- Moved wxApp::SendIdleEvents and wxApp::ProcessIdle into common code.

- wxWindow::OnInternalIdle is now used in all ports, and ensures that
  user OnIdle events do not interfere with crucial internal processing.
- wxWindow::UpdateWindowUI is now a documented function that
  sends wxUpdateUIEvents, and can be overridden. It has a helper function
  DoUpdateWindowUI for taking appropriate wxUpdateUIEvent action.
- Added functions to wxUpdateUIEvent: Set/GetMode, Set/GetUpdateInterval,
  CanUpdate, to assist with optimising update event frequency.
- Added functions to wxIdleEvent: Set/GetMode, CanSend, to
  determine whether a window should receive idle events.
- Added wxWS_EX_PROCESS_IDLE, wxWS_EX_PROCESS_UI_UPDATES window
  styles for use with conservative idle and update event modes.
- wxMSW and wxGTK now send menu update events only when a menu is
  about to be used.
- Added WM_INITMENU processing instead of WM_ENTERMENULOOP, or
  accelerators don't always get called since menu items may still
  be disabled.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-07-09 10:15:21 +00:00
parent 50b27824da
commit e39af974ef
81 changed files with 733 additions and 959 deletions

View File

@@ -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,7 +36,8 @@ Idle events can be caught by the wxApp class, or by top-level window classes.
\wxheading{See also}
\helpref{Event handling overview}{eventhandlingoverview}
\helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxUpdateUIEvent}{wxupdateuievent},
\helpref{wxWindow::OnInternalIdle}{wxwindowoninternalidle}
\latexignore{\rtfignore{\wxheading{Members}}}
@@ -37,6 +47,33 @@ Idle events can be caught by the wxApp class, or by top-level window classes.
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}{wxidlesetmode}
\membersection{wxIdleEvent::GetMode}\label{wxidleeventgetmode}
\func{static wxIdleMode}{GetMode}{\void}
Static function returning a value specifying how wxWindows
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}}
@@ -61,3 +98,26 @@ Returns true if the OnIdle function processing this event requested more process
\helpref{wxIdleEvent::RequestMore}{wxidleeventrequestmore}
\membersection{wxIdleEvent::SetMode}\label{wxidleeventsetmode}
\func{static void}{SetMode}{\param{wxIdleMode }{mode}}
Static function for specifying how wxWindows 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}