]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/app.h
remove references to datetime_constants; they're not needed anymore
[wxWidgets.git] / interface / wx / app.h
index 9037103381b94379583649e9c39e7f22e2e5f34a..4652096e3fb427533cfb4520527cb097dd31072f 100644 (file)
@@ -91,6 +91,14 @@ public:
     */
     virtual int FilterEvent(wxEvent& event);
 
+    /**
+        Returns the main event loop instance, i.e. the event loop which is started
+        by OnRun() and which dispatches all events sent from the native toolkit
+        to the application (except when new event loops are temporarily set-up).
+        The returned value maybe @NULL. Put initialization code which needs a
+        non-@NULL main event loop into OnEventLoopEnter().
+    */
+    wxEventLoopBase* GetMainLoop() const;
 
     /**
         This function simply invokes the given method @a func of the specified
@@ -254,6 +262,26 @@ public:
     */
     virtual bool OnCmdLineParsed(wxCmdLineParser& parser);
 
+    /**
+        Called by wxEventLoopBase::SetActive(): you can override this function
+        and put here the code which needs an active event loop.
+
+        Note that this function is called whenever an event loop is activated;
+        you may want to use wxEventLoopBase::IsMain() to perform initialization
+        specific for the app's main event loop.
+
+        @see OnEventLoopExit()
+    */
+    virtual void OnEventLoopEnter(wxEventLoopBase* loop);
+
+    /**
+        Called by wxEventLoopBase::OnExit() for each event loop which
+        is exited.
+
+        @see OnEventLoopEnter()
+    */
+    virtual void OnEventLoopExit(wxEventLoopBase* loop);
+
     /**
         This function is called if an unhandled exception occurs inside the main
         application event loop. It can return @true to ignore the exception and to