#include </home/zeitlin/src/wx/github/interface/wx/dataview.h>
Base class with abstract API for wxDataViewIndexListModel and wxDataViewVirtualListModel.
Public Member Functions | |
virtual | ~wxDataViewIndexListModel () |
Destructor. | |
int | Compare (const wxDataViewItem &item1, const wxDataViewItem &item2, unsigned int column, bool ascending) const |
Compare method that sorts the items by their index. | |
virtual bool | GetAttrByRow (unsigned int row, unsigned int col, wxDataViewItemAttr &attr) const |
Override this to indicate that the row has special font attributes. | |
virtual bool | IsEnabledByRow (unsigned int row, unsigned int col) const |
Override this if you want to disable specific items. | |
unsigned int | GetCount () const |
Returns the number of items (or rows) in the list. | |
wxDataViewItem | GetItem (unsigned int row) const |
Returns the wxDataViewItem at the given row. | |
unsigned int | GetRow (const wxDataViewItem &item) const |
Returns the position of given item. | |
virtual void | GetValueByRow (wxVariant &variant, unsigned int row, unsigned int col) const =0 |
Override this to allow getting values from the model. | |
void | Reset (unsigned int new_size) |
Call this after if the data has to be read again from the model. | |
void | RowAppended () |
Call this after a row has been appended to the model. | |
void | RowChanged (unsigned int row) |
Call this after a row has been changed. | |
void | RowDeleted (unsigned int row) |
Call this after a row has been deleted. | |
void | RowInserted (unsigned int before) |
Call this after a row has been inserted at the given position. | |
void | RowPrepended () |
Call this after a row has been prepended to the model. | |
void | RowValueChanged (unsigned int row, unsigned int col) |
Call this after a value has been changed. | |
void | RowsDeleted (const wxArrayInt &rows) |
Call this after rows have been deleted. | |
virtual bool | SetValueByRow (const wxVariant &variant, unsigned int row, unsigned int col)=0 |
Called in order to set a value in the model. |
virtual wxDataViewListModel::~wxDataViewIndexListModel | ( | ) | [virtual] |
Destructor.
int wxDataViewListModel::Compare | ( | const wxDataViewItem & | item1, |
const wxDataViewItem & | item2, | ||
unsigned int | column, | ||
bool | ascending | ||
) | const [virtual] |
Compare method that sorts the items by their index.
Reimplemented from wxDataViewModel.
virtual bool wxDataViewListModel::GetAttrByRow | ( | unsigned int | row, |
unsigned int | col, | ||
wxDataViewItemAttr & | attr | ||
) | const [virtual] |
Override this to indicate that the row has special font attributes.
This only affects the wxDataViewTextRendererText() renderer.
The base class version always simply returns false.
row | The row for which the attribute is requested. |
col | The column for which the attribute is requested. |
attr | The attribute to be filled in if the function returns true. |
unsigned int wxDataViewListModel::GetCount | ( | ) | const |
Returns the number of items (or rows) in the list.
wxDataViewItem wxDataViewListModel::GetItem | ( | unsigned int | row | ) | const |
Returns the wxDataViewItem at the given row.
unsigned int wxDataViewListModel::GetRow | ( | const wxDataViewItem & | item | ) | const |
Returns the position of given item.
virtual void wxDataViewListModel::GetValueByRow | ( | wxVariant & | variant, |
unsigned int | row, | ||
unsigned int | col | ||
) | const [pure virtual] |
Override this to allow getting values from the model.
Implemented in wxDataViewListStore.
virtual bool wxDataViewListModel::IsEnabledByRow | ( | unsigned int | row, |
unsigned int | col | ||
) | const [virtual] |
Override this if you want to disable specific items.
The base class version always returns true, thus making all items enabled by default.
row | The row of the item whose enabled status is requested. |
col | The column of the item whose enabled status is requested. |
void wxDataViewListModel::Reset | ( | unsigned int | new_size | ) |
Call this after if the data has to be read again from the model.
This is useful after major changes when calling the methods below (possibly thousands of times) doesn't make sense.
void wxDataViewListModel::RowAppended | ( | ) |
Call this after a row has been appended to the model.
void wxDataViewListModel::RowChanged | ( | unsigned int | row | ) |
Call this after a row has been changed.
void wxDataViewListModel::RowDeleted | ( | unsigned int | row | ) |
Call this after a row has been deleted.
void wxDataViewListModel::RowInserted | ( | unsigned int | before | ) |
Call this after a row has been inserted at the given position.
void wxDataViewListModel::RowPrepended | ( | ) |
Call this after a row has been prepended to the model.
void wxDataViewListModel::RowsDeleted | ( | const wxArrayInt & | rows | ) |
Call this after rows have been deleted.
The array will internally get copied and sorted in descending order so that the rows with the highest position will be deleted first.
void wxDataViewListModel::RowValueChanged | ( | unsigned int | row, |
unsigned int | col | ||
) |
Call this after a value has been changed.
virtual bool wxDataViewListModel::SetValueByRow | ( | const wxVariant & | variant, |
unsigned int | row, | ||
unsigned int | col | ||
) | [pure virtual] |
Called in order to set a value in the model.
Implemented in wxDataViewListStore.