Refactor wxGridCellBoolEditor to make some functions reusable
No real changes, just factor out code for getting and setting the grid cell value as bool from {Begin,Apply}Edit() to {Get,Set}GridValue() to make it possible to reuse these functions in the upcoming commits. This commit is best viewed with the --color-moved option.
This commit is contained in:
@@ -275,6 +275,15 @@ protected:
|
||||
wxCheckBox *CBox() const { return (wxCheckBox *)m_control; }
|
||||
|
||||
private:
|
||||
// These functions modify or use m_value.
|
||||
void SetValueFromGrid(int row, int col, wxGrid* grid);
|
||||
void SetGridFromValue(int row, int col, wxGrid* grid) const;
|
||||
|
||||
wxString GetStringValue() const { return GetStringValue(m_value); }
|
||||
|
||||
static
|
||||
wxString GetStringValue(bool value) { return ms_stringValues[value]; }
|
||||
|
||||
bool m_value;
|
||||
|
||||
static wxString ms_stringValues[2];
|
||||
|
Reference in New Issue
Block a user