]>
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.} | |
11358d39 VZ |
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).} | |
a660d684 KB |
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).} |
11358d39 | 34 | \twocolitem{{\bf EVT\_LIST\_ITEM\_RIGHT\_CLICK(id, func)}}{An item has been right-clicked.} |
a660d684 KB |
35 | \twocolitem{{\bf EVT\_LIST\_KEY\_DOWN(id, func)}}{A key has been pressed.} |
36 | \twocolitem{{\bf EVT\_LIST\_INSERT\_ITEM(id, func)}}{An item has been inserted.} | |
37 | \twocolitem{{\bf EVT\_LIST\_COL\_CLICK(id, func)}}{A column ({\bf m\_col}) has been left-clicked.} | |
11358d39 VZ |
38 | \twocolitem{{\bf EVT\_LIST\_COL\_RIGHT\_CLICK(id, func)}}{A column ({\bf m\_col}) has been right-clicked.} |
39 | \twocolitem{{\bf EVT\_LIST\_COL\_BEGIN\_DRAG(id, func)}}{The user started resizing a column - can be vetoed.} | |
40 | \twocolitem{{\bf EVT\_LIST\_COL\_DRAGGING(id, func)}}{The divider between columns is being dragged.} | |
41 | \twocolitem{{\bf EVT\_LIST\_COL\_END\_DRAG(id, func)}}{A column has been resized by the user.} | |
614391dc | 42 | \twocolitem{{\bf EVT\_LIST\_CACHE\_HINT(id, func)}}{Prepare cache for a virtual list control} |
a660d684 KB |
43 | \end{twocollist}% |
44 | ||
45 | \wxheading{See also} | |
46 | ||
47 | \helpref{wxListCtrl}{wxlistctrl} | |
48 | ||
49 | \latexignore{\rtfignore{\wxheading{Members}}} | |
50 | ||
51 | \membersection{wxListEvent::wxListEvent} | |
52 | ||
53 | \func{}{wxListEvent}{\param{WXTYPE }{commandType = 0}, \param{int }{id = 0}} | |
54 | ||
55 | Constructor. | |
56 | ||
614391dc VZ |
57 | \membersection{wxListEvent::GetCacheFrom}\label{wxlisteventgetcachefrom} |
58 | ||
59 | \constfunc{long}{GetCacheFrom}{\void} | |
60 | ||
61 | For {\tt EVT\_LIST\_CACHE\_HINT} event only: return the first item which the | |
62 | list control advises us to cache. | |
63 | ||
64 | \membersection{wxListEvent::GetCacheTo}\label{wxlisteventgetcacheto} | |
65 | ||
66 | \constfunc{long}{GetCacheTo}{\void} | |
67 | ||
68 | For {\tt EVT\_LIST\_CACHE\_HINT} event only: return the last item (inclusive) | |
69 | which the list control advises us to cache. | |
70 | ||
f6bcfd97 | 71 | \membersection{wxListEvent::GetCode}\label{wxlisteventgetcode} |
a660d684 | 72 | |
f6bcfd97 | 73 | \constfunc{int}{GetCode}{\void} |
a660d684 KB |
74 | |
75 | Key code if the event is a keypress event. | |
76 | ||
f6bcfd97 | 77 | \membersection{wxListEvent::GetIndex}\label{wxlisteventgetindex} |
a660d684 | 78 | |
f6bcfd97 | 79 | \constfunc{long}{GetIndex}{\void} |
a660d684 KB |
80 | |
81 | The item index. | |
82 | ||
f6bcfd97 | 83 | \membersection{wxListEvent::GetColumn}\label{wxlisteventgetcolumn} |
a660d684 | 84 | |
f6bcfd97 | 85 | \constfunc{int}{GetColumn}{\void} |
a660d684 | 86 | |
11358d39 VZ |
87 | The column position: it is only used with {\tt COL} events. For the column |
88 | dragging events, it is the column to the left of the divider being dragged, for | |
89 | the column click events it may be $-1$ if the user clicked in the list control | |
90 | header outside any column. | |
a660d684 | 91 | |
f6bcfd97 | 92 | \membersection{wxListEvent::Cancelled}\label{wxlisteventcancelled} |
a660d684 | 93 | |
f6bcfd97 | 94 | \constfunc{bool}{Cancelled}{\void} |
a660d684 KB |
95 | |
96 | TRUE if this event is an end edit event and the user cancelled the edit. | |
97 | ||
f6bcfd97 | 98 | \membersection{wxListEvent::GetPoint}\label{wxlisteventgetpoint} |
a660d684 | 99 | |
f6bcfd97 | 100 | \constfunc{wxPoint}{GetPoint}{\void} |
a660d684 KB |
101 | |
102 | The position of the mouse pointer if the event is a drag event. | |
103 | ||
a660d684 | 104 | |
f6bcfd97 BP |
105 | \membersection{wxListEvent::GetLabel}\label{wxlisteventgetlabel} |
106 | ||
107 | \constfunc{const wxString\&}{GetLabel}{\void} | |
108 | ||
109 | The label. | |
110 | ||
111 | \membersection{wxListEvent::GetText}\label{wxlisteventgettext} | |
112 | ||
113 | \constfunc{const wxString\&}{GetText}{\void} | |
114 | ||
115 | The text. | |
116 | ||
117 | \membersection{wxListEvent::GetImage}\label{wxlisteventgetimage} | |
118 | ||
119 | \constfunc{int}{GetImage}{\void} | |
120 | ||
121 | The image. | |
122 | ||
123 | \membersection{wxListEvent::GetData}\label{wxlisteventgetdata} | |
124 | ||
125 | \constfunc{long}{GetData}{\void} | |
126 | ||
127 | The data. | |
128 | ||
129 | \membersection{wxListEvent::GetMask}\label{wxlisteventgetmask} | |
130 | ||
131 | \constfunc{long}{GetMask}{\void} | |
132 | ||
133 | The mask. | |
134 | ||
135 | \membersection{wxListEvent::GetItem}\label{wxlisteventgetitem} | |
136 | ||
137 | \constfunc{const wxListItem\&}{GetItem}{\void} | |
a660d684 KB |
138 | |
139 | An item object, used by some events. See also \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}. | |
140 | ||
141 |