#include <moldtool.h>
Inheritance diagram for OpCreateNewMould:
Public Member Functions | |
OpCreateNewMould () | |
OpCreateNewMould() constructor. | |
void | GetOpName (String_256 *OpName) |
The GetOpName fn is overridden so that we return back a description appropriate to the type of attribute that the operation applies. | |
void | DoWithParam (OpDescriptor *, OpParam *) |
This operation will create a new mould object, and thus start off quite a complicated chain of events. First off, a mouldgroup node is created and all objects are moved into it as children, along with any inherited attributes. Secondly a mould object is created and initialise with the shape passed to this do function. The mouldgroup node is now added to the mould node as a first child. A moulder object is then created and added as the last child of the mould node. It is not added to the next object of the mouldgroup, as there may be more than one moulder object. The moulder object is then asked to initialise itself. In doing so it will scan the mould group children and ask them to make shapes of themselves. These shapes are stored in a list within the moulder class, (not in the tree). Having constructed the moulder, a mould operation is triggered, whence all current moulder list objects are mangled by the mould shape class functions (held within the mould parent class). These mangled objects are added as children of the moulder object. Having done all this without running out of memory, the mouldgroup object is hidden. | |
Static Public Member Functions | |
static BOOL | Init () |
OpDeletePoints initialiser method. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
For finding the OpCreateNewMould state. | |
Private Member Functions | |
BOOL | AllMouldObjects (List *pNodeList) |
Scans the list of nodes provided. If any objects which are not node moulds are found, false is returned. | |
Private Attributes | |
MouldSpace | m_space |
Definition at line 313 of file moldtool.h.
|
OpCreateNewMould() constructor.
Definition at line 1468 of file moldtool.cpp. 01469 { 01470 m_space = MOULDSPACE_UNDEFINED; 01471 }
|
|
Scans the list of nodes provided. If any objects which are not node moulds are found, false is returned.
Reimplemented from OpMouldLibSel. |
|
This operation will create a new mould object, and thus start off quite a complicated chain of events. First off, a mouldgroup node is created and all objects are moved into it as children, along with any inherited attributes. Secondly a mould object is created and initialise with the shape passed to this do function. The mouldgroup node is now added to the mould node as a first child. A moulder object is then created and added as the last child of the mould node. It is not added to the next object of the mouldgroup, as there may be more than one moulder object. The moulder object is then asked to initialise itself. In doing so it will scan the mould group children and ask them to make shapes of themselves. These shapes are stored in a list within the moulder class, (not in the tree). Having constructed the moulder, a mould operation is triggered, whence all current moulder list objects are mangled by the mould shape class functions (held within the mould parent class). These mangled objects are added as children of the moulder object. Having done all this without running out of memory, the mouldgroup object is hidden.
Reimplemented from Operation. Definition at line 1608 of file moldtool.cpp. 01609 { 01610 ERROR3IF(pParam == NULL, "OpCreateNewMould::DoWithParam - NULL Param passed in"); 01611 01612 BeginSlowJob(); 01613 01614 // Initialise ourselves from the supplied parameters 01615 CreateMouldParam* CreateMould = (CreateMouldParam*)pParam; 01616 01617 if (!CreateNewMould(CreateMould->ParamShape, 01618 CreateMould->ParamSpace, 01619 CreateMould->FitSelection, 01620 CreateMould->LockAspect)) 01621 FailAndExecute(); 01622 01623 End(); 01624 }
|
|
The GetOpName fn is overridden so that we return back a description appropriate to the type of attribute that the operation applies.
Reimplemented from Operation. Definition at line 1526 of file moldtool.cpp. 01527 { 01528 switch (m_space) 01529 { 01530 case MOULDSPACE_ENVELOPE: 01531 *OpName = String_256(_R(IDS_UNDO_ENVELOPE)); 01532 break; 01533 case MOULDSPACE_ENVELOPE2X2: 01534 *OpName = String_256(_R(IDS_UNDO_ENVELOPE)); 01535 break; 01536 case MOULDSPACE_PERSPECTIVE: 01537 *OpName = String_256(_R(IDS_UNDO_PERSPECTIVE)); 01538 break; 01539 default: 01540 *OpName = String_256(_R(IDS_UNDO_CREATENEWMOULD)); 01541 break; 01542 } 01543 }
|
|
For finding the OpCreateNewMould state.
Definition at line 1559 of file moldtool.cpp. 01560 { 01561 OpState OpSt; 01562 OpSt.Greyed = TRUE; 01563 01564 // only ungrey if we have a selection 01565 SelRange* pSelRange = GetApplication()->FindSelection(); 01566 if (pSelRange && pSelRange->FindFirst() != NULL) 01567 OpSt.Greyed=FALSE; 01568 01569 return OpSt; 01570 }
|
|
OpDeletePoints initialiser method.
Reimplemented from SimpleCCObject. Definition at line 1494 of file moldtool.cpp. 01495 { 01496 return (RegisterOpDescriptor(0, // tool ID 01497 _R(IDS_CREATENEWMOULD), // string resource ID 01498 CC_RUNTIME_CLASS(OpCreateNewMould), // runtime class for Op 01499 OPTOKEN_CREATENEWMOULD, // Ptr to token string 01500 OpCreateNewMould::GetState, // GetState function 01501 0, // help ID 01502 _R(IDBBL_CREATENEWMOULD), // bubble help ID 01503 0 // resource ID 01504 )); 01505 01506 }
|
|
Definition at line 329 of file moldtool.h. |