X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f71d3ba46cb50237ef024478b01c0dd99468da77..8e4b5265cdd7aeea67c85eb0f50186641f09f7d8:/include/wx/gtk/dataview.h diff --git a/include/wx/gtk/dataview.h b/include/wx/gtk/dataview.h index b84a7f4f8a..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 @@ -275,6 +305,8 @@ protected: DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumn) }; +WX_DECLARE_LIST(wxDataViewColumn, wxDataViewColumnList ); + // --------------------------------------------------------- // wxDataViewCtrl // --------------------------------------------------------- @@ -305,7 +337,15 @@ public: const wxValidator& validator = wxDefaultValidator ); virtual bool AssociateModel( wxDataViewModel *model ); + virtual bool AppendColumn( wxDataViewColumn *col ); + virtual unsigned int GetColumnCount() const; + 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; @@ -346,6 +386,7 @@ private: GtkWidget *m_treeview; wxDataViewModelNotifier *m_notifier; wxDataViewCtrlInternal *m_internal; + wxDataViewColumnList m_cols; virtual void OnInternalIdle();