X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a7f61f762d284fb33d12d3b2e69f05675ab675c4..ad63bf413b716c673804ab7ef957d90731f8f839:/include/wx/gtk/dataview.h diff --git a/include/wx/gtk/dataview.h b/include/wx/gtk/dataview.h index e1e1fab2cc..1dd168ddb7 100644 --- a/include/wx/gtk/dataview.h +++ b/include/wx/gtk/dataview.h @@ -58,6 +58,74 @@ protected: DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextCell) }; +// --------------------------------------------------------- +// wxDataViewToggleCell +// --------------------------------------------------------- + +class wxDataViewToggleCell: public wxDataViewCell +{ +public: + wxDataViewToggleCell( const wxString &varianttype = wxT("bool"), + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT ); + + bool SetValue( const wxVariant &value ); + bool GetValue( wxVariant &value ); + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewToggleCell) +}; + +// --------------------------------------------------------- +// wxDataViewCustomCell +// --------------------------------------------------------- + +class wxDataViewCustomCell: public wxDataViewCell +{ +public: + wxDataViewCustomCell( const wxString &varianttype = wxT("string"), + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + bool no_init = false ); + ~wxDataViewCustomCell(); + bool Init(); + + virtual bool Render( wxRect cell, wxDC *dc, int state ) = 0; + virtual wxSize GetSize() = 0; + + // Create DC on request + virtual wxDC *GetDC(); + +private: + wxDC *m_dc; + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomCell) +}; + +// --------------------------------------------------------- +// wxDataViewProgressCell +// --------------------------------------------------------- + +class wxDataViewProgressCell: public wxDataViewCustomCell +{ +public: + wxDataViewProgressCell( const wxString &label = wxEmptyString, + const wxString &varianttype = wxT("long"), + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT ); + ~wxDataViewProgressCell(); + + bool SetValue( const wxVariant &value ); + + virtual bool Render( wxRect cell, wxDC *dc, int state ); + virtual wxSize GetSize(); + +private: + wxString m_label; + int m_value; + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressCell) +}; + // --------------------------------------------------------- // wxDataViewColumn // ---------------------------------------------------------