Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

Undo_Doc Class Reference

CP_Document class to handle the data from the main window and reading / writing contents.

List of all members.

Public Member Functions

Constructor / Destructor
 Undo_Doc (CPLAT::CP_ScriptableObject *inContainer, CPLAT::FourCharCode inDocType)
 Constructor.
virtual ~Undo_Doc () throw ()
Document UI
virtual void HandleCreateDocumentUI (SInt32 inPostCreateFlags=CP_E_Doc_Create_DoNothing)

Static Public Member Functions

Creator
static CPLAT::CP_Document_Base * DocumentCreator (CPLAT::CP_ScriptableObject *inContainer, CPLAT::FourCharCode inDocumentClass)

Protected Member Functions

Persistance
void CreateWriter (CPLAT::CP_PersistantWriter **inReturnWriter, CPLAT::FourCharCode inOSType)
virtual void GetFileTypeInfo (const CPLAT::CP_FileSystemSpec &inFileSpec, CPLAT::FourCharCode *inOutCreator, CPLAT::FourCharCode *inOutType, CPLAT::CP_String *inOutFileExtension)

Private Types

typedef CPLAT::CP_Document<
CPLAT::CP_UndoPolicy_Multi,
CPLAT::CP_PrintPolicy_None > 
inherited


Member Typedef Documentation

typedef CPLAT::CP_Document<CPLAT::CP_UndoPolicy_Multi, CPLAT::CP_PrintPolicy_None> Undo_Doc::inherited [private]
 


Constructor & Destructor Documentation

Undo_Doc::Undo_Doc CPLAT::CP_ScriptableObject *  inContainer,
CPLAT::FourCharCode  inDocType
 

Constructor.

Parameters:
inContainer The scriptable object that serves as a container for this document. In this case it will be the application object.
inDocType The documents default file type.
Exceptions:
none 

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

Destructor.

Exceptions:
none 


Member Function Documentation

CPLAT::CP_Document_Base * Undo_Doc::DocumentCreator CPLAT::CP_ScriptableObject *  inContainer,
CPLAT::FourCharCode  inDocumentClass
[static]
 

Called when some action has requested we create a new document object. This is usually called from the CP_DocumentFactoryManager when it needs to create a new document.

Parameters:
inContainer The scriptable object that serves as a container for this document. In this case it will be the application object.
inDocumentClass The documents default file type.
Exceptions:
none 
Returns:
void

void Undo_Doc::HandleCreateDocumentUI SInt32  inPostCreateFlags = CP_E_Doc_Create_DoNothing  )  [virtual]
 

Called when the document wants to create the main user interface for the document. In this demo we create a window, with a CP_TextView in it.

Parameters:
inPostCreateFlags Not used.
Exceptions:
none 
Returns:
void

void Undo_Doc::CreateWriter CPLAT::CP_PersistantWriter **  inReturnWriter,
CPLAT::FourCharCode  inOSType
[protected]
 

Called when the document is being saved. This will create a return a CP_PersistantWriter object that is used to save the actual data.

Parameters:
inReturnWriter Location to return the persistant writer in.
inOSType Not used.
Exceptions:
none 
Returns:
void

void Undo_Doc::GetFileTypeInfo const CPLAT::CP_FileSystemSpec &  inFileSpec,
CPLAT::FourCharCode inOutCreator,
CPLAT::FourCharCode inOutType,
CPLAT::CP_String *  inOutFileExtension
[protected, virtual]
 

Called when we need to get the file type information for our documents file. In this demo, we supply the creator as the applications creator code, and the files extensio as 'txt' for a text file.

Exceptions:
none 
Returns:
void


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:29:19 2005 for CPLAT_MacOS by  doxygen 1.4.0