-/**
- @class wxDataViewIndexListModel
- @wxheader{dataview.h}
-
- wxDataViewIndexListModel is a specialized data model which lets
- you address an item by its position (row) rather than its
- wxDataViewItem (which you can obtain from this class).
- This model also provides its own
- wxDataViewIndexListModel::Compare method
- which sorts the model's data by the index.
-
- This model is special in the it is implemented differently under OS X
- and other platforms. Under OS X a wxDataViewItem is always persistent
- and this is also the case for this class. Under other platforms, the
- meaning of a wxDataViewItem is changed to reflect a row number for
- wxDataViewIndexListModel. The consequence of this is that
- wxDataViewIndexListModel can be used as a virtual model with an
- almost infinate number of items on platforms other than OS X.
-
- @library{wxbase}
- @category{FIXME}
-*/
-class wxDataViewIndexListModel : public wxDataViewModel
-{
-public:
- /**
- Constructor.
- */
- wxDataViewIndexListModel(unsigned int initial_size = 0);
-
- /**
- Destructor.
- */
- ~wxDataViewIndexListModel();
-
- /**
- Compare method that sorts the items by their index.
- */
- int Compare(const wxDataViewItem& item1,
- const wxDataViewItem& item2,
- unsigned int column, bool ascending);
-
- /**
- Oberride this to indicate that the row has special font attributes.
- This only affects the
- wxDataViewTextRendererText renderer.
-
- See also wxDataViewItemAttr.
- */
- bool GetAttr(unsigned int row, unsigned int col,
- wxDataViewItemAttr& attr);
-
- /**
- Returns the wxDataViewItem at the given @e row.
- */
- wxDataViewItem GetItem(unsigned int row);
-
- /**
- Returns the position of given @e item.
- */
- unsigned int GetRow(const wxDataViewItem& item);
-
- /**
- Override this to allow getting values from the model.
- */
- void GetValue(wxVariant& variant, unsigned int row,
- unsigned int col);
-
- /**
- 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 Reset(unsigned int new_size);
-
- /**
- Call this after a row has been appended to the model.
- */
- void RowAppended();
-
- /**
- Call this after a row has been changed.
- */
- void RowChanged(unsigned int row);
-
- /**
- Call this after a row has been deleted.
- */
- void RowDeleted(unsigned int row);
-
- /**
- Call this after a row has been inserted at the given position.
- */
- void RowInserted(unsigned int before);
-
- /**
- Call this after a row has been prepended to the model.
- */
- void RowPrepended();
-
- /**
- Call this after a value has been changed.
- */
- void RowValueChanged(unsigned int row, unsigned int col);
-
- /**
- 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 RowsDeleted(const wxArrayInt& rows);
-
- /**
- Called in order to set a value in the model.
- */
- bool SetValue(const wxVariant& variant, unsigned int row,
- unsigned int col);
-};
-