1998-05-20 10:25:30 -04:00
|
|
|
\section{\class{wxCloseEvent}}\label{wxcloseevent}
|
|
|
|
|
|
|
|
This event class contains information about window and session close events.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxEvent}{wxevent}
|
|
|
|
|
|
|
|
\wxheading{Event table macros}
|
|
|
|
|
|
|
|
To process a close event, use these event handler macros to direct input to member
|
|
|
|
functions that take a wxCloseEvent argument.
|
|
|
|
|
|
|
|
\twocolwidtha{7cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
1998-10-12 15:45:24 -04:00
|
|
|
\twocolitem{{\bf EVT\_CLOSE(func)}}{Process a close event, supplying the member function. This
|
|
|
|
event applies to wxFrame and wxDialog classes.}
|
|
|
|
\twocolitem{{\bf EVT\_QUERY\_END\_SESSION(func)}}{Process a query end session event, supplying the member function.
|
|
|
|
This event applies to wxApp only.}
|
1999-01-07 03:43:47 -05:00
|
|
|
\twocolitem{{\bf EVT\_END\_SESSION(func)}}{Process an end session event, supplying the member function.
|
1998-10-12 15:45:24 -04:00
|
|
|
This event applies to wxApp only.}
|
1998-05-20 10:25:30 -04:00
|
|
|
\end{twocollist}%
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
|
|
|
|
\helpref{wxWindow::Close}{wxwindowclose},\rtfsp
|
1998-10-14 04:13:09 -04:00
|
|
|
\helpref{wxApp::OnQueryEndSession}{wxapponqueryendsession},\rtfsp
|
|
|
|
\helpref{wxApp::OnEndSession}{wxapponendsession},\rtfsp
|
1998-05-20 10:25:30 -04:00
|
|
|
\helpref{Window deletion overview}{windowdeletionoverview}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxCloseEvent::wxCloseEvent}
|
|
|
|
|
|
|
|
\func{}{wxCloseEvent}{\param{WXTYPE}{ commandEventType = 0}, \param{int}{ id = 0}}
|
|
|
|
|
|
|
|
Constructor.
|
|
|
|
|
1998-10-12 15:45:24 -04:00
|
|
|
\membersection{wxCloseEvent::CanVeto}\label{wxcloseeventcanveto}
|
|
|
|
|
|
|
|
\func{bool}{CanVeto}{\void}
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\membersection{wxCloseEvent::GetLoggingOff}\label{wxcloseeventgetloggingoff}
|
|
|
|
|
|
|
|
\constfunc{bool}{GetLoggingOff}{\void}
|
|
|
|
|
|
|
|
Returns TRUE if the user is logging off.
|
|
|
|
|
|
|
|
\membersection{wxCloseEvent::GetSessionEnding}\label{wxcloseeventgetsessionending}
|
|
|
|
|
|
|
|
\constfunc{bool}{GetSessionEnding}{\void}
|
|
|
|
|
|
|
|
Returns TRUE if the session is ending.
|
|
|
|
|
|
|
|
\membersection{wxCloseEvent::GetForce}\label{wxcloseeventgetforce}
|
|
|
|
|
1998-10-12 15:45:24 -04:00
|
|
|
\constfunc{bool}{GetForce}{\void}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Returns TRUE if the application wishes to force the window to close.
|
1998-10-12 15:45:24 -04:00
|
|
|
This will shortly be obsolete, replaced by CanVeto.
|
|
|
|
|
|
|
|
\membersection{wxCloseEvent::SetCanVeto}\label{wxcloseeventsetcanveto}
|
|
|
|
|
|
|
|
\func{void}{SetCanVeto}{\param{bool}{ canVeto}}
|
|
|
|
|
|
|
|
Sets the 'can veto' flag.
|
|
|
|
|
|
|
|
\membersection{wxCloseEvent::SetForce}\label{wxcloseeventsetforce}
|
|
|
|
|
|
|
|
\constfunc{void}{SetForce}{\param{bool}{ force}}
|
|
|
|
|
|
|
|
Sets the 'force' flag.
|
|
|
|
|
|
|
|
\membersection{wxCloseEvent::SetLoggingOff}\label{wxcloseeventsetloggingoff}
|
|
|
|
|
|
|
|
\constfunc{void}{SetLoggingOff}{\param{bool}{ loggingOff}}
|
|
|
|
|
|
|
|
Sets the 'logging off' flag.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxCloseEvent::Veto}\label{wxcloseeventveto}
|
|
|
|
|
1998-10-12 15:45:24 -04:00
|
|
|
\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.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1998-10-12 15:45:24 -04:00
|
|
|
You can only veto a shutdown if \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto} returns
|
|
|
|
TRUE.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
|