X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/954b8ae60391d18b87a604e7919c87c0c6ae208b..78cb09ec439962b53ba75fef814b9a3871412287:/docs/latex/wx/treeevt.tex diff --git a/docs/latex/wx/treeevt.tex b/docs/latex/wx/treeevt.tex index 02188ac288..4471a2a85b 100644 --- a/docs/latex/wx/treeevt.tex +++ b/docs/latex/wx/treeevt.tex @@ -4,6 +4,7 @@ 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} @@ -17,21 +18,33 @@ A tree event holds information about events associated with wxTreeCtrl objects. To process input from a tree control, use these event handler macros to direct input to member functions that take a wxTreeEvent argument. -\twocolwidtha{7cm} +\twocolwidtha{9cm} \begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_TREE\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.} -\twocolitem{{\bf EVT\_TREE\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.} -\twocolitem{{\bf EVT\_TREE\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label.} -\twocolitem{{\bf EVT\_TREE\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label.} -\twocolitem{{\bf EVT\_TREE\_DELETE\_ITEM(id, func)}}{Delete an item.} -\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\_EXPANDED(id, func)}}{Parent has been expanded.} -\twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDING(id, func)}}{Parent is being expanded.} +\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.} +\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.} -\end{twocollist}% +\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} @@ -39,33 +52,72 @@ functions that take a wxTreeEvent argument. \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxTreeEvent::wxTreeEvent} -\func{}{wxTreeEvent}{\param{WXTYPE }{commandType = 0}, \param{int }{id = 0}} +\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}{} -Constructor. +Returns the old item index (valid for EVT\_TREE\_ITEM\_CHANGING and CHANGED events) -\membersection{wxTreeEvent::m\_code} -\member{int}{m\_code} +\membersection{wxTreeEvent::GetPoint}\label{wxtreeeventgetpoint} -Key code if the event is a keypress event. +\constfunc{wxPoint}{GetPoint}{} -\membersection{wxTreeEvent::m\_itemIndex} +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}). -\member{wxTreeItem}{m\_item} -The item. +\membersection{wxTreeEvent::IsEditCancelled}\label{wxtreeeventiseditcancelled} -\membersection{wxTreeEvent::m\_oldItem} +\constfunc{bool}{IsEditCancelled}{} -\member{long}{m\_oldItem} +Returns true if the label edit was cancelled. This should be +called from within an EVT\_TREE\_END\_LABEL\_EDIT handler. -The old item index. -\membersection{wxTreeEvent::m\_pointDrag} +\membersection{wxTreeEvent::SetToolTip}\label{wxtreeeventsettooltip} -\member{wxPoint}{m\_pointDrag} +\func{void}{SetToolTip}{\param{const wxString\&}{ tooltip}} -The position of the mouse pointer if the event is a drag event. +Set the tooltip for the item (valid for EVT\_TREE\_ITEM\_GETTOOLTIP events). +Windows only.