]>
Commit | Line | Data |
---|---|---|
1 | \section{\class{wxListItem}}\label{wxlistitem} | |
2 | ||
3 | This class stores information about a wxListCtrl item or column. | |
4 | ||
5 | \wxheading{Derived from} | |
6 | ||
7 | \helpref{wxObject}{wxobject} | |
8 | ||
9 | \wxheading{Include files} | |
10 | ||
11 | <wx/listctrl.h> | |
12 | ||
13 | \latexignore{\rtfignore{\wxheading{Members}}} | |
14 | ||
15 | \membersection{wxListItem::wxListItem}\label{wxlistitemwxlistitem} | |
16 | ||
17 | \func{}{wxListItem}{\void} | |
18 | ||
19 | Constructor. | |
20 | ||
21 | \membersection{wxListItem::Clear}\label{wxlistitemclear} | |
22 | ||
23 | \func{void}{Clear}{\void} | |
24 | ||
25 | Resets the item state to the default. | |
26 | ||
27 | ||
28 | ||
29 | \membersection{wxListItem::GetAlign}\label{wxlistitemgetalign} | |
30 | ||
31 | \constfunc{wxListColumnFormat}{GetAlign}{\void} | |
32 | ||
33 | Returns the alignment for this item. Can be one of | |
34 | wxLIST\_FORMAT\_LEFT, wxLIST\_FORMAT\_RIGHT or wxLIST\_FORMAT\_CENTRE. | |
35 | ||
36 | ||
37 | ||
38 | \membersection{wxListItem::GetBackgroundColour}\label{wxlistitemgetbackgroundcolour} | |
39 | ||
40 | \constfunc{wxColour}{GetBackgroundColour}{\void} | |
41 | ||
42 | Returns the background colour for this item. | |
43 | ||
44 | ||
45 | ||
46 | \membersection{wxListItem::GetColumn}\label{wxlistitemgetcolumn} | |
47 | ||
48 | \constfunc{int}{GetColumn}{\void} | |
49 | ||
50 | Returns the zero-based column; meaningful only in report mode. | |
51 | ||
52 | ||
53 | ||
54 | \membersection{wxListItem::GetData}\label{wxlistitemgetdata} | |
55 | ||
56 | \constfunc{long}{GetData}{\void} | |
57 | ||
58 | Returns client data associated with the control. | |
59 | ||
60 | ||
61 | ||
62 | \membersection{wxListItem::GetFont}\label{wxlistitemgetfont} | |
63 | ||
64 | \constfunc{wxFont}{GetFont}{\void} | |
65 | ||
66 | Returns the font used to display the item. | |
67 | ||
68 | ||
69 | ||
70 | \membersection{wxListItem::GetId}\label{wxlistitemgetid} | |
71 | ||
72 | \constfunc{long}{GetId}{\void} | |
73 | ||
74 | Returns the zero-based item position. | |
75 | ||
76 | ||
77 | ||
78 | \membersection{wxListItem::GetImage}\label{wxlistitemgetimage} | |
79 | ||
80 | \constfunc{int}{GetImage}{\void} | |
81 | ||
82 | Returns the zero-based index of the image | |
83 | associated with the item into the image list. | |
84 | ||
85 | ||
86 | ||
87 | \membersection{wxListItem::GetMask}\label{wxlistitemgetmask} | |
88 | ||
89 | \constfunc{long}{GetMask}{\void} | |
90 | ||
91 | Returns a bit mask indicating which fields of the structure are valid; | |
92 | can be any combination of the following values: | |
93 | ||
94 | \twocolwidtha{5cm} | |
95 | \begin{twocollist}\itemsep=0pt | |
96 | \twocolitem{wxLIST\_MASK\_STATE}{The {\bf GetState} is valid.} | |
97 | \twocolitem{wxLIST\_MASK\_TEXT}{The {\bf GetText} is valid.} | |
98 | \twocolitem{wxLIST\_MASK\_IMAGE}{The {\bf GetImage} is valid.} | |
99 | \twocolitem{wxLIST\_MASK\_DATA}{The {\bf GetData} is valid.} | |
100 | \twocolitem{wxLIST\_MASK\_WIDTH}{The {\bf GetWidth} is valid.} | |
101 | \twocolitem{wxLIST\_MASK\_FORMAT}{The {\bf GetAlign} is valid.} | |
102 | \end{twocollist} | |
103 | ||
104 | ||
105 | ||
106 | \membersection{wxListItem::GetState}\label{wxlistitemgetstate} | |
107 | ||
108 | \constfunc{long}{GetState}{\void} | |
109 | ||
110 | Returns a bit field representing the state of the item. Can be any | |
111 | combination of: | |
112 | ||
113 | \twocolwidtha{5cm} | |
114 | \begin{twocollist}\itemsep=0pt | |
115 | \twocolitem{wxLIST\_STATE\_DONTCARE}{Don't care what the state is. Win32 only. } | |
116 | \twocolitem{wxLIST\_STATE\_DROPHILITED}{The item is highlighted to receive a drop event. Win32 only. } | |
117 | \twocolitem{wxLIST\_STATE\_FOCUSED}{The item has the focus.} | |
118 | \twocolitem{wxLIST\_STATE\_SELECTED}{The item is selected.} | |
119 | \twocolitem{wxLIST\_STATE\_CUT}{The item is in the cut state. Win32 only. } | |
120 | \end{twocollist} | |
121 | ||
122 | ||
123 | ||
124 | \membersection{wxListItem::GetText}\label{wxlistitemgettext} | |
125 | ||
126 | \constfunc{const wxString\&}{GetText}{\void} | |
127 | ||
128 | Returns the label/header text. | |
129 | ||
130 | ||
131 | ||
132 | \membersection{wxListItem::GetTextColour}\label{wxlistitemgettextcolour} | |
133 | ||
134 | \constfunc{wxColour}{GetTextColour}{\void} | |
135 | ||
136 | Returns the text colour. | |
137 | ||
138 | ||
139 | ||
140 | \membersection{wxListItem::GetWidth}\label{wxlistitemgetwidth} | |
141 | ||
142 | \constfunc{int}{GetWidth}{\void} | |
143 | ||
144 | Meaningful only for column headers in report mode. Returns the column width. | |
145 | ||
146 | ||
147 | ||
148 | \membersection{wxListItem::SetAlign}\label{wxlistitemsetalign} | |
149 | ||
150 | \func{void}{SetAlign}{\param{wxListColumnFormat }{align}} | |
151 | ||
152 | Sets the alignment for the item. See also | |
153 | \helpref{wxListItem::SetAlign}{wxlistitemsetalign} | |
154 | ||
155 | ||
156 | ||
157 | \membersection{wxListItem::SetBackgroundColour}\label{wxlistitemsetbackgroundcolour} | |
158 | ||
159 | \func{void}{SetBackgroundColour}{\param{const wxColour\& }{colBack}} | |
160 | ||
161 | Sets the background colour for the item. | |
162 | ||
163 | ||
164 | ||
165 | \membersection{wxListItem::SetColumn}\label{wxlistitemsetcolumn} | |
166 | ||
167 | \func{void}{SetColumn}{\param{int }{col}} | |
168 | ||
169 | Sets the zer-based column. Meaningful only in report mode. | |
170 | ||
171 | ||
172 | ||
173 | \membersection{wxListItem::SetData}\label{wxlistitemsetdata} | |
174 | ||
175 | \func{void}{SetData}{\param{long }{data}} | |
176 | ||
177 | \func{void}{SetData}{\param{void* }{data}} | |
178 | ||
179 | Sets client data for the item. | |
180 | ||
181 | ||
182 | ||
183 | \membersection{wxListItem::SetFont}\label{wxlistitemsetfont} | |
184 | ||
185 | \func{void}{SetFont}{\param{const wxFont\& }{font}} | |
186 | ||
187 | Sets the font for the item. | |
188 | ||
189 | ||
190 | ||
191 | \membersection{wxListItem::SetId}\label{wxlistitemsetid} | |
192 | ||
193 | \func{void}{SetId}{\param{long }{id}} | |
194 | ||
195 | Sets the zero-based item position. | |
196 | ||
197 | ||
198 | ||
199 | \membersection{wxListItem::SetImage}\label{wxlistitemsetimage} | |
200 | ||
201 | \func{void}{SetImage}{\param{int }{image}} | |
202 | ||
203 | Returns the zero-based index of the image associated with the item | |
204 | into the image list. | |
205 | ||
206 | ||
207 | ||
208 | \membersection{wxListItem::SetMask}\label{wxlistitemsetmask} | |
209 | ||
210 | \func{void}{SetMask}{\param{long }{mask}} | |
211 | ||
212 | Sets the mask of valid fields. See | |
213 | \helpref{wxListItem::SetMask}{wxlistitemsetmask}. | |
214 | ||
215 | ||
216 | ||
217 | \membersection{wxListItem::SetState}\label{wxlistitemsetstate} | |
218 | ||
219 | \func{void}{SetState}{\param{long }{state}} | |
220 | ||
221 | Sets the item state flags (note that the valid state flags are influenced | |
222 | by the value of the state mask, see | |
223 | \helpref{wxListItem::SetStateMask}{wxlistitemsetstatemask}). | |
224 | See \helpref{wxListItem::GetState}{wxlistitemsetstate} for valid flag | |
225 | values. | |
226 | ||
227 | ||
228 | ||
229 | \membersection{wxListItem::SetStateMask}\label{wxlistitemsetstatemask} | |
230 | ||
231 | \func{void}{SetStateMask}{\param{long }{stateMask}} | |
232 | ||
233 | Sets the bitmask that is used to determine which of the state flags | |
234 | are to be set. See also \helpref{wxListItem::SetState}{wxlistitemsetstate}. | |
235 | ||
236 | ||
237 | ||
238 | \membersection{wxListItem::SetText}\label{wxlistitemsettext} | |
239 | ||
240 | \func{void}{SetText}{\param{const wxString\& }{text}} | |
241 | ||
242 | Sets the text label for the item. | |
243 | ||
244 | ||
245 | ||
246 | \membersection{wxListItem::SetTextColour}\label{wxlistitemsettextcolour} | |
247 | ||
248 | \func{void}{SetTextColour}{\param{const wxColour\& }{colText}} | |
249 | ||
250 | Sets the text colour for the item. | |
251 | ||
252 | ||
253 | ||
254 | \membersection{wxListItem::SetWidth}\label{wxlistitemsetwidth} | |
255 | ||
256 | \func{void}{SetWidth}{\param{int }{width}} | |
257 | ||
258 | Meaningful only for column headers in report mode. Sets the column width. |