]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dvrenderers.h
Avoid id clashes
[wxWidgets.git] / include / wx / dvrenderers.h
index c05c109522b8db5ecff17c06ab6394021e575248..248e4af121cc21367a93bbdaa6deaa56029ea2ca 100644 (file)
@@ -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