1 \section{\class{wxListEvent
}}\label{wxlistevent
}
3 A list event holds information about events associated with wxListCtrl objects.
5 \wxheading{Derived from
}
7 \helpref{wxNotifyEvent
}{wxnotifyevent
}\\
8 \helpref{wxCommandEvent
}{wxcommandevent
}\\
9 \helpref{wxEvent
}{wxevent
}\\
10 \helpref{wxObject
}{wxobject
}
12 \wxheading{Include files
}
16 \wxheading{Event table macros
}
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.
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\_ITEM\_SELECTED(id, func)
}}{The item has been selected.
}
30 \twocolitem{{\bf EVT
\_LIST\_ITEM\_DESELECTED(id, func)
}}{The item has been deselected.
}
31 \twocolitem{{\bf EVT
\_LIST\_ITEM\_ACTIVATED(id, func)
}}{The item has been activated (ENTER or double click).
}
32 \twocolitem{{\bf EVT
\_LIST\_ITEM\_FOCUSED(id, func)
}}{The currently focused item has changed.
}
33 \twocolitem{{\bf EVT
\_LIST\_ITEM\_MIDDLE\_CLICK(id, func)
}}{The middle mouse button has been clicked on an item.
}
34 \twocolitem{{\bf EVT
\_LIST\_ITEM\_RIGHT\_CLICK(id, func)
}}{The right mouse button has been clicked on an item.
}
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.
}
38 \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.
}
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.
}
42 \twocolitem{{\bf EVT
\_LIST\_CACHE\_HINT(id, func)
}}{Prepare cache for a virtual list control
}
47 \helpref{wxListCtrl
}{wxlistctrl
}
49 \latexignore{\rtfignore{\wxheading{Members
}}}
52 \membersection{wxListEvent::wxListEvent
}\label{wxlisteventctor
}
54 \func{}{wxListEvent
}{\param{WXTYPE
}{commandType =
0},
\param{int
}{id =
0}}
59 \membersection{wxListEvent::GetCacheFrom
}\label{wxlisteventgetcachefrom
}
61 \constfunc{long
}{GetCacheFrom
}{\void}
63 For
{\tt EVT
\_LIST\_CACHE\_HINT} event only: return the first item which the
64 list control advises us to cache.
67 \membersection{wxListEvent::GetCacheTo
}\label{wxlisteventgetcacheto
}
69 \constfunc{long
}{GetCacheTo
}{\void}
71 For
{\tt EVT
\_LIST\_CACHE\_HINT} event only: return the last item (inclusive)
72 which the list control advises us to cache.
75 \membersection{wxListEvent::GetKeyCode
}\label{wxlisteventgetkeycode
}
77 \constfunc{int
}{GetKeyCode
}{\void}
79 Key code if the event is a keypress event.
82 \membersection{wxListEvent::GetIndex
}\label{wxlisteventgetindex
}
84 \constfunc{long
}{GetIndex
}{\void}
89 \membersection{wxListEvent::GetColumn
}\label{wxlisteventgetcolumn
}
91 \constfunc{int
}{GetColumn
}{\void}
93 The column position: it is only used with
{\tt COL
} events. For the column
94 dragging events, it is the column to the left of the divider being dragged, for
95 the column click events it may be $-
1$ if the user clicked in the list control
96 header outside any column.
99 \membersection{wxListEvent::GetPoint
}\label{wxlisteventgetpoint
}
101 \constfunc{wxPoint
}{GetPoint
}{\void}
103 The position of the mouse pointer if the event is a drag event.
107 \membersection{wxListEvent::GetLabel
}\label{wxlisteventgetlabel
}
109 \constfunc{const wxString\&
}{GetLabel
}{\void}
111 The (new) item label for
\texttt{EVT
\_LIST\_END\_LABEL\_EDIT} event.
114 \membersection{wxListEvent::GetText
}\label{wxlisteventgettext
}
116 \constfunc{const wxString\&
}{GetText
}{\void}
121 \membersection{wxListEvent::GetImage
}\label{wxlisteventgetimage
}
123 \constfunc{int
}{GetImage
}{\void}
128 \membersection{wxListEvent::GetData
}\label{wxlisteventgetdata
}
130 \constfunc{long
}{GetData
}{\void}
135 \membersection{wxListEvent::GetMask
}\label{wxlisteventgetmask
}
137 \constfunc{long
}{GetMask
}{\void}
142 \membersection{wxListEvent::GetItem
}\label{wxlisteventgetitem
}
144 \constfunc{const wxListItem\&
}{GetItem
}{\void}
146 An item object, used by some events. See also
\helpref{wxListCtrl::SetItem
}{wxlistctrlsetitem
}.
149 \membersection{wxListEvent::IsEditCancelled
}\label{wxlisteventiseditcancelled
}
151 \constfunc{bool
}{IsEditCancelled
}{\void}
153 This method only makes sense for
\texttt{EVT
\_LIST\_END\_LABEL\_EDIT} message
154 and returns
\true if it the label editing has been cancelled by the user
155 (
\helpref{GetLabel
}{wxlisteventgetlabel
} returns an empty string in this case
156 but it doesn't allow the application to distinguish between really cancelling the edit and
157 the admittedly rare case when the user wants to rename it to an empty string).