+ void PrependColumn( wxDataViewColumn *column, const wxString &varianttype );
+
+ //@}
+
+
+ /**
+ @name Item management functions
+ */
+ //@{
+
+ /**
+ Appends an item (=row) to the control and store.
+ */
+ void AppendItem( const wxVector<wxVariant> &values, wxUIntPtr data = NULL );
+
+ /**
+ Prepends an item (=row) to the control and store.
+ */
+ void PrependItem( const wxVector<wxVariant> &values, wxUIntPtr data = NULL );
+
+ /**
+ Inserts an item (=row) to the control and store.
+ */
+ void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxUIntPtr data = NULL );
+
+ /**
+ Delete the row at position @a row.
+ */
+ void DeleteItem( unsigned row );
+
+ /**
+ Delete all items (= all rows).
+ */
+ void DeleteAllItems();
+
+ /**
+ Returns the number of items (=rows) in the control
+
+ @since 2.9.4
+ */
+ unsigned int GetItemCount() const;
+
+ /**
+ Returns the client data associated with the item.
+
+ @see SetItemData()
+
+ @since 2.9.4
+ */
+ wxUIntPtr GetItemData(const wxDataViewItem& item) const;
+
+ /**
+ Sets the value in the store and update the control.
+ */
+ void SetValue( const wxVariant &value, unsigned int row, unsigned int col );
+
+ /**
+ Returns the value from the store.
+ */
+ void GetValue( wxVariant &value, unsigned int row, unsigned int col );
+
+ /**
+ Sets the value in the store and update the control.
+
+ This method assumes that the string is stored in respective
+ column.
+ */
+ void SetTextValue( const wxString &value, unsigned int row, unsigned int col );
+
+ /**
+ Returns the value from the store.
+
+ This method assumes that the string is stored in respective
+ column.
+ */
+ wxString GetTextValue( unsigned int row, unsigned int col ) const;
+
+ /**
+ Sets the value in the store and update the control.
+
+ This method assumes that the boolean value is stored in
+ respective column.
+ */
+ void SetToggleValue( bool value, unsigned int row, unsigned int col );
+
+ /**
+ Returns the value from the store.
+
+ This method assumes that the boolean value is stored in
+ respective column.
+ */
+ bool GetToggleValue( unsigned int row, unsigned int col ) const;
+
+ /**
+ Associates a client data pointer with the given item.
+
+ Notice that the control does @e not take ownership of the pointer for
+ compatibility with wxListCtrl. I.e. it will @e not delete the pointer
+ (if it is a pointer and not a number) itself, it is up to you to do it.
+
+ @see GetItemData()
+
+ @since 2.9.4
+ */
+ void SetItemData(const wxDataViewItem& item, wxUIntPtr data);
+
+ //@}
+};
+
+
+/**
+ @class wxDataViewTreeCtrl
+
+ This class is a wxDataViewCtrl which internally uses a wxDataViewTreeStore
+ and forwards most of its API to that class.
+ Additionally, it uses a wxImageList to store a list of icons.
+
+ The main purpose of this class is to provide a simple upgrade path for code
+ using wxTreeCtrl.
+
+ @beginStyleTable
+ See wxDataViewCtrl for the list of supported styles.
+ @endStyleTable
+
+ @beginEventEmissionTable
+ See wxDataViewCtrl for the list of events emitted by this class.
+ @endEventTable
+
+ @library{wxadv}
+ @category{ctrl,dvc}
+ @appearance{dataviewtreectrl.png}
+*/
+class wxDataViewTreeCtrl : public wxDataViewCtrl
+{
+public:
+ /**
+ Default ctor.
+ */
+ wxDataViewTreeCtrl();
+
+ /**
+ Constructor.
+
+ Calls Create().
+ */
+ wxDataViewTreeCtrl(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDV_NO_HEADER | wxDV_ROW_LINES,
+ const wxValidator& validator = wxDefaultValidator);
+
+ /**
+ Destructor. Deletes the image list if any.
+ */
+ virtual ~wxDataViewTreeCtrl();
+
+ /**
+ Appends a container to the given @a parent.
+ */
+ wxDataViewItem AppendContainer(const wxDataViewItem& parent,
+ const wxString& text,
+ int icon = -1,
+ int expanded = -1,
+ wxClientData* data = NULL);
+
+ /**
+ Appends an item to the given @a parent.
+ */
+ wxDataViewItem AppendItem(const wxDataViewItem& parent,
+ const wxString& text,
+ int icon = -1,
+ wxClientData* data = NULL);
+
+ /**
+ Creates the control and a wxDataViewTreeStore as its internal model.
+
+ The default tree column created by this method is an editable column
+ using wxDataViewIconTextRenderer as its renderer.
+ */
+ bool Create(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDV_NO_HEADER | wxDV_ROW_LINES,
+ const wxValidator& validator = wxDefaultValidator);
+
+ /**
+ Calls the identical method from wxDataViewTreeStore.
+ */
+ void DeleteAllItems();
+
+ /**
+ Calls the identical method from wxDataViewTreeStore.
+ */
+ void DeleteChildren(const wxDataViewItem& item);
+
+ /**
+ Calls the identical method from wxDataViewTreeStore.
+ */
+ void DeleteItem(const wxDataViewItem& item);
+
+ /**
+ Calls the identical method from wxDataViewTreeStore.
+ */
+ int GetChildCount(const wxDataViewItem& parent) const;
+
+ /**
+ Returns the image list.
+ */
+ wxImageList* GetImageList();
+
+ /**
+ Calls the identical method from wxDataViewTreeStore.
+ */
+ wxClientData* GetItemData(const wxDataViewItem& item) const;
+
+ /**
+ Calls the identical method from wxDataViewTreeStore.
+ */
+ const wxIcon& GetItemExpandedIcon(const wxDataViewItem& item) const;
+
+ /**
+ Calls the identical method from wxDataViewTreeStore.
+ */
+ const wxIcon& GetItemIcon(const wxDataViewItem& item) const;
+
+ /**
+ Calls the identical method from wxDataViewTreeStore.
+ */
+ wxString GetItemText(const wxDataViewItem& item) const;
+
+ /**
+ Calls the identical method from wxDataViewTreeStore.
+ */
+ wxDataViewItem GetNthChild(const wxDataViewItem& parent,
+ unsigned int pos) const;
+
+ //@{
+ /**
+ Returns the store.
+ */
+ wxDataViewTreeStore* GetStore();
+ const wxDataViewTreeStore* GetStore() const;
+ //@}
+
+ /**
+ Calls the same method from wxDataViewTreeStore but uses
+ an index position in the image list instead of a wxIcon.
+ */
+ wxDataViewItem InsertContainer(const wxDataViewItem& parent,
+ const wxDataViewItem& previous,
+ const wxString& text,
+ int icon = -1,
+ int expanded = -1,
+ wxClientData* data = NULL);
+
+ /**
+ Calls the same method from wxDataViewTreeStore but uses
+ an index position in the image list instead of a wxIcon.
+ */
+ wxDataViewItem InsertItem(const wxDataViewItem& parent,
+ const wxDataViewItem& previous,
+ const wxString& text,
+ int icon = -1,
+ wxClientData* data = NULL);
+
+ /**
+ Returns true if item is a container.
+ */
+ bool IsContainer( const wxDataViewItem& item );
+
+ /**
+ Calls the same method from wxDataViewTreeStore but uses
+ an index position in the image list instead of a wxIcon.
+ */
+ wxDataViewItem PrependContainer(const wxDataViewItem& parent,
+ const wxString& text,
+ int icon = -1,
+ int expanded = -1,
+ wxClientData* data = NULL);
+
+ /**
+ Calls the same method from wxDataViewTreeStore but uses
+ an index position in the image list instead of a wxIcon.
+ */
+ wxDataViewItem PrependItem(const wxDataViewItem& parent,
+ const wxString& text,
+ int icon = -1,
+ wxClientData* data = NULL);
+
+ /**
+ Sets the image list.
+ */
+ void SetImageList(wxImageList* imagelist);
+
+ /**
+ Calls the identical method from wxDataViewTreeStore.
+ */
+ void SetItemData(const wxDataViewItem& item, wxClientData* data);