KiCad PCB EDA Suite
|
A cell editor which runs a provided function when the grid cell button is clicked. More...
#include <grid_text_button_helpers.h>
Public Member Functions | |
GRID_CELL_RUN_FUNCTION_EDITOR (DIALOG_SHIM *aParent, const std::function< void(int, int)> aFunction, const bool aIsNullable=false) | |
wxGridCellEditor * | Clone () const override |
void | Create (wxWindow *aParent, wxWindowID aId, wxEvtHandler *aEventHandler) override |
void | BeginEdit (int aRow, int aCol, wxGrid *aGrid) override |
wxString | GetValue () const override |
void | SetSize (const wxRect &aRect) override |
void | StartingKey (wxKeyEvent &event) override |
bool | EndEdit (int, int, const wxGrid *, const wxString &, wxString *aNewVal) override |
void | ApplyEdit (int aRow, int aCol, wxGrid *aGrid) override |
void | Reset () override |
virtual bool | IsNullable () const |
Protected Member Functions | |
wxComboCtrl * | Combo () const |
wxDECLARE_NO_COPY_CLASS (GRID_CELL_TEXT_BUTTON) | |
Protected Attributes | |
DIALOG_SHIM * | m_dlg |
int | m_row |
int | m_col |
std::function< void(int, int)> | m_function |
wxString | m_value |
bool | m_isNullable { false } |
A cell editor which runs a provided function when the grid cell button is clicked.
The function has the signature (int, int) -> void. The passed parameters are the (row, col) of the clicked grid cell
Definition at line 233 of file grid_text_button_helpers.h.
|
inline |
Definition at line 236 of file grid_text_button_helpers.h.
References GRID_CELL_NULLABLE_INTERFACE::GRID_CELL_NULLABLE_INTERFACE(), m_col, m_dlg, m_function, and m_row.
Referenced by Clone().
|
overrideinherited |
Definition at line 153 of file grid_text_button_helpers.cpp.
References m_value.
|
override |
Definition at line 672 of file grid_text_button_helpers.cpp.
References GRID_CELL_TEXT_BUTTON::BeginEdit(), m_col, and m_row.
|
inlineoverride |
Definition at line 246 of file grid_text_button_helpers.h.
References GRID_CELL_RUN_FUNCTION_EDITOR(), GRID_CELL_NULLABLE_INTERFACE::IsNullable(), m_dlg, and m_function.
|
inlineprotectedinherited |
Definition at line 63 of file grid_text_button_helpers.h.
Referenced by BeginEdit(), GRID_CELL_FPID_EDITOR::Create(), GRID_CELL_PATH_EDITOR::Create(), GRID_CELL_RUN_FUNCTION_EDITOR::Create(), GRID_CELL_SYMBOL_ID_EDITOR::Create(), GRID_CELL_URL_EDITOR::Create(), EndEdit(), GetValue(), Reset(), and StartingKey().
|
override |
Definition at line 655 of file grid_text_button_helpers.cpp.
References WX_GRID::CellEditorSetMargins(), GRID_CELL_TEXT_BUTTON::Combo(), m_col, m_dlg, m_function, and m_row.
|
overrideinherited |
Definition at line 137 of file grid_text_button_helpers.cpp.
|
overrideinherited |
Definition at line 57 of file grid_text_button_helpers.cpp.
References Combo().
|
inlinevirtualinherited |
Definition at line 156 of file grid_icon_text_helpers.h.
References m_isNullable.
Referenced by GRID_CELL_MARK_AS_NULLABLE::Clone(), and GRID_CELL_RUN_FUNCTION_EDITOR::Clone().
|
overrideinherited |
Definition at line 159 of file grid_text_button_helpers.cpp.
|
overrideinherited |
Definition at line 63 of file grid_text_button_helpers.cpp.
References WX_GRID::CellEditorTransformSizeRect().
|
overrideinherited |
Definition at line 72 of file grid_text_button_helpers.cpp.
References Combo().
|
protectedinherited |
References GRID_CELL_TEXT_BUTTON().
|
protected |
Definition at line 258 of file grid_text_button_helpers.h.
Referenced by BeginEdit(), Create(), and GRID_CELL_RUN_FUNCTION_EDITOR().
|
protected |
Definition at line 256 of file grid_text_button_helpers.h.
Referenced by Clone(), Create(), and GRID_CELL_RUN_FUNCTION_EDITOR().
|
protected |
Definition at line 259 of file grid_text_button_helpers.h.
Referenced by Clone(), Create(), and GRID_CELL_RUN_FUNCTION_EDITOR().
|
protectedinherited |
Definition at line 159 of file grid_icon_text_helpers.h.
Referenced by GRID_CELL_NULLABLE_INTERFACE(), GRID_CELL_NULLABLE_INTERFACE(), and IsNullable().
|
protected |
Definition at line 257 of file grid_text_button_helpers.h.
Referenced by BeginEdit(), Create(), and GRID_CELL_RUN_FUNCTION_EDITOR().
|
protectedinherited |
Definition at line 69 of file grid_text_button_helpers.h.
Referenced by ApplyEdit(), BeginEdit(), EndEdit(), and Reset().