#include </home/zeitlin/src/wx/github/interface/wx/dataview.h>
wxDataViewListStore is a specialised wxDataViewModel for storing a simple table of data.
Since it derives from wxDataViewIndexListModel its data is be accessed by row (i.e. by index) instead of only by wxDataViewItem.
This class actually stores the values (therefore its name) and implements all virtual methods from the base classes so it can be used directly without having to derive any class from it, but it is mostly used from within wxDataViewListCtrl.
Public Member Functions | |
wxDataViewListStore () | |
Constructor. | |
~wxDataViewListStore () | |
Destructor. | |
void | PrependColumn (const wxString &varianttype) |
Prepends a data column. | |
void | InsertColumn (unsigned int pos, const wxString &varianttype) |
Inserts a data column before pos. | |
void | AppendColumn (const wxString &varianttype) |
Appends a data column. | |
void | AppendItem (const wxVector< wxVariant > &values, wxUIntPtr data=NULL) |
Appends an item (=row) and fills it with values. | |
void | PrependItem (const wxVector< wxVariant > &values, wxUIntPtr data=NULL) |
Prepends an item (=row) and fills it with values. | |
void | InsertItem (unsigned int row, const wxVector< wxVariant > &values, wxUIntPtr data=NULL) |
Inserts an item (=row) and fills it with values. | |
void | DeleteItem (unsigned pos) |
Delete the item (=row) at position pos. | |
void | DeleteAllItems () |
Delete all item (=all rows) in the store. | |
unsigned int | GetItemCount () const |
Returns the number of items (=rows) in the control. | |
wxUIntPtr | GetItemData (const wxDataViewItem &item) const |
Returns the client data associated with the item. | |
virtual unsigned int | GetColumnCount () const |
Overridden from wxDataViewModel. | |
virtual wxString | GetColumnType (unsigned int col) const |
Overridden from wxDataViewModel. | |
void | SetItemData (const wxDataViewItem &item, wxUIntPtr data) |
Sets the client data associated with the item. | |
virtual void | GetValueByRow (wxVariant &value, unsigned int row, unsigned int col) const |
Overridden from wxDataViewIndexListModel. | |
virtual bool | SetValueByRow (const wxVariant &value, unsigned int row, unsigned int col) |
Overridden from wxDataViewIndexListModel. |
wxDataViewListStore::wxDataViewListStore | ( | ) |
Constructor.
wxDataViewListStore::~wxDataViewListStore | ( | ) |
Destructor.
void wxDataViewListStore::AppendColumn | ( | const wxString & | varianttype | ) |
Appends a data column.
variantype indicates the type of values store in the column.
This does not automatically fill in any (default) values in rows which exist in the store already.
void wxDataViewListStore::AppendItem | ( | const wxVector< wxVariant > & | values, |
wxUIntPtr | data = NULL |
||
) |
Appends an item (=row) and fills it with values.
The values must match the values specifies in the column in number and type. No (default) values are filled in automatically.
void wxDataViewListStore::DeleteAllItems | ( | ) |
Delete all item (=all rows) in the store.
void wxDataViewListStore::DeleteItem | ( | unsigned | pos | ) |
Delete the item (=row) at position pos.
virtual unsigned int wxDataViewListStore::GetColumnCount | ( | ) | const [virtual] |
Overridden from wxDataViewModel.
Implements wxDataViewModel.
virtual wxString wxDataViewListStore::GetColumnType | ( | unsigned int | col | ) | const [virtual] |
Overridden from wxDataViewModel.
Implements wxDataViewModel.
unsigned int wxDataViewListStore::GetItemCount | ( | ) | const |
Returns the number of items (=rows) in the control.
wxUIntPtr wxDataViewListStore::GetItemData | ( | const wxDataViewItem & | item | ) | const |
virtual void wxDataViewListStore::GetValueByRow | ( | wxVariant & | value, |
unsigned int | row, | ||
unsigned int | col | ||
) | const [virtual] |
Overridden from wxDataViewIndexListModel.
Implements wxDataViewListModel.
void wxDataViewListStore::InsertColumn | ( | unsigned int | pos, |
const wxString & | varianttype | ||
) |
Inserts a data column before pos.
variantype indicates the type of values store in the column.
This does not automatically fill in any (default) values in rows which exist in the store already.
void wxDataViewListStore::InsertItem | ( | unsigned int | row, |
const wxVector< wxVariant > & | values, | ||
wxUIntPtr | data = NULL |
||
) |
Inserts an item (=row) and fills it with values.
The values must match the values specifies in the column in number and type. No (default) values are filled in automatically.
void wxDataViewListStore::PrependColumn | ( | const wxString & | varianttype | ) |
Prepends a data column.
variantype indicates the type of values store in the column.
This does not automatically fill in any (default) values in rows which exist in the store already.
void wxDataViewListStore::PrependItem | ( | const wxVector< wxVariant > & | values, |
wxUIntPtr | data = NULL |
||
) |
Prepends an item (=row) and fills it with values.
The values must match the values specifies in the column in number and type. No (default) values are filled in automatically.
void wxDataViewListStore::SetItemData | ( | const wxDataViewItem & | item, |
wxUIntPtr | data | ||
) |
Sets the client data associated with the item.
Notice that this class does not take ownership of the passed in pointer and will not delete it.
virtual bool wxDataViewListStore::SetValueByRow | ( | const wxVariant & | value, |
unsigned int | row, | ||
unsigned int | col | ||
) | [virtual] |
Overridden from wxDataViewIndexListModel.
Implements wxDataViewListModel.