X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dde19c2180ef8d6415af7bb2492bfcb0a2d5c7e4..50d4763f1710f6e45ac6af7112d1ce9effe93bc4:/interface/wx/evtloop.h diff --git a/interface/wx/evtloop.h b/interface/wx/evtloop.h index 659a6b964e..b60889ef34 100644 --- a/interface/wx/evtloop.h +++ b/interface/wx/evtloop.h @@ -4,7 +4,7 @@ // Author: Vadim Zeitlin // Copyright: (C) 2008 Vadim Zeitlin // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -12,8 +12,16 @@ Base class for all event loop implementations. + An event loop is a class which queries the queue of native events sent + to the wxWidgets application and dispatches them to the appropriate + wxEvtHandlers. + An object of this class is created by wxAppTraits::CreateEventLoop() and used by wxApp to run the main application event loop. + Temporary event loops are usually created by wxDialog::ShowModal(). + + You can create your own event loop if you need, provided that you restore + the main event loop once yours is destroyed (see wxEventLoopActivator). @library{wxbase} @category{appmanagement} @@ -37,9 +45,16 @@ public: Called by wxEventLoopActivator, use an instance of this class instead of calling this method directly to ensure that the previously active event loop is restored. + + Results in a call to wxAppConsole::OnEventLoopEnter. */ static void SetActive(wxEventLoopBase* loop); + /** + Returns @true if this is the main loop executed by wxApp::OnRun(). + */ + bool IsMain() const; + /** @name Dispatch and processing @@ -131,41 +146,6 @@ public: //@} - /** - @name Pending events - */ - //@{ - - /** - Process all pending events; it is necessary to call this function to - process posted events. - - This happens during each event loop iteration in GUI mode but - it may be also called directly. - */ - virtual void ProcessPendingEvents(); - - /** - Returns @true if there are pending events on the internal pending event list. - */ - bool HasPendingEvents() const; - - /** - Temporary suspends processing of the pending events. - - @see ResumeProcessingOfPendingEvents() - */ - void SuspendProcessingOfPendingEvents(); - - /** - Resume processing of the pending events previously stopped because of a - call to SuspendProcessingOfPendingEvents(). - */ - void ResumeProcessingOfPendingEvents(); - - //@} - - /** @name Idle handling */ @@ -193,7 +173,7 @@ public: //@{ /** - Returns @true if called from inside Yield(). + Returns @true if called from inside Yield() or from inside YieldFor(). */ virtual bool IsYielding() const; @@ -261,7 +241,7 @@ protected: happens normally (because of Exit() call) or abnormally (because of an exception thrown from inside the loop). - Default version does nothing. + The default implementation calls wxAppConsole::OnEventLoopExit. */ virtual void OnExit(); };