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