#include <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, wxClientData *data=NULL) |
Appends an item (=row) and fills it with values. | |
void | PrependItem (const wxVector< wxVariant > &values, wxClientData *data=NULL) |
Prepends an item (=row) and fills it with values. | |
void | InsertItem (unsigned int row, const wxVector< wxVariant > &values, wxClientData *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. | |
virtual unsigned int | GetColumnCount () const |
Overriden from wxDataViewModel. | |
virtual wxString | GetColumnType (unsigned int col) const |
Overriden from wxDataViewModel. | |
virtual void | GetValueByRow (wxVariant &value, unsigned int row, unsigned int col) const |
Overriden from wxDataViewIndexListModel. | |
virtual bool | SetValueByRow (const wxVariant &value, unsigned int row, unsigned int col) |
Overriden 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, | |
wxClientData * | 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] |
Overriden from wxDataViewModel.
Implements wxDataViewModel.
virtual wxString wxDataViewListStore::GetColumnType | ( | unsigned int | col | ) | const [virtual] |
Overriden from wxDataViewModel.
Implements wxDataViewModel.
virtual void wxDataViewListStore::GetValueByRow | ( | wxVariant & | value, | |
unsigned int | row, | |||
unsigned int | col | |||
) | const [virtual] |
Overriden from wxDataViewIndexListModel.
Implements wxDataViewIndexListModel.
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, | |||
wxClientData * | 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, | |
wxClientData * | 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.
virtual bool wxDataViewListStore::SetValueByRow | ( | const wxVariant & | value, | |
unsigned int | row, | |||
unsigned int | col | |||
) | [virtual] |
Overriden from wxDataViewIndexListModel.
Implements wxDataViewIndexListModel.
![]() |
[ top ] |