1 \section{\class{wxCloseEvent
}}\label{wxcloseevent
}
3 This event class contains information about window and session close events.
5 \wxheading{Derived from
}
7 \helpref{wxEvent
}{wxevent
}
9 \wxheading{Include files
}
13 \wxheading{Event table macros
}
15 To process a close event, use these event handler macros to direct input to member
16 functions that take a wxCloseEvent argument.
19 \begin{twocollist
}\itemsep=
0pt
20 \twocolitem{{\bf EVT
\_CLOSE(func)
}}{Process a close event, supplying the member function. This
21 event applies to wxFrame and wxDialog classes.
}
22 \twocolitem{{\bf EVT
\_QUERY\_END\_SESSION(func)
}}{Process a query end session event, supplying the member function.
23 This event applies to wxApp only.
}
24 \twocolitem{{\bf EVT
\_END\_SESSION(func)
}}{Process an end session event, supplying the member function.
25 This event applies to wxApp only.
}
30 \helpref{wxWindow::OnCloseWindow
}{wxwindowonclosewindow
},
\rtfsp
31 \helpref{wxWindow::Close
}{wxwindowclose
},
\rtfsp
32 \helpref{wxApp::OnQueryEndSession
}{wxapponqueryendsession
},
\rtfsp
33 \helpref{wxApp::OnEndSession
}{wxapponendsession
},
\rtfsp
34 \helpref{Window deletion overview
}{windowdeletionoverview
}
36 \latexignore{\rtfignore{\wxheading{Members
}}}
38 \membersection{wxCloseEvent::wxCloseEvent
}
40 \func{}{wxCloseEvent
}{\param{WXTYPE
}{ commandEventType =
0},
\param{int
}{ id =
0}}
44 \membersection{wxCloseEvent::CanVeto
}\label{wxcloseeventcanveto
}
46 \func{bool
}{CanVeto
}{\void}
48 Returns TRUE if you can veto a system shutdown or a window close event.
49 Vetoing a window close event is not possible if the calling code wishes to
50 force the application to exit, and so this function must be called to check this.
52 \membersection{wxCloseEvent::GetLoggingOff
}\label{wxcloseeventgetloggingoff
}
54 \constfunc{bool
}{GetLoggingOff
}{\void}
56 Returns TRUE if the user is logging off.
58 \membersection{wxCloseEvent::GetSessionEnding
}\label{wxcloseeventgetsessionending
}
60 \constfunc{bool
}{GetSessionEnding
}{\void}
62 Returns TRUE if the session is ending.
64 \membersection{wxCloseEvent::GetForce
}\label{wxcloseeventgetforce
}
66 \constfunc{bool
}{GetForce
}{\void}
68 Returns TRUE if the application wishes to force the window to close.
69 This will shortly be obsolete, replaced by CanVeto.
71 \membersection{wxCloseEvent::SetCanVeto
}\label{wxcloseeventsetcanveto
}
73 \func{void
}{SetCanVeto
}{\param{bool
}{ canVeto
}}
75 Sets the 'can veto' flag.
77 \membersection{wxCloseEvent::SetForce
}\label{wxcloseeventsetforce
}
79 \constfunc{void
}{SetForce
}{\param{bool
}{ force
}}
81 Sets the 'force' flag.
83 \membersection{wxCloseEvent::SetLoggingOff
}\label{wxcloseeventsetloggingoff
}
85 \constfunc{void
}{SetLoggingOff
}{\param{bool
}{ loggingOff
}}
87 Sets the 'logging off' flag.
89 \membersection{wxCloseEvent::Veto
}\label{wxcloseeventveto
}
91 \func{void
}{Veto
}{\param{bool
}{ veto = TRUE
}}
93 Call this from your event handler to veto a system shutdown or to signal
94 to the calling application that a window close did not happen.
96 You can only veto a shutdown if
\helpref{wxCloseEvent::CanVeto
}{wxcloseeventcanveto
} returns