// (already) be dispatched
static bool IsMainLoopRunning();
- // process all events in the wxPendingEvents list -- it is necessary to
- // call this function to process posted events. This happens during each
+ // process all events in the wxHandlersWithPendingEvents list -- it is necessary
+ // to call this function to process posted events. This happens during each
// event loop iteration in GUI mode but if there is no main loop, it may be
// also called directly.
virtual void ProcessPendingEvents();
// with _extreme_ care or, better, don't use at all!
virtual bool Yield(bool onlyIfNeeded = false) = 0;
+ // returns true if the main thread is inside a Yield() call
+ bool IsYielding() const
+ { return m_isInsideYield; }
+
// this virtual function is called in the GUI mode when the application
// becomes idle and normally just sends wxIdleEvent to all interested
// parties
// does any of our windows have focus?
bool m_isActive;
+ bool m_isInsideYield;
DECLARE_NO_COPY_CLASS(wxAppBase)
};
//
// the cast is safe as in GUI build we only use wxApp, not wxAppConsole, and in
// console mode it does nothing at all
-#define wxTheApp wx_static_cast(wxApp*, wxApp::GetInstance())
+#define wxTheApp static_cast<wxApp*>(wxApp::GetInstance())
// ----------------------------------------------------------------------------
// global functions
wxAppInitializer \
wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \
DECLARE_APP(appname) \
- appname& wxGetApp() { return *wx_static_cast(appname*, wxApp::GetInstance()); }
+ appname& wxGetApp() { return *static_cast<appname*>(wxApp::GetInstance()); }
// Same as IMPLEMENT_APP() normally but doesn't include themes support in
// wxUniversal builds