wxTreeCtrl docs additions/corrections, wxNotifyEvent::Allow() adocumented

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-09-16 17:34:57 +00:00
parent 2e7005d54f
commit 19d900fd6a
3 changed files with 22 additions and 0 deletions

View File

@@ -7,6 +7,14 @@ It (or an object of a derived class) is sent when the controls state is being
changed and allows the program to \helpref{Veto()}{wxnotifyeventveto} this
change if it wants to prevent it from happening.
In some rare cases (so far only dragging the items in the tree control) the
event is disabled by default in which case
\helpref{Allow()}{wxnotifyeventallow} may be called to allow it.
If both \helpref{Allow()}{wxnotifyeventallow} and
\helpref{Veto()}{wxnotifyeventveto} are called, only the last method called
counts.
\wxheading{Derived from}
\helpref{wxCommandEvent}{wxcommandevent}\\
@@ -34,6 +42,12 @@ None
Constructor (used internally by wxWindows only).
\membersection{wxNotifyEvent::Allow}\label{wxnotifyeventallow}
\func{void}{Allow}{\param{bool }{allow = TRUE}}
Allow the action signalled by this event to be carried.
\membersection{wxNotifyEvent::IsAllowed}\label{wxnotifyeventisallowed}
\constfunc{bool}{IsAllowed}{\void}

View File

@@ -40,6 +40,7 @@ functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument.
\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\_END\_DRAG(id, func)}}{Drag ended (drop).}
\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\_LABEL\_EDIT(id, func)}}{Finish editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
\twocolitem{{\bf EVT\_TREE\_DELETE\_ITEM(id, func)}}{Delete an item.}
@@ -55,6 +56,12 @@ functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument.
\twocolitem{{\bf EVT\_TREE\_KEY\_DOWN(id, func)}}{A key has been pressed.}
\end{twocollist}%
Note that to allow drag and drop in the tree control you must explicitly call
\helpref{Allow()}{wxnotifyeventallow} in the event handler, by default
dragging is disabled. On the other hand, label editing is allowed by default
for the controls with \windowstyle{wxTR\_EDIT\_LABELS} style but you can call
\helpref{Veto()}{wxnotifyeventveto} to prevent it from happening.
\wxheading{See also}
\helpref{wxTreeItemData}{wxtreeitemdata}, \helpref{wxTreeCtrl overview}{wxtreectrloverview}, \helpref{wxListBox}{wxlistbox}, \helpref{wxListCtrl}{wxlistctrl},\rtfsp

View File

@@ -22,6 +22,7 @@ functions that take a wxTreeEvent argument.
\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\_END\_DRAG(id, func)}}{Drag ended (drop).}
\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\_LABEL\_EDIT(id, func)}}{Finish editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.}
\twocolitem{{\bf EVT\_TREE\_DELETE\_ITEM(id, func)}}{Delete an item.}