|
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 |
| void | OnTextChange (wxCommandEvent &event) |
| 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 |
| wxGrid * | m_grid |
| 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 204 of file grid_text_button_helpers.h.
|
inline |
Definition at line 207 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 506 of file grid_text_helpers.cpp.
References m_value.
Referenced by OnTextChange().
|
override |
Definition at line 557 of file grid_text_button_helpers.cpp.
References GRID_CELL_TEXT_BUTTON::BeginEdit(), m_col, and m_row.
|
inlineoverride |
Definition at line 217 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 150 of file grid_text_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(), OnTextChange(), Reset(), and StartingKey().
|
override |
Definition at line 540 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 485 of file grid_text_helpers.cpp.
References Combo(), m_col, m_grid, m_row, m_value, and OnTextChange().
|
overrideinherited |
Definition at line 386 of file grid_text_helpers.cpp.
References Combo().
|
inlinevirtualinherited |
Definition at line 157 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().
|
inherited |
Definition at line 473 of file grid_text_helpers.cpp.
References ApplyEdit(), Combo(), m_col, m_grid, m_row, and m_value.
Referenced by BeginEdit(), and EndEdit().
|
overrideinherited |
Definition at line 512 of file grid_text_helpers.cpp.
|
overrideinherited |
Definition at line 392 of file grid_text_helpers.cpp.
References WX_GRID::CellEditorTransformSizeRect().
|
overrideinherited |
Definition at line 401 of file grid_text_helpers.cpp.
References Combo().
|
protectedinherited |
References GRID_CELL_TEXT_BUTTON().
|
protected |
Definition at line 229 of file grid_text_button_helpers.h.
Referenced by BeginEdit(), Create(), and GRID_CELL_RUN_FUNCTION_EDITOR().
|
protected |
Definition at line 227 of file grid_text_button_helpers.h.
Referenced by Clone(), Create(), and GRID_CELL_RUN_FUNCTION_EDITOR().
|
protected |
Definition at line 230 of file grid_text_button_helpers.h.
Referenced by Clone(), Create(), and GRID_CELL_RUN_FUNCTION_EDITOR().
|
protectedinherited |
Definition at line 157 of file grid_text_helpers.h.
Referenced by BeginEdit(), EndEdit(), GRID_CELL_TEXT_BUTTON(), and OnTextChange().
|
protectedinherited |
Definition at line 160 of file grid_icon_text_helpers.h.
Referenced by GRID_CELL_NULLABLE_INTERFACE(), GRID_CELL_NULLABLE_INTERFACE(), and IsNullable().
|
protected |
Definition at line 228 of file grid_text_button_helpers.h.
Referenced by BeginEdit(), Create(), and GRID_CELL_RUN_FUNCTION_EDITOR().
|
protectedinherited |
Definition at line 160 of file grid_text_helpers.h.
Referenced by ApplyEdit(), BeginEdit(), EndEdit(), OnTextChange(), and Reset().