]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/listevt.tex
mention that doing SetFocus() results in the focus event being sent
[wxWidgets.git] / docs / latex / wx / listevt.tex
... / ...
CommitLineData
1\section{\class{wxListEvent}}\label{wxlistevent}
2
3A list event holds information about events associated with wxListCtrl objects.
4
5\wxheading{Derived from}
6
7\helpref{wxNotifyEvent}{wxnotifyevent}\\
8\helpref{wxCommandEvent}{wxcommandevent}\\
9\helpref{wxEvent}{wxevent}\\
10\helpref{wxObject}{wxobject}
11
12\wxheading{Include files}
13
14<wx/listctrl.h>
15
16\wxheading{Event table macros}
17
18To process input from a list control, use these event handler macros to direct input to member
19functions 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.}
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}.}
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.}
33\twocolitem{{\bf EVT\_LIST\_ITEM\_ACTIVATED(id, func)}}{The item has been activated (ENTER or double click).}
34\twocolitem{{\bf EVT\_LIST\_ITEM\_FOCUSED(id, func)}}{The currently focused item has changed.}
35\twocolitem{{\bf EVT\_LIST\_ITEM\_MIDDLE\_CLICK(id, func)}}{The middle mouse button has been clicked on an item.}
36\twocolitem{{\bf EVT\_LIST\_ITEM\_RIGHT\_CLICK(id, func)}}{The right mouse button has been clicked on an item.}
37\twocolitem{{\bf EVT\_LIST\_KEY\_DOWN(id, func)}}{A key has been pressed.}
38\twocolitem{{\bf EVT\_LIST\_INSERT\_ITEM(id, func)}}{An item has been inserted.}
39\twocolitem{{\bf EVT\_LIST\_COL\_CLICK(id, func)}}{A column ({\bf m\_col}) has been left-clicked.}
40\twocolitem{{\bf EVT\_LIST\_COL\_RIGHT\_CLICK(id, func)}}{A column ({\bf m\_col}) (which can be $-1$ if the click occured outside any column) has been right-clicked.}
41\twocolitem{{\bf EVT\_LIST\_COL\_BEGIN\_DRAG(id, func)}}{The user started resizing a column - can be vetoed.}
42\twocolitem{{\bf EVT\_LIST\_COL\_DRAGGING(id, func)}}{The divider between columns is being dragged.}
43\twocolitem{{\bf EVT\_LIST\_COL\_END\_DRAG(id, func)}}{A column has been resized by the user.}
44\twocolitem{{\bf EVT\_LIST\_CACHE\_HINT(id, func)}}{Prepare cache for a virtual list control}
45\end{twocollist}%
46
47\wxheading{See also}
48
49\helpref{wxListCtrl}{wxlistctrl}
50
51\latexignore{\rtfignore{\wxheading{Members}}}
52
53\membersection{wxListEvent::wxListEvent}
54
55\func{}{wxListEvent}{\param{WXTYPE }{commandType = 0}, \param{int }{id = 0}}
56
57Constructor.
58
59\membersection{wxListEvent::GetCacheFrom}\label{wxlisteventgetcachefrom}
60
61\constfunc{long}{GetCacheFrom}{\void}
62
63For {\tt EVT\_LIST\_CACHE\_HINT} event only: return the first item which the
64list control advises us to cache.
65
66\membersection{wxListEvent::GetCacheTo}\label{wxlisteventgetcacheto}
67
68\constfunc{long}{GetCacheTo}{\void}
69
70For {\tt EVT\_LIST\_CACHE\_HINT} event only: return the last item (inclusive)
71which the list control advises us to cache.
72
73\membersection{wxListEvent::GetCode}\label{wxlisteventgetcode}
74
75\constfunc{int}{GetCode}{\void}
76
77Key code if the event is a keypress event.
78
79\membersection{wxListEvent::GetIndex}\label{wxlisteventgetindex}
80
81\constfunc{long}{GetIndex}{\void}
82
83The item index.
84
85\membersection{wxListEvent::GetColumn}\label{wxlisteventgetcolumn}
86
87\constfunc{int}{GetColumn}{\void}
88
89The column position: it is only used with {\tt COL} events. For the column
90dragging events, it is the column to the left of the divider being dragged, for
91the column click events it may be $-1$ if the user clicked in the list control
92header outside any column.
93
94\membersection{wxListEvent::Cancelled}\label{wxlisteventcancelled}
95
96\constfunc{bool}{Cancelled}{\void}
97
98TRUE if this event is an end edit event and the user cancelled the edit.
99
100\membersection{wxListEvent::GetPoint}\label{wxlisteventgetpoint}
101
102\constfunc{wxPoint}{GetPoint}{\void}
103
104The position of the mouse pointer if the event is a drag event.
105
106
107\membersection{wxListEvent::GetLabel}\label{wxlisteventgetlabel}
108
109\constfunc{const wxString\&}{GetLabel}{\void}
110
111The label.
112
113\membersection{wxListEvent::GetText}\label{wxlisteventgettext}
114
115\constfunc{const wxString\&}{GetText}{\void}
116
117The text.
118
119\membersection{wxListEvent::GetImage}\label{wxlisteventgetimage}
120
121\constfunc{int}{GetImage}{\void}
122
123The image.
124
125\membersection{wxListEvent::GetData}\label{wxlisteventgetdata}
126
127\constfunc{long}{GetData}{\void}
128
129The data.
130
131\membersection{wxListEvent::GetMask}\label{wxlisteventgetmask}
132
133\constfunc{long}{GetMask}{\void}
134
135The mask.
136
137\membersection{wxListEvent::GetItem}\label{wxlisteventgetitem}
138
139\constfunc{const wxListItem\&}{GetItem}{\void}
140
141An item object, used by some events. See also \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}.
142
143