X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/66c02e6e33fe3afee6b67a7e060a695787515650..1d12c6e2be99ae9e7d9a75ba2540ebec7449c92e:/include/wx/dvrenderers.h diff --git a/include/wx/dvrenderers.h b/include/wx/dvrenderers.h index c05c109522..248e4af121 100644 --- a/include/wx/dvrenderers.h +++ b/include/wx/dvrenderers.h @@ -333,11 +333,33 @@ public: virtual bool SetValue( const wxVariant &value ); virtual bool GetValue( wxVariant &value ) const; + wxString GetChoice(size_t index) const { return m_choices[index]; } + const wxArrayString& GetChoices() const { return m_choices; } + private: wxArrayString m_choices; wxString m_data; }; +// ---------------------------------------------------------------------------- +// wxDataViewChoiceByIndexRenderer +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewChoiceByIndexRenderer: public wxDataViewChoiceRenderer +{ +public: + wxDataViewChoiceByIndexRenderer( const wxArrayString &choices, + wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, + int alignment = wxDVR_DEFAULT_ALIGNMENT ); + + virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ); + virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value ); + + virtual bool SetValue( const wxVariant &value ); + virtual bool GetValue( wxVariant &value ) const; +}; + + #endif // generic or Carbon versions // this class is obsolete, its functionality was merged in