X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a7f61f762d284fb33d12d3b2e69f05675ab675c4..4d496ecbc48803b41b33e57d331895df5bfc7f56:/src/common/datavcmn.cpp?ds=sidebyside diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index e3f74ccac1..109b136e9a 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -15,6 +15,10 @@ #pragma hdrstop #endif +#include "wx/defs.h" + +#if wxUSE_DATAVIEWCTRL + #include "wx/object.h" #include "wx/dataview.h" #include "wx/log.h" @@ -189,11 +193,26 @@ wxDataViewListModel* wxDataViewCtrlBase::GetModel() return m_model; } -bool wxDataViewCtrlBase::AppendStringColumn( const wxString &label, size_t model_column ) +bool wxDataViewCtrlBase::AppendTextColumn( const wxString &label, size_t model_column ) { return AppendColumn( new wxDataViewColumn( label, new wxDataViewTextCell(), model_column ) ); } +bool wxDataViewCtrlBase::AppendToggleColumn( const wxString &label, size_t model_column ) +{ + return AppendColumn( new wxDataViewColumn( label, new wxDataViewToggleCell(), model_column ) ); +} + +bool wxDataViewCtrlBase::AppendProgressColumn( const wxString &label, size_t model_column ) +{ + return AppendColumn( new wxDataViewColumn( label, new wxDataViewProgressCell(), model_column ) ); +} + +bool wxDataViewCtrlBase::AppendDateColumn( const wxString &label, size_t model_column ) +{ + return AppendColumn( new wxDataViewColumn( label, new wxDataViewDateCell(), model_column ) ); +} + bool wxDataViewCtrlBase::AppendColumn( wxDataViewColumn *col ) { m_cols.Append( (wxObject*) col ); @@ -221,3 +240,4 @@ wxDataViewColumn* wxDataViewCtrlBase::GetColumn( size_t pos ) return (wxDataViewColumn*) m_cols[ pos ]; } +#endif