Inheritance diagram for CP_Application_Imp:
Containers | |
CP_ScriptableObject_Imp * | GetSuperScriptableObject () const |
virtual void | SetSuperScriptableObject (CP_ScriptableObject_Imp *inSuperScriptableObject) |
CP_ScriptableObject_Imp * | GetDefaultSubScriptableObject () const |
void | SetDefaultSubScriptableObject (CP_ScriptableObject_Imp *inObject) |
CP_ScriptableObject_Imp * | GetDefaultSuperScriptableObject () const |
void | SetDefaultSuperScriptableObject (CP_ScriptableObject_Imp *inObject) |
static void | SetDefaultObject (CP_ScriptableObject_Imp *inDefaultObject) |
static CP_ScriptableObject_Imp * | GetDefaultObject () |
static CP_ScriptableObject_Imp * | GetScriptableObjectFromToken (const AEDesc &inToken) |
Property | |
CP_ScriptableObject_Imp * | GetScriptableObjectProperty (DescType inProperty) const |
virtual void | DoAE_SetData (const DescType inPropertyType, const AEDesc &inValue, AppleEvent &inOutReply) |
AppleEvents | |
virtual DescType | GetAppleClass () const |
virtual void | MakeSelfSpecifier (AEDesc &inContainerSpec, AEDesc &inOutSelfSpec) |
virtual void | HandleOpenApplicationAppleEvent (const AppleEvent &inEvent, AppleEvent &inOutReply, SInt32 inRefCon) |
virtual void | HandleQuitApplicationAppleEvent (const AppleEvent &inEvent, AppleEvent &inOutReply, SInt32 inRefCon) |
virtual void | HandlePreferencesAppleEvent (const AppleEvent &inEvent, AppleEvent &inOutReply, SInt32 inRefCon) |
virtual void | HandleOpenDocumentAppleEvent (const AppleEvent &inEvent, AppleEvent &inOutReply, SInt32 inRefCon) |
Commands | |
virtual void | HandleNewUpdateCommandStatusCommand (CP_CommandStatus &inOutCommandStatus, bool &, CP_CommandNo &) |
virtual void | HandleNewCommand (OSStatus &inOutStatus, CP_CommandNo &) |
virtual void | HandleOpenUpdateCommandStatusCommand (CP_CommandStatus &inOutCommandStatus, bool &, CP_CommandNo &) |
virtual void | HandleOpenCommand (OSStatus &inOutStatus, CP_CommandNo &) |
virtual void | HandlePageSetupUpdateCommandStatusCommand (CP_CommandStatus &inOutCommandStatus, bool &, CP_CommandNo &) |
virtual void | HandlePageSetupCommand (OSStatus &inOutStatus, CP_CommandNo &) |
virtual void | HandlePrintUpdateCommandStatusCommand (CP_CommandStatus &inOutCommandStatus, bool &, CP_CommandNo &) |
virtual void | HandlePrintCommand (OSStatus &inOutStatus, CP_CommandNo &) |
virtual void | HandleCloseUpdateCommandStatusCommand (CP_CommandStatus &inOutCommandStatus, bool &inOutWasHandled, CP_CommandNo &inCommandNo) |
Events | |
virtual void | HandleOpenApplication () |
virtual void | HandleOpenDocument (CP_FileSystemSpec &) |
virtual void | HandleReopenApplication () |
virtual bool | HandleQuitApplication () |
virtual void | HandleShowPreferences () |
virtual void | CommandProcess (CP_Event_Base &inEvent) |
Documents | |
virtual void | RegisterDocuments () |
virtual SInt32 | CountDocuments () |
virtual CP_ScriptableObject_Imp * | GetNthDocument (SInt32 inPosition) |
Events | |
virtual void | HandleOpenApplication () |
virtual void | HandleShowPreferences () |
AppleEventHandlers | |
virtual void | DoAE_Activate (const AppleEvent &inEvent, AppleEvent &inOutReply) |
virtual void | DoAE_Clone (const AppleEvent &inEvent, AppleEvent &inOutReply) |
virtual void | DoAE_Close (const AppleEvent &inEvent, AppleEvent &inOutReply) |
virtual void | DoAE_Delete (const AppleEvent &inEvent, AppleEvent &inOutReply) |
virtual void | DoAE_DoObjectsExist (const AppleEvent &inEvent, AppleEvent &inOutReply) |
virtual void | DoAE_Move (const AppleEvent &inEvent, AppleEvent &inOutReply) |
virtual void | DoAE_Open (const AppleEvent &inEvent, AppleEvent &inOutReply) |
virtual void | DoAE_Print (const AppleEvent &inEvent, AppleEvent &inOutReply) |
virtual void | DoAE_Save (const AppleEvent &inEvent, AppleEvent &inOutReply) |
virtual void | DoAE_Revert (const AppleEvent &inEvent, AppleEvent &inOutReply) |
Public Member Functions | |
void | disconnect_all () |
void | signal_connect (CP_Signal *inSender) |
void | signal_disconnect (CP_Signal *inSender) |
void | SetID (FourCharCode inIdentifier) |
FourCharCode | GetID () |
void | RegisterSignal (const CP_SignalHolder &inSignal) |
CP_DataValueSignal * | FindSignal (const CP_String &inSignalName) |
UInt32 | GetNumberSignals () |
CP_String | GetNthSignalName (UInt32 inSignalIndex) |
void | RegisterSlot (const CP_SlotHolder &inSlot) |
CP_DataValueSlot | FindSlot (const CP_String &inSlotName) |
UInt32 | GetNumberSlots () |
CP_String | GetNthSlotName (UInt32 inSlotIndex) |
template<class R, class P1, class P2> | |
CP_CommandHandlerSignal * | Connect (CPLAT::CP_CommandNo cmd, void(R::*handler)(P1, P2), SInt32 mode) |
template<class R, class P1, class P2> | |
void | Connect (CP_Object *control, const CPLAT::CP_String &signalName, void(R::*handler)(P1, P2)) |
Constructor / Destructor | |
CP_Application_Imp () | |
Constructor. | |
virtual | ~CP_Application_Imp () throw () |
Destructor. | |
Constructor / Destructor | |
CP_Application_Imp () | |
Constructor. | |
virtual | ~CP_Application_Imp () throw () |
Destructor. | |
Constructor / Destructor | |
CP_Application_Imp () | |
Constructor. | |
virtual | ~CP_Application_Imp () throw () |
Destructor. | |
Static Public Member Functions | |
static void | Connect (CP_Object *sender, const CP_String &signalName, CP_Object *receiver, const CP_String &slotName, const bool reciprocal=false) |
static void | Connect (CP_Object *sender, CP_Object *receiver, const bool reciprocal=false, const CP_String &signalName=kCP_Signal_ValueChanged, const CP_String &slotName=kCP_Slot_SetValue) |
Protected Member Functions | |
Events | |
virtual bool | HandleQuitApplication () |
virtual void | HandleOpenApplication () |
Commands | |
virtual void | HandleNewUpdateCommandStatusCommand (CP_CommandStatus &inOutCommandStatus, bool &, CP_CommandNo &) |
virtual void | HandleNewCommand (OSStatus &inOutStatus, CP_CommandNo &) |
virtual void | HandleOpenUpdateCommandStatusCommand (CP_CommandStatus &inOutCommandStatus, bool &, CP_CommandNo &) |
virtual void | HandleOpenCommand (OSStatus &inOutStatus, CP_CommandNo &) |
virtual void | HandlePageSetupUpdateCommandStatusCommand (CP_CommandStatus &inOutCommandStatus, bool &, CP_CommandNo &) |
virtual void | HandlePageSetupCommand (OSStatus &inOutStatus, CP_CommandNo &) |
virtual void | HandlePrintUpdateCommandStatusCommand (CP_CommandStatus &inOutCommandStatus, bool &, CP_CommandNo &) |
virtual void | HandlePrintCommand (OSStatus &inOutStatus, CP_CommandNo &) |
Protected Attributes | |
CP_E_AppStatus | fAppStatus |
CP_EventHandler | fEventHandler |
CP_SplashScreen * | fSplashScreen |
CP_M_DeferredTask_Array * | fDeferredTasks |
CP_TimedTask * | fDeferredTasksTimer |
CP_M_DeferredTask_Array * | fDeferredTasks |
CP_TimedTask * | fDeferredTasksTimer |
CP_AppleEventHandler_Map | fEventHandlers |
CP_ScriptableObject_Imp * | fSuperScriptableObject |
CP_ScriptableObject_Imp * | fDefaultSubScriptableObject |
CP_ScriptableObject_Imp * | fDefaultSuperScriptableObject |
CP_Commands_Array * | fCommands |
CP_MenuSelectionSignal * | fMennuSelectionSignal |
sender_set | fSenders |
CP_Signals_Array * | fSignals |
CP_Slots_Array * | fSlots |
FourCharCode | fObjectID |
Static Protected Attributes | |
static CP_Application_Imp * | fsInstance = NULL |
static CP_Application_Imp * | fsInstance |
static CP_Application_Imp * | fsInstance |
static CP_ScriptableObject_Imp * | gDefaultObject = NULL |
static bool | gInited = false |
static FourCharCode | fObjectIDCount = 0 |
Private Member Functions | |
Initialization | |
void | Init () |
void | InitEventHandler (CP_EventHandler &inEventHandler) |
Initialization | |
void | Init () |
void | InitEventHandler (CP_EventHandler &inEventHandler) |
void | InitAppleEvents () |
Carbon Events | |
void | AppQuit (CP_Event_Base &inEvent) |
void | CommandUpdateStatus (CP_Event_Base &inEvent) |
Slots | |
void | HandleDeferredTasksTimer (CP_DataValueHolder &inDataValue, OSStatus &inOSStatus) |
Initialization | |
void | Init () |
void | InitEventHandler (CP_EventHandler &inEventHandler) |
Commands | |
void | CommandProcess (CP_Event_Base &inEvent) |
void | CommandUpdateStatus (CP_Event_Base &inEvent) |
virtual bool | HandleQuitApplication () |
Events | |
void | RunOneEventLoop (CP_Event< kCP_WINDOW_EVENT, 0 > &inOutEvent) |
bool | GetAnEvent (CP_Event< kCP_WINDOW_EVENT, 0 > &inOutEvent) |
void | DispatchEvent (CP_Event< kCP_WINDOW_EVENT, 0 > &inEvent) |
Slots | |
void | HandleDeferredTasksTimer (CP_DataValueHolder &inDataValue, OSStatus &inOSStatus) |
|
Constructor.
|
|
Destructor.
|
|
|
|
|
|
|
|
|
|
Returns the single instance of this object.
|
|
Called when the user has selected Quit from the main menu bar. Or the application has called this method. This will quit the main CarbonEvent loop. In this class no check is made to handle dirty documents, or any other processing. If your application is handling documents, you should be using CP_DocumentApp which will check for dirty documents before quitting the main event loop.
|
|
Runs the main CarbonEvent application loop until the user issues some type of command to quit the event loop. This will also set the app status flag to kCP_E_AppStatus_Running.
|
|
Called when the main event loop encounters an exception it doesn't know how to handle. Users should override to provide application defined behavior.
|
|
Returns the current application status flag as a CP_E_APP_STATUS enumeration that is defined in CP_Enums.h. This flag indicates the current running status of the application, and will be either running, quitting or quit.
|
|
Sets the status of our application from the passed in parameter.
|
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Ends the Gtk loop processing for this class. This calls gtk_main_quit() to exit the Run() method in CPLAT. You should not call this directly, but instead use HandleQuit() which takes care of some housekeeping (such as closing documents) before calling this to end the event loop processing.
|
|
Initialize the application class.
|
|
Initialize the event handler data member for this class.
|
|
|
|
Handles the get data Apple Event to return some type of data about this window.
Reimplemented from CP_ScriptableObject_Imp. |
|
Return a count of the objects of inType contained in ourselves. This needs to be overriden, this method just returns 0.
Reimplemented from CP_ScriptableObject_Imp. |
|
Return the object contained inourselves based on the name passed in.
Reimplemented from CP_ScriptableObject_Imp. |
|
Return the object contained inourselves based on the position passed in.
Reimplemented from CP_ScriptableObject_Imp. |
|
|
|
Called when the user has selected Preferences from the Apple Menu.
|
|
Add a new deferred task to our list of tasks.
|
|
Remove a deferred task from our list.
|
|
Remove all tasks from this object.
|
|
Return the number of tasks that have been added to this object.
|
|
Return the index of the passed in inTask in the list of tasks to do. If the task is not in the list, then 0 is returned.
|
|
Call each of the deferred tasks to do their task, and then delete the task.
|
|
|
|
|
|
Return the event handler for this application implementation. This will be the OS implentation event handler.
|
|
|
|
Sets the status of our application from the passed in parameter.
|
|
|
|
|
|
Returns a DescType to describe this class for the Apple Event Manager. Default is to return typeNull indicating this is the outter container.
Implements CP_ScriptableObject_Imp. |
|
Add a specifier to ourselves. This is by default a specifier for an object of typeNull.
Reimplemented from CP_ScriptableObject_Imp. |
|
Handles the open application Apple Event. This calls the user overrideable HandleOpenAppliction() method that users can override to have their appliction perform when the application first opens.
|
|
Handles the quit application Apple Event. This calls the user overrideable HandleQuitAppliction() method that users can override to have their appliction perform when the application quits.
|
|
Handles the preferences Apple Event. This calls the user overrideable HandleShowPreferences() method that users can override to have their appliction handle their preferences.
|
|
Handles the open document Apple Event. This is overriden in CP_Application to allow the document policy class determine what to do with with documents / files that have been received by this Apple Event.
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Handles the enabling status of the Close command.
|
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
|
|
|
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
|
|
Called when the application target needs to handle a command. This will call the CP_M_CommandHandler with the information about the command being updated to do the actual handling of the command.
|
|
Register information about the documents that this application will handle. Subclasses need to override if they are going to do any CP_Document handling. Default does nothing.
|
|
Returns a count of the number of documents for this application. Subclasses need to override if they support documents.
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Returns the nth document created by this application, if the application supports documents.
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
|
|
|
|
|
|
|
|
Initialize the Apple Event classes, and install the handlers for the application events we handle. The AppleEvents registered to be handled are:
|
|
|
|
Called when the application target needs to update information about commands, usually called when the user is opening a menu that contains some items that the application has registered with the Carbon Event handler. This will call the CP_M_CommandHandler with the information about the command being updated to do the actual processing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sets the status of our application from the passed in parameter.
|
|
|
|
|
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
|
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Runs one iteration of the Windows main event loop. Normally you do not need to call this method. It is continuously called from Run() to handle event processing in an application.
|
|
Private method used in the RunOneEventLoop method to retrieve information about the current event from a Windows MSG structure as returned by Windows ::GetMessage().
|
|
Private method used in the RunOneEventLoop method to dispatch an event under Windows to the corrent Windows event target.
|
|
|
|
Handle the passed in Apple Event. You should not need to override this. Either call the one of the default handlers for the core events, or to override the default handlers, register an event handler for the event. Registered event handlers will be handled first, then the built in functions will be called if there is no overriding event handler for the event.
Reimplemented in CP_ScriptableObject_Property. |
|
Handles AppleEvents for this object and any sub scriptable objects that this object might contain.
|
|
Set the default object. This is the object that subsequent events will use when they refer to the default object.
|
|
|
|
Gets the scriptable object that an event corresponds to, by extracting our CP_ModelToken from the descriptor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Compare Apple Event objects. This method returns false, and subclasses need to override it.
|
|
Return the object contained in the passed in container based upon the inForm criteria.
|
|
Return the object contained in ourselves based on the unique ID passed in. Subclasses need to override this function. This routine just returns NULL.
|
|
Return the object contained in ourselves based on the position passed in. Subclasses need to override this function. This routine just returns NULL.
|
|
Subclasses need to override this to handle the create element event.
Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >. |
|
Adds the passed in CP_AppleEventSignal to the list of AppleEvents we will handle through a signal / slot connection.
|
|
Removes a previously added event handler from the list of the events handled by the object.
|
|
Returns true if there is a registered signal handler for the passed in event.
|
|
Finds and returns the signal for the passed in event.
|
|
Tries to get the CP_ModelToken from the passed in descriptor and return in outToken.
|
|
Places the passed in scriptable object into a CP_ModelToken and then packages it up in a descriptor and returns in outToken.
|
|
|
|
Subclasses should override this to handle the set data event.
Reimplemented in CP_Window_Imp. |
|
Send an Apple Event to ourselves. Used to record events.
|
|
Make the specifier for our object. This method will recruisvely travel the object heirachy to make the correct specifier.
|
|
Check to make sure that the required params for the event are present, and throw an OSErr exception if they are missing.
|
|
Initialize our Apple Event handling by installing the Apple Event dispatcher and its object handlers.
|
|
|
|
|
|
Reimplemented in CP_Window_Imp. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Return the object contained in the passed in container based upon the inForm criteria.
|
|
Return the object contained in the passed in container based upon the inForm criteria.
|
|
Return the object contained in the passed in container based upon the inForm criteria.
|
|
Return the object contained in the passed in container based upon the inForm criteria.
|
|
Return the object contained in the passed in container based upon the inForm criteria.
|
|
Return the object contained in the passed in container based upon the inForm criteria.
|
|
Subclasses need to override to return the position of their sub objects.
|
|
Updates the status of a command.
|
|
Updates the status of a command based on the current state of the application.
|
|
Handles the processing of a command. If the command has been registered with this class, then its signal will be called. If the command has not been registered, then this function does nothing with the passed in command.
|
|
Signal called when a menu item is selected with no associated command. |
|
Returns the signal called when a menu item is selected and has no command associated with it.
|
|
Registers the passed in command. This places the command in a list of commands we will handle updating the status for, and when called executing the signal registered for the command.
|
|
Registers the passed in command. This places the command in a list of commands we will handle updating the status for, and when called executing the signal registered for the command.
|
|
Registers the passed in command. This places the command in a list of commands we will handle updating the status for. You are returned the signal object that you need to connect your slot to.
|
|
Registers the passed in command, returning the command status signal. If the command already exists, we will return the existing command status signal if there is one, otherwise we create a new signal, and return that signal. If there is already a signal, then return the existing signal.
|
|
Registers the passed in command, returning the command handling signal. If the command already exists, we will return the existing command handler signal if there is one, otherwise we create a new signal, and return that signal. If there is already a signal, then return the existing signal.
|
|
Returns true if the passed in command is known to this class.
|
|
Replaces a CP_Command for the passed in command number.
|
|
Unregisters a command.
|
|
Returns the CP_Command object associated with the passed in command number.
|
|
MacOS - Handles the processing of the passed in HICommand. This will translate the HICommand into a CPLAT CP_CommandNo for processing and updating the status of the command.
|
|
|
|
|
|
|
|
|
|
Sets the identifier for this object. If a specific identifier is not set with this function, then a default id is used, which is simply a running count of the number of objects created.
|
|
Returns the objects identifier.
|
|
Registers the signal / signal name contained in the passed in inSignal object.
|
|
Finds the CP_DataValueSignal object that matches the passed in inSignalName.
|
|
Returns the number of signals for this object.
|
|
Returns the signal name of the passed in signal index.
|
|
Registers the slot / slot name contained in the passed in inSlot object.
|
|
Finds the CP_Slot1 object that matches the passed in inSlotName.
|
|
Returns the number of slots for this object.
|
|
Returns the slot name of the passed in signal index.
|
|
|
|
|
|
|
|
|
|
|
|
Single instance of this class. |
|
Current state of the application, startup, running, quitting or quit. |
|
|
|
Event handling object for this class. |
|
Instance of any splash screen displayed for this app. |
|
Lists of tasks to be handled at idle time. |
|
|
|
Event handling object for this class |
|
Lists of tasks to be handled at idle time. |
|
|
|
The default object that events will be dispatched to. |
|
Flag to indicate if this class has been initialized. |
|
Map that contains all of the registered handlers. |
|
Scriptable object that is our container. |
|
Default scriptable object that is contained by this object. |
|
|
|
List of commands managed by this class. |
|
|
|
|
|
List of registered signals for this object. |
|
List of registered slots for this object. |
|
Object identifier. |