]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dvrenderers.h
Allow specifying non default port for wxFTP connections.
[wxWidgets.git] / include / wx / dvrenderers.h
index a534f76d8f5e06ce904782668a6607c6aef0b6db..5b0ef20910d39517c1554b662b850e17e87da649 100644 (file)
@@ -3,7 +3,7 @@
 // Purpose:     Declare all wxDataViewCtrl classes
 // Author:      Robert Roebling, Vadim Zeitlin
 // Created:     2009-11-08 (extracted from wx/dataview.h)
-// RCS-ID:      $Id: wxhead.h,v 1.11 2009-06-29 10:23:04 zeitlin Exp $
+// RCS-ID:      $Id$
 // Copyright:   (c) 2006 Robert Roebling
 //              (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
@@ -154,6 +154,9 @@ public:
     wxControl *GetEditorCtrl() { return m_editorCtrl; }
 
 protected:
+    // Called from {Cancel,Finish}Editing() to cleanup m_editorCtrl
+    void DestroyEditControl();
+
     wxString                m_variantType;
     wxDataViewColumn       *m_owner;
     wxWeakRef<wxControl>    m_editorCtrl;
@@ -330,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