]>
Commit | Line | Data |
---|---|---|
08a87680 MB |
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 | ||
08a87680 MB |
27 | \membersection{wxListItem::GetAlign}\label{wxlistitemgetalign} |
28 | ||
29 | \constfunc{wxListColumnFormat}{GetAlign}{\void} | |
30 | ||
31 | Returns the alignment for this item. Can be one of | |
32 | wxLIST\_FORMAT\_LEFT, wxLIST\_FORMAT\_RIGHT or wxLIST\_FORMAT\_CENTRE. | |
33 | ||
08a87680 MB |
34 | \membersection{wxListItem::GetBackgroundColour}\label{wxlistitemgetbackgroundcolour} |
35 | ||
36 | \constfunc{wxColour}{GetBackgroundColour}{\void} | |
37 | ||
38 | Returns the background colour for this item. | |
39 | ||
08a87680 MB |
40 | \membersection{wxListItem::GetColumn}\label{wxlistitemgetcolumn} |
41 | ||
42 | \constfunc{int}{GetColumn}{\void} | |
43 | ||
44 | Returns the zero-based column; meaningful only in report mode. | |
45 | ||
08a87680 MB |
46 | \membersection{wxListItem::GetData}\label{wxlistitemgetdata} |
47 | ||
48 | \constfunc{long}{GetData}{\void} | |
49 | ||
50 | Returns client data associated with the control. | |
51 | ||
08a87680 MB |
52 | \membersection{wxListItem::GetFont}\label{wxlistitemgetfont} |
53 | ||
54 | \constfunc{wxFont}{GetFont}{\void} | |
55 | ||
56 | Returns the font used to display the item. | |
57 | ||
08a87680 MB |
58 | \membersection{wxListItem::GetId}\label{wxlistitemgetid} |
59 | ||
60 | \constfunc{long}{GetId}{\void} | |
61 | ||
62 | Returns the zero-based item position. | |
63 | ||
08a87680 MB |
64 | \membersection{wxListItem::GetImage}\label{wxlistitemgetimage} |
65 | ||
66 | \constfunc{int}{GetImage}{\void} | |
67 | ||
68 | Returns the zero-based index of the image | |
69 | associated with the item into the image list. | |
70 | ||
08a87680 MB |
71 | \membersection{wxListItem::GetMask}\label{wxlistitemgetmask} |
72 | ||
73 | \constfunc{long}{GetMask}{\void} | |
74 | ||
75 | Returns a bit mask indicating which fields of the structure are valid; | |
76 | can be any combination of the following values: | |
77 | ||
78 | \twocolwidtha{5cm} | |
79 | \begin{twocollist}\itemsep=0pt | |
c3627a00 JS |
80 | \twocolitem{wxLIST\_MASK\_STATE}{{\bf GetState} is valid.} |
81 | \twocolitem{wxLIST\_MASK\_TEXT}{{\bf GetText} is valid.} | |
82 | \twocolitem{wxLIST\_MASK\_IMAGE}{{\bf GetImage} is valid.} | |
83 | \twocolitem{wxLIST\_MASK\_DATA}{{\bf GetData} is valid.} | |
84 | \twocolitem{wxLIST\_MASK\_WIDTH}{{\bf GetWidth} is valid.} | |
85 | \twocolitem{wxLIST\_MASK\_FORMAT}{{\bf GetFormat} is valid.} | |
08a87680 MB |
86 | \end{twocollist} |
87 | ||
08a87680 MB |
88 | \membersection{wxListItem::GetState}\label{wxlistitemgetstate} |
89 | ||
90 | \constfunc{long}{GetState}{\void} | |
91 | ||
92 | Returns a bit field representing the state of the item. Can be any | |
93 | combination of: | |
94 | ||
95 | \twocolwidtha{5cm} | |
96 | \begin{twocollist}\itemsep=0pt | |
97 | \twocolitem{wxLIST\_STATE\_DONTCARE}{Don't care what the state is. Win32 only. } | |
98 | \twocolitem{wxLIST\_STATE\_DROPHILITED}{The item is highlighted to receive a drop event. Win32 only. } | |
99 | \twocolitem{wxLIST\_STATE\_FOCUSED}{The item has the focus.} | |
100 | \twocolitem{wxLIST\_STATE\_SELECTED}{The item is selected.} | |
101 | \twocolitem{wxLIST\_STATE\_CUT}{The item is in the cut state. Win32 only. } | |
102 | \end{twocollist} | |
103 | ||
08a87680 MB |
104 | \membersection{wxListItem::GetText}\label{wxlistitemgettext} |
105 | ||
106 | \constfunc{const wxString\&}{GetText}{\void} | |
107 | ||
108 | Returns the label/header text. | |
109 | ||
08a87680 MB |
110 | \membersection{wxListItem::GetTextColour}\label{wxlistitemgettextcolour} |
111 | ||
112 | \constfunc{wxColour}{GetTextColour}{\void} | |
113 | ||
114 | Returns the text colour. | |
115 | ||
08a87680 MB |
116 | \membersection{wxListItem::GetWidth}\label{wxlistitemgetwidth} |
117 | ||
118 | \constfunc{int}{GetWidth}{\void} | |
119 | ||
120 | Meaningful only for column headers in report mode. Returns the column width. | |
121 | ||
08a87680 MB |
122 | \membersection{wxListItem::SetAlign}\label{wxlistitemsetalign} |
123 | ||
124 | \func{void}{SetAlign}{\param{wxListColumnFormat }{align}} | |
125 | ||
126 | Sets the alignment for the item. See also | |
3980000c | 127 | \helpref{wxListItem::GetAlign}{wxlistitemgetalign} |
08a87680 | 128 | |
08a87680 MB |
129 | \membersection{wxListItem::SetBackgroundColour}\label{wxlistitemsetbackgroundcolour} |
130 | ||
131 | \func{void}{SetBackgroundColour}{\param{const wxColour\& }{colBack}} | |
132 | ||
133 | Sets the background colour for the item. | |
134 | ||
08a87680 MB |
135 | \membersection{wxListItem::SetColumn}\label{wxlistitemsetcolumn} |
136 | ||
137 | \func{void}{SetColumn}{\param{int }{col}} | |
138 | ||
ba637f22 | 139 | Sets the zero-based column. Meaningful only in report mode. |
08a87680 MB |
140 | |
141 | \membersection{wxListItem::SetData}\label{wxlistitemsetdata} | |
142 | ||
143 | \func{void}{SetData}{\param{long }{data}} | |
144 | ||
145 | \func{void}{SetData}{\param{void* }{data}} | |
146 | ||
147 | Sets client data for the item. | |
148 | ||
08a87680 MB |
149 | \membersection{wxListItem::SetFont}\label{wxlistitemsetfont} |
150 | ||
151 | \func{void}{SetFont}{\param{const wxFont\& }{font}} | |
152 | ||
153 | Sets the font for the item. | |
154 | ||
08a87680 MB |
155 | \membersection{wxListItem::SetId}\label{wxlistitemsetid} |
156 | ||
157 | \func{void}{SetId}{\param{long }{id}} | |
158 | ||
159 | Sets the zero-based item position. | |
160 | ||
08a87680 MB |
161 | \membersection{wxListItem::SetImage}\label{wxlistitemsetimage} |
162 | ||
163 | \func{void}{SetImage}{\param{int }{image}} | |
164 | ||
c3627a00 | 165 | Sets the zero-based index of the image associated with the item |
08a87680 MB |
166 | into the image list. |
167 | ||
08a87680 MB |
168 | \membersection{wxListItem::SetMask}\label{wxlistitemsetmask} |
169 | ||
170 | \func{void}{SetMask}{\param{long }{mask}} | |
171 | ||
8161ba08 | 172 | Sets the mask of valid fields. See \helpref{wxListItem::GetMask}{wxlistitemgetmask}. |
08a87680 | 173 | |
08a87680 MB |
174 | \membersection{wxListItem::SetState}\label{wxlistitemsetstate} |
175 | ||
176 | \func{void}{SetState}{\param{long }{state}} | |
177 | ||
178 | Sets the item state flags (note that the valid state flags are influenced | |
179 | by the value of the state mask, see | |
180 | \helpref{wxListItem::SetStateMask}{wxlistitemsetstatemask}). | |
43e8916f | 181 | See \helpref{wxListItem::GetState}{wxlistitemgetstate} for valid flag |
08a87680 MB |
182 | values. |
183 | ||
08a87680 MB |
184 | \membersection{wxListItem::SetStateMask}\label{wxlistitemsetstatemask} |
185 | ||
186 | \func{void}{SetStateMask}{\param{long }{stateMask}} | |
187 | ||
188 | Sets the bitmask that is used to determine which of the state flags | |
189 | are to be set. See also \helpref{wxListItem::SetState}{wxlistitemsetstate}. | |
190 | ||
08a87680 MB |
191 | \membersection{wxListItem::SetText}\label{wxlistitemsettext} |
192 | ||
193 | \func{void}{SetText}{\param{const wxString\& }{text}} | |
194 | ||
195 | Sets the text label for the item. | |
196 | ||
08a87680 MB |
197 | \membersection{wxListItem::SetTextColour}\label{wxlistitemsettextcolour} |
198 | ||
199 | \func{void}{SetTextColour}{\param{const wxColour\& }{colText}} | |
200 | ||
201 | Sets the text colour for the item. | |
202 | ||
08a87680 MB |
203 | \membersection{wxListItem::SetWidth}\label{wxlistitemsetwidth} |
204 | ||
205 | \func{void}{SetWidth}{\param{int }{width}} | |
206 | ||
207 | Meaningful only for column headers in report mode. Sets the column width. | |
ba637f22 | 208 |