X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/954b8ae60391d18b87a604e7919c87c0c6ae208b..32485259c1342115488d219776dfebeb3d4d81b1:/docs/latex/wx/idleevt.tex diff --git a/docs/latex/wx/idleevt.tex b/docs/latex/wx/idleevt.tex index f38cf33a03..288673f860 100644 --- a/docs/latex/wx/idleevt.tex +++ b/docs/latex/wx/idleevt.tex @@ -2,6 +2,15 @@ This class is used for idle events, which are generated when the system is idle. +By default, idle events are sent to all windows. If this is causing a significant +overhead in your application, you can call \helpref{wxIdleEvent::SetMode}{wxidleeventsetmode} with +the value wxIDLE\_PROCESS\_SPECIFIED, and set the wxWS\_EX\_PROCESS\_IDLE extra +window style for every window which should receive idle events. + +The function \helpref{wxWindow::OnInternalIdle}{wxwindowoninternalidle} is +also provided for internal purposes, and cannot be disabled. wxUpdateUIEvents +are sent from OnInternalIdle. + \wxheading{Derived from} \helpref{wxEvent}{wxevent}\\ @@ -27,21 +36,49 @@ Idle events can be caught by the wxApp class, or by top-level window classes. \wxheading{See also} -\helpref{wxApp::OnIdle}{wxapponidle}, \helpref{Event handling overview}{eventhandlingoverview} +\helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxUpdateUIEvent}{wxupdateuievent}, +\helpref{wxWindow::OnInternalIdle}{wxwindowoninternalidle} \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxIdleEvent::wxIdleEvent} +\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 to +this 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 to +this window now. By default this will always return {\tt true} because +the update mode is initially wxIDLE\_PROCESS\_ALL. You can change the mode +to 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 wxWidgets +will send idle events: to all windows, or only to those which specify that they +will process the events. + +See \helpref{wxIdleEvent::SetMode}{wxidleeventsetmode}. + \membersection{wxIdleEvent::RequestMore}\label{wxidleeventrequestmore} -\func{void}{RequestMore}{\param{bool}{ needMore = TRUE}} +\func{void}{RequestMore}{\param{bool}{ needMore = true}} -Tells wxWindows that more processing is required. This function can be called by an OnIdle +Tells wxWidgets that more processing is required. This function can be called by an OnIdle handler for a window or window event handler to indicate that wxApp::OnIdle should forward the OnIdle event once more to the application windows. If no window calls this function during OnIdle, then the application will remain in a passive event loop (not calling OnIdle) until a @@ -49,15 +86,38 @@ new event is posted to the application by the windowing system. \wxheading{See also} -\helpref{wxIdleEvent::MoreRequested}{wxidleeventmorerequested}, \helpref{wxApp::OnIdle}{wxapponidle} +\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. +Returns true if the OnIdle function processing this event requested more processing time. \wxheading{See also} -\helpref{wxIdleEvent::RequestMore}{wxidleeventrequestmore}, \helpref{wxApp::OnIdle}{wxapponidle} +\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: to +all windows, or only to those which specify that they +will 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}