WizOpStyleComponentClass Class Reference

Provide a class that will add document information components to new documents. More...

#include <styles.h>

Inheritance diagram for WizOpStyleComponentClass:

DocComponentClass ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

virtual BOOL AddComponent (BaseDocument *)
 Adds the WizOpStyleComponent to the specified document.

Static Public Member Functions

static BOOL Init ()
 Registers this WizOpStyleComponentClass with the main application. It should be called at start-up, somewhere in main3.cpp would be nice.

Detailed Description

Provide a class that will add document information components to new documents.

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

Definition at line 247 of file styles.h.


Member Function Documentation

BOOL WizOpStyleComponentClass::AddComponent BaseDocument pDocument  )  [virtual]
 

Adds the WizOpStyleComponent to the specified document.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/07/97
Parameters:
pDocument - the document to add the WizOpStyleComponent to. [INPUTS]
Returns:
TRUE if the unit list was added ok; FALSE if not.

Implements DocComponentClass.

Definition at line 1316 of file styles.cpp.

01317 {
01318     BOOL Ok = TRUE;
01319 
01320     // Check to see if this document already has a WizOp Style list; if so, leave it alone.
01321     if (pDocument->GetDocComponent(CC_RUNTIME_CLASS(WizOpStyles)) != NULL)
01322         return TRUE;
01323 
01324     // Ok - create the WizOp Style component using this list.
01325     WizOpStyles* pComponent = new WizOpStyles();
01326     Ok = (pComponent != NULL);
01327 
01328     if (Ok)
01329     {
01330         Ok = pComponent->Init();
01331     }
01332 
01333 
01334     if (Ok)
01335     {
01336         // All ok - add the component to the document.
01337         pDocument->AddDocComponent(pComponent);
01338     }
01339 
01340     return Ok;
01341 }

BOOL WizOpStyleComponentClass::Init void   )  [static]
 

Registers this WizOpStyleComponentClass with the main application. It should be called at start-up, somewhere in main3.cpp would be nice.

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

Reimplemented from SimpleCCObject.

Definition at line 1286 of file styles.cpp.

01287 {
01288     // Instantiate a component class to register with the application.
01289     WizOpStyleComponentClass *pClass = new WizOpStyleComponentClass;
01290     if (pClass == NULL)
01291         return FALSE;
01292 
01293     // Register it
01294     GetApplication()->RegisterDocComponent(pClass);
01295 
01296     // All ok
01297     return TRUE;
01298 }


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