VCF::AbstractApplication Class Reference
An AbstractApplication is a base class for deriving new application types Currently there are two main types, standard Application classes, which represent the current process the application is associated with and of which there should only be one, and LibraryApplication classes which are tied to shared librarys or DLL's. More...
#include <vcf/ApplicationKit/AbstractApplication.h>
Inheritance diagram for VCF::AbstractApplication:

Public Member Functions | |
| AbstractApplication () | |
| virtual | ~AbstractApplication () |
| String | getName () |
| allows for the use of programmable, user friendly names for Applications | |
| virtual void | setName (const String &name) |
| virtual bool | initRunningApplication ()=0 |
| 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 ()=0 |
| terminates the running application. | |
| ApplicationPeer * | getPeer () |
| retreives the system specific Peer for this application | |
| virtual GraphicsResourceBundle * | getResourceBundle () |
| This returns the application's resource bundle. | |
| String | getFileName () |
| returns the full path for the application executable | |
| Window * | createWindow (Class *windowClass) |
| Creates a Frame from a frame derived class name. | |
| Dialog * | createDialog (Class *dialogClass) |
| void | loadWindow (Window *window) |
| Loads an already existing Frame from a frame derived class name. | |
| void | loadDialog (Dialog *dialog) |
| virtual void | idleTime () |
| This virtual function is called during the event loops idle phase. | |
| virtual void | postEvent (EventHandler *eventHandler, Event *event, const bool &deleteHandler=true) |
| call this method to post an event. | |
| AcceleratorKey * | getAccelerator (const VirtualKeyCode &keyCode, const uint32 &modifierMask, Object *src) |
| void | addAcceleratorKey (const VirtualKeyCode &keyCode, const uint32 &modifierMask, EventHandler *eventHandler) |
| void | addAcceleratorKey (AcceleratorKey *accelerator) |
Protected Attributes | |
| ApplicationPeer * | applicationPeer_ |
| String | applicationName_ |
Detailed Description
An AbstractApplication is a base class for deriving new application types Currently there are two main types, standard Application classes, which represent the current process the application is associated with and of which there should only be one, and LibraryApplication classes which are tied to shared librarys or DLL's.
An application can act as a grouping place for a set of logically connect group of behaviours. For example, you might consider writing an HTML editor and thus want to create an HTMLEditorApplication class. Later you might expand things and break out the text editing functionality into a separate library, thus create a TextEditorLibraryApplication class. You would still have a primary application class ( the HTMLEditorApplication ) of which there could be only one per process. However, unlike other frameworks, an AbstractApplication instance is NOT a requirement in the VCF. It is entirely possible to use the VCF without an application object. For example, you may have an existing MFC or raw Win32 application that you wish to enhance using controls or other classes from the VCF. To allow this certain functions are declared again in the AbstractApplication class that were previously declared in the UIToolkit to allow for a central place to call them when using an application object, but still allowing the framework to operate correctly without the application instance when appropriate. Please note that while these functions may be declared again, they are not reimplmented. All the AbstractApplication functions like postEvent() or getAccelerator() do is to call the approriate UIToolkit functions, so no implmentation code is duplicated.
Constructor & Destructor Documentation
|
|
|
|
|
|
Member Function Documentation
|
|
|
|
||||||||||||||||
|
|
|
|
|
|
|
Creates a Frame from a frame derived class name.
|
|
||||||||||||||||
|
|
|
|
returns the full path for the application executable
String appFileName = Application::getRunningInstance()->getFileName(); Sting msg = StringUtils::formatString( "The app file name is: %s", appFileName.c_str() ); Dialog::showMessage( msg ); * |
|
|
allows for the use of programmable, user friendly names for Applications
|
|
|
retreives the system specific Peer for this application
|
|
|
This returns the application's resource bundle. If the application in question is the application instance that represents the running process/program ( in other words, the instance returned by Application::getRunningInstance() ) then the resource bundle returned is the same that you would get by calling System::getResourceBundle(). However, if the application instance is a LibraryApplication, then the resource bundle is unique to that library, and independant from that of the main application's resource bundle. This is re-implemented in LibraryApplication class. Reimplemented in VCF::LibraryApplication. |
|
|
This virtual function is called during the event loops idle phase. Ovveride this fucntion for application specific processing that can be done during idle time. |
|
|
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
Implemented in VCF::Application, VCF::DocumentBasedApplication< DocInterfacePolicy >, and VCF::LibraryApplication. |
|
|
|
|
|
Loads an already existing Frame from a frame derived class name.
|
|
||||||||||||||||
|
call this method to post an event. You can override it ot provide extra behaviour. The default behaviour is to simply pass the event along to the UIToolkit::postEvent() method. The idea in placing this function here is allow event posting to be able to happen through an application where appropriate.
|
|
|
Reimplemented in VCF::LibraryApplication. |
|
|
terminates the running application. This is called during normal shutdown of an application object. You should override this function if your application created resources and release those resources here. Implemented in VCF::Application, VCF::DocumentBasedApplication< DocInterfacePolicy >, and VCF::LibraryApplication. |
Member Data Documentation
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/AbstractApplication.h
