X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/91a6c655582321b61a7545ed9c121ad6593ccbfe..6a6ea041d96f19c89c0f68741502f08e5cee97ec:/include/wx/gtk/dataview.h diff --git a/include/wx/gtk/dataview.h b/include/wx/gtk/dataview.h index e4df649926..bbb7f6b7e8 100644 --- a/include/wx/gtk/dataview.h +++ b/include/wx/gtk/dataview.h @@ -180,6 +180,35 @@ protected: DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressRenderer) }; +// --------------------------------------------------------- +// wxDataViewIconTextRenderer +// --------------------------------------------------------- + +class wxDataViewIconTextRenderer: public wxDataViewCustomRenderer +{ +public: + wxDataViewIconTextRenderer( const wxString &varianttype = wxT("wxDataViewIconText"), + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); + virtual ~wxDataViewIconTextRenderer(); + + bool SetValue( const wxVariant &value ); + bool GetValue( wxVariant &value ) const; + + virtual bool Render( wxRect cell, wxDC *dc, int state ); + virtual wxSize GetSize() const; + + virtual bool HasEditorCtrl() { return true; } + virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ); + virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value ); + +private: + wxDataViewIconText m_value; + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewIconTextRenderer) +}; + // --------------------------------------------------------- // wxDataViewDateRenderer // --------------------------------------------------------- @@ -259,6 +288,7 @@ public: // implementation GtkWidget* GetGtkHandle() { return m_column; } + GtkWidget* GetConstGtkHandle() const { return m_column; } private: // holds the GTK handle @@ -313,6 +343,9 @@ public: virtual wxDataViewColumn* GetColumn( unsigned int pos ) const; virtual bool DeleteColumn( wxDataViewColumn *column ); virtual bool ClearColumns(); + virtual int GetColumnPosition( const wxDataViewColumn *column ) const; + + virtual wxDataViewColumn *GetSortingColumn() const; virtual wxDataViewItem GetSelection() const; virtual int GetSelections( wxDataViewItemArray & sel ) const;