#include <moldtool.h>
Inheritance diagram for OpRectangularEnvelope:
Public Member Functions | |
OpRectangularEnvelope () | |
Constructor for Detach mould operation. | |
void | Do (OpDescriptor *) |
Scan through the selection finding mould objects. Each mould will have its contents remoulded, having has its mould path rotated around logically by one element. The result will be to spin the orientation of the moulded objects around. | |
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. | |
Static Public Member Functions | |
static BOOL | Init () |
Initialise the rotate mould operation so that it can be accessed from the interface. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
For finding the OpRotateMould state. |
Definition at line 585 of file moldtool.h.
|
Constructor for Detach mould operation.
Definition at line 3074 of file moldtool.cpp.
|
|
Scan through the selection finding mould objects. Each mould will have its contents remoulded, having has its mould path rotated around logically by one element. The result will be to spin the orientation of the moulded objects around.
Reimplemented from Operation. Definition at line 3183 of file moldtool.cpp. 03184 { 03185 BeginSlowJob(); 03186 03187 // Assume faied until proven otherwise. 03188 BOOL Failed=TRUE; 03189 03190 // Create a manifold to use 03191 Path* pDefShape = new Path; 03192 if (pDefShape!=NULL) 03193 { 03194 if (pDefShape->Initialise(12,12)) 03195 { 03196 if (EnvelopeShapes::Rectangular(pDefShape)) 03197 { 03198 Failed=!CreateNewMould(pDefShape, MOULDSPACE_ENVELOPE, TRUE, FALSE); 03199 } 03200 } 03201 // remove the shape once used 03202 delete pDefShape; 03203 } 03204 03205 if (Failed) 03206 FailAndExecute(); 03207 03208 End(); 03209 }
|
|
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 3160 of file moldtool.cpp. 03161 { 03162 *OpName = String_256(_R(IDS_UNDO_RECTANGULARENVELOPE)); 03163 }
|
|
For finding the OpRotateMould state.
Definition at line 3124 of file moldtool.cpp. 03125 { 03126 OpState OpSt; 03127 String_256 DisableReason; 03128 OpSt.Greyed = TRUE; 03129 03130 ObjChangeFlags cFlags; 03131 cFlags.MultiReplaceNode = TRUE; 03132 ObjChangeParam ObjChange(OBJCHANGE_STARTING,cFlags,NULL,NULL); 03133 03134 SelRange* pSelRange = GetApplication()->FindSelection(); 03135 Node* pNode = pSelRange->FindFirst(); 03136 03137 while (pNode != NULL && OpSt.Greyed) 03138 { 03139 OpSt.Greyed = !(pNode->AllowOp(&ObjChange,FALSE)); 03140 pNode = pSelRange->FindNext(pNode); 03141 } 03142 03143 return (OpSt); 03144 }
|
|
Initialise the rotate mould operation so that it can be accessed from the interface.
Reimplemented from SimpleCCObject. Definition at line 3098 of file moldtool.cpp. 03099 { 03100 return (RegisterOpDescriptor(0, // tool ID 03101 _R(IDS_RECTANGULARENVELOPE), // string resource ID 03102 CC_RUNTIME_CLASS(OpRectangularEnvelope),// runtime class for Op 03103 OPTOKEN_RECTANGULARENVELOPE, // Ptr to token string 03104 OpRectangularEnvelope::GetState, // GetState function 03105 0, // help ID 03106 _R(IDBBL_RECTANGULARENVELOPE) 03107 )); 03108 }
|