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