X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f4fcc2919776cffa5e3b2f0d44dd24c41e652ff4..bcf576ccfe754a634034203aa133c02fb5d2f964:/docs/latex/wx/closeevt.tex diff --git a/docs/latex/wx/closeevt.tex b/docs/latex/wx/closeevt.tex index 6ea5728e48..9c90c4f5f3 100644 --- a/docs/latex/wx/closeevt.tex +++ b/docs/latex/wx/closeevt.tex @@ -3,18 +3,18 @@ This event class contains information about window and session close events. The handler function for EVT\_CLOSE is called when the user has tried to close a a frame -or dialog box using the window manager (X) or system menu (Windows). It is -called via the \helpref{wxWindow::Close}{wxwindowclose} function, so -that the application can also invoke the handler programmatically. +or dialog box using the window manager (X) or system menu (Windows). It can +also be invoked by the application itself programmatically, for example by +calling the \helpref{wxWindow::Close}{wxwindowclose} function. You should check whether the application is forcing the deletion of the window -using \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto}. If this is {\tt FALSE}, +using \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto}. If this is {\tt false}, you {\it must} destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}. -If the return value is TRUE, it is up to you whether you respond by destroying the window. +If the return value is true, it is up to you whether you respond by destroying the window. If you don't destroy the window, you should call \helpref{wxCloseEvent::Veto}{wxcloseeventveto} to let the calling code know that you did not destroy the window. This allows the \helpref{wxWindow::Close}{wxwindowclose} function -to return {\tt TRUE} or {\tt FALSE} depending on whether the close instruction was honoured or not. +to return {\tt true} or {\tt false} depending on whether the close instruction was honoured or not. \wxheading{Derived from} @@ -49,7 +49,7 @@ This event applies to wxApp only.} \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxCloseEvent::wxCloseEvent} +\membersection{wxCloseEvent::wxCloseEvent}\label{wxcloseeventctor} \func{}{wxCloseEvent}{\param{WXTYPE}{ commandEventType = 0}, \param{int}{ id = 0}} @@ -59,7 +59,7 @@ Constructor. \func{bool}{CanVeto}{\void} -Returns TRUE if you can veto a system shutdown or a window close event. +Returns true if you can veto a system shutdown or a window close event. Vetoing a window close event is not possible if the calling code wishes to force the application to exit, and so this function must be called to check this. @@ -67,19 +67,19 @@ force the application to exit, and so this function must be called to check this \constfunc{bool}{GetLoggingOff}{\void} -Returns TRUE if the user is logging off. +Returns true if the user is logging off. \membersection{wxCloseEvent::GetSessionEnding}\label{wxcloseeventgetsessionending} \constfunc{bool}{GetSessionEnding}{\void} -Returns TRUE if the session is ending. +Returns true if the session is ending. \membersection{wxCloseEvent::GetForce}\label{wxcloseeventgetforce} \constfunc{bool}{GetForce}{\void} -Returns TRUE if the application wishes to force the window to close. +Returns true if the application wishes to force the window to close. This will shortly be obsolete, replaced by CanVeto. \membersection{wxCloseEvent::SetCanVeto}\label{wxcloseeventsetcanveto} @@ -102,12 +102,12 @@ Sets the 'logging off' flag. \membersection{wxCloseEvent::Veto}\label{wxcloseeventveto} -\func{void}{Veto}{\param{bool}{ veto = TRUE}} +\func{void}{Veto}{\param{bool}{ veto = true}} Call this from your event handler to veto a system shutdown or to signal to the calling application that a window close did not happen. You can only veto a shutdown if \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto} returns -TRUE. +true.