X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fa03f04345b620d1a14529b05961116b20a1297..66e9a9f0ae9cccd52b1a8f9828a3e054803fefb6:/include/wx/generic/grid.h diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index cdca4984ef..7c4de9a29f 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; } @@ -695,6 +696,7 @@ public: 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; @@ -712,6 +714,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 +740,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 +1331,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 +1933,7 @@ protected: void OnSize( wxSizeEvent& ); void OnKeyDown( wxKeyEvent& ); void OnKeyUp( wxKeyEvent& ); + void OnChar( wxKeyEvent& ); void OnEraseBackground( wxEraseEvent& ); @@ -2133,16 +2138,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))