]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/app.h
XML code needs wchar_t
[wxWidgets.git] / include / wx / app.h
index 0850ae3b72d14d66ac8433fc7e3d2989c6ce9f3a..31f27162cf2883d29d7217b377c9d6e260c91c05 100644 (file)
@@ -26,7 +26,7 @@
 #include "wx/build.h"
 #include "wx/init.h"        // we must declare wxEntry()
 
-class WXDLLIMPEXP_CORE wxApp;
+class WXDLLIMPEXP_BASE wxAppConsole;
 class WXDLLIMPEXP_BASE wxAppTraits;
 class WXDLLIMPEXP_BASE wxCmdLineParser;
 class WXDLLIMPEXP_BASE wxLog;
@@ -37,7 +37,7 @@ class WXDLLIMPEXP_BASE wxMessageOutput;
 // ----------------------------------------------------------------------------
 
 // the type of the function used to create a wxApp object on program start up
-typedef wxApp* (*wxAppInitializerFunction)();
+typedef wxAppConsole* (*wxAppInitializerFunction)();
 
 // ----------------------------------------------------------------------------
 // constants
@@ -381,16 +381,13 @@ public:
         // it should return TRUE if more idle events are needed, FALSE if not
     virtual bool ProcessIdle() ;
 
-#if 0
-        // Send idle event to all top-level windows.
-        // Returns TRUE if more idle time is requested.
-    virtual bool SendIdleEvents();
-#endif
-
         // Send idle event to window and all subwindows
         // Returns TRUE if more idle time is requested.
     virtual bool SendIdleEvents(wxWindow* win, wxIdleEvent& event);
 
+        // Perform standard OnIdle behaviour: call from port's OnIdle
+    void OnIdle(wxIdleEvent& event);
+
 
     // top level window functions
     // --------------------------
@@ -515,10 +512,7 @@ protected:
         #include "wx/os2/app.h"
     #endif
 #else // !GUI
-    // can't use typedef because wxApp forward declared as a class
-    class WXDLLIMPEXP_BASE wxApp : public wxAppConsole
-    {
-    };
+    typedef wxAppConsole wxApp;
 #endif // GUI/!GUI
 
 // ----------------------------------------------------------------------------
@@ -603,9 +597,9 @@ public:
 // Use this macro if you want to define your own main() or WinMain() function
 // and call wxEntry() from there.
 #define IMPLEMENT_APP_NO_MAIN(appname)                                      \
-    wxApp *wxCreateApp()                                                    \
+    wxAppConsole *wxCreateApp()                                             \
     {                                                                       \
-        wxApp::CheckBuildOptions(wxBuildOptions());                         \
+        wxAppConsole::CheckBuildOptions(wxBuildOptions());                  \
         return new appname;                                                 \
     }                                                                       \
     wxAppInitializer                                                        \