Implemented wxMouseCaptureChangedEvent and made wxGenericDragImage check it

the capture before release it.
Documented wxMouseCaptureChangedEvent and GetCapture/FindCapture.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-04-12 20:26:43 +00:00
parent cd5e929815
commit a5e84126fc
10 changed files with 128 additions and 3 deletions

View File

@@ -222,6 +222,7 @@ An event object contains information about a specific event. Event handlers
\twocolitem{\helpref{wxListEvent}{wxlistevent}}{A list control event}
\twocolitem{\helpref{wxMaximizeEvent}{wxmaximizeevent}}{A maximize event}
\twocolitem{\helpref{wxMenuEvent}{wxmenuevent}}{A menu event}
\twocolitem{\helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}}{A mouse capture changed event}
\twocolitem{\helpref{wxMouseEvent}{wxmouseevent}}{A mouse event}
\twocolitem{\helpref{wxMoveEvent}{wxmoveevent}}{A move event}
\twocolitem{\helpref{wxNotebookEvent}{wxnotebookevent}}{A notebook control event}

View File

@@ -202,6 +202,7 @@
\input mimetype.tex
\input minifram.tex
\input module.tex
\input mcaptevt.tex
\input mouseevt.tex
\input moveevt.tex
\input mltchdlg.tex

View File

@@ -0,0 +1,50 @@
\section{\class{wxMouseCaptureChangedEvent}}\label{wxmousecapturechangedevent}
An mouse capture changed event is sent to a window that loses its
mouse capture. This is called even if wxWindow::ReleaseCapture
was called by the application code. Handling this event allows
an application to cater for unexpected capture releases which
might otherwise confuse mouse handling code.
This event is implemented under Windows only.
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/event.h>
\wxheading{Event table macros}
To process this event, use the following event handler macro to direct input to a member
function that takes a wxMouseCaptureChangedEvent argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_MOUSE\_CAPTURE\_CHANGED(func)}}{Process a wxEVT\_MOUSE\_CAPTURE\_CHANGED event.}
\end{twocollist}%
\wxheading{See also}
\helpref{Event handling overview}{eventhandlingoverview},
\helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse},
\helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse},
\helpref{wxWindow::GetCapture}{wxwindowgetcapture}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxMouseCaptureChangedEvent::wxMouseCaptureChangedEvent}
\func{}{wxMouseCaptureChangedEvent}{\param{wxWindowID }{windowId = 0}, \param{wxWindow*}{ gainedCapture = NULL}}
Constructor.
\membersection{wxActivateEvent::GetCapturedWindow}\label{wxmousecapturechangedeventgetcapturedwindow}
\constfunc{wxWindow*}{GetCapturedWindow}{\void}
Returns the window that gained the capture, or NULL if it was a non-wxWindows window.

View File

@@ -509,6 +509,19 @@ same as the size the window would have had after calling
Returns the \helpref{caret}{wxcaret} associated with the window.
\membersection{wxWindow::GetCapture}\label{wxwindowgetcapture}
\func{static wxWindow *}{GetCapture}{\void}
Returns the currently captured window.
\wxheading{See also}
\helpref{wxWindow::HasCapture}{wxwindowhascapture},
\helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse},
\helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse},
\helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}
\membersection{wxWindow::GetCharHeight}
\constfunc{virtual int}{GetCharHeight}{\void}
@@ -896,6 +909,18 @@ Returns a pointer to the current validator for the window, or NULL if there is n
Gets the window style that was passed to the constructor or {\bf Create}
method. {\bf GetWindowStyle()} is another name for the same function.
\membersection{wxWindow::HasCapture}\label{wxwindowhascapture}
\constfunc{virtual bool}{HasCapture}{\void}
Returns TRUE if this window has the current mouse capture.
\wxheading{See also}
\helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse},
\helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse},
\helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}
\membersection{wxWindow::Hide}\label{wxwindowhide}
\func{bool}{Hide}{\void}
@@ -1665,7 +1690,10 @@ Releases mouse input captured with \helpref{wxWindow::CaptureMouse}{wxwindowcapt
\wxheading{See also}
\helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse}
\helpref{wxWindow::CaptureMouse}{wxwindowcapturemouse},
\helpref{wxWindow::HasCapture}{wxwindowhascapture},
\helpref{wxWindow::ReleaseMouse}{wxwindowreleasemouse},
\helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}
\membersection{wxWindow::RemoveChild}\label{wxwindowremovechild}