X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d68a949dff65b8f40e4d372364e7ff8feba152a..a5664fd6ef32c7e7432a9213ad8a8f9550460fbf:/interface/wx/dataview.h?ds=sidebyside diff --git a/interface/wx/dataview.h b/interface/wx/dataview.h index f02803df96..13df37997b 100644 --- a/interface/wx/dataview.h +++ b/interface/wx/dataview.h @@ -100,7 +100,7 @@ public: @since 2.9.1 - @param variable + @param variant The new value. @param item The item (row) to update. @@ -1114,6 +1114,7 @@ enum wxDataViewCellRenderState - wxDataViewBitmapRenderer, - wxDataViewDateRenderer, - wxDataViewSpinRenderer. + - wxDataViewChoiceRenderer. Additionally, the user can write own renderers by deriving from wxDataViewCustomRenderer. @@ -1353,6 +1354,38 @@ public: }; +/** + @class wxDataViewChoiceRenderer + + This class is used by wxDataViewCtrl to render choice controls. + It stores a string so that SetValue() and GetValue() operate + on a variant holding a string. + + @library{wxadv} + @category{dvc} +*/ + +class wxDataViewChoiceRenderer: public wxDataViewRenderer +{ +public: + /** + The ctor. + */ + wxDataViewChoiceRenderer( const wxArrayString &choices, + wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, + int alignment = wxDVR_DEFAULT_ALIGNMENT ); + + /** + Returns the choice referred to by index. + */ + wxString GetChoice(size_t index) const; + + /** + Returns all choices. + */ + const wxArrayString& GetChoices() const; +}; + /** @class wxDataViewDateRenderer