X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d2425a43ec49de87bf97403ca16fb41cdd8a0bc4..9bd5c5fcda3fe2222bf37f1615961516d6b40e7f:/include/wx/generic/dvrenderers.h diff --git a/include/wx/generic/dvrenderers.h b/include/wx/generic/dvrenderers.h index dc1bc24f7f..a5dc8c09b0 100644 --- a/include/wx/generic/dvrenderers.h +++ b/include/wx/generic/dvrenderers.h @@ -26,21 +26,13 @@ public: // see the explanation of the following WXOnXXX() methods in wx/generic/dvrenderer.h - virtual bool WXOnActivate(wxRect cell, - wxDataViewModel *model, - const wxDataViewItem& item, - unsigned int col) + virtual bool WXActivateCell(const wxRect& cell, + wxDataViewModel *model, + const wxDataViewItem& item, + unsigned int col, + const wxMouseEvent *mouseEvent) { - return Activate(cell, model, item, col); - } - - virtual bool WXOnLeftClick(wxPoint cursor, - wxRect cell, - wxDataViewModel *model, - const wxDataViewItem &item, - unsigned int col) - { - return LeftClick(cursor, cell, model, item, col); + return ActivateCell(cell, model, item, col, mouseEvent); } private: @@ -67,9 +59,9 @@ public: // in-place editing virtual bool HasEditorCtrl() const; - virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, - const wxVariant &value ); - virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value ); + virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, + const wxVariant &value ); + virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value ); protected: wxString m_text; @@ -121,11 +113,11 @@ public: wxSize GetSize() const; // Implementation only, don't use nor override - virtual bool WXOnLeftClick(wxPoint cursor, - wxRect cell, - wxDataViewModel *model, - const wxDataViewItem& item, - unsigned int col); + virtual bool WXActivateCell(const wxRect& cell, + wxDataViewModel *model, + const wxDataViewItem& item, + unsigned int col, + const wxMouseEvent *mouseEvent); private: bool m_toggle; @@ -177,9 +169,9 @@ public: virtual wxSize GetSize() const; virtual bool HasEditorCtrl() const { return true; } - virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, - const wxVariant &value ); - virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value ); + virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, + const wxVariant &value ); + virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value ); private: wxDataViewIconText m_value; @@ -188,36 +180,5 @@ protected: DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewIconTextRenderer) }; -// --------------------------------------------------------- -// wxDataViewDateRenderer -// --------------------------------------------------------- - -class WXDLLIMPEXP_ADV wxDataViewDateRenderer: public wxDataViewRenderer -{ -public: - wxDataViewDateRenderer( const wxString &varianttype = wxT("datetime"), - wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, - int align = wxDVR_DEFAULT_ALIGNMENT ); - - bool SetValue( const wxVariant &value ); - bool GetValue( wxVariant& value ) const; - - virtual bool Render( wxRect cell, wxDC *dc, int state ); - virtual wxSize GetSize() const; - - // Implementation only, don't use nor override - virtual bool WXOnActivate(wxRect cell, - wxDataViewModel *model, - const wxDataViewItem& item, - unsigned int col); - -private: - wxDateTime m_date; - -protected: - DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewDateRenderer) -}; - - #endif // _WX_GENERIC_DVRENDERERS_H_