- // execute the main GUI loop, the function returns when the loop ends
- virtual int MainLoop();
-
- // exit the main loop thus terminating the application
- virtual void Exit();
-
- // exit the main GUI loop during the next iteration (i.e. it does not
- // stop the program immediately!)
- virtual void ExitMainLoop();
-
- // returns TRUE if there are unprocessed events in the event queue
- virtual bool Pending();
-
- // process the first event in the event queue (blocks until an event
- // appears if there are none currently, use Pending() if this is not
- // wanted), returns false if the event loop should stop and true
- // otherwise
- virtual bool Dispatch();
-
- // process all currently pending events right now
- //
- // it is an error to call Yield() recursively unless the value of
- // onlyIfNeeded is TRUE
- //
- // WARNING: this function is dangerous as it can lead to unexpected
- // reentrancies (i.e. when called from an event handler it
- // may result in calling the same event handler again), use
- // with _extreme_ care or, better, don't use at all!
- virtual bool Yield(bool onlyIfNeeded = FALSE) = 0;
+ // safer alternatives to Yield(), using wxWindowDisabler
+ virtual bool SafeYield(wxWindow *win, bool onlyIfNeeded);
+ virtual bool SafeYieldFor(wxWindow *win, long eventsToProcess);