#include <prnmkcom.h>
Inheritance diagram for PrintMarkComponentClass:
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. |
Definition at line 209 of file prnmkcom.h.
|
Add a printmark component to the specified document.
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 }
|
|
Register the print marks document component with the main application.
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 }
|