StrokeComponentClass Class Reference

The class that gets a Stroke 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 <strkcomp.h>

Inheritance diagram for StrokeComponentClass:

DocComponentClass ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

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

Static Public Member Functions

static BOOL Init ()
 Register the Stroke document component with the main application.
static void DeInit ()
 De-initialises the vector stroke provider system.

Detailed Description

The class that gets a Stroke 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:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/2/97
See also:
DocComponentClass

Definition at line 235 of file strkcomp.h.


Member Function Documentation

BOOL StrokeComponentClass::AddComponent BaseDocument pDocument  )  [virtual]
 

Add a Stroke component to the specified document.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/2/97
Parameters:
pDocument - the document to add the print to. [INPUTS]
Returns:
TRUE if the Stroke component was added ok; FALSE if not.

Errors: Out of memory

See also:
PrintComponentClass

Implements DocComponentClass.

Definition at line 448 of file strkcomp.cpp.

00449 {
00450     ERROR2IF(pDocument==NULL, FALSE, "NULL document passed to StrokeCompClass:Add");
00451 
00452     // Check to see if this document already has a colour list; if so, leave it alone.
00453     if (pDocument->GetDocComponent(CC_RUNTIME_CLASS(StrokeComponent)) != NULL)
00454         return(TRUE);
00455 
00456     // Ok - create the print mark component.
00457     StrokeComponent *pComponent = new StrokeComponent();
00458     if (pComponent == NULL)
00459         return(FALSE);
00460 
00461     // All ok - add the component to the document.
00462     pDocument->AddDocComponent(pComponent);
00463     return(TRUE);
00464 }

void StrokeComponentClass::DeInit void   )  [static]
 

De-initialises the vector stroke provider system.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/2/97
Returns:
TRUE if all went well; FALSE if not.

Definition at line 426 of file strkcomp.cpp.

00427 {
00428     StrokeComponent::DeleteStrokeList();
00429 }

BOOL StrokeComponentClass::Init void   )  [static]
 

Register the Stroke document component with the main application.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/2/97
Returns:
TRUE if all went well; FALSE if not.

Errors: Out of memory.

See also:
DocComponent

Reimplemented from SimpleCCObject.

Definition at line 398 of file strkcomp.cpp.

00399 {
00400     // Instantiate a component class to register with the application.
00401     StrokeComponentClass *pClass = new StrokeComponentClass;
00402     if (pClass == NULL)
00403         return(FALSE);
00404 
00405     // Register it
00406     GetApplication()->RegisterDocComponent(pClass);
00407     return(TRUE);
00408 }


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