#include <strkcomp.h>
Inheritance diagram for StrokeComponentClass:
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. |
Definition at line 235 of file strkcomp.h.
|
Add a Stroke component to the specified document.
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 }
|
|
De-initialises the vector stroke provider system.
Definition at line 426 of file strkcomp.cpp. 00427 { 00428 StrokeComponent::DeleteStrokeList(); 00429 }
|
|
Register the Stroke document component with the main application.
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 }
|