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