removed wrong sentence about idle events being sent to TLWs only; explained why you would and wouldn't use RequestMore

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-08-23 21:37:38 +00:00
parent c54e5eb0f6
commit 09f7f79f2d

View File

@ -1,16 +1,22 @@
\section{\class{wxIdleEvent}}\label{wxidleevent}
This class is used for idle events, which are generated when the system is idle.
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. If this is causing a significant
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},