List of all members.
Public Member Functions
|void||catchException (Object e)|
|virtual bool||OnInit ()|
|virtual int||OnRun ()|
|virtual int||OnExit ()|
|void||Run (char args)|
|void||VendorName (string name)|
|void||AppName (string name)|
|void||TopWindow (Window window)|
|bool||Yield (bool onlyIfNeeded)|
Static Public Member Functions
|static App||GetApp ()|
|static bool||SafeYield ()|
|static bool||SafeYield (Window win)|
|static bool||SafeYield (Window win, bool onlyIfNeeded)|
|static void||WakeUpIdle ()|
Protected Member Functions
It is used to:
|virtual bool OnInit||(||)|
This must be provided by the application, and will usually create the application's main window, optionally calling wxApp.SetTopWindow. You may use OnExit to clean up anything initialized here, provided that the function returns true.
Notice that if you want to to use the command line processing provided by wxWidgets you have to call the base class version in the derived class OnInit().
Return true to continue processing, false to exit the application immediately.
|virtual int OnRun||(||)|
This virtual function is where the execution of a program written in wxWidgets starts. The default implementation just enters the main loop and starts handling the events until it terminates, either because ExitMainLoop has been explicitly called or because the last frame has been deleted and GetExitOnFrameDelete flag is true (this is the default).
The return value of this function becomes the exit code of the program, so it should return 0 in case of successful termination.
|virtual int OnExit||(||)|
Override this member function for any processing which needs to be done as the application is about to exit. OnExit is called after destroying all application windows and controls, but before wxWidgets cleanup. Note that it is not called at all if OnInit failed.
The return value of this function is currently ignored, return the same value as returned by the base class method if you override it.
|static App GetApp||(||)||
|public string VendorName||(||)|
Returns the application's vendor name.
|public void VendorName||(||string||name||)|
Sets the name of application's vendor. The name will be used in registry access. A default name is set by wxWidgets.
|public string AppName||(||)|
Returns the application name.
|public void AppName||(||string||name||)|
Sets the name of the application. The name may be used in dialogs (for example by the document/view framework). A default name is set by wxWidgets.
|public Window TopWindow||(||)|
Returns a pointer to the top window.
|public void TopWindow||(||Window||window||)|
Sets the 'top' window. You can call this from within wxApp.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.
|window||The new top window.|
|static bool SafeYield||(||)||
|static bool SafeYield||(||Window||win||)||
|static bool SafeYield||(||Window||win,|
|public bool Yield||(||bool||onlyIfNeeded||)|
Yields control to pending messages in the windowing system. This can be useful, for example, when a time-consuming process writes to a text window. Without an occasional yield, the text window will not be updated properly, and on systems with cooperative multitasking, such as Windows 3.1 other processes will not respond.
Caution should be exercised, however, since yielding may allow the user to perform actions which are not compatible with the current task. Disabling menu items or whole menus during processing can avoid unwanted reentrance of code: see wxSafeYield for a better function.
Note that Yield() will not flush the message logs. This is intentional as calling Yield() is usually done to quickly update the screen and popping up a message box dialog may be undesirable. If you do wish to flush the log messages immediately (otherwise it will be done during the next idle loop iteration), call wxLog.FlushActive.
Calling Yield() recursively is normally an error and an assert failure is raised in debug build if such situation is detected. However if the onlyIfNeeded parameter is true, the method will just silently return false instead.
|static void WakeUpIdle||(||)||