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