1 \section{\class{wxIdleEvent
}}\label{wxidleevent
}
3 This class is used for idle events, which are generated when the system is idle.
5 By default, idle events are sent to all windows. If this is causing a significant
6 overhead in your application, you can call
\helpref{wxIdleEvent::SetMode
}{wxidleeventsetmode
} with
7 the value wxIDLE
\_PROCESS\_SPECIFIED, and set the wxWS
\_EX\_PROCESS\_IDLE extra
8 window style for every window which should receive idle events.
10 The function
\helpref{wxWindow::OnInternalIdle
}{wxwindowoninternalidle
} is
11 also provided for internal purposes, and cannot be disabled. wxUpdateUIEvents
12 are sent from OnInternalIdle.
14 \wxheading{Derived from
}
16 \helpref{wxEvent
}{wxevent
}\\
17 \helpref{wxObject
}{wxobject
}
19 \wxheading{Include files
}
23 \wxheading{Event table macros
}
25 To process an idle event, use this event handler macro to direct input to a member
26 function that takes a wxIdleEvent argument.
29 \begin{twocollist
}\itemsep=
0pt
30 \twocolitem{{\bf EVT
\_IDLE(func)
}}{Process a wxEVT
\_IDLE event.
}
35 Idle events can be caught by the wxApp class, or by top-level window classes.
39 \helpref{Event handling overview
}{eventhandlingoverview
},
\helpref{wxUpdateUIEvent
}{wxupdateuievent
},
40 \helpref{wxWindow::OnInternalIdle
}{wxwindowoninternalidle
}
42 \latexignore{\rtfignore{\wxheading{Members
}}}
44 \membersection{wxIdleEvent::wxIdleEvent
}
46 \func{}{wxIdleEvent
}{\void}
50 \membersection{wxIdleEvent::CanSend
}\label{wxidleeventcansend
}
52 \func{static bool
}{CanSend
}{\param{wxWindow*
}{ window
}}
54 Returns
{\tt true
} if it is appropriate to send idle events to
57 This function looks at the mode used (see
\helpref{wxIdleEvent::SetMode
}{wxidleeventsetmode
}),
58 and the wxWS
\_EX\_PROCESS\_IDLE style in
{\it window
} to determine whether idle events should be sent to
59 this window now. By default this will always return
{\tt true
} because
60 the update mode is initially wxIDLE
\_PROCESS\_ALL. You can change the mode
61 to only send idle events to windows with the wxWS
\_EX\_PROCESS\_IDLE extra window style set.
65 \helpref{wxIdleEvent::SetMode
}{wxidleeventsetmode
}
67 \membersection{wxIdleEvent::GetMode
}\label{wxidleeventgetmode
}
69 \func{static wxIdleMode
}{GetMode
}{\void}
71 Static function returning a value specifying how wxWindows
72 will send idle events: to all windows, or only to those which specify that they
73 will process the events.
75 See
\helpref{wxIdleEvent::SetMode
}{wxidleeventsetmode
}.
77 \membersection{wxIdleEvent::RequestMore
}\label{wxidleeventrequestmore
}
79 \func{void
}{RequestMore
}{\param{bool
}{ needMore = true
}}
81 Tells wxWindows that more processing is required. This function can be called by an OnIdle
82 handler for a window or window event handler to indicate that wxApp::OnIdle should
83 forward the OnIdle event once more to the application windows. If no window calls this function
84 during OnIdle, then the application will remain in a passive event loop (not calling OnIdle) until a
85 new event is posted to the application by the windowing system.
89 \helpref{wxIdleEvent::MoreRequested
}{wxidleeventmorerequested
}
91 \membersection{wxIdleEvent::MoreRequested
}\label{wxidleeventmorerequested
}
93 \constfunc{bool
}{MoreRequested
}{\void}
95 Returns true if the OnIdle function processing this event requested more processing time.
99 \helpref{wxIdleEvent::RequestMore
}{wxidleeventrequestmore
}
101 \membersection{wxIdleEvent::SetMode
}\label{wxidleeventsetmode
}
103 \func{static void
}{SetMode
}{\param{wxIdleMode
}{mode
}}
105 Static function for specifying how wxWindows will send idle events: to
106 all windows, or only to those which specify that they
107 will process the events.
109 {\it mode
} can be one of the following values.
110 The default is wxIDLE
\_PROCESS\_ALL.
115 // Send idle events to all windows
118 // Send idle events to windows that have
119 // the wxWS_EX_PROCESS_IDLE flag specified
120 wxIDLE_PROCESS_SPECIFIED