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

CP_Document< UNDO_POLICY, PRINT_POLICY > Class Template Reference

Inheritance diagram for CP_Document< UNDO_POLICY, PRINT_POLICY >:

CP_Document_Base CP_ScriptableObject CP_Persistant CP_M_CommandHandler CP_ScriptableObject_Imp CP_SigSlot::CP_SlotObject CP_NoCopy 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)

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 Types

typedef UNDO_POLICY UndoPolicyType
typedef PRINT_POLICY PrintPolicyType
enum  { CP_E_Doc_Create_DoNothing = 1, CP_E_Doc_Create_CreateUI = 2, CP_E_Doc_Create_CreateUIOnNew = 3, CP_E_Doc_Create_CreateUIOnOpen = 4 }

Public Member Functions

 CP_Document (CP_ScriptableObject *inContainer, SInt32 inDocType)
virtual ~CP_Document () throw ()
PrintPolicyTypeGetPrintPolicy ()
UndoPolicyTypeGetUndoPolicy ()
virtual void HandlePageSetupUpdateCommandStatusCommand (CP_CommandStatus &inOutCommandStatus, bool &inOutWasHandled, CP_CommandNo &inCommandNo)
virtual void HandlePageSetupCommand (OSStatus &inOutStatus, CP_CommandNo &inCommandNo)
virtual void HandlePrintUpdateCommandStatusCommand (CP_CommandStatus &inOutCommandStatus, bool &inOutWasHandled, CP_CommandNo &inCommandNo)
virtual void HandlePrintCommand (OSStatus &inOutStatus, CP_CommandNo &inCommandNo)
virtual void HandleUndoCommandStatus (CP_CommandStatus &inOutCommandStatus, bool &inOutResult, CP_CommandNo &inCommand)
virtual void HandleUndoCommand (OSStatus &inOutStatus, CP_CommandNo &inCommandNo)
virtual void HandleRedoCommandStatus (CP_CommandStatus &inOutCommandStatus, bool &inOutResult, CP_CommandNo &inCommand)
virtual void HandleRedoCommand (OSStatus &inOutStatus, CP_CommandNo &inCommand)
void disconnect_all ()
void signal_connect (CP_Signal *inSender)
void signal_disconnect (CP_Signal *inSender)
Closing
virtual void AttemptCloseDocument ()
void CloseDocument ()
Getters
virtual CP_EventHandlerGetEventHandler ()
virtual FourCharCode GetDefaultFileCreator ()
virtual CP_String GetFileName () const
virtual CP_String GetFileExtension () const
virtual FourCharCode GetDefaualtFileType ()
virtual CP_OSIconGetIcon ()
virtual CP_String GetDefaultFileName (const CP_String &inFileName) const
Opening
virtual void HandleOpen (const CP_FileSystemSpec &inFileSpec)
Persist
virtual void DoPostCreate (SInt32 inPostCreateFlags=CP_E_Doc_Create_DoNothing)
Saving Commands
virtual bool HandleSave (const CP_FileSystemSpec &inFileSpec, FourCharCode inCreator, FourCharCode inType, const CP_String &inFileExtension, bool inReplaceFile)
virtual void HandleRevert ()
virtual void HandleSaveCommandStatus (CP_CommandStatus &inOutCommandStatus, bool &inOutResult, CP_CommandNo &inCommand)
virtual void HandleSaveCommand (OSStatus &inOutStatus)
virtual void HandleSaveAsCommandStatus (CP_CommandStatus &inOutCommandStatus, bool &inOutResult, CP_CommandNo &inCommand)
virtual void HandleSaveAsCommand (OSStatus &inOutStatus)
virtual void HandleRevertCommandStatus (CP_CommandStatus &inOutCommandStatus, bool &inOutResult, CP_CommandNo &inCommand)
virtual void HandleRevertCommand (OSStatus &inOutStatus)
Setters
virtual void SetDefaultFileCreator (FourCharCode inCreator)
virtual void SetDefaualtFileType (FourCharCode inFileType)
virtual void SetFileName (const CP_String &inFileName)
virtual void SetFileExtension (const CP_String &inExtension)
UI
virtual void HandleCreateDocumentUI (SInt32 inCreateFlags=CP_E_Doc_Create_DoNothing)
virtual void Show ()
virtual void Hide ()
CP_DocumentWindowGetMainWindow ()
void SetMainWindow (CP_DocumentWindow *inMainWindow)
File Dialogs
CP_AskSaveChangesDialogGetSaveChangesDialog ()
CP_AskRevertDialogGetAskRevertDialog ()
CP_PutFileDialogGetPutFileDialog ()
CP_FileSystemSpec GetFileSpec ()
void SetFileSpec (const CP_FileSystemSpec &inFileSpec)
bool GetSaveIsSaveAs ()
AppleEvents
virtual SInt32 CountContainedObjects (const DescType inType)
virtual CP_ScriptableObject_ImpGetContainedObjectByName (const DescType inDesiredClass, const CP_String &inName)
virtual CP_ScriptableObject_ImpGetContainedObjectByPosition (const DescType inDesiredClass, const SInt32 inPosition)
virtual void DoAE_GetData (const DescType inPropertyType, const AEDesc &inValue, AppleEvent &inOutReply)
ProxyIcon
void LoadProxyIcon ()
Dirty
virtual bool IsDirty ()
virtual void SetDirty (bool inIsDirty)
Reading / Writing
virtual void WritePersistantData (CP_File &, CP_PersistantWriter *)
Closing
virtual void AttemptCloseDocument ()
void CloseDocument ()
Getters
virtual CP_EventHandlerGetEventHandler ()
virtual FourCharCode GetDefaultFileCreator ()
virtual CP_String GetFileName () const
virtual CP_String GetFileExtension () const
virtual FourCharCode GetDefaualtFileType ()
virtual CP_OSIconGetIcon ()
virtual CP_String GetDefaultFileName (const CP_String &inFileName) const
Opening
virtual void HandleOpen (const CP_FileSystemSpec &inFileSpec)
Persist
virtual void DoPostCreate (SInt32 inPostCreateFlags=CP_E_Doc_Create_DoNothing)
Saving Commands
virtual bool HandleSave (const CP_FileSystemSpec &inFileSpec, FourCharCode inCreator, FourCharCode inType, const CP_String &inFileExtension, bool inReplaceFile)
virtual void HandleRevert ()
virtual void HandleSaveCommandStatus (CP_CommandStatus &inOutCommandStatus, bool &inOutResult, CP_CommandNo &inCommand)
virtual void HandleSaveCommand (OSStatus &inOutStatus)
virtual void HandleSaveAsCommandStatus (CP_CommandStatus &inOutCommandStatus, bool &inOutResult, CP_CommandNo &inCommand)
virtual void HandleSaveAsCommand (OSStatus &inOutStatus)
virtual void HandleRevertCommandStatus (CP_CommandStatus &inOutCommandStatus, bool &inOutResult, CP_CommandNo &inCommand)
virtual void HandleRevertCommand (OSStatus &inOutStatus)
Setters
virtual void SetDefaultFileCreator (FourCharCode inCreator)
virtual void SetDefaualtFileType (FourCharCode inFileType)
virtual void SetFileName (const CP_String &inFileName)
virtual void SetFileExtension (const CP_String &inExtension)
UI
virtual void HandleCreateDocumentUI (SInt32 inCreateFlags=CP_E_Doc_Create_DoNothing)
virtual void Show ()
virtual void Hide ()
CP_DocumentWindowGetMainWindow ()
void SetMainWindow (CP_DocumentWindow *inMainWindow)
File Dialogs
CP_AskSaveChangesDialogGetSaveChangesDialog ()
CP_AskRevertDialogGetAskRevertDialog ()
CP_PutFileDialogGetPutFileDialog ()
CP_FileSystemSpec GetFileSpec ()
void SetFileSpec (const CP_FileSystemSpec &inFileSpec)
bool GetSaveIsSaveAs ()
AppleEvents
virtual SInt32 CountContainedObjects (const DescType inType)
virtual CP_ScriptableObject_ImpGetContainedObjectByName (const DescType inDesiredClass, const CP_String &inName)
virtual CP_ScriptableObject_ImpGetContainedObjectByPosition (const DescType inDesiredClass, const SInt32 inPosition)
virtual void DoAE_GetData (const DescType inPropertyType, const AEDesc &inValue, AppleEvent &inOutReply)
ProxyIcon
void LoadProxyIcon ()
Dirty
virtual bool IsDirty ()
virtual void SetDirty (bool inIsDirty)
Reading / Writing
virtual void WritePersistantData (CP_File &, CP_PersistantWriter *)
Dirty
virtual bool IsDirty ()
virtual void SetDirty (bool inIsDirty)
Reading / Writing
virtual void WritePersistantData (CP_File &, CP_PersistantWriter *)

Static Public Member Functions

Persistance
static CP_Document_BaseDocumentCreator (CP_ScriptableObject *inContainer, SInt32 inDocumentClass)
Persistance
static CP_Document_BaseDocumentCreator (CP_ScriptableObject *inContainer, SInt32 inDocumentClass)

Protected Member Functions

virtual void HandleUndoEvent (CP_Event_Base &inEvent)
Printing
virtual void HandlePrinting (CP_Printer *)
AppleEvents
virtual DescType GetAppleClass () const
virtual void MakeSelfSpecifier (AEDesc &inContainerSpec, AEDesc &inOutSelfSpec)
FileType
virtual void GetFileTypeInfo (const CP_FileSystemSpec &inFileSpec, FourCharCode *inOutCreator, FourCharCode *inOutType, CP_String *inOutFileExtension)
AppleEvents
virtual DescType GetAppleClass () const
virtual void MakeSelfSpecifier (AEDesc &inContainerSpec, AEDesc &inOutSelfSpec)
FileType
virtual void GetFileTypeInfo (const CP_FileSystemSpec &inFileSpec, FourCharCode *inOutCreator, FourCharCode *inOutType, CP_String *inOutFileExtension)
FileType
virtual void GetFileTypeInfo (const CP_FileSystemSpec &inFileSpec, FourCharCode *inOutCreator, FourCharCode *inOutType, CP_String *inOutFileExtension)

Protected Attributes

CP_DocumentWindowfMainWindow
bool fCloseInProgress
bool fSaveIsSaveAs
CP_EventHandler fDummyHandler
FourCharCode fDefaultFileCreator
FourCharCode fDefaultFileType
CP_String fFileName
CP_String fExtension
CP_AppleEventHandler_Map fEventHandlers
CP_ScriptableObject_ImpfSuperScriptableObject
CP_ScriptableObject_ImpfDefaultSubScriptableObject
CP_ScriptableObject_ImpfDefaultSuperScriptableObject
CP_FileSystemSpec fFileSpec
bool fDirty
CP_Commands_ArrayfCommands
CP_MenuSelectionSignalfMennuSelectionSignal
sender_set fSenders

Static Protected Attributes

static CP_ScriptableObject_ImpgDefaultObject = NULL
static bool gInited = false

Private Attributes

CP_EventHandler fEventHandler
PRINT_POLICY fPrintPolicy
UNDO_POLICY fUndoPolicy
CP_PrintSignal fPrintSignal

Friends

class CP_DocumentNameMatch

template<class UNDO_POLICY, class PRINT_POLICY>
class CP_Document< UNDO_POLICY, PRINT_POLICY >


Member Typedef Documentation

template<class UNDO_POLICY, class PRINT_POLICY>
typedef UNDO_POLICY CP_Document< UNDO_POLICY, PRINT_POLICY >::UndoPolicyType
 

template<class UNDO_POLICY, class PRINT_POLICY>
typedef PRINT_POLICY CP_Document< UNDO_POLICY, PRINT_POLICY >::PrintPolicyType
 


Member Enumeration Documentation

anonymous enum [inherited]
 

Enumeration values:
CP_E_Doc_Create_DoNothing 
CP_E_Doc_Create_CreateUI 
CP_E_Doc_Create_CreateUIOnNew 
CP_E_Doc_Create_CreateUIOnOpen 


Constructor & Destructor Documentation

template<class UNDO_POLICY, class PRINT_POLICY>
CPLAT_Begin_Namespace_CPLAT CP_Document< UNDO_POLICY, PRINT_POLICY >::CP_Document CP_ScriptableObject inContainer,
SInt32  inDocType
 

template<class UNDO_POLICY, class PRINT_POLICY>
CP_Document< UNDO_POLICY, PRINT_POLICY >::~CP_Document  )  throw () [virtual]
 


Member Function Documentation

template<class UNDO_POLICY, class PRINT_POLICY>
PrintPolicyType& CP_Document< UNDO_POLICY, PRINT_POLICY >::GetPrintPolicy  ) 
 

template<class UNDO_POLICY, class PRINT_POLICY>
UndoPolicyType& CP_Document< UNDO_POLICY, PRINT_POLICY >::GetUndoPolicy  ) 
 

template<class UNDO_POLICY, class PRINT_POLICY>
void CP_Document< UNDO_POLICY, PRINT_POLICY >::HandlePageSetupUpdateCommandStatusCommand CP_CommandStatus inOutCommandStatus,
bool &  inOutWasHandled,
CP_CommandNo inCommandNo
[virtual]
 

template<class UNDO_POLICY, class PRINT_POLICY>
void CP_Document< UNDO_POLICY, PRINT_POLICY >::HandlePageSetupCommand OSStatus inOutStatus,
CP_CommandNo inCommandNo
[virtual]
 

template<class UNDO_POLICY, class PRINT_POLICY>
void CP_Document< UNDO_POLICY, PRINT_POLICY >::HandlePrintUpdateCommandStatusCommand CP_CommandStatus inOutCommandStatus,
bool &  inOutWasHandled,
CP_CommandNo inCommandNo
[virtual]
 

template<class UNDO_POLICY, class PRINT_POLICY>
void CP_Document< UNDO_POLICY, PRINT_POLICY >::HandlePrintCommand OSStatus inOutStatus,
CP_CommandNo inCommandNo
[virtual]
 

template<class UNDO_POLICY, class PRINT_POLICY>
void CP_Document< UNDO_POLICY, PRINT_POLICY >::HandleUndoCommandStatus CP_CommandStatus inOutCommandStatus,
bool &  inOutResult,
CP_CommandNo inCommand
[virtual]
 

Reimplemented from CP_Document_Base.

template<class UNDO_POLICY, class PRINT_POLICY>
void CP_Document< UNDO_POLICY, PRINT_POLICY >::HandleUndoCommand OSStatus inOutStatus,
CP_CommandNo inCommandNo
[virtual]
 

Reimplemented from CP_Document_Base.

template<class UNDO_POLICY, class PRINT_POLICY>
void CP_Document< UNDO_POLICY, PRINT_POLICY >::HandleRedoCommandStatus CP_CommandStatus inOutCommandStatus,
bool &  inOutResult,
CP_CommandNo inCommand
[virtual]
 

Reimplemented from CP_Document_Base.

template<class UNDO_POLICY, class PRINT_POLICY>
void CP_Document< UNDO_POLICY, PRINT_POLICY >::HandleRedoCommand OSStatus inOutStatus,
CP_CommandNo inCommand
[virtual]
 

Reimplemented from CP_Document_Base.

template<class UNDO_POLICY, class PRINT_POLICY>
void CP_Document< UNDO_POLICY, PRINT_POLICY >::HandleUndoEvent CP_Event_Base inEvent  )  [protected, virtual]
 

Reimplemented from CP_Document_Base.

template<class UNDO_POLICY, class PRINT_POLICY>
virtual void CP_Document< UNDO_POLICY, PRINT_POLICY >::HandlePrinting CP_Printer  )  [protected, virtual]
 

static CP_Document_Base* CP_Document_Base::DocumentCreator CP_ScriptableObject inContainer,
SInt32  inDocumentClass
[static, inherited]
 

void CP_Document_Base::AttemptCloseDocument  )  [virtual, inherited]
 

Called when the user is attempting to close this document, or the main CP_DocumentWindow associated with this document. If the document is dirty, the user will be prompted if they want to save the contents.

Exceptions:
none 
Returns:
void

void CP_Document_Base::CloseDocument  )  [inherited]
 

Called when the user is done with this document. The default is to just delete this object. This will be called automatically by the framework.

Exceptions:
none 
Returns:
void

CP_EventHandler & CP_Document_Base::GetEventHandler  )  [virtual, inherited]
 

Returns the CP_EventHandler for this class. If the document has a window associated with it, then that handler is returned, otherwise a dummy handler is returned. Since documents don't have an associated event handling object associated with them, the event handler for the main window is returned.

Exceptions:
none 
Returns:
CP_EventHandler& The event handler being returned.

virtual FourCharCode CP_Document_Base::GetDefaultFileCreator  )  [virtual, inherited]
 

CP_String CP_Document_Base::GetFileName  )  const [virtual, inherited]
 

Returns the file name used with this document.

Exceptions:
none 
Returns:
CP_String const The file name of this document.

CP_String CP_Document_Base::GetFileExtension  )  const [virtual, inherited]
 

Returns the file extension used with files created for this document. The default is txt. Users should set this field based on the extensions used for their document.

Exceptions:
none 
Returns:
CP_String const The file extension for this document.

virtual FourCharCode CP_Document_Base::GetDefaualtFileType  )  [virtual, inherited]
 

CP_OSIcon * CP_Document_Base::GetIcon  )  [virtual, inherited]
 

Returns the default icon for this document.

Exceptions:
none 
Returns:
CP_OSIcon * The documents icon.

CP_String CP_Document_Base::GetDefaultFileName const CP_String inFileName  )  const [virtual, inherited]
 

Returns the default file name for this document. This is "Untitled" followed by a count, based on the number of default documents created.

Exceptions:
none 
Returns:
CP_String const The default name.

void CP_Document_Base::HandleOpen const CP_FileSystemSpec inFileSpec  )  [virtual, inherited]
 

User overrideable method to be called when the user wants to open a document. This method does nothing here, users must override.

Parameters:
inFileSpec The file spec of the file to be opened.
Exceptions:
none 
Returns:
void

void CP_Document_Base::DoPostCreate SInt32  inPostCreateFlags = CP_E_Doc_Create_DoNothing  )  [virtual, inherited]
 

This is called right after the document class is created. The default is to call HandleCreateDocumentUI which you need to override in your document subclass to handle creation of the main UI elements for this class.

Parameters:
inPostCreateFlags Flags used to indicate what operation should take place in this method.
Exceptions:
none 
Returns:
void

bool CP_Document_Base::HandleSave const CP_FileSystemSpec inFileSpec,
FourCharCode  inCreator,
FourCharCode  inType,
const CP_String inFileExtension,
bool  inReplaceFile
[virtual, inherited]
 

Called when the user needs to save the documents contents to a file. Normally you do not need to override this, but just supply a CP_PersistantWriter object that will do the actual writing of the documents data.

Parameters:
inFileSpec The name and location where the file will be written to.
inCreator The OSType creator code for this document. Some OSs just ignore this data.
inType The OSType file type for this document. This is also the
inReplaceFile If true, replace any existing file with the same name. file extension if used.
Exceptions:
OSError / Runtime exceptions.
Returns:
void
Bug:
temp file should be created on same volume as target file, otherwise FSExchangeObjects below will fail

Todo:
-- need to implement this

the original file if we have saved to a temp file.

Reimplemented from CP_Persistant.

void CP_Document_Base::HandleRevert  )  [virtual, inherited]
 

void CP_Document_Base::HandleSaveCommandStatus CP_CommandStatus inOutCommandStatus,
bool &  inOutResult,
CP_CommandNo inCommand
[virtual, inherited]
 

Called when the status of the save command needs to be updated.

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

void CP_Document_Base::HandleSaveCommand OSStatus inOutStatus  )  [virtual, inherited]
 

Handle the save command.

Parameters:
inOutStatus Location to return the resulting OSStatus of the save operation in.
Exceptions:
none 
Returns:
void

void CP_Document_Base::HandleSaveAsCommandStatus CP_CommandStatus inOutCommandStatus,
bool &  inOutResult,
CP_CommandNo inCommand
[virtual, inherited]
 

Called when the status of the save as command needs to be updated.

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

void CP_Document_Base::HandleSaveAsCommand OSStatus inOutStatus  )  [virtual, inherited]
 

Handle the save as command.

Parameters:
inOutStatus Location to return the resulting OSStatus of the save as operation in.
Exceptions:
none 
Returns:
void

void CP_Document_Base::HandleRevertCommandStatus CP_CommandStatus inOutCommandStatus,
bool &  inOutResult,
CP_CommandNo inCommand
[virtual, inherited]
 

Called when the status of the revert command needs to be updated.

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

void CP_Document_Base::HandleRevertCommand OSStatus inOutStatus  )  [virtual, inherited]
 

Handle the revert command.

Parameters:
inOutStatus Location to return the resulting OSStatus of the reverting operation in.
Exceptions:
none 
Returns:
void

virtual void CP_Document_Base::SetDefaultFileCreator FourCharCode  inCreator  )  [virtual, inherited]
 

virtual void CP_Document_Base::SetDefaualtFileType FourCharCode  inFileType  )  [virtual, inherited]
 

virtual void CP_Document_Base::SetFileName const CP_String inFileName  )  [virtual, inherited]
 

virtual void CP_Document_Base::SetFileExtension const CP_String inExtension  )  [virtual, inherited]
 

void CP_Document_Base::HandleCreateDocumentUI SInt32  inCreateFlags = CP_E_Doc_Create_DoNothing  )  [virtual, inherited]
 

User overrideable method to handle creation of the document main UI and windows.

Exceptions:
none 
Returns:
void

void CP_Document_Base::Show  )  [virtual, inherited]
 

Make this document visible. The default is to just call the main window and show that window. However if you have other UI elements such as palettes you can override this and handle showing them here.

Exceptions:
none 
Returns:
void

void CP_Document_Base::Hide  )  [virtual, inherited]
 

Make this document hidden. The default is to just call the main window and hide that window. However if you have other UI elements such as palettes you can override this and handle hiding them here.

Exceptions:
none 
Returns:
void

CP_DocumentWindow* CP_Document_Base::GetMainWindow  )  [inherited]
 

Return the main document window.

Exceptions:
none 
Returns:
CP_Document_BaseWindow * The CP_Document_BaseWindow being used as the main window.

void CP_Document_Base::SetMainWindow CP_DocumentWindow inMainWindow  )  [inherited]
 

Sets the CP_DocumentWindow that is associated with this document. This is the window that will check with this object before it closes itself to ensure that any data is saved first.

This will also broadcast a document message of type kCP_Message_DocumentWindowSet so that any listeners will be notified when the main window has changed for this object.

Parameters:
inMainWindow The CP_DocumentWindw we are going to make the main window.
Exceptions:
NULL exceptions.
Returns:
void

CP_AskSaveChangesDialog * CP_Document_Base::GetSaveChangesDialog  )  [inherited]
 

Return a CP_AskSaveChangesDialog so the user will be notified if the document has any changes that need saving. Before returning the dialog, we fill in values that the dialog will display, based on information in this document.

Exceptions:
none 
Returns:
CP_AskSaveChangesDialog * The dialog to be used.

CP_AskRevertDialog * CP_Document_Base::GetAskRevertDialog  )  [inherited]
 

CP_PutFileDialog * CP_Document_Base::GetPutFileDialog  )  [inherited]
 

Return a CP_PutFileDialog so the user can choose the location to save the file to. Before returning the dialog, we fill in values that the dialog will display, based on information in this document.

Exceptions:
NULL exceptions.
Returns:
CP_AskSaveChangesDialog * The dialog to be used.

CP_FileSystemSpec CP_Document_Base::GetFileSpec  )  [inherited]
 

Returns the file spec used for this documents main file.

Exceptions:
none 
Returns:
CP_FileSystemSpec The documents main files file system spec.

void CP_Document_Base::SetFileSpec const CP_FileSystemSpec inFileSpec  )  [inherited]
 

Sets the file spec used for this documents main file.

Parameters:
inFileSpec The file spec for this documents main file.
Exceptions:
none 
Returns:
void

bool CP_Document_Base::GetSaveIsSaveAs  )  [inherited]
 

SInt32 CP_Document_Base::CountContainedObjects const DescType  inType  )  [virtual, inherited]
 

Extension used with the file for this document.

Reimplemented from CP_ScriptableObject_Imp.

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

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_Document_Base::GetContainedObjectByPosition const DescType  inDesiredClass,
const SInt32  inPosition
[virtual, inherited]
 

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.

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

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:
DescType typeNull class id.

Reimplemented from CP_ScriptableObject_Imp.

void CP_Document_Base::LoadProxyIcon  )  [inherited]
 

Loads the proxy icon based on the saved status of this document.

Exceptions:
none 
Returns:
void

DescType CP_Document_Base::GetAppleClass  )  const [protected, virtual, inherited]
 

Returns the AppleEvent document class for this object. The default is to return cDocument.

Exceptions:
none 
Returns:
DescType The DescType for this object.

Implements CP_ScriptableObject_Imp.

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

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

Parameters:
inContainerSpec A specifier to our container.
inOutSelfSpec The object we return the information in.
Exceptions:
none 
Returns:
VOID

Reimplemented from CP_ScriptableObject_Imp.

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.

virtual bool CP_Persistant::IsDirty  )  [virtual, inherited]
 

virtual void CP_Persistant::SetDirty bool  inIsDirty  )  [virtual, inherited]
 

virtual void CP_Persistant::WritePersistantData CP_File ,
CP_PersistantWriter
[virtual, inherited]
 

Method call by our persistant writer to write out the data from the CP_Persistant class.

Parameters:
inFile The CP_File that we are writing to.
inWriter The CP_PersistantWriter that is currently writing the persistant data.
Returns:
void

void CP_Persistant::GetFileTypeInfo const CP_FileSystemSpec inFileSpec,
FourCharCode inOutCreator,
FourCharCode inOutType,
CP_String inOutFileExtension
[protected, virtual, inherited]
 

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]
 


Friends And Related Function Documentation

friend class CP_DocumentNameMatch [friend, inherited]
 


Member Data Documentation

template<class UNDO_POLICY, class PRINT_POLICY>
CP_EventHandler CP_Document< UNDO_POLICY, PRINT_POLICY >::fEventHandler [private]
 

template<class UNDO_POLICY, class PRINT_POLICY>
PRINT_POLICY CP_Document< UNDO_POLICY, PRINT_POLICY >::fPrintPolicy [private]
 

CarbonEvent handler.

template<class UNDO_POLICY, class PRINT_POLICY>
UNDO_POLICY CP_Document< UNDO_POLICY, PRINT_POLICY >::fUndoPolicy [private]
 

template<class UNDO_POLICY, class PRINT_POLICY>
CP_PrintSignal CP_Document< UNDO_POLICY, PRINT_POLICY >::fPrintSignal [private]
 

CP_DocumentWindow* CP_Document_Base::fMainWindow [protected, inherited]
 

bool CP_Document_Base::fCloseInProgress [protected, inherited]
 

This is the main window for this class, and allows communication between the window and this document so closing the window will also cause this document to close.

bool CP_Document_Base::fSaveIsSaveAs [protected, inherited]
 

Flag used to indicate if a close is in progress. Used with non-modal file dialogs to monitor progress.

CP_EventHandler CP_Document_Base::fDummyHandler [protected, inherited]
 

FourCharCode CP_Document_Base::fDefaultFileCreator [protected, inherited]
 

Default event handler returnned for this class.

FourCharCode CP_Document_Base::fDefaultFileType [protected, inherited]
 

Default file creator used with documents. Users should provide actual creator if different than the applications.

CP_String CP_Document_Base::fFileName [protected, inherited]
 

Defaualt file type code for documents created with this class. Default is 'TEXT'.

CP_String CP_Document_Base::fExtension [protected, inherited]
 

File name for the default document of this class.

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_FileSystemSpec CP_Persistant::fFileSpec [protected, inherited]
 

bool CP_Persistant::fDirty [protected, inherited]
 

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]
 


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