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

📄 idleevt.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
字号:
\section{\class{wxIdleEvent}}\label{wxidleevent}This class is used for idle events, which are generated when the system becomesidle. Note that, unless you do something specifically, the idle events are notsent if the system remains idle once it has become it, e.g. only a single idleevent will be generated until something else resulting in more normal eventshappens and only then is the next idle event sent again. If you need to ensurea continuous stream of idle events, you can either use \helpref{RequestMore}{wxidleeventrequestmore} method in your handler or call \helpref{wxWakeUpIdle}{wxwakeupidle} periodically (for example from timerevent), but note that both of these approaches (and especially the first one)increase the system load and so should be avoided if possible.By default, idle events are sent to all windows (and also \helpref{wxApp}{wxapp}, as usual). If this is causing a significantoverhead in your application, you can call \helpref{wxIdleEvent::SetMode}{wxidleeventsetmode} withthe value wxIDLE\_PROCESS\_SPECIFIED, and set the wxWS\_EX\_PROCESS\_IDLE extrawindow style for every window which should receive idle events.\wxheading{Derived from}\helpref{wxEvent}{wxevent}\\\helpref{wxObject}{wxobject}\wxheading{Include files}<wx/event.h>\wxheading{Event table macros}To process an idle event, use this event handler macro to direct input to a memberfunction that takes a wxIdleEvent argument.\twocolwidtha{7cm}\begin{twocollist}\itemsep=0pt\twocolitem{{\bf EVT\_IDLE(func)}}{Process a wxEVT\_IDLE event.}\end{twocollist}%\wxheading{See also}\helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxUpdateUIEvent}{wxupdateuievent}, \helpref{wxWindow::OnInternalIdle}{wxwindowoninternalidle}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxIdleEvent::wxIdleEvent}\label{wxidleeventctor}\func{}{wxIdleEvent}{\void}Constructor.\membersection{wxIdleEvent::CanSend}\label{wxidleeventcansend}\func{static bool}{CanSend}{\param{wxWindow*}{ window}}Returns {\tt true} if it is appropriate to send idle events tothis window.This function looks at the mode used (see \helpref{wxIdleEvent::SetMode}{wxidleeventsetmode}),and the wxWS\_EX\_PROCESS\_IDLE style in {\it window} to determine whether idle events should be sent tothis window now. By default this will always return {\tt true} becausethe update mode is initially wxIDLE\_PROCESS\_ALL. You can change the modeto only send idle events to windows with the wxWS\_EX\_PROCESS\_IDLE extra window style set.\wxheading{See also}\helpref{wxIdleEvent::SetMode}{wxidleeventsetmode}\membersection{wxIdleEvent::GetMode}\label{wxidleeventgetmode}\func{static wxIdleMode}{GetMode}{\void}Static function returning a value specifying how wxWidgetswill send idle events: to all windows, or only to those which specify that theywill process the events.See \helpref{wxIdleEvent::SetMode}{wxidleeventsetmode}.\membersection{wxIdleEvent::RequestMore}\label{wxidleeventrequestmore}\func{void}{RequestMore}{\param{bool}{ needMore = true}}Tells wxWidgets that more processing is required. This function can be called by an OnIdlehandler for a window or window event handler to indicate that wxApp::OnIdle shouldforward the OnIdle event once more to the application windows. If no window calls this functionduring OnIdle, then the application will remain in a passive event loop (not calling OnIdle) until anew event is posted to the application by the windowing system.\wxheading{See also}\helpref{wxIdleEvent::MoreRequested}{wxidleeventmorerequested}\membersection{wxIdleEvent::MoreRequested}\label{wxidleeventmorerequested}\constfunc{bool}{MoreRequested}{\void}Returns true if the OnIdle function processing this event requested more processing time.\wxheading{See also}\helpref{wxIdleEvent::RequestMore}{wxidleeventrequestmore}\membersection{wxIdleEvent::SetMode}\label{wxidleeventsetmode}\func{static void}{SetMode}{\param{wxIdleMode }{mode}}Static function for specifying how wxWidgets will send idle events: toall windows, or only to those which specify that theywill process the events.{\it mode} can be one of the following values.The default is wxIDLE\_PROCESS\_ALL.\begin{verbatim}enum wxIdleMode{        // Send idle events to all windows    wxIDLE_PROCESS_ALL,        // Send idle events to windows that have        // the wxWS_EX_PROCESS_IDLE flag specified    wxIDLE_PROCESS_SPECIFIED};\end{verbatim}

⌨️ 快捷键说明

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