X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/684761db46d96d4a919d8e94edd1e9065978e675..5c35d5c1d984f46d33e8181c907936e96160d795:/docs/latex/wx/idleevt.tex diff --git a/docs/latex/wx/idleevt.tex b/docs/latex/wx/idleevt.tex index db3a82a754..1cd14a7010 100644 --- a/docs/latex/wx/idleevt.tex +++ b/docs/latex/wx/idleevt.tex @@ -1,16 +1,22 @@ \section{\class{wxIdleEvent}}\label{wxidleevent} -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 +This class is used for idle events, which are generated when the system becomes +idle. Note that, unless you do something specifically, the idle events are not +sent if the system remains idle once it has become it, e.g. only a single idle +event will be generated until something else resulting in more normal events +happens and only then is the next idle event sent again. If you need to ensure +a 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 timer +event), 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 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}\\ @@ -30,10 +36,6 @@ function that takes a wxIdleEvent argument. \twocolitem{{\bf EVT\_IDLE(func)}}{Process a wxEVT\_IDLE event.} \end{twocollist}% -\wxheading{Remarks} - -Idle events can be caught by the wxApp class, or by top-level window classes. - \wxheading{See also} \helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxUpdateUIEvent}{wxupdateuievent}, @@ -41,7 +43,7 @@ Idle events can be caught by the wxApp class, or by top-level window classes. \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxIdleEvent::wxIdleEvent} +\membersection{wxIdleEvent::wxIdleEvent}\label{wxidleeventctor} \func{}{wxIdleEvent}{\void} @@ -68,7 +70,7 @@ to only send idle events to windows with the wxWS\_EX\_PROCESS\_IDLE extra windo \func{static wxIdleMode}{GetMode}{\void} -Static function returning a value specifying how wxWindows +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. @@ -78,7 +80,7 @@ See \helpref{wxIdleEvent::SetMode}{wxidleeventsetmode}. \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 @@ -102,7 +104,7 @@ Returns true if the OnIdle function processing this event requested more process \func{static void}{SetMode}{\param{wxIdleMode }{mode}} -Static function for specifying how wxWindows will send idle events: to +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.