Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_Application_Imp Class Reference

Linux Gtk implementation of the CP_Application class. More...

Inheritance diagram for CP_Application_Imp:

CP_Object CP_M_CommandHandler CP_ScriptableObject CP_Object CP_M_CommandHandler CP_ScriptableObject CP_Object CP_M_CommandHandler CP_ScriptableObject CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY > List of all members.

Containers

CP_ScriptableObject_ImpGetSuperScriptableObject () const
virtual void SetSuperScriptableObject (CP_ScriptableObject_Imp *inSuperScriptableObject)
CP_ScriptableObject_ImpGetDefaultSubScriptableObject () const
void SetDefaultSubScriptableObject (CP_ScriptableObject_Imp *inObject)
CP_ScriptableObject_ImpGetDefaultSuperScriptableObject () const
void SetDefaultSuperScriptableObject (CP_ScriptableObject_Imp *inObject)
static void SetDefaultObject (CP_ScriptableObject_Imp *inDefaultObject)
static CP_ScriptableObject_ImpGetDefaultObject ()
static CP_ScriptableObject_ImpGetScriptableObjectFromToken (const AEDesc &inToken)

Property

CP_ScriptableObject_ImpGetScriptableObjectProperty (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_ImpGetNthDocument (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_DataValueSignalFindSignal (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_CommandHandlerSignalConnect (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_SplashScreenfSplashScreen
CP_M_DeferredTask_ArrayfDeferredTasks
CP_TimedTaskfDeferredTasksTimer
CP_M_DeferredTask_ArrayfDeferredTasks
CP_TimedTaskfDeferredTasksTimer
CP_AppleEventHandler_Map fEventHandlers
CP_ScriptableObject_ImpfSuperScriptableObject
CP_ScriptableObject_ImpfDefaultSubScriptableObject
CP_ScriptableObject_ImpfDefaultSuperScriptableObject
CP_Commands_ArrayfCommands
CP_MenuSelectionSignalfMennuSelectionSignal
sender_set fSenders
CP_Signals_ArrayfSignals
CP_Slots_ArrayfSlots
FourCharCode fObjectID

Static Protected Attributes

static CP_Application_ImpfsInstance = NULL
static CP_Application_ImpfsInstance
static CP_Application_ImpfsInstance
static CP_ScriptableObject_ImpgDefaultObject = 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)

Detailed Description

This object will implement the CP_Application class through the Linux Gtk library for all of its event handling.


Constructor & Destructor Documentation

CP_Application_Imp::CP_Application_Imp  ) 
 

Constructor.

Exceptions:
none 

CP_Application_Imp::~CP_Application_Imp  )  throw () [virtual]
 

Destructor.

Exceptions:
none 

CP_Application_Imp::CP_Application_Imp  ) 
 

virtual CP_Application_Imp::~CP_Application_Imp  )  throw () [virtual]
 

CP_Application_Imp::CP_Application_Imp  ) 
 

virtual CP_Application_Imp::~CP_Application_Imp  )  throw () [virtual]
 


Member Function Documentation

CP_Application_Imp * CP_Application_Imp::Instance  )  [static]
 

Returns the single instance of this object.

Exceptions:
none 
Returns:
CP_Application_Imp Returns the single instance of this class.

void CP_Application_Imp::HandleQuitCommand OSStatus inOutStatus,
CP_CommandNo inCommandNo
[virtual]
 

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.

Exceptions:
none 
Returns:
void

void CP_Application_Imp::Run  )  [virtual]
 

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.

Exceptions:
none 
Returns:
void

void CP_Application_Imp::OnUncaughtException const std::exception &  e  )  [virtual]
 

Called when the main event loop encounters an exception it doesn't know how to handle. Users should override to provide application defined behavior.

Parameters:
e In std::exception being handled.
Exceptions:
none 
Returns:
void

CP_E_AppStatus CP_Application_Imp::GetAppStatus  ) 
 

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.

Exceptions:
none 
Returns:
CP_E_AppStatus Current application status

void CP_Application_Imp::SetAppStatus CP_E_AppStatus  inAppStatus  ) 
 

Sets the status of our application from the passed in parameter.

Parameters:
inAppStatus Flag to indicate the current condition of the application. These flags are defined in CP_Enums.h and indicate if the application is starting up, running, quitting, or quit.
Exceptions:
none 
Returns:
void

virtual bool CP_Application_Imp::HandleQuitApplication  )  [protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandleOpenApplication  )  [protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

void CP_Application_Imp::QuitApplication  )  [protected]
 

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.

Exceptions:
none 
Returns:
void

void CP_Application_Imp::Init  )  [private]
 

Initialize the application class.

Exceptions:
none 
Returns:
void

void CP_Application_Imp::InitEventHandler CP_EventHandler inEventHandler  )  [private]
 

Initialize the event handler data member for this class.

Parameters:
inEventHandler The CP_EventHandler that handles the application events.
Exceptions:
none 
Returns:
void

static CP_Application_Imp* CP_Application_Imp::Instance  )  [static]
 

void CP_Application_Imp::DoAE_GetData const DescType  inPropertyType,
const AEDesc &  inValue,
AppleEvent &  inOutReply
[virtual]
 

Handles the get data Apple Event to return some type of data about this window.

Parameters:
inPropertyType The DescType of property we are getting.
inValue Any value of data to get.
inOutReply The AppleEvent where the reply will be placed.
Exceptions:
none 
Returns:
void

Reimplemented from CP_ScriptableObject_Imp.

SInt32 CP_Application_Imp::CountContainedObjects const DescType  inType  )  [virtual]
 

Return a count of the objects of inType contained in ourselves. This needs to be overriden, this method just returns 0.

Parameters:
inType A DescType containing the type of object we are trying to count.
Exceptions:
none 
Returns:
SInt32 The number of contained object of the passed in type.

Reimplemented from CP_ScriptableObject_Imp.

CP_ScriptableObject_Imp * CP_Application_Imp::GetContainedObjectByName const DescType  inDesiredClass,
const CP_String inName
[virtual]
 

Return the object contained inourselves based on the name passed in.

Parameters:
inDesiredClass Desired object class we are looking for, currently only cWindow objects.
inName The name of the object we are looking for.
Exceptions:
none 
Returns:
CP_ScriptableObject_Imp * The contained object we found. If no object was found, then NULL is returned.

Reimplemented from CP_ScriptableObject_Imp.

CP_ScriptableObject_Imp * CP_Application_Imp::GetContainedObjectByPosition const DescType  inDesiredClass,
const SInt32  inPosition
[virtual]
 

Return the object contained inourselves based on the position passed in.

Parameters:
inDesiredClass Desired object class we are looking for, currently only cWindow objects.
inPosition Index or position of the item we are looking for.
Exceptions:
none 
Returns:
CP_ScriptableObject_Imp * The contained object we found. If no object was found, then NULL is returned.

Reimplemented from CP_ScriptableObject_Imp.

virtual void CP_Application_Imp::HandleQuitCommand OSStatus inOutStatus,
CP_CommandNo inCommandNo
[virtual]
 

void CP_Application_Imp::HandlePreferencesCommand OSStatus inOutStatus,
CP_CommandNo inCommandNo
[virtual]
 

Called when the user has selected Preferences from the Apple Menu.

Parameters:
inOutStatus Returns a status of CP_noErr.
inCommandNo Not used.
Exceptions:
none 
Returns:
void

void CP_Application_Imp::AddTask CP_M_DeferredTask inTask  ) 
 

Add a new deferred task to our list of tasks.

Parameters:
inTask The task being added to our list of tasks.
Exceptions:
none 
Returns:
void

void CP_Application_Imp::RemoveTask CP_M_DeferredTask inTask  ) 
 

Remove a deferred task from our list.

Parameters:
inTask The task being removed from our list of tasks.
Exceptions:
none 
Returns:
void

void CP_Application_Imp::RemoveAllTasks  ) 
 

Remove all tasks from this object.

Exceptions:
none 
Returns:
void

UInt32 CP_Application_Imp::GetNumberTasks  ) 
 

Return the number of tasks that have been added to this object.

Exceptions:
none 
Returns:
UInt32 The number of tasks currently in our list of tasks to do.

UInt32 CP_Application_Imp::GetTaskListIndex CP_M_DeferredTask inTask  ) 
 

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.

Exceptions:
none 
Returns:
UInt32 The number of tasks currently in our list of tasks to do.

void CP_Application_Imp::DoDeferredTasks  )  [virtual]
 

Call each of the deferred tasks to do their task, and then delete the task.

Exceptions:
none 
Returns:
void

virtual void CP_Application_Imp::Run  )  [virtual]
 

virtual void CP_Application_Imp::OnUncaughtException const std::exception &  inException  )  [virtual]
 

CP_EventHandler & CP_Application_Imp::GetEventHandler  )  [virtual]
 

Return the event handler for this application implementation. This will be the OS implentation event handler.

Exceptions:
none 
Returns:
CP_EventHandler The OS implementations event handler.

CP_E_AppStatus CP_Application_Imp::GetAppStatus  ) 
 

void CP_Application_Imp::SetAppStatus CP_E_AppStatus  inAppStatus  ) 
 

Sets the status of our application from the passed in parameter.

Parameters:
inAppStatus Flag to indicate the current condition of the application. These flags are defined in CP_Enums.h and indicate if the application is starting up, running, quitting, or quit.
Exceptions:
none 
Returns:
void

void CP_Application_Imp::ShowSplashScreen  )  [virtual]
 

CP_SplashScreen* CP_Application_Imp::GetSplashScreen  ) 
 

DescType CP_Application_Imp::GetAppleClass  )  const [protected, virtual]
 

Returns a DescType to describe this class for the Apple Event Manager. Default is to return typeNull indicating this is the outter container.

Exceptions:
none 
Returns:
DescType typeNull class id.

Implements CP_ScriptableObject_Imp.

void CP_Application_Imp::MakeSelfSpecifier AEDesc &  inContainerSpec,
AEDesc &  inOutSelfSpec
[protected, virtual]
 

Add a specifier to ourselves. This is by default a specifier for an object of typeNull.

Parameters:
inContainerSpec Not used.
inOutSelfSpec The object we return the information in.
Exceptions:
none 
Returns:
VOID

Reimplemented from CP_ScriptableObject_Imp.

void CP_Application_Imp::HandleOpenApplicationAppleEvent const AppleEvent &  inEvent,
AppleEvent &  inOutReply,
SInt32  inRefCon
[protected, virtual]
 

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.

Parameters:
inEvent Not used.
inOutReply Not used.
Exceptions:
none 
Returns:
void

void CP_Application_Imp::HandleQuitApplicationAppleEvent const AppleEvent &  inEvent,
AppleEvent &  inOutReply,
SInt32  inRefCon
[protected, virtual]
 

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.

Parameters:
inEvent Not used.
inOutReply Not used.
Exceptions:
none 
Returns:
void

void CP_Application_Imp::HandlePreferencesAppleEvent const AppleEvent &  inEvent,
AppleEvent &  inOutReply,
SInt32  inRefCon
[protected, virtual]
 

Handles the preferences Apple Event. This calls the user overrideable HandleShowPreferences() method that users can override to have their appliction handle their preferences.

Parameters:
inEvent Not used.
inOutReply Not used.
Exceptions:
none 
Returns:
void

void CP_Application_Imp::HandleOpenDocumentAppleEvent const AppleEvent &  inEvent,
AppleEvent &  inOutReply,
SInt32  inRefCon
[protected, virtual]
 

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.

Parameters:
inEvent Not used.
inOutReply Not used.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandleNewUpdateCommandStatusCommand CP_CommandStatus inOutCommandStatus,
bool &  ,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandleNewCommand OSStatus inOutStatus,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandleOpenUpdateCommandStatusCommand CP_CommandStatus inOutCommandStatus,
bool &  ,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandleOpenCommand OSStatus inOutStatus,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandlePageSetupUpdateCommandStatusCommand CP_CommandStatus inOutCommandStatus,
bool &  ,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandlePageSetupCommand OSStatus inOutStatus,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandlePrintUpdateCommandStatusCommand CP_CommandStatus inOutCommandStatus,
bool &  ,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandlePrintCommand OSStatus inOutStatus,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

void CP_Application_Imp::HandleCloseUpdateCommandStatusCommand CP_CommandStatus inOutCommandStatus,
bool &  inOutWasHandled,
CP_CommandNo inCommandNo
[protected, virtual]
 

Handles the enabling status of the Close command.

Parameters:
inOutCommandStatus Object to return the command status in.
inOutResult Location to return the result in. If set to true, the status needs to be updated.
inCommand Not used.
Exceptions:
none 
Returns:
void

virtual void CP_Application_Imp::HandleOpenApplication  )  [protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandleOpenDocument CP_FileSystemSpec  )  [protected, virtual]
 

virtual void CP_Application_Imp::HandleReopenApplication  )  [protected, virtual]
 

virtual bool CP_Application_Imp::HandleQuitApplication  )  [protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandleShowPreferences  )  [protected, virtual]
 

void CP_Application_Imp::CommandProcess CP_Event_Base inEvent  )  [protected, virtual]
 

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.

Parameters:
inEvent CP_Event_Base event that contains the information about the event being handled.
Exceptions:
none 
Returns:
void

void CP_Application_Imp::RegisterDocuments  )  [protected, virtual]
 

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.

Exceptions:
none 
Returns:
void

SInt32 CP_Application_Imp::CountDocuments  )  [protected, virtual]
 

Returns a count of the number of documents for this application. Subclasses need to override if they support documents.

Exceptions:
none 
Returns:
SInt32 Number of documents.

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

CP_ScriptableObject_Imp * CP_Application_Imp::GetNthDocument SInt32  inPosition  )  [protected, virtual]
 

Returns the nth document created by this application, if the application supports documents.

Exceptions:
none 
Returns:
CP_ScriptableObject_Imp * The returned document.

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

void CP_Application_Imp::PrepareToRun  )  [protected, virtual]
 

void CP_Application_Imp::QuitApplication  )  [protected]
 

void CP_Application_Imp::Init  )  [private]
 

void CP_Application_Imp::InitEventHandler CP_EventHandler inEventHandler  )  [private]
 

void CP_Application_Imp::InitAppleEvents  )  [private]
 

Initialize the Apple Event classes, and install the handlers for the application events we handle. The AppleEvents registered to be handled are:

  • OpenApplication
  • QuitApplication
  • Preferences

Exceptions:
none 
Returns:
void

void CP_Application_Imp::AppQuit CP_Event_Base inEvent  )  [private]
 

void CP_Application_Imp::CommandUpdateStatus CP_Event_Base inEvent  )  [private]
 

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.

Parameters:
inEvent CP_Event_Base event that contains the information about the event being handled.
Exceptions:
none 
Returns:
void

void CP_Application_Imp::HandleDeferredTasksTimer CP_DataValueHolder inDataValue,
OSStatus inOSStatus
[private]
 

static CP_Application_Imp* CP_Application_Imp::Instance  )  [static]
 

virtual void CP_Application_Imp::HandleQuitCommand OSStatus inOutStatus,
CP_CommandNo inCommandNo
[virtual]
 

virtual void CP_Application_Imp::HandlePreferencesCommand OSStatus inOutStatus,
CP_CommandNo inCommandNo
[virtual]
 

void CP_Application_Imp::AddTask CP_M_DeferredTask inTask  ) 
 

void CP_Application_Imp::RemoveTask CP_M_DeferredTask inTask  ) 
 

void CP_Application_Imp::RemoveAllTasks  ) 
 

UInt32 CP_Application_Imp::GetNumberTasks  ) 
 

UInt32 CP_Application_Imp::GetTaskListIndex CP_M_DeferredTask inTask  ) 
 

virtual void CP_Application_Imp::DoDeferredTasks  )  [virtual]
 

CP_EventHandler& CP_Application_Imp::GetEventHandler  ) 
 

CP_E_AppStatus CP_Application_Imp::GetAppStatus  ) 
 

void CP_Application_Imp::SetAppStatus CP_E_AppStatus  inAppStatus  ) 
 

Sets the status of our application from the passed in parameter.

Parameters:
inAppStatus Flag to indicate the current condition of the application. These flags are defined in CP_Enums.h and indicate if the application is starting up, running, quitting, or quit.
Exceptions:
none 
Returns:
void

virtual void CP_Application_Imp::Run  )  [virtual]
 

virtual void CP_Application_Imp::OnUncaughtException const std::exception &  e  )  [virtual]
 

virtual void CP_Application_Imp::HandleNewUpdateCommandStatusCommand CP_CommandStatus inOutCommandStatus,
bool &  ,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandleNewCommand OSStatus inOutStatus,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandleOpenUpdateCommandStatusCommand CP_CommandStatus inOutCommandStatus,
bool &  ,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandleOpenCommand OSStatus inOutStatus,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandlePageSetupUpdateCommandStatusCommand CP_CommandStatus inOutCommandStatus,
bool &  ,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandlePageSetupCommand OSStatus inOutStatus,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandlePrintUpdateCommandStatusCommand CP_CommandStatus inOutCommandStatus,
bool &  ,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandlePrintCommand OSStatus inOutStatus,
CP_CommandNo
[protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::RegisterDocuments  )  [protected, virtual]
 

virtual void CP_Application_Imp::HandleOpenApplication  )  [protected, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

virtual void CP_Application_Imp::HandleShowPreferences  )  [protected, virtual]
 

virtual void CP_Application_Imp::PrepareToRun  )  [protected, virtual]
 

void CP_Application_Imp::Init  )  [private]
 

void CP_Application_Imp::InitEventHandler CP_EventHandler inEventHandler  )  [private]
 

void CP_Application_Imp::CommandProcess CP_Event_Base inEvent  )  [private]
 

void CP_Application_Imp::CommandUpdateStatus CP_Event_Base inEvent  )  [private]
 

virtual bool CP_Application_Imp::HandleQuitApplication  )  [private, virtual]
 

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

void CP_Application_Imp::RunOneEventLoop CP_Event< kCP_WINDOW_EVENT, 0 > &  inOutEvent  )  [private]
 

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.

Parameters:
inOutEvent CP_Event containing information from Windows about the event that is happening. On entry this event does not contain valid information.
It is filled in during this method with the current event information, and contains the event information when the method exits.

Exceptions:
none 
Returns:
void

bool CP_Application_Imp::GetAnEvent CP_Event< kCP_WINDOW_EVENT, 0 > &  inOutEvent  )  [private]
 

Private method used in the RunOneEventLoop method to retrieve information about the current event from a Windows MSG structure as returned by Windows ::GetMessage().

Parameters:
inOutEvent CP_Event containing information from Windows about the event that is happening. On entry this event does not contain valid information.
It is filled in during this method with the current event information, and contains the event information when the method exits.

Exceptions:
none 
Returns:
bool True if there was an event that occurred, and the inOutEvent parameter now contains valid event information.

void CP_Application_Imp::DispatchEvent CP_Event< kCP_WINDOW_EVENT, 0 > &  inEvent  )  [private]
 

Private method used in the RunOneEventLoop method to dispatch an event under Windows to the corrent Windows event target.

Parameters:
inEvent CP_Event containing information from Windows about the event that is happening.
Exceptions:
none 
Returns:
void

void CP_Application_Imp::HandleDeferredTasksTimer CP_DataValueHolder inDataValue,
OSStatus inOSStatus
[private]
 

void CP_ScriptableObject_Imp::HandleAppleEventSelf const AppleEvent &  inEvent,
AppleEvent &  inOutReply,
SInt32  inRefCon
[virtual, inherited]
 

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.

Parameters:
inEvent The AppleEvent being handled.
inOutReply The AppleEvent to place any reply into.
inRefCon The eventID passed from the AppleEvent manager when the event handler was registered.
Exceptions:
OSErrorExceptions 
Returns:
void

Reimplemented in CP_ScriptableObject_Property.

void CP_ScriptableObject_Imp::HandleAppleEvent const AppleEvent &  inEvent,
AppleEvent &  outAEReply,
AEDesc &  outResult,
SInt32  inRefCon
[virtual, inherited]
 

Handles AppleEvents for this object and any sub scriptable objects that this object might contain.

Parameters:
inEvent The AppleEvent being handled.
inOutReply The AppleEvent to place any reply into.
outReply Location to put a reply into.
inRefCon The eventID passed from the AppleEvent manager when the event handler was registered.
Exceptions:
OSErrorExceptions 
Returns:
void

void CP_ScriptableObject_Imp::SetDefaultObject CP_ScriptableObject_Imp inDefaultObject  )  [static, inherited]
 

Set the default object. This is the object that subsequent events will use when they refer to the default object.

Parameters:
inDefaultObject The CP_ScriptableObject_Imp that is to become the default object.
Exceptions:
none 
Returns:
void

static CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::GetDefaultObject  )  [static, inherited]
 

CP_ScriptableObject_Imp * CP_ScriptableObject_Imp::GetScriptableObjectFromToken const AEDesc &  inToken  )  [static, inherited]
 

Gets the scriptable object that an event corresponds to, by extracting our CP_ModelToken from the descriptor.

Parameters:
inToken The AEDesc that contains the token for the scriptable object we are trying to get.
Exceptions:
OSErrorExceptions 
Returns:
void

CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::GetSuperScriptableObject  )  const [inherited]
 

virtual void CP_ScriptableObject_Imp::SetSuperScriptableObject CP_ScriptableObject_Imp inSuperScriptableObject  )  [virtual, inherited]
 

CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::GetDefaultSubScriptableObject  )  const [inherited]
 

void CP_ScriptableObject_Imp::SetDefaultSubScriptableObject CP_ScriptableObject_Imp inObject  )  [inherited]
 

CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::GetDefaultSuperScriptableObject  )  const [inherited]
 

void CP_ScriptableObject_Imp::SetDefaultSuperScriptableObject CP_ScriptableObject_Imp inObject  )  [inherited]
 

bool CP_ScriptableObject_Imp::CompareObjects const DescType  inOperation,
const CP_ScriptableObject_Imp toWhat
[virtual, inherited]
 

Compare Apple Event objects. This method returns false, and subclasses need to override it.

Parameters:
inOperation A DescType describing the type of comparison operation to be performed.
toWhat The CP_ScriptableObject_Imp we are comparing against.
Exceptions:
none 
Returns:
bool The result of the comparison.

void CP_ScriptableObject_Imp::GetContainedObject const DescType  inDesiredClass,
const DescType  inForm,
const AEDesc &  inSelectionData,
AEDesc &  outToken
[virtual, inherited]
 

Return the object contained in the passed in container based upon the inForm criteria.

Parameters:
inDesiredClass A DescType describing the class we are looking for.
inForm a DescType describing the form.
inSelectionData AEDesc with the selection data.
inNeedsDisposal Flag to indicate if we should dispose dispose of objects.
Exceptions:
none 
Returns:
void

CP_ScriptableObject_Imp * CP_ScriptableObject_Imp::GetContainedObjectByUniqueID DescType  inDesiredClass,
SInt32  inID
[virtual, inherited]
 

Return the object contained in ourselves based on the unique ID passed in. Subclasses need to override this function. This routine just returns NULL.

Parameters:
inDesiredClass A DescType for the class we are looking for.
inUniqueID The unique id to identify the object.
Exceptions:
none 
Returns:
CP_ScriptableObject_Imp * The contained object.

CP_ScriptableObject_Imp * CP_ScriptableObject_Imp::GetContainedObjectByRelativePosition DescType  inDesiredClass,
SInt32  inPosition
[virtual, inherited]
 

Return the object contained in ourselves based on the position passed in. Subclasses need to override this function. This routine just returns NULL.

Parameters:
inDesiredClass A DescType for the class we are looking for.
inRelativePosition The relative position of the object we are looking for.
Exceptions:
none 
Returns:
CP_ScriptableObject_Imp * The contained object.

CP_ScriptableObject_Imp * CP_ScriptableObject_Imp::DoAE_CreateElement const DescType  inDesiredClass,
const DescType  inInsertLocation,
const AppleEvent &  inEvent,
AppleEvent &  inOutAEReply
[virtual, inherited]
 

Subclasses need to override this to handle the create element event.

Parameters:
inDesiredClass A DescType describing the class desired to create.
inInsertLocation A DescType describing the location to insert the object.
inEvent The incoming AppleEvent that we are creating the object for.
inOutAEReply The reply to the incoming Apple Event.
Exceptions:
none 
Returns:
CP_ScriptableObject_Imp * The newly created element.

Reimplemented in CP_Application< DOC_POLICY, PRINT_POLICY, UNDO_POLICY >.

void CP_ScriptableObject_Imp::AddEvent SInt32  inEventID,
CP_AppleEventSignal inEventSignal
[inherited]
 

Adds the passed in CP_AppleEventSignal to the list of AppleEvents we will handle through a signal / slot connection.

Parameters:
inEventID The identifier of the event to be handled.
inEventSignal The signal to call to handle the event.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::RemoveEvent SInt32  inEventID  )  [inherited]
 

Removes a previously added event handler from the list of the events handled by the object.

Parameters:
inEventID The identifier of the event to be removed.
Exceptions:
none 
Returns:
void

bool CP_ScriptableObject_Imp::HasHandlerForEvent SInt32  inEventID  )  [inherited]
 

Returns true if there is a registered signal handler for the passed in event.

Parameters:
inEventID The event id to check for a handler for.
Exceptions:
none 
Returns:
bool True if we have a handler for the event.

CP_AppleEventSignal * CP_ScriptableObject_Imp::FindHandlerForEvent SInt32  inEventID  )  [inherited]
 

Finds and returns the signal for the passed in event.

Parameters:
inEventID The identifier of the event to return the signal handler for.
Exceptions:
none 
Returns:
CP_AppleEventSignal * The AppleEventSignal handler for the event.

void CP_ScriptableObject_Imp::GetScriptableObjectToken DescType  inModelID,
DescType  inKeyForm,
const AEDesc &  inKeyData,
AEDesc &  outToken
[virtual, inherited]
 

Tries to get the CP_ModelToken from the passed in descriptor and return in outToken.

Parameters:
inModelID Identifier of the model to get.
inKeyForm Form to use.
inKeyData Descriptor that holds the data.
outToken Location to return the result in.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::PutInToken CP_ScriptableObject_Imp inScriptableObject,
AEDesc &  outToken
const [inherited]
 

Places the passed in scriptable object into a CP_ModelToken and then packages it up in a descriptor and returns in outToken.

Parameters:
inScriptableObject Object to package up.
outToken Location to return the result in.
Exceptions:
OSErrorExceptions 
Returns:
void

CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::GetScriptableObjectProperty DescType  inProperty  )  const [inherited]
 

void CP_ScriptableObject_Imp::DoAE_SetData const DescType  inPropertyType,
const AEDesc &  inValue,
AppleEvent &  inOutReply
[virtual, inherited]
 

Subclasses should override this to handle the set data event.

Parameters:
inPropertyType The DescType of property we are setting.
inValue Any value of data to get.
inOutReply The AppleEvent where the reply will be placed.
Exceptions:
none 
Returns:
void

Reimplemented in CP_Window_Imp.

void CP_ScriptableObject_Imp::SendAppleEvent_Self const AEEventClass  inEventClass,
const AEEventID  inEventID,
const bool  inDoExecute
[inherited]
 

Send an Apple Event to ourselves. Used to record events.

Parameters:
inEventClass The AEEventClass for this event.
inEventID The AEEventID for this event.
inDoExecute If false, the event is sent for recording purposes, but not actually executed.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::MakeSpecifier AEDesc &  inOutSpecifier  )  [virtual, inherited]
 

Make the specifier for our object. This method will recruisvely travel the object heirachy to make the correct specifier.

Parameters:
inOutSpecifier The CP_AE_Object where we will place the results.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::GotRequiredParams const AppleEvent &  inAppleEvent  )  [virtual, inherited]
 

Check to make sure that the required params for the event are present, and throw an OSErr exception if they are missing.

Parameters:
inAppleEvent The AppleEvent that we are checking.
Exceptions:
OSErrorExceptions 
Returns:
void

void CP_ScriptableObject_Imp::Install CP_AE_ObjectDispatcher inDispatcher = NULL  )  [protected, virtual, inherited]
 

Initialize our Apple Event handling by installing the Apple Event dispatcher and its object handlers.

Parameters:
inDispatcher Ghe CP_AE_ObjectDispatcher you want to use. If you pass NULL in this parameter, then the default CPLAT dispatcher will be used.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::DoAE_Activate const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_Clone const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_Close const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

Reimplemented in CP_Window_Imp.

void CP_ScriptableObject_Imp::DoAE_Delete const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_DoObjectsExist const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_Move const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_Open const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_Print const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_Save const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::DoAE_Revert const AppleEvent &  inEvent,
AppleEvent &  inOutReply
[protected, virtual, inherited]
 

void CP_ScriptableObject_Imp::GetContainedObject_FormAbsolutePosition const DescType  inDesiredClass,
const DescType  inForm,
const AEDesc &  inSelectionData,
AEDesc &  outToken
[protected, virtual, inherited]
 

Return the object contained in the passed in container based upon the inForm criteria.

Parameters:
inDesiredClass A DescType describing the class we are looking for.
inForm a DescType describing the form.
inSelectionData AEDesc with the selection data.
inNeedsDisposal Flag to indicate if we should dispose dispose of objects.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::GetContainedObject_FormName const DescType  inDesiredClass,
const DescType  inForm,
const AEDesc &  inSelectionData,
AEDesc &  outToken
[protected, virtual, inherited]
 

Return the object contained in the passed in container based upon the inForm criteria.

Parameters:
inDesiredClass A DescType describing the class we are looking for.
inForm a DescType describing the form.
inSelectionData AEDesc with the selection data.
inNeedsDisposal Flag to indicate if we should dispose dispose of objects.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::GetContainedObject_FormUniqueID const DescType  inDesiredClass,
const DescType  inForm,
const AEDesc &  inSelectionData,
AEDesc &  outToken
[protected, virtual, inherited]
 

Return the object contained in the passed in container based upon the inForm criteria.

Parameters:
inDesiredClass A DescType describing the class we are looking for.
inForm a DescType describing the form.
inSelectionData AEDesc with the selection data.
inNeedsDisposal Flag to indicate if we should dispose dispose of objects.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::GetContainedObject_FormRelativePosition const DescType  inDesiredClass,
const DescType  inForm,
const AEDesc &  inSelectionData,
AEDesc &  outToken
[protected, virtual, inherited]
 

Return the object contained in the passed in container based upon the inForm criteria.

Parameters:
inDesiredClass A DescType describing the class we are looking for.
inForm a DescType describing the form.
inSelectionData AEDesc with the selection data.
inNeedsDisposal Flag to indicate if we should dispose dispose of objects.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::GetContainedObject_FormPropertyID const DescType  inDesiredClass,
const DescType  inForm,
const AEDesc &  inSelectionData,
AEDesc &  outToken
[protected, virtual, inherited]
 

Return the object contained in the passed in container based upon the inForm criteria.

Parameters:
inDesiredClass A DescType describing the class we are looking for.
inForm a DescType describing the form.
inSelectionData AEDesc with the selection data.
inNeedsDisposal Flag to indicate if we should dispose dispose of objects.
Exceptions:
none 
Returns:
void

void CP_ScriptableObject_Imp::GetContainedObject_OtherForm const DescType  inDesiredClass,
const DescType  inForm,
const AEDesc &  inSelectionData,
AEDesc &  outToken
[protected, virtual, inherited]
 

Return the object contained in the passed in container based upon the inForm criteria.

Parameters:
inDesiredClass A DescType describing the class we are looking for.
inForm a DescType describing the form.
inSelectionData AEDesc with the selection data.
inNeedsDisposal Flag to indicate if we should dispose dispose of objects.
Exceptions:
CP_AE_EventNotHandledException 
Returns:
void

SInt32 CP_ScriptableObject_Imp::GetPositionOfSubObject const DescType  inObjectID,
const CP_ScriptableObject_Imp inObject
const [protected, virtual, inherited]
 

Subclasses need to override to return the position of their sub objects.

Parameters:
inDesiredClass A DescType for the class we are looking for.
inObject The object we are looking for.
Exceptions:
none 
Returns:
SInt32 The position of the subobject.

bool CP_M_CommandHandler::UpdateCommandStatus CP_CommandNo  inOSCommand,
CP_CommandStatus inOutCommandStatus
[inherited]
 

Updates the status of a command.

Parameters:
inOSCommand The CP_CommandNo assigned to the command.
inOutCommandStatus CP_CommandStatus object that holds the result of the update for the command.
Exceptions:
none 
Returns:
bool True if the command was handled.

bool CP_M_CommandHandler::UpdateCommandStatusForAppState CP_CommandNo  inOSCommand,
CP_CommandStatus inOutCommandStatus,
CP_Command inCommand
[virtual, inherited]
 

Updates the status of a command based on the current state of the application.

Parameters:
inOSCommand The CP_CommandNo assigned to the command.
inOutCommandStatus CP_CommandStatus object that holds the result of the update for the command.
inCommand CP_Command object with the command.
Exceptions:
none 
Returns:
bool True if the command was handled.

OSStatus CP_M_CommandHandler::HandleCommand CP_CommandNo  inOSCommand  )  [inherited]
 

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.

Parameters:
inOSCommand The CP_CommandNo assigned to the command.
Exceptions:
NULL exceptions.
Returns:
OSStatus Result of the command handling.

OSStatus CP_M_CommandHandler::HandleCommand HICommand  inCommand,
CP_Menu inMenu = NULL
[inherited]
 

Signal called when a menu item is selected with no associated command.

CP_MenuSelectionSignal* CP_M_CommandHandler::GetMenuSelectionSignal  )  [inherited]
 

Returns the signal called when a menu item is selected and has no command associated with it.

Exceptions:
none 
Returns:
CP_MenuSelectionSignal * Returns the menu selection signal.

void CP_M_CommandHandler::RegisterCommand CP_CommandNo  inOSCommand,
CP_CommandHandlerSignal inCommandHandler,
CP_CommandStatusSignal inCommandStatus
[inherited]
 

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.

Parameters:
inOSCommand The CP_CommandNo assigned to the command.
inCommandHandler The CP_CommandHandlerSignal called when the command is called to be executed. Note: This signal will be deleted when the command is removed from the list of commands, and should be unique for each command, ie don't assign the same signal to the same command.
inCommandStatus The CP_CommandStatusSignal called when the commands status needs to be updated. Note: This signal will be deleted when the command is removed from the list of commands, and should be unique for each command, ie don't assign the same signal to the same command.
Exceptions:
none 
Returns:
void

void CP_M_CommandHandler::RegisterCommand CP_CommandNo  inOSCommand,
CP_CommandHandlerSignal inCommandHandler,
SInt32  inFlags
[inherited]
 

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.

Parameters:
inOSCommand The CP_CommandNo assigned to the command.
inCommandHandler The CP_CommandHandlerSignal called when the command is called to be executed. Note: This signal will be deleted when the command is removed from the list of commands, and should be unique for each command, ie don't assign the same signal to the same command.
inFlags Flags used to update the status of the command instead of calling a signal to do the updating.
Exceptions:
none 
Returns:
void

CP_CommandHandlerSignal * CP_M_CommandHandler::RegisterCommand CP_CommandNo  inOSCommand,
SInt32  inFlags
[inherited]
 

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.

Parameters:
inOSCommand The CP_CommandNo assigned to the command.
inFlags Flags used to update the status of the command instead of calling a signal to do the updating.
Exceptions:
none 
Returns:
CP_CommandHandlerSignal The command handler signal that will be called when the command is executed. You need to connect your slot to this signal.

CP_CommandStatusSignal * CP_M_CommandHandler::RegisterUpdateStatusHandler CP_CommandNo  inOSCommand  )  [inherited]
 

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.

Parameters:
inOSCommand The CP_CommandNo assigned to the command.
Exceptions:
none 
Returns:
CP_CommandStatusSignal The command status signal that will be called when the command is executed. You need to connect your slot to this signal.

CP_CommandHandlerSignal * CP_M_CommandHandler::RegisterCommandHandler CP_CommandNo  inOSCommand  )  [inherited]
 

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.

Parameters:
inOSCommand The CP_CommandNo assigned to the command.
Exceptions:
none 
Returns:
CP_CommandHandlerSignal The command handler signal that will be called when the command is executed. You need to connect your slot to this signal.

bool CP_M_CommandHandler::IsRegisteredCommand CP_CommandNo  inOSCommand  )  const [inherited]
 

Returns true if the passed in command is known to this class.

Parameters:
inOSCommand The CP_CommandNo assigned to the command.
Exceptions:
none 
Returns:
bool const Returns true if we have previously registered the passed in command.

void CP_M_CommandHandler::ReplaceCommand CP_CommandNo  inOSCommand,
CP_Command inCommand
[inherited]
 

Replaces a CP_Command for the passed in command number.

Parameters:
inOSCommand The CP_CommandNo assigned to the command.
inCommand The CP_Command to replace with.
Exceptions:
none 
Returns:
void

void CP_M_CommandHandler::UnRegisterCommand CP_CommandNo  inOSCommand  )  [inherited]
 

Unregisters a command.

Parameters:
inOSCommand The CP_CommandNo to remove from the list of known commands we handle.
Exceptions:
none 
Returns:
void

CP_Command * CP_M_CommandHandler::GetCommand CP_CommandNo  inOSCommand  )  [inherited]
 

Returns the CP_Command object associated with the passed in command number.

Parameters:
inOSCommand The CP_CommandNo assigned to the command.
Exceptions:
none 
Returns:
CP_Command * CP_Command object associated with the passed in command number. Note: This will return a NULL CP_Command if the command has not been registered yet.

OSStatus CP_M_CommandHandler::HandleCommandUpdateStatus HICommand  inCommand,
CP_Menu inMenu = NULL
[inherited]
 

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.

Parameters:
inCommand The HICommand to be handled.
Exceptions:
OSError exceptions.
Returns:
OSStatus Result of the command handling.

OSStatus CP_M_CommandHandler::UpdateCommandStatusOS CP_CommandStatus  inCommandStatus,
bool  inResult,
HICommand  inCommand
[inherited]
 

void CP_SigSlot::CP_SlotObject::disconnect_all  )  [inherited]
 

void CP_SigSlot::CP_SlotObject::signal_connect CP_Signal inSender  )  [inherited]
 

void CP_SigSlot::CP_SlotObject::signal_disconnect CP_Signal inSender  )  [inherited]
 

void CP_Object::SetID FourCharCode  inIdentifier  )  [inherited]
 

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.

Parameters:
inIdentifier The objects identifier.
Returns:
void

FourCharCode CP_Object::GetID  )  [inherited]
 

Returns the objects identifier.

Returns:
FourCharCode The identifier of this object.

void CP_Object::RegisterSignal const CP_SignalHolder inSignal  )  [inherited]
 

Registers the signal / signal name contained in the passed in inSignal object.

Parameters:
inSignal CP_SignalHolder that holds a signal and string identifier.
Returns:
void

CP_DataValueSignal * CP_Object::FindSignal const CP_String inSignalName  )  [inherited]
 

Finds the CP_DataValueSignal object that matches the passed in inSignalName.

Parameters:
inSignalName CP_String containing the identifier of the signal to return.
Returns:
CP_DataValueSignal * Returns a pointer to a CP_DataValueSignal object.

UInt32 CP_Object::GetNumberSignals  )  [inherited]
 

Returns the number of signals for this object.

Returns:
UInt32 The number of signals.

CP_String CP_Object::GetNthSignalName UInt32  inSignalIndex  )  [inherited]
 

Returns the signal name of the passed in signal index.

Parameters:
inSignalIndex Index of the name of the signal to return.
Returns:
CP_String The name of the nth signal being returned.

void CP_Object::RegisterSlot const CP_SlotHolder inSlot  )  [inherited]
 

Registers the slot / slot name contained in the passed in inSlot object.

Parameters:
inSlot CP_SignalHolder that holds a slot and string identifier.
Returns:
void

CP_DataValueSlot CP_Object::FindSlot const CP_String inSlotName  )  [inherited]
 

Finds the CP_Slot1 object that matches the passed in inSlotName.

Parameters:
inSlotName CP_String containing the identifier of the slot to return.
Returns:
CP_DataValueSlot Returns a pointer to a CP_DataValueSlot object.

UInt32 CP_Object::GetNumberSlots  )  [inherited]
 

Returns the number of slots for this object.

Returns:
UInt32 The number of slots.

CP_String CP_Object::GetNthSlotName UInt32  inSlotIndex  )  [inherited]
 

Returns the slot name of the passed in signal index.

Parameters:
inSlotIndex Index of the name of the slot to return.
Returns:
CP_String The name of the nth slot being returned.

template<class R, class P1, class P2>
CP_CommandHandlerSignal* CP_Object::Connect CPLAT::CP_CommandNo  cmd,
void(R::*)(P1, P2)  handler,
SInt32  mode
[inherited]
 

template<class R, class P1, class P2>
void CP_Object::Connect CP_Object control,
const CPLAT::CP_String &  signalName,
void(R::*)(P1, P2)  handler
[inherited]
 

void CP_Object::Connect CP_Object sender,
const CP_String signalName,
CP_Object receiver,
const CP_String slotName,
const bool  reciprocal = false
[static, inherited]
 

void CP_Object::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
[static, inherited]
 


Member Data Documentation

CPLAT_Begin_Namespace_CPLAT CP_Application_Imp * CP_Application_Imp::fsInstance = NULL [static, protected]
 

CP_E_AppStatus CP_Application_Imp::fAppStatus [protected]
 

Single instance of this class.

CP_EventHandler CP_Application_Imp::fEventHandler [protected]
 

Current state of the application, startup, running, quitting or quit.

CP_Application_Imp* CP_Application_Imp::fsInstance [static, protected]
 

CP_SplashScreen* CP_Application_Imp::fSplashScreen [protected]
 

Event handling object for this class.

CP_M_DeferredTask_Array* CP_Application_Imp::fDeferredTasks [protected]
 

Instance of any splash screen displayed for this app.

CP_TimedTask* CP_Application_Imp::fDeferredTasksTimer [protected]
 

Lists of tasks to be handled at idle time.

CP_Application_Imp* CP_Application_Imp::fsInstance [static, protected]
 

CP_M_DeferredTask_Array* CP_Application_Imp::fDeferredTasks [protected]
 

Event handling object for this class

CP_TimedTask* CP_Application_Imp::fDeferredTasksTimer [protected]
 

Lists of tasks to be handled at idle time.

CPLAT_Begin_Namespace_CPLAT CP_ScriptableObject_Imp * CP_ScriptableObject_Imp::gDefaultObject = NULL [static, protected, inherited]
 

bool CP_ScriptableObject_Imp::gInited = false [static, protected, inherited]
 

The default object that events will be dispatched to.

CP_AppleEventHandler_Map CP_ScriptableObject_Imp::fEventHandlers [protected, inherited]
 

Flag to indicate if this class has been initialized.

CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::fSuperScriptableObject [protected, inherited]
 

Map that contains all of the registered handlers.

CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::fDefaultSubScriptableObject [protected, inherited]
 

Scriptable object that is our container.

CP_ScriptableObject_Imp* CP_ScriptableObject_Imp::fDefaultSuperScriptableObject [protected, inherited]
 

Default scriptable object that is contained by this object.

CP_Commands_Array* CP_M_CommandHandler::fCommands [protected, inherited]
 

CP_MenuSelectionSignal* CP_M_CommandHandler::fMennuSelectionSignal [protected, inherited]
 

List of commands managed by this class.

sender_set CP_SigSlot::CP_SlotObject::fSenders [protected, inherited]
 

CP_Signals_Array* CP_Object::fSignals [protected, inherited]
 

CP_Slots_Array* CP_Object::fSlots [protected, inherited]
 

List of registered signals for this object.

FourCharCode CP_Object::fObjectID [protected, inherited]
 

List of registered slots for this object.

CPLAT_Begin_Namespace_CPLAT FourCharCode CP_Object::fObjectIDCount = 0 [static, protected, inherited]
 

Object identifier.


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:01:22 2005 for CPLAT by  doxygen 1.4.0