virtual void Reset();
virtual void StartingClick();
+ virtual void StartingKey(wxKeyEvent& event);
virtual wxGridCellEditor *Clone() const
{ return new wxGridCellBoolEditor; }
bool HasEditor() const { return m_editor != NULL; }
bool HasReadWriteMode() const { return m_isReadOnly != Unset; }
bool HasOverflowMode() const { return m_overflow != UnsetOverflow; }
+ bool HasSize() const { return m_sizeRows != 1 || m_sizeCols != 1; }
const wxColour& GetTextColour() const;
const wxColour& GetBackgroundColour() const;
void SetDefAttr(wxGridCellAttr* defAttr) { m_defGridAttr = defAttr; }
+protected:
+ // the dtor is private because only DecRef() can delete us
+ virtual ~wxGridCellAttr()
+ {
+ wxSafeDecRef(m_renderer);
+ wxSafeDecRef(m_editor);
+ }
+
private:
enum wxAttrReadMode
{
// the common part of all ctors
void Init(wxGridCellAttr *attrDefault = NULL);
- // the dtor is private because only DecRef() can delete us
- ~wxGridCellAttr()
- {
- wxSafeDecRef(m_renderer);
- wxSafeDecRef(m_editor);
- }
// the ref count - when it goes to 0, we die
size_t m_nRef;
// DecRef() must be called on the returned pointer, as usual
wxGridCellAttr *GetOrCreateCellAttr(int row, int col) const;
-
+
// shortcuts for setting the column parameters
// set the format for the data in the column: default is string
void OnSize( wxSizeEvent& );
void OnKeyDown( wxKeyEvent& );
void OnKeyUp( wxKeyEvent& );
+ void OnChar( wxKeyEvent& );
void OnEraseBackground( wxEraseEvent& );
typedef void (wxEvtHandler::*wxGridEditorCreatedEventFunction)(wxGridEditorCreatedEvent&);
#define wxGridEventHandler(func) \
- (wxObjectEventFunction)wxStaticCastEvent(wxGridEventFunction, &func)
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxGridEventFunction, &func)
#define wxGridSizeEventHandler(func) \
- (wxObjectEventFunction)wxStaticCastEvent(wxGridSizeEventFunction, &func)
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxGridSizeEventFunction, &func)
#define wxGridRangeSelectEventHandler(func) \
- (wxObjectEventFunction)wxStaticCastEvent(wxGridRangeSelectEventFunction, &func)
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxGridRangeSelectEventFunction, &func)
#define wxGridEditorCreatedEventHandler(func) \
- (wxObjectEventFunction)wxStaticCastEvent(wxGridEditorCreatedEventFunction, &func)
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxGridEditorCreatedEventFunction, &func)
#define wx__DECLARE_GRIDEVT(evt, id, fn) \
wx__DECLARE_EVT1(wxEVT_GRID_ ## evt, id, wxGridEventHandler(fn))