+ /**
+ Returns @true if the application will use the best visual on systems that support
+ different visuals, @false otherwise.
+
+ @see SetUseBestVisual()
+ */
+ bool GetUseBestVisual() const;
+
+ /**
+ Returns a pointer to the top window.
+
+ @remarks If the top window hasn't been set using SetTopWindow(),
+ this function will find the first top-level window
+ (frame or dialog) and return that.
+
+ @see SetTopWindow()
+ */
+ virtual wxWindow* GetTopWindow() const;
+
+ /**
+ Returns @true if the application is active, i.e. if one of its windows is
+ currently in the foreground.
+
+ If this function returns @false and you need to attract users attention to
+ the application, you may use wxTopLevelWindow::RequestUserAttention to do it.
+ */
+ virtual bool IsActive() const;
+
+ /**
+ Windows-only function for processing a message. This function is called
+ from the main message loop, checking for windows that may wish to process it.
+
+ The function returns @true if the message was processed, @false otherwise.
+ If you use wxWidgets with another class library with its own message loop,
+ you should make sure that this function is called to allow wxWidgets to
+ receive messages. For example, to allow co-existence with the Microsoft
+ Foundation Classes, override the PreTranslateMessage function:
+
+ @code
+ // Provide wxWidgets message loop compatibility
+ BOOL CTheApp::PreTranslateMessage(MSG *msg)
+ {
+ if (wxTheApp && wxTheApp->ProcessMessage((WXMSW *)msg))
+ return true;
+ else
+ return CWinApp::PreTranslateMessage(msg);
+ }
+ @endcode
+
+ @onlyfor{wxmsw}
+ */
+ bool ProcessMessage(WXMSG* msg);
+
+ /**
+ Sends idle events to a window and its children.
+ Please note that this function is internal to wxWidgets and shouldn't be used
+ by user code.
+
+ @remarks These functions poll the top-level windows, and their children,
+ for idle event processing. If @true is returned, more OnIdle
+ processing is requested by one or more window.
+
+ @see wxIdleEvent
+ */
+ virtual bool SendIdleEvents(wxWindow* win, wxIdleEvent& event);
+
+ /**
+ Allows the programmer to specify whether the application will exit when the
+ top-level frame is deleted.
+
+ @param flag
+ If @true (the default), the application will exit when the top-level frame
+ is deleted. If @false, the application will continue to run.
+
+ @see GetExitOnFrameDelete(), @ref overview_app_shutdown
+ */
+ void SetExitOnFrameDelete(bool flag);
+
+ /**
+ Allows external code to modify global ::wxTheApp, but you should really
+ know what you're doing if you call it.
+
+ @param app
+ Replacement for the global application object.
+
+ @see GetInstance()
+ */
+ static void SetInstance(wxAppConsole* app);
+
+ /**
+ Allows runtime switching of the UI environment theme.
+
+ Currently implemented for wxGTK2-only.
+ Return @true if theme was successfully changed.
+
+ @param theme
+ The name of the new theme or an absolute path to a gtkrc-theme-file
+ */
+ virtual bool SetNativeTheme(const wxString& theme);
+
+ /**
+ Sets the 'top' window. You can call this from within OnInit() to let wxWidgets
+ know which is the main window. You don't have to set the top window;
+ it is only a convenience so that (for example) certain dialogs without parents
+ can use a specific window as the top window. If no top window is specified by the
+ application, wxWidgets just uses the first frame or dialog in its top-level window
+ list, when it needs to use the top window.
+
+ @param window
+ The new top window.
+
+ @see GetTopWindow(), OnInit()
+ */
+ void SetTopWindow(wxWindow* window);
+
+ /**
+ Allows the programmer to specify whether the application will use the best
+ visual on systems that support several visual on the same display. This is typically
+ the case under Solaris and IRIX, where the default visual is only 8-bit whereas
+ certain applications are supposed to run in TrueColour mode.
+
+ Note that this function has to be called in the constructor of the wxApp
+ instance and won't have any effect when called later on.
+ This function currently only has effect under GTK.
+
+ @param flag
+ If @true, the app will use the best visual.
+ @param forceTrueColour
+ If @true then the application will try to force using a TrueColour
+ visual and abort the app if none is found.
+ */
+ void SetUseBestVisual(bool flag, bool forceTrueColour = false);
+};
+
+
+
+// ============================================================================
+// Global functions/macros
+// ============================================================================
+
+
+/** @ingroup group_funcmacro_rtti */