/**
Appends an item (=row) to the control and store.
*/
- void AppendItem( const wxVector<wxVariant> &values, wxClientData *data = NULL );
+ void AppendItem( const wxVector<wxVariant> &values, wxUIntPtr data = NULL );
/**
Prepends an item (=row) to the control and store.
*/
- void PrependItem( const wxVector<wxVariant> &values, wxClientData *data = NULL );
+ 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, wxClientData *data = NULL );
+ void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxUIntPtr data = NULL );
/**
Delete the row at position @a row.
*/
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.
*/
*/
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);
+
//@}
};
in number and type. No (default) values are filled in
automatically.
*/
- void AppendItem( const wxVector<wxVariant> &values, wxClientData *data = NULL );
+ void AppendItem( const wxVector<wxVariant> &values, wxUIntPtr data = NULL );
/**
Prepends an item (=row) and fills it with @a values.
in number and type. No (default) values are filled in
automatically.
*/
- void PrependItem( const wxVector<wxVariant> &values, wxClientData *data = NULL );
+ void PrependItem( const wxVector<wxVariant> &values, wxUIntPtr data = NULL );
/**
Inserts an item (=row) and fills it with @a values.
in number and type. No (default) values are filled in
automatically.
*/
- void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxClientData *data = NULL );
+ void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxUIntPtr data = NULL );
/**
Delete the item (=row) at position @a pos.
*/
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;
+
/**
Overridden from wxDataViewModel
*/
*/
virtual wxString GetColumnType( unsigned int col ) const;
+ /**
+ Sets the client data associated with the item.
+
+ Notice that this class does @e not take ownership of the passed in
+ pointer and will not delete it.
+
+ @see GetItemData()
+
+ @since 2.9.4
+ */
+ void SetItemData(const wxDataViewItem& item, wxUIntPtr data);
+
/**
Overridden from wxDataViewIndexListModel
*/