void PushEventHandler( wxEvtHandler *handler );
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
+ // find the given handler in the event handler chain and remove (but
+ // not delete) it from the event handler chain, return TRUE if it was
+ // found and FALSE otherwise (this also results in an assert failure so
+ // this function should only be called when the handler is supposed to
+ // be there)
+ bool RemoveEventHandler(wxEvtHandler *handler);
+
// validators
// ----------
// move the mouse to the specified position
virtual void WarpPointer(int x, int y) = 0;
- // start or end mouse capture
- virtual void CaptureMouse() = 0;
- virtual void ReleaseMouse() = 0;
+ // start or end mouse capture, these functions maintain the stack of
+ // windows having captured the mouse and after calling ReleaseMouse()
+ // the mouse is not released but returns to the window which had had
+ // captured it previously (if any)
+ void CaptureMouse();
+ void ReleaseMouse();
// get the window which currently captures the mouse or NULL
static wxWindow *GetCapture();
virtual wxHitTest DoHitTest(wxCoord x, wxCoord y) const;
+ // capture/release the mouse, used by Capture/ReleaseMouse()
+ virtual void DoCaptureMouse() = 0;
+ virtual void DoReleaseMouse() = 0;
+
// retrieve the position/size of the window
virtual void DoGetPosition( int *x, int *y ) const = 0;
virtual void DoGetSize( int *width, int *height ) const = 0;
// contains the last id generated by NewControlId
static int ms_lastControlId;
+ // the stack of windows which have captured the mouse
+ static struct WXDLLEXPORT wxWindowNext *ms_winCaptureNext;
+
DECLARE_ABSTRACT_CLASS(wxWindowBase)
DECLARE_NO_COPY_CLASS(wxWindowBase)
DECLARE_EVENT_TABLE()