File: treeevt.tex

package info (click to toggle)
wxwidgets2.8 2.8.12.1-12
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 242,920 kB
  • sloc: cpp: 1,840,772; xml: 385,749; python: 334,729; makefile: 51,774; ansic: 30,987; sh: 7,716; sql: 258; lex: 194; perl: 139; yacc: 128; pascal: 95; php: 45; lisp: 38; tcl: 38; java: 22; haskell: 20; cs: 18; erlang: 17; ruby: 16; asm: 15; ada: 9; ml: 9; csh: 9
file content (123 lines) | stat: -rw-r--r-- 5,563 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
\section{\class{wxTreeEvent}}\label{wxtreeevent}

A tree event holds information about events associated with wxTreeCtrl objects.

\wxheading{Derived from}

\helpref{wxNotifyEvent}{wxnotifyevent}\\
\helpref{wxCommandEvent}{wxcommandevent}\\
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}

\wxheading{Include files}

<wx/treectrl.h>

\wxheading{Event table macros}

To process input from a tree control, use these event handler macros to direct input to member
functions that take a wxTreeEvent argument.

\twocolwidtha{9cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_TREE\_BEGIN\_DRAG(id, func)}}{The user has started dragging an item with the left mouse button. The event handler must call {\bf wxTreeEvent::Allow()} for the drag operation to continue.}
\twocolitem{{\bf EVT\_TREE\_BEGIN\_RDRAG(id, func)}}{The user has started dragging an item with the right mouse button. The event handler must call {\bf wxTreeEvent::Allow()} for the drag operation to continue.}
\twocolitem{{\bf EVT\_TREE\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
\twocolitem{{\bf EVT\_TREE\_END\_DRAG(id, func)}}{The user has released the mouse after dragging an item.}
\twocolitem{{\bf EVT\_TREE\_END\_LABEL\_EDIT(id, func)}}{The user has finished editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
\twocolitem{{\bf EVT\_TREE\_DELETE\_ITEM(id, func)}}{A tree item has been deleted.}
% they're not very (or at all) useful currently
%\twocolitem{{\bf EVT\_TREE\_GET\_INFO(id, func)}}{Request information from the application.}
%\twocolitem{{\bf EVT\_TREE\_SET\_INFO(id, func)}}{Information is being supplied.}
\twocolitem{{\bf EVT\_TREE\_ITEM\_ACTIVATED(id, func)}}{An item has been activated (e.g. double clicked).}
\twocolitem{{\bf EVT\_TREE\_ITEM\_COLLAPSED(id, func)}}{The item has been collapsed.}
\twocolitem{{\bf EVT\_TREE\_ITEM\_COLLAPSING(id, func)}}{The item is being collapsed. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
\twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDED(id, func)}}{The item has been expanded.}
\twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDING(id, func)}}{The item is being expanded. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
\twocolitem{{\bf EVT\_TREE\_ITEM\_RIGHT\_CLICK(id, func)}}{The user has clicked the item with the right mouse button.}
\twocolitem{{\bf EVT\_TREE\_ITEM\_MIDDLE\_CLICK(id, func)}}{The user has clicked the item with the middle mouse button.}
\twocolitem{{\bf EVT\_TREE\_KEY\_DOWN(id, func)}}{A key has been pressed.}
\twocolitem{{\bf EVT\_TREE\_SEL\_CHANGED(id, func)}}{Selection has changed.}
\twocolitem{{\bf EVT\_TREE\_SEL\_CHANGING(id, func)}}{Selection is changing. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
\twocolitem{{\bf EVT\_TREE\_KEY\_DOWN(id, func)}}{A key has been pressed.}
\twocolitem{{\bf EVT\_TREE\_ITEM\_GETTOOLTIP(id, func)}}{The opportunity to set the item tooltip
is being given to the application (call wxTreeEvent::SetToolTip). Windows only.}
\twocolitem{{\bf EVT\_TREE\_ITEM\_MENU(id, func)}}{The context menu for the selected item has been requested, either by a right click or by using the menu key.}
\twocolitem{{\bf EVT\_TREE\_STATE\_IMAGE\_CLICK(id, func)}}{The state image has been clicked. Windows only.}
\end{twocollist}

\wxheading{See also}

\helpref{wxTreeCtrl}{wxtreectrl}

\latexignore{\rtfignore{\wxheading{Members}}}


\membersection{wxTreeEvent::wxTreeEvent}\label{wxtreeeventctor}

\func{}{wxTreeEvent}{\param{wxEventType }{commandType}, \param{wxTreeCtrl *}{tree}, \param{const wxTreeItemId\&}{item = wxTreeItemId()}}

Constructor, used by wxWidgets itself only.


\membersection{wxTreeEvent::GetKeyCode}\label{wxtreeeventgetkeycode}

\constfunc{int}{GetKeyCode}{}

Returns the key code if the event is a key event. Use 
\helpref{GetKeyEvent}{wxtreeeventgetkeyevent} to get the values of the
modifier keys for this event (i.e. Shift or Ctrl).


\membersection{wxTreeEvent::GetItem}\label{wxtreeeventgetitem}

\constfunc{wxTreeItemId}{GetItem}{}

Returns the item (valid for all events).


\membersection{wxTreeEvent::GetKeyEvent}\label{wxtreeeventgetkeyevent}

\constfunc{const wxKeyEvent\&}{GetKeyEvent}{}

Returns the key event for {\tt EVT\_TREE\_KEY\_DOWN} events.


\membersection{wxTreeEvent::GetLabel}\label{wxtreeeventgetlabel}

\constfunc{const wxString\&}{GetLabel}{}

Returns the label if the event is a begin or end edit label event.


\membersection{wxTreeEvent::GetOldItem}\label{wxtreeeventgetolditem}

\constfunc{wxTreeItemId}{GetOldItem}{}

Returns the old item index (valid for EVT\_TREE\_ITEM\_CHANGING and CHANGED events)


\membersection{wxTreeEvent::GetPoint}\label{wxtreeeventgetpoint}

\constfunc{wxPoint}{GetPoint}{}

Returns the position of the mouse pointer if the event is a drag or menu-context event.
In both cases the position is in client coordinates - i.e. relative to the wxTreeCtrl
window (so that you can pass it directly to e.g. \helpref{wxWindow::PopupMenu}{wxwindowpopupmenu}).


\membersection{wxTreeEvent::IsEditCancelled}\label{wxtreeeventiseditcancelled}

\constfunc{bool}{IsEditCancelled}{}

Returns true if the label edit was cancelled. This should be
called from within an EVT\_TREE\_END\_LABEL\_EDIT handler.


\membersection{wxTreeEvent::SetToolTip}\label{wxtreeeventsettooltip}

\func{void}{SetToolTip}{\param{const wxString\&}{ tooltip}}

Set the tooltip for the item (valid for EVT\_TREE\_ITEM\_GETTOOLTIP events).
Windows only.