NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
This class represents the grid cell editor which automatically selects the necessary edit control for the underlying column data type. More...
#include <cellattributes.hpp>
Public Member Functions | |
CombinedCellEditor (wxGrid *grid) | |
Construct this editor for the current wxGrid. More... | |
virtual void | Create (wxWindow *parent, wxWindowID id, wxEvtHandler *evtHandler) override |
Create the necessary edit controls. More... | |
virtual void | SetSize (const wxRect &_rect) override |
Set size and position of the controls. More... | |
virtual void | PaintBackground (wxDC &dc, const wxRect &rectCell, const wxGridCellAttr &attr) override |
Paint the background. More... | |
virtual bool | IsAcceptedKey (wxKeyEvent &event) override |
Determine, whether the pressed key is accepted by this editor and will start the editing process. More... | |
virtual void | BeginEdit (int row, int col, wxGrid *grid) override |
Begin the editing process. Will select the correct edit control depending on the underlying column data type. More... | |
virtual bool | EndEdit (int row, int col, const wxGrid *grid, const wxString &oldval, wxString *newval) override |
End the editing process. Will store the value of the edit control internally and reset the edit control to its original state. More... | |
virtual void | ApplyEdit (int row, int col, wxGrid *grid) override |
Called after EndEdit if the user did not cancel the process and will store the value in the correct cell. More... | |
virtual void | Reset () override |
Reset the control to its initial state. More... | |
virtual void | StartingClick () override |
Called after BeginEdit if the user clicked on this cell to handle the click event. More... | |
virtual void | StartingKey (wxKeyEvent &event) override |
Called after BeginEdit to give this control the possibility to respond to the initial key. More... | |
virtual void | HandleReturn (wxKeyEvent &event) override |
We do not handle the return key as a character. More... | |
virtual wxGridCellEditor * | Clone () const override |
Get a copy of this editor instance. More... | |
virtual wxString | GetValue () const override |
Get the value stored in this editor. More... | |
virtual void | Show (bool show, wxGridCellAttr *attr=nullptr) override |
Show or hide the edit control. Will in fact only hide the controls. Showing them is done in BeginEdit. More... | |
Protected Member Functions | |
void | SetTextCtrlSize (const wxRect &_rect) |
Set the size and position of the text control and the combo box. More... | |
void | SetCheckBoxSize (const wxRect &_rect) |
Set size and position of the check box. More... | |
void | OnEnterKey (wxCommandEvent &event) |
Respond to ENTER key events created by the combo box control. More... | |
void | finalize (bool moveCursor) |
Inform the grid to finalize the editing process. More... | |
Protected Attributes | |
wxTextCtrl * | m_text |
wxCheckBox * | m_checkBox |
wxComboBox * | m_comboBox |
wxGrid * | m_grid |
wxString | m_value |
bool | m_finished |
This class represents the grid cell editor which automatically selects the necessary edit control for the underlying column data type.
Definition at line 319 of file cellattributes.hpp.
|
inline |
Construct this editor for the current wxGrid.
grid | wxGrid* |
Definition at line 329 of file cellattributes.hpp.
Referenced by Clone().
|
inlineoverridevirtual |
Called after EndEdit if the user did not cancel the process and will store the value in the correct cell.
row | int |
col | int |
grid | wxGrid* |
Definition at line 581 of file cellattributes.hpp.
References m_value.
|
inlineoverridevirtual |
Begin the editing process. Will select the correct edit control depending on the underlying column data type.
row | int |
col | int |
grid | wxGrid* |
Definition at line 430 of file cellattributes.hpp.
References GridNumeReTable::getCategories(), GridNumeReTable::getColumnTypes(), GridNumeReTable::GetValue(), m_checkBox, m_comboBox, m_finished, m_text, m_value, Reset(), TableColumn::TYPE_CATEGORICAL, and TableColumn::TYPE_LOGICAL.
|
inlineoverridevirtual |
Get a copy of this editor instance.
Definition at line 750 of file cellattributes.hpp.
References CombinedCellEditor(), and m_grid.
|
inlineoverridevirtual |
Create the necessary edit controls.
parent | wxWindow* |
id | wxWindowID |
evtHandler | wxEvtHandler* |
Definition at line 340 of file cellattributes.hpp.
References m_checkBox, m_comboBox, m_text, and OnEnterKey().
|
inlineoverridevirtual |
End the editing process. Will store the value of the edit control internally and reset the edit control to its original state.
row | int |
col | int |
grid | const wxGrid* |
oldval | const wxString& |
newval | wxString* |
Definition at line 519 of file cellattributes.hpp.
References m_checkBox, m_comboBox, m_finished, m_text, m_value, and toString().
|
inlineprotected |
Inform the grid to finalize the editing process.
moveCursor | bool |
Definition at line 934 of file cellattributes.hpp.
References m_grid.
Referenced by OnEnterKey(), and StartingClick().
|
inlineoverridevirtual |
Get the value stored in this editor.
Definition at line 761 of file cellattributes.hpp.
References m_value.
|
inlineoverridevirtual |
We do not handle the return key as a character.
event | wxKeyEvent& |
Definition at line 739 of file cellattributes.hpp.
|
inlineoverridevirtual |
Determine, whether the pressed key is accepted by this editor and will start the editing process.
event | wxKeyEvent& |
Definition at line 403 of file cellattributes.hpp.
|
inlineprotected |
Respond to ENTER key events created by the combo box control.
event | wxCommandEvent& |
Definition at line 921 of file cellattributes.hpp.
References finalize().
Referenced by Create().
|
inlineoverridevirtual |
Paint the background.
dc | wxDC& |
rectCell | const wxRect& |
attr | const wxGridCellAttr& |
Definition at line 389 of file cellattributes.hpp.
|
inlineoverridevirtual |
Reset the control to its initial state.
Definition at line 593 of file cellattributes.hpp.
References m_checkBox, m_comboBox, m_text, and m_value.
Referenced by BeginEdit(), and StartingKey().
|
inlineprotected |
Set size and position of the check box.
_rect | const wxRect& |
Definition at line 854 of file cellattributes.hpp.
References m_checkBox.
Referenced by SetSize().
|
inlineoverridevirtual |
Set size and position of the controls.
_rect | const wxRect& |
Definition at line 374 of file cellattributes.hpp.
References SetCheckBoxSize(), and SetTextCtrlSize().
|
inlineprotected |
Set the size and position of the text control and the combo box.
_rect | const wxRect& |
Definition at line 809 of file cellattributes.hpp.
References m_comboBox, and m_text.
Referenced by SetSize().
|
inlineoverridevirtual |
Show or hide the edit control. Will in fact only hide the controls. Showing them is done in BeginEdit.
show | bool |
attr | wxGridCellAttr* |
Definition at line 776 of file cellattributes.hpp.
References m_checkBox, m_comboBox, and m_text.
|
inlineoverridevirtual |
Called after BeginEdit if the user clicked on this cell to handle the click event.
Definition at line 617 of file cellattributes.hpp.
References finalize(), and m_checkBox.
|
inlineoverridevirtual |
Called after BeginEdit to give this control the possibility to respond to the initial key.
event | wxKeyEvent& |
Definition at line 635 of file cellattributes.hpp.
References m_checkBox, m_comboBox, m_text, m_value, Reset(), and StartingKey().
Referenced by StartingKey().
|
protected |
Definition at line 795 of file cellattributes.hpp.
Referenced by BeginEdit(), Create(), EndEdit(), Reset(), SetCheckBoxSize(), Show(), StartingClick(), and StartingKey().
|
protected |
Definition at line 796 of file cellattributes.hpp.
Referenced by BeginEdit(), Create(), EndEdit(), Reset(), SetTextCtrlSize(), Show(), and StartingKey().
|
protected |
Definition at line 799 of file cellattributes.hpp.
Referenced by BeginEdit(), and EndEdit().
|
protected |
Definition at line 797 of file cellattributes.hpp.
Referenced by Clone(), and finalize().
|
protected |
Definition at line 794 of file cellattributes.hpp.
Referenced by BeginEdit(), Create(), EndEdit(), Reset(), SetTextCtrlSize(), Show(), and StartingKey().
|
protected |
Definition at line 798 of file cellattributes.hpp.
Referenced by ApplyEdit(), BeginEdit(), EndEdit(), GetValue(), Reset(), and StartingKey().