friend class wxGridCellEditorDummyFriend;
};
+#if wxUSE_TEXTCTRL
+
// the editor for string/text data
class WXDLLEXPORT wxGridCellTextEditor : public wxGridCellEditor
{
double m_valueOld;
};
+#endif // wxUSE_TEXTCTRL
+
+#if wxUSE_CHECKBOX
+
// the editor for boolean data
class WXDLLEXPORT wxGridCellBoolEditor : public wxGridCellEditor
{
bool m_startValue;
};
+#endif // wxUSE_CHECKBOX
+
+#if wxUSE_COMBOBOX
+
// the editor for string data allowing to choose from the list of strings
class WXDLLEXPORT wxGridCellChoiceEditor : public wxGridCellEditor
{
bool m_allowOthers;
};
+#endif // wxUSE_COMBOBOX
+
// ----------------------------------------------------------------------------
// wxGridCellAttr: this class can be used to alter the cells appearance in
// the grid by changing their colour/font/... from default. An object of this
};
// ctors
- wxGridCellAttr()
+ wxGridCellAttr(wxGridCellAttr *attrDefault = NULL)
{
- Init();
+ Init(attrDefault);
+
// MB: args used to be 0,0 here but wxALIGN_LEFT is 0
SetAlignment(-1, -1);
}
};
// the common part of all ctors
- void Init()
- {
- m_nRef = 1;
-
- m_isReadOnly = Unset;
-
- m_renderer = NULL;
- m_editor = NULL;
-
- m_attrkind = wxGridCellAttr::Cell;
- }
+ void Init(wxGridCellAttr *attrDefault = NULL);
// the dtor is private because only DecRef() can delete us
~wxGridCellAttr()
{
m_extraWidth = extraWidth;
m_extraHeight = extraHeight;
+
+ CalcDimensions();
}
// Accessors for component windows
bool Redimension( wxGridTableMessage& );
- bool SendEvent( const wxEventType, int row, int col, wxMouseEvent& );
- bool SendEvent( const wxEventType, int row, int col );
- bool SendEvent( const wxEventType type)
+ int SendEvent( const wxEventType, int row, int col, wxMouseEvent& );
+ int SendEvent( const wxEventType, int row, int col );
+ int SendEvent( const wxEventType type)
{
return SendEvent(type,
m_currentCellCoords.GetRow(),