X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fa03f04345b620d1a14529b05961116b20a1297..55079b432bf9e46f9b19efa71462b32022ffcf5e:/include/wx/generic/grid.h diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index cdca4984ef..e9b5dbb0c2 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -547,6 +547,7 @@ public: virtual void Reset(); virtual void StartingClick(); + virtual void StartingKey(wxKeyEvent& event); virtual wxGridCellEditor *Clone() const { return new wxGridCellBoolEditor; } @@ -712,6 +713,14 @@ public: 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 { @@ -730,12 +739,6 @@ private: // 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; @@ -1327,7 +1330,7 @@ public: // 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 @@ -1929,6 +1932,7 @@ protected: void OnSize( wxSizeEvent& ); void OnKeyDown( wxKeyEvent& ); void OnKeyUp( wxKeyEvent& ); + void OnChar( wxKeyEvent& ); void OnEraseBackground( wxEraseEvent& ); @@ -2133,16 +2137,16 @@ typedef void (wxEvtHandler::*wxGridRangeSelectEventFunction)(wxGridRangeSelectEv 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))