]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/closeevt.tex
enable verbose messages by default in debug builds
[wxWidgets.git] / docs / latex / wx / closeevt.tex
CommitLineData
a660d684
KB
1\section{\class{wxCloseEvent}}\label{wxcloseevent}
2
3This event class contains information about window and session close events.
4
5\wxheading{Derived from}
6
7\helpref{wxEvent}{wxevent}
8
9\wxheading{Event table macros}
10
11To process a close event, use these event handler macros to direct input to member
12functions that take a wxCloseEvent argument.
13
14\twocolwidtha{7cm}
15\begin{twocollist}\itemsep=0pt
387a3b02
JS
16\twocolitem{{\bf EVT\_CLOSE(func)}}{Process a close event, supplying the member function. This
17event applies to wxFrame and wxDialog classes.}
18\twocolitem{{\bf EVT\_QUERY\_END\_SESSION(func)}}{Process a query end session event, supplying the member function.
19This event applies to wxApp only.}
2432b92d 20\twocolitem{{\bf EVT\_END\_SESSION(func)}}{Process an end session event, supplying the member function.
387a3b02 21This event applies to wxApp only.}
a660d684
KB
22\end{twocollist}%
23
24\wxheading{See also}
25
26\helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
27\helpref{wxWindow::Close}{wxwindowclose},\rtfsp
da36f544
JS
28\helpref{wxApp::OnQueryEndSession}{wxapponqueryendsession},\rtfsp
29\helpref{wxApp::OnEndSession}{wxapponendsession},\rtfsp
a660d684
KB
30\helpref{Window deletion overview}{windowdeletionoverview}
31
32\latexignore{\rtfignore{\wxheading{Members}}}
33
34\membersection{wxCloseEvent::wxCloseEvent}
35
36\func{}{wxCloseEvent}{\param{WXTYPE}{ commandEventType = 0}, \param{int}{ id = 0}}
37
38Constructor.
39
387a3b02
JS
40\membersection{wxCloseEvent::CanVeto}\label{wxcloseeventcanveto}
41
42\func{bool}{CanVeto}{\void}
43
44Returns TRUE if you can veto a system shutdown or a window close event.
45Vetoing a window close event is not possible if the calling code wishes to
46force the application to exit, and so this function must be called to check this.
47
a660d684
KB
48\membersection{wxCloseEvent::GetLoggingOff}\label{wxcloseeventgetloggingoff}
49
50\constfunc{bool}{GetLoggingOff}{\void}
51
52Returns TRUE if the user is logging off.
53
54\membersection{wxCloseEvent::GetSessionEnding}\label{wxcloseeventgetsessionending}
55
56\constfunc{bool}{GetSessionEnding}{\void}
57
58Returns TRUE if the session is ending.
59
60\membersection{wxCloseEvent::GetForce}\label{wxcloseeventgetforce}
61
387a3b02 62\constfunc{bool}{GetForce}{\void}
a660d684
KB
63
64Returns TRUE if the application wishes to force the window to close.
387a3b02
JS
65This will shortly be obsolete, replaced by CanVeto.
66
67\membersection{wxCloseEvent::SetCanVeto}\label{wxcloseeventsetcanveto}
68
69\func{void}{SetCanVeto}{\param{bool}{ canVeto}}
70
71Sets the 'can veto' flag.
72
73\membersection{wxCloseEvent::SetForce}\label{wxcloseeventsetforce}
74
75\constfunc{void}{SetForce}{\param{bool}{ force}}
76
77Sets the 'force' flag.
78
79\membersection{wxCloseEvent::SetLoggingOff}\label{wxcloseeventsetloggingoff}
80
81\constfunc{void}{SetLoggingOff}{\param{bool}{ loggingOff}}
82
83Sets the 'logging off' flag.
a660d684
KB
84
85\membersection{wxCloseEvent::Veto}\label{wxcloseeventveto}
86
387a3b02
JS
87\func{void}{Veto}{\param{bool}{ veto = TRUE}}
88
89Call this from your event handler to veto a system shutdown or to signal
90to the calling application that a window close did not happen.
a660d684 91
387a3b02
JS
92You can only veto a shutdown if \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto} returns
93TRUE.
a660d684
KB
94
95