]>
Commit | Line | Data |
---|---|---|
1ab4aff2 RR |
1 | |
2 | \section{\class{wxDataViewIndexListModel}}\label{wxdataviewindexlistmodel} | |
3 | ||
4 | wxDataViewIndexListModel is a specialized data model which lets | |
5 | you address an item by its position (row) rather than its | |
6 | wxDataViewItem (which you can obtain from this class). | |
7 | This model also provides its own | |
8 | \helpref{Compare}{wxdataviewindexlistmodelcompare} method | |
9 | which sorts the model's data by the index. | |
10 | ||
11 | ||
12 | \wxheading{Derived from} | |
13 | ||
14 | \helpref{wxDataViewModel}{wxdataviewmodel} | |
15 | ||
16 | \wxheading{Include files} | |
17 | ||
18 | <dataview.h> | |
19 | ||
20 | \latexignore{\rtfignore{\wxheading{Members}}} | |
21 | ||
22 | ||
23 | \membersection{wxDataViewIndexListModel::wxDataViewIndexListModel}\label{wxdataviewindexlistmodelwxdataviewindexlistmodel} | |
24 | ||
25 | \func{}{wxDataViewIndexListModel}{\param{unsigned int }{initial\_size = 0}} | |
26 | ||
27 | Constructor. | |
28 | ||
29 | \membersection{wxDataViewIndexListModel::\destruct{wxDataViewIndexListModel}}\label{wxdataviewindexlistmodeldtor} | |
30 | ||
31 | \func{}{\destruct{wxDataViewIndexListModel}}{\void} | |
32 | ||
33 | Destructor. | |
34 | ||
35 | \membersection{wxDataViewIndexListModel::Compare}\label{wxdataviewindexlistmodelcompare} | |
36 | ||
37 | \func{int}{Compare}{\param{const wxDataViewItem\& }{item1}, \param{const wxDataViewItem\& }{item2}, \param{unsigned int }{column}, \param{bool }{ascending}} | |
38 | ||
39 | Compare method that sorts the items by their index. | |
40 | ||
41 | \membersection{wxDataViewIndexListModel::GetItem}\label{wxdataviewindexlistmodelgetitem} | |
42 | ||
43 | \constfunc{wxDataViewItem}{GetItem}{\param{unsigned int }{row}} | |
44 | ||
45 | Returns the wxDataViewItem at the given {\it row}. | |
46 | ||
47 | \membersection{wxDataViewIndexListModel::GetRow}\label{wxdataviewindexlistmodelgetrow} | |
48 | ||
49 | \constfunc{unsigned int}{GetRow}{\param{const wxDataViewItem\& }{item}} | |
50 | ||
51 | Returns the position of given {\it item}. | |
52 | ||
53 | \membersection{wxDataViewIndexListModel::GetRowCount}\label{wxdataviewindexlistmodelgetrowcount} | |
54 | ||
55 | \func{unsigned int}{GetRowCount}{\void} | |
56 | ||
57 | Override this to indicate the number of rows. | |
58 | ||
59 | \membersection{wxDataViewIndexListModel::GetValue}\label{wxdataviewindexlistmodelgetvalue} | |
60 | ||
61 | \constfunc{void}{GetValue}{\param{wxVariant\& }{variant}, \param{unsigned int }{row}, \param{unsigned int }{col}} | |
62 | ||
63 | Override this to allow getting values from the model. | |
64 | ||
65 | \membersection{wxDataViewIndexListModel::RowAppended}\label{wxdataviewindexlistmodelrowappended} | |
66 | ||
67 | \func{void}{RowAppended}{\void} | |
68 | ||
69 | Call this after a row has been appended to the model. | |
70 | ||
71 | \membersection{wxDataViewIndexListModel::RowChanged}\label{wxdataviewindexlistmodelrowchanged} | |
72 | ||
73 | \func{void}{RowChanged}{\param{unsigned int }{row}} | |
74 | ||
75 | Call this after a row has been changed. | |
76 | ||
77 | \membersection{wxDataViewIndexListModel::RowDeleted}\label{wxdataviewindexlistmodelrowdeleted} | |
78 | ||
79 | \func{void}{RowDeleted}{\param{unsigned int }{row}} | |
80 | ||
81 | Call this after a row has been deleted. | |
82 | ||
83 | \membersection{wxDataViewIndexListModel::RowInserted}\label{wxdataviewindexlistmodelrowinserted} | |
84 | ||
85 | \func{void}{RowInserted}{\param{unsigned int }{before}} | |
86 | ||
87 | Call this after a row has been inserted at the given position. | |
88 | ||
89 | \membersection{wxDataViewIndexListModel::RowPrepended}\label{wxdataviewindexlistmodelrowprepended} | |
90 | ||
91 | \func{void}{RowPrepended}{\void} | |
92 | ||
93 | Call this after a row has been prepended to the model. | |
94 | ||
95 | \membersection{wxDataViewIndexListModel::RowValueChanged}\label{wxdataviewindexlistmodelrowvaluechanged} | |
96 | ||
97 | \func{void}{RowValueChanged}{\param{unsigned int }{row}, \param{unsigned int }{col}} | |
98 | ||
99 | Call this after a value has been changed. | |
100 | ||
101 | \membersection{wxDataViewIndexListModel::SetValue}\label{wxdataviewindexlistmodelsetvalue} | |
102 | ||
103 | \func{bool}{SetValue}{\param{const wxVariant\& }{variant}, \param{unsigned int }{row}, \param{unsigned int }{col}} | |
104 | ||
8cb475f1 | 105 | Called in order to set a value in the model. |