1998-05-20 10:25:30 -04:00
\section { \class { wxTreeEvent} } \label { wxtreeevent}
A tree event holds information about events associated with wxTreeCtrl objects.
\wxheading { Derived from}
1999-07-26 06:46:55 -04:00
\helpref { wxNotifyEvent} { wxnotifyevent} \\
1998-05-20 10:25:30 -04:00
\helpref { wxCommandEvent} { wxcommandevent} \\
\helpref { wxEvent} { wxevent} \\
\helpref { wxObject} { wxobject}
1999-02-15 15:41:29 -05:00
\wxheading { Include files}
<wx/treectrl.h>
1998-05-20 10:25:30 -04:00
\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.
2002-04-05 12:27:38 -05:00
\twocolwidtha { 9cm}
1998-05-20 10:25:30 -04:00
\begin { twocollist} \itemsep =0pt
2002-12-04 09:11:26 -05:00
\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.}
1999-07-26 10:28:25 -04:00
\twocolitem { { \bf EVT\_ TREE\_ BEGIN\_ LABEL\_ EDIT(id, func)} } { Begin editing a label. This can be prevented by calling \helpref { Veto()} { wxnotifyeventveto} .}
2002-04-05 12:27:38 -05:00
\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.}
2004-10-22 15:15:35 -04:00
% they're not very (or at all) useful currently
2002-04-05 12:27:38 -05:00
%\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).}
2001-02-08 10:26:38 -05:00
\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} .}
2002-04-05 12:27:38 -05:00
\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.}
1998-05-20 10:25:30 -04:00
\twocolitem { { \bf EVT\_ TREE\_ SEL\_ CHANGED(id, func)} } { Selection has changed.}
1999-07-26 10:28:25 -04:00
\twocolitem { { \bf EVT\_ TREE\_ SEL\_ CHANGING(id, func)} } { Selection is changing. This can be prevented by calling \helpref { Veto()} { wxnotifyeventveto} .}
2003-12-11 02:30:20 -05:00
\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.}
2005-06-01 05:56:43 -04:00
\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.}
2004-02-21 20:16:32 -05:00
\end { twocollist}
1998-05-20 10:25:30 -04:00
\wxheading { See also}
\helpref { wxTreeCtrl} { wxtreectrl}
\latexignore { \rtfignore { \wxheading { Members} } }
2004-09-22 06:59:57 -04:00
\membersection { wxTreeEvent::wxTreeEvent} \label { wxtreeeventctor}
1998-05-20 10:25:30 -04:00
\func { } { wxTreeEvent} { \param { WXTYPE } { commandType = 0} , \param { int } { id = 0} }
Constructor.
2004-09-22 06:59:57 -04:00
\membersection { wxTreeEvent::GetKeyCode} \label { wxtreeeventgetkeycode}
2001-09-24 12:39:49 -04:00
2002-08-15 16:38:39 -04:00
\constfunc { int} { GetKeyCode} { }
2001-09-24 12:39:49 -04:00
Returns the key code if the event was is a key event. Use
\helpref { GetKeyEvent} { wxtreeeventgetkeyevent} to get the values of the
modifier keys for this event (i.e. Shift or Ctrl).
2004-09-22 06:59:57 -04:00
\membersection { wxTreeEvent::GetItem} \label { wxtreeeventgetitem}
1998-05-20 10:25:30 -04:00
1999-08-15 14:35:03 -04:00
\constfunc { wxTreeItemId} { GetItem} { }
1998-05-20 10:25:30 -04:00
2002-04-05 12:27:38 -05:00
Returns the item (valid for all events).
1998-05-20 10:25:30 -04:00
2001-09-24 12:39:49 -04:00
\membersection { wxTreeEvent::GetKeyEvent} \label { wxtreeeventgetkeyevent}
1998-05-20 10:25:30 -04:00
2001-09-24 12:39:49 -04:00
\constfunc { const wxKeyEvent\& } { GetKeyEvent} { }
1998-05-20 10:25:30 -04:00
2001-09-24 12:39:49 -04:00
Returns the key event for { \tt EVT\_ TREE\_ KEY\_ DOWN} events.
1998-05-20 10:25:30 -04:00
2004-09-22 06:59:57 -04:00
\membersection { wxTreeEvent::GetLabel} \label { wxtreeeventgetlabel}
1998-05-20 10:25:30 -04:00
2001-09-24 12:39:49 -04:00
\constfunc { const wxString\& } { GetLabel} { }
1998-05-20 10:25:30 -04:00
2001-09-24 12:39:49 -04:00
Returns the label if the event was a begin or end edit label event.
1998-05-20 10:25:30 -04:00
2004-09-22 06:59:57 -04:00
\membersection { wxTreeEvent::GetOldItem} \label { wxtreeeventgetolditem}
1998-05-20 10:25:30 -04:00
2001-09-24 12:39:49 -04:00
\constfunc { wxTreeItemId} { GetOldItem} { }
1998-05-20 10:25:30 -04:00
2001-09-24 12:39:49 -04:00
Returns the old item index (valid for EVT\_ TREE\_ ITEM\_ CHANGING and CHANGED events)
1998-05-20 10:25:30 -04:00
2004-09-22 06:59:57 -04:00
\membersection { wxTreeEvent::GetPoint()} \label { wxtreeeventgetpoint}
1999-08-15 14:35:03 -04:00
2001-09-24 12:39:49 -04:00
\constfunc { wxPoint} { GetPoint} { }
1999-08-15 14:35:03 -04:00
2001-09-24 12:39:49 -04:00
Returns the position of the mouse pointer if the event is a drag event.
1999-09-05 15:42:03 -04:00
2004-09-22 06:59:57 -04:00
\membersection { wxTreeEvent::IsEditCancelled()} \label { wxtreeeventiseditcancelled}
2002-09-05 15:50:41 -04:00
\constfunc { bool} { IsEditCancelled} { }
2003-01-17 19:16:34 -05:00
Returns true if the label edit was cancelled. This should be
2002-09-05 15:50:41 -04:00
called from within an EVT\_ TREE\_ END\_ LABEL\_ EDIT handler.
2004-09-22 06:59:57 -04:00
\membersection { wxTreeEvent::SetToolTip} \label { wxtreeeventsettooltip}
2003-12-11 02:30:20 -05:00
\func { void} { SetToolTip} { \param { const wxString\& } { tooltip} }
Set the tooltip for the item (valid for EVT\_ TREE\_ ITEM\_ GETTOOLTIP events).
Windows only.