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{Event table macros
}
11 To process a close event, use these event handler macros to direct input to member
12 functions that take a wxCloseEvent argument.
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.
}
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
}
32 \latexignore{\rtfignore{\wxheading{Members
}}}
34 \membersection{wxCloseEvent::wxCloseEvent
}
36 \func{}{wxCloseEvent
}{\param{WXTYPE
}{ commandEventType =
0},
\param{int
}{ id =
0}}
40 \membersection{wxCloseEvent::CanVeto
}\label{wxcloseeventcanveto
}
42 \func{bool
}{CanVeto
}{\void}
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.
48 \membersection{wxCloseEvent::GetLoggingOff
}\label{wxcloseeventgetloggingoff
}
50 \constfunc{bool
}{GetLoggingOff
}{\void}
52 Returns TRUE if the user is logging off.
54 \membersection{wxCloseEvent::GetSessionEnding
}\label{wxcloseeventgetsessionending
}
56 \constfunc{bool
}{GetSessionEnding
}{\void}
58 Returns TRUE if the session is ending.
60 \membersection{wxCloseEvent::GetForce
}\label{wxcloseeventgetforce
}
62 \constfunc{bool
}{GetForce
}{\void}
64 Returns TRUE if the application wishes to force the window to close.
65 This will shortly be obsolete, replaced by CanVeto.
67 \membersection{wxCloseEvent::SetCanVeto
}\label{wxcloseeventsetcanveto
}
69 \func{void
}{SetCanVeto
}{\param{bool
}{ canVeto
}}
71 Sets the 'can veto' flag.
73 \membersection{wxCloseEvent::SetForce
}\label{wxcloseeventsetforce
}
75 \constfunc{void
}{SetForce
}{\param{bool
}{ force
}}
77 Sets the 'force' flag.
79 \membersection{wxCloseEvent::SetLoggingOff
}\label{wxcloseeventsetloggingoff
}
81 \constfunc{void
}{SetLoggingOff
}{\param{bool
}{ loggingOff
}}
83 Sets the 'logging off' flag.
85 \membersection{wxCloseEvent::Veto
}\label{wxcloseeventveto
}
87 \func{void
}{Veto
}{\param{bool
}{ veto = TRUE
}}
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.
92 You can only veto a shutdown if
\helpref{wxCloseEvent::CanVeto
}{wxcloseeventcanveto
} returns