⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 closeevt.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
字号:
\section{\class{wxCloseEvent}}\label{wxcloseevent}This event class contains information about window and session close events.The handler function for EVT\_CLOSE is called when the user has tried to close a a frameor dialog box using the window manager (X) or system menu (Windows). It canalso be invoked by the application itself programmatically, for example bycalling the \helpref{wxWindow::Close}{wxwindowclose} function.You should check whether the application is forcing the deletion of the windowusing \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto}. If this is {\tt false},you {\it must} destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}.If the return value is true, it is up to you whether you respond by destroying the window.If you don't destroy the window, you should call \helpref{wxCloseEvent::Veto}{wxcloseeventveto} tolet the calling code know that you did not destroy the window. This allows the \helpref{wxWindow::Close}{wxwindowclose} functionto return {\tt true} or {\tt false} depending on whether the close instruction was honoured or not.\wxheading{Derived from}\helpref{wxEvent}{wxevent}\wxheading{Include files}<wx/event.h>\wxheading{Event table macros}To process a close event, use these event handler macros to direct input to memberfunctions that take a wxCloseEvent argument.\twocolwidtha{7cm}\begin{twocollist}\itemsep=0pt\twocolitem{{\bf EVT\_CLOSE(func)}}{Process a close event, supplying the member function. Thisevent applies to wxFrame and wxDialog classes.}\twocolitem{{\bf EVT\_QUERY\_END\_SESSION(func)}}{Process a query end session event, supplying the member function.This event applies to wxApp only.}\twocolitem{{\bf EVT\_END\_SESSION(func)}}{Process an end session event, supplying the member function.This event applies to wxApp only.}\end{twocollist}%\wxheading{See also}\helpref{wxWindow::Close}{wxwindowclose},\rtfsp%% GD: OnXXX functions are not documented%%\helpref{wxApp::OnEndSession}{wxapponendsession},\rtfsp\helpref{Window deletion overview}{windowdeletionoverview}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxCloseEvent::wxCloseEvent}\label{wxcloseeventctor}\func{}{wxCloseEvent}{\param{WXTYPE}{ commandEventType = 0}, \param{int}{ id = 0}}Constructor.\membersection{wxCloseEvent::CanVeto}\label{wxcloseeventcanveto}\func{bool}{CanVeto}{\void}Returns true if you can veto a system shutdown or a window close event.Vetoing a window close event is not possible if the calling code wishes toforce the application to exit, and so this function must be called to check this.\membersection{wxCloseEvent::GetLoggingOff}\label{wxcloseeventgetloggingoff}\constfunc{bool}{GetLoggingOff}{\void}Returns true if the user is just logging off or false if the system isshutting down. This method can only be called for end session and query endsession events, it doesn't make sense for close window event.\membersection{wxCloseEvent::SetCanVeto}\label{wxcloseeventsetcanveto}\func{void}{SetCanVeto}{\param{bool}{ canVeto}}Sets the 'can veto' flag.\membersection{wxCloseEvent::SetForce}\label{wxcloseeventsetforce}\constfunc{void}{SetForce}{\param{bool}{ force}}Sets the 'force' flag.\membersection{wxCloseEvent::SetLoggingOff}\label{wxcloseeventsetloggingoff}\constfunc{void}{SetLoggingOff}{\param{bool}{ loggingOff}}Sets the 'logging off' flag.\membersection{wxCloseEvent::Veto}\label{wxcloseeventveto}\func{void}{Veto}{\param{bool}{ veto = true}}Call this from your event handler to veto a system shutdown or to signalto the calling application that a window close did not happen.You can only veto a shutdown if \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto} returnstrue.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -