]>
Commit | Line | Data |
---|---|---|
a660d684 KB |
1 | \section{\class{wxListEvent}}\label{wxlistevent} |
2 | ||
3 | A list event holds information about events associated with wxListCtrl objects. | |
4 | ||
5 | \wxheading{Derived from} | |
6 | ||
86f975a8 | 7 | \helpref{wxNotifyEvent}{wxnotifyevent}\\ |
a660d684 KB |
8 | \helpref{wxCommandEvent}{wxcommandevent}\\ |
9 | \helpref{wxEvent}{wxevent}\\ | |
10 | \helpref{wxObject}{wxobject} | |
11 | ||
954b8ae6 JS |
12 | \wxheading{Include files} |
13 | ||
14 | <wx/listctrl.h> | |
15 | ||
a660d684 KB |
16 | \wxheading{Event table macros} |
17 | ||
18 | To process input from a list control, use these event handler macros to direct input to member | |
19 | functions that take a wxListEvent argument. | |
20 | ||
21 | \twocolwidtha{7cm} | |
22 | \begin{twocollist}\itemsep=0pt | |
23 | \twocolitem{{\bf EVT\_LIST\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.} | |
24 | \twocolitem{{\bf EVT\_LIST\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.} | |
fd128b0c RR |
25 | \twocolitem{{\bf EVT\_LIST\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} |
26 | \twocolitem{{\bf EVT\_LIST\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} | |
a660d684 KB |
27 | \twocolitem{{\bf EVT\_LIST\_DELETE\_ITEM(id, func)}}{Delete an item.} |
28 | \twocolitem{{\bf EVT\_LIST\_DELETE\_ALL\_ITEMS(id, func)}}{Delete all items.} | |
29 | \twocolitem{{\bf EVT\_LIST\_GET\_INFO(id, func)}}{Request information from the application, usually the item text.} | |
30 | \twocolitem{{\bf EVT\_LIST\_SET\_INFO(id, func)}}{Information is being supplied (not implemented).} | |
31 | \twocolitem{{\bf EVT\_LIST\_ITEM\_SELECTED(id, func)}}{The item has been selected.} | |
32 | \twocolitem{{\bf EVT\_LIST\_ITEM\_DESELECTED(id, func)}}{The item has been deselected.} | |
8b17ba72 | 33 | \twocolitem{{\bf EVT\_LIST\_ITEM\_ACTIVATED(id, func)}}{The item has been activated (ENTER or double click).} |
a660d684 KB |
34 | \twocolitem{{\bf EVT\_LIST\_KEY\_DOWN(id, func)}}{A key has been pressed.} |
35 | \twocolitem{{\bf EVT\_LIST\_INSERT\_ITEM(id, func)}}{An item has been inserted.} | |
36 | \twocolitem{{\bf EVT\_LIST\_COL\_CLICK(id, func)}}{A column ({\bf m\_col}) has been left-clicked.} | |
614391dc | 37 | \twocolitem{{\bf EVT\_LIST\_CACHE\_HINT(id, func)}}{Prepare cache for a virtual list control} |
a660d684 KB |
38 | \end{twocollist}% |
39 | ||
40 | \wxheading{See also} | |
41 | ||
42 | \helpref{wxListCtrl}{wxlistctrl} | |
43 | ||
44 | \latexignore{\rtfignore{\wxheading{Members}}} | |
45 | ||
46 | \membersection{wxListEvent::wxListEvent} | |
47 | ||
48 | \func{}{wxListEvent}{\param{WXTYPE }{commandType = 0}, \param{int }{id = 0}} | |
49 | ||
50 | Constructor. | |
51 | ||
614391dc VZ |
52 | \membersection{wxListEvent::GetCacheFrom}\label{wxlisteventgetcachefrom} |
53 | ||
54 | \constfunc{long}{GetCacheFrom}{\void} | |
55 | ||
56 | For {\tt EVT\_LIST\_CACHE\_HINT} event only: return the first item which the | |
57 | list control advises us to cache. | |
58 | ||
59 | \membersection{wxListEvent::GetCacheTo}\label{wxlisteventgetcacheto} | |
60 | ||
61 | \constfunc{long}{GetCacheTo}{\void} | |
62 | ||
63 | For {\tt EVT\_LIST\_CACHE\_HINT} event only: return the last item (inclusive) | |
64 | which the list control advises us to cache. | |
65 | ||
f6bcfd97 | 66 | \membersection{wxListEvent::GetCode}\label{wxlisteventgetcode} |
a660d684 | 67 | |
f6bcfd97 | 68 | \constfunc{int}{GetCode}{\void} |
a660d684 KB |
69 | |
70 | Key code if the event is a keypress event. | |
71 | ||
f6bcfd97 | 72 | \membersection{wxListEvent::GetIndex}\label{wxlisteventgetindex} |
a660d684 | 73 | |
f6bcfd97 | 74 | \constfunc{long}{GetIndex}{\void} |
a660d684 KB |
75 | |
76 | The item index. | |
77 | ||
f6bcfd97 | 78 | \membersection{wxListEvent::GetOldIndex}\label{wxlisteventgetoldindex} |
a660d684 | 79 | |
f6bcfd97 | 80 | \constfunc{long}{GetOldIndex}{\void} |
a660d684 KB |
81 | |
82 | The old item index. | |
83 | ||
f6bcfd97 | 84 | \membersection{wxListEvent::GetColumn}\label{wxlisteventgetcolumn} |
a660d684 | 85 | |
f6bcfd97 | 86 | \constfunc{int}{GetColumn}{\void} |
a660d684 KB |
87 | |
88 | The column position. | |
89 | ||
f6bcfd97 | 90 | \membersection{wxListEvent::Cancelled}\label{wxlisteventcancelled} |
a660d684 | 91 | |
f6bcfd97 | 92 | \constfunc{bool}{Cancelled}{\void} |
a660d684 KB |
93 | |
94 | TRUE if this event is an end edit event and the user cancelled the edit. | |
95 | ||
f6bcfd97 | 96 | \membersection{wxListEvent::GetPoint}\label{wxlisteventgetpoint} |
a660d684 | 97 | |
f6bcfd97 | 98 | \constfunc{wxPoint}{GetPoint}{\void} |
a660d684 KB |
99 | |
100 | The position of the mouse pointer if the event is a drag event. | |
101 | ||
a660d684 | 102 | |
f6bcfd97 BP |
103 | \membersection{wxListEvent::GetLabel}\label{wxlisteventgetlabel} |
104 | ||
105 | \constfunc{const wxString\&}{GetLabel}{\void} | |
106 | ||
107 | The label. | |
108 | ||
109 | \membersection{wxListEvent::GetText}\label{wxlisteventgettext} | |
110 | ||
111 | \constfunc{const wxString\&}{GetText}{\void} | |
112 | ||
113 | The text. | |
114 | ||
115 | \membersection{wxListEvent::GetImage}\label{wxlisteventgetimage} | |
116 | ||
117 | \constfunc{int}{GetImage}{\void} | |
118 | ||
119 | The image. | |
120 | ||
121 | \membersection{wxListEvent::GetData}\label{wxlisteventgetdata} | |
122 | ||
123 | \constfunc{long}{GetData}{\void} | |
124 | ||
125 | The data. | |
126 | ||
127 | \membersection{wxListEvent::GetMask}\label{wxlisteventgetmask} | |
128 | ||
129 | \constfunc{long}{GetMask}{\void} | |
130 | ||
131 | The mask. | |
132 | ||
133 | \membersection{wxListEvent::GetItem}\label{wxlisteventgetitem} | |
134 | ||
135 | \constfunc{const wxListItem\&}{GetItem}{\void} | |
a660d684 KB |
136 | |
137 | An item object, used by some events. See also \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}. | |
138 | ||
139 |