PrintMarkComponentClass Class Reference

The class that gets a print mark doc component going on start up We need to register our class as a document component and this is where we do it all. More...

#include <prnmkcom.h>

Inheritance diagram for PrintMarkComponentClass:

DocComponentClass ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

BOOL AddComponent (BaseDocument *)
 Add a printmark component to the specified document.

Static Public Member Functions

static BOOL Init ()
 Register the print marks document component with the main application.

Detailed Description

The class that gets a print mark doc component going on start up We need to register our class as a document component and this is where we do it all.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
31/07/96
See also:
DocComponentClass

Definition at line 209 of file prnmkcom.h.


Member Function Documentation

BOOL PrintMarkComponentClass::AddComponent BaseDocument pDocument  )  [virtual]
 

Add a printmark component to the specified document.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
31/07/96
Parameters:
pDocument - the document to add the print to. [INPUTS]
Returns:
TRUE if the printmark component was added ok; FALSE if not.

Errors: Out of memory

See also:
PrintComponentClass

Implements DocComponentClass.

Definition at line 300 of file prnmkcom.cpp.

00301 {
00302     ERROR2IF(pDocument==NULL,FALSE,"NULL document passed to PrintMarkCompClass:Add");
00303     
00304     // Check to see if this document already has a colour list; if so, leave it alone.
00305     if (pDocument->GetDocComponent(CC_RUNTIME_CLASS(PrintMarksComponent)) != NULL)
00306         return TRUE;
00307 
00308     // Ok - create the print mark component.
00309     PrintMarksComponent *pComponent = new PrintMarksComponent();
00310     if (pComponent==NULL)
00311         return FALSE;
00312 
00313     // All ok - add the component to the document.
00314     pDocument->AddDocComponent(pComponent);
00315     return TRUE;
00316 }

BOOL PrintMarkComponentClass::Init void   )  [static]
 

Register the print marks document component with the main application.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
31/07/96
Returns:
TRUE if all went well; FALSE if not.

Errors: Out of memory.

See also:
DocComponent

Reimplemented from SimpleCCObject.

Definition at line 270 of file prnmkcom.cpp.

00271 {
00272     // Instantiate a component class to register with the application.
00273     PrintMarkComponentClass *pClass = new PrintMarkComponentClass;
00274     if (pClass == NULL)
00275         return FALSE;
00276 
00277     // Register it
00278     GetApplication()->RegisterDocComponent(pClass);
00279 
00280     // All ok
00281     return TRUE;
00282 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:00:02 2007 for Camelot by  doxygen 1.4.4