VCF::Application Class Reference
Represents the main process for a application. More...
#include <vcf/ApplicationKit/Application.h>
Inheritance diagram for VCF::Application:

Public Member Functions | |
| Application (int argc, char **argv) | |
| Every derived class must at least take argc, and argv arguments to it's constructor. | |
| virtual | ~Application () |
| void | run () |
| starts the application event loop running | |
| virtual bool | initRunningApplication () |
| This happens after the Application object is constructed, after the initialize() method, and just before the app's run() method is called successful. | |
| virtual void | terminateRunningApplication () |
| terminates the running application | |
| Window * | getMainWindow () |
| gets the main window of the application. | |
| void | setMainWindow (Window *mainWindow) |
| sets the main window for the application | |
| void | onMainWindowClose (WindowEvent *event) |
| event handler for the main window closing down. | |
| void | loadVPL (const String &vplFileName) |
| load a VPL, calls the initPackage() function, and adds the library to it's list. | |
| virtual bool | loadState () |
| virtual bool | saveState () |
| virtual bool | loadFrameState (Frame *frame) |
| virtual bool | saveFrameState (Frame *frame) |
| void | setAutoLoadSaveAppState (const bool &autoLoadSaveState) |
| virtual bool | displayHelpContents () |
| This gets called by the internals of the framework in response standard OS events. | |
| virtual bool | displayHelpIndex () |
| This gets called by the internals of the framework in response standard OS events. | |
| virtual void | getHelpInfo (String &helpBookName, String &helpDirectory) |
| returns the values for the help book and the directory it's located in. | |
| virtual void | onOSNativeEvent (Event *nativeOSEvent) |
| default implamentation simply passes the event to the Delegate to be passed off to any other EventHandlers. | |
Static Public Member Functions | |
| static void | main () |
| The entry point into the application object starting up. | |
| static Application * | getRunningInstance () |
| returns the singleton instance of the current application for this process. | |
Public Attributes | |
| Delegate | nativeOSEventReceived |
| Use this delegate to attach an event handler for native OS Events. | |
Protected Member Functions | |
| void | init () |
| This is going to be removed from the bext release. | |
| void | internal_terminate () |
Protected Attributes | |
| std::map< String, Library * > | VPLMap_ |
| bool | autoLoadSaveAppState_ |
Static Protected Attributes | |
| static Application * | appInstance_ |
Detailed Description
Represents the main process for a application.Each application contains a main window, pointed to by mainWindow_. Application are started by some entry point of the executing process. Once the entry point has been called, usually main(), the static function Application::appMain() is called to start the application initializing itself. While the Application instance is optional, if it is present there should only be one instance that is created on the stack.
Typically the startup code looks like this:
int main( int argc, char** argv ) { Application theApp(argc, argv); Application::main(); return 0; } *
- Version:
- 1.0
- Author:
- Jim Crafton
- Event Delegates for this class:
Constructor & Destructor Documentation
|
||||||||||||
|
Every derived class must at least take argc, and argv arguments to it's constructor. These in turn get passed to the ApplicationKit and it's underlying platform implementation in order to properly initialize them. These arguments can be retrieved in the form of the CommandLine instance that is part of the FoundationKit. For example: CommandLine cmdLine = FoundationKit::getCommandLine(); //get the first argument cmdLine.getArgument(0);
|
|
|
|
Member Function Documentation
|
|
This gets called by the internals of the framework in response standard OS events. You can customize how or what help contents are loaded by overriding this function.
|
|
|
This gets called by the internals of the framework in response standard OS events. You can customize how or what help index is loaded by overriding this function.
|
|
||||||||||||
|
returns the values for the help book and the directory it's located in. The default returns empty strings for both values. |
|
|
gets the main window of the application. All applications have a main window of some sort. This can a be a tool type window, a dialog, or just a regular window. When this window is closed, the application begins it's shutdown priocess
|
|
|
returns the singleton instance of the current application for this process. May be null if the VCF is being used without Application support.
|
|
|
This is going to be removed from the bext release.
Reimplemented from VCF::Object. |
|
|
This happens after the Application object is constructed, after the initialize() method, and just before the app's run() method is called successful. if false, it calls terminate() and then kills the app process. this method also builds the accellerator table used for keyboard shortcuts
Implements VCF::AbstractApplication. Reimplemented in VCF::DocumentBasedApplication< DocInterfacePolicy >. |
|
|
|
|
|
|
|
|
|
|
|
load a VPL, calls the initPackage() function, and adds the library to it's list. The library will be unloaded when the app quits. |
|
|
The entry point into the application object starting up.
|
|
|
event handler for the main window closing down.
|
|
|
default implamentation simply passes the event to the Delegate to be passed off to any other EventHandlers. To prevent this from happening, do NOT call the base class's onOSNativeEvent()
void MyApp::onOSNativeEvent( Event* e ) { //comment the next line out if you want to prevent the //delegate from notifying event handlers Application::onOSNativeEvent(e); Win32MSG* msg = (Win32MSG*)e->getUserData(); switch( msg->msg_.message ) { //do whatever here } } |
|
|
starts the application event loop running
|
|
|
|
|
|
|
|
|
|
|
|
sets the main window for the application
|
|
|
terminates the running application
Implements VCF::AbstractApplication. Reimplemented in VCF::DocumentBasedApplication< DocInterfacePolicy >. |
Member Data Documentation
|
|
|
|
|
|
|
|
Use this delegate to attach an event handler for native OS Events.
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/Application.h
