- Directs all mouse input to this window.
- Call ReleaseMouse() to release the capture.
-
- Note that wxWidgets maintains the stack of windows having captured the mouse
- and when the mouse is released the capture returns to the window which had had
- captured it previously and it is only really released if there were no previous
- window. In particular, this means that you must release the mouse as many times
- as you capture it, unless the window receives the wxMouseCaptureLostEvent event.
-
- Any application which captures the mouse in the beginning of some operation
- must handle wxMouseCaptureLostEvent and cancel this operation when it receives
- the event. The event handler must not recapture mouse.
-
- @see ReleaseMouse(), wxMouseCaptureLostEvent
- */
- void CaptureMouse();
-
- /**
- This function simply generates a wxCloseEvent whose handler usually tries
- to close the window. It doesn't close the window itself, however.
-
- @param force
- @false if the window's close handler should be able to veto the destruction
- of this window, @true if it cannot.
-
- @remarks Close calls the close handler for the window, providing an
- opportunity for the window to choose whether to destroy
- the window. Usually it is only used with the top level
- windows (wxFrame and wxDialog classes) as the others
- are not supposed to have any special OnClose() logic.
- The close handler should check whether the window is being deleted
- forcibly, using wxCloseEvent::CanVeto, in which case it should
- destroy the window using wxWindow::Destroy.
- Note that calling Close does not guarantee that the window will
- be destroyed; but it provides a way to simulate a manual close
- of a window, which may or may not be implemented by destroying
- the window. The default implementation of wxDialog::OnCloseWindow
- does not necessarily delete the dialog, since it will simply
- simulate an wxID_CANCEL event which is handled by the appropriate
- button event handler and may do anything at all.
- To guarantee that the window will be destroyed, call
- wxWindow::Destroy instead
-
- @see @ref overview_windowdeletion "Window Deletion Overview",
- Destroy(), wxCloseEvent
- */
- bool Close(bool force = false);
-
- /**
- Destroys the window safely. Use this function instead of the delete operator,
- since different window classes can be destroyed differently. Frames and dialogs
- are not destroyed immediately when this function is called -- they are added
- to a list of windows to be deleted on idle time, when all the window's events
- have been processed. This prevents problems with events being sent to
- non-existent windows.
-
- @return @true if the window has either been successfully deleted, or it
- has been added to the list of windows pending real deletion.