#include <styles.h>
Inheritance diagram for WizOpStyleComponentClass:
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. |
Definition at line 247 of file styles.h.
|
Adds the WizOpStyleComponent to the specified document.
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 }
|
|
Registers this WizOpStyleComponentClass with the main application. It should be called at start-up, somewhere in main3.cpp would be nice.
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 }
|