#include <moldtool.h>
Inheritance diagram for OpRotateMould:
Public Member Functions | |
OpRotateMould () | |
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 521 of file moldtool.h.
|
Constructor for Detach mould operation.
Definition at line 2905 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 3033 of file moldtool.cpp. 03034 { 03035 BeginSlowJob(); 03036 SelRange* Selected = GetApplication()->FindSelection(); 03037 Node* pNode = Selected->FindFirst(); 03038 while (pNode) 03039 { 03040 if (pNode->GetRuntimeClass() == CC_RUNTIME_CLASS(NodeMould)) 03041 { 03042 NodeMould* pMould = (NodeMould*)pNode; 03043 03044 if (!DoInvalidateNodeRegion(pMould,TRUE)) 03045 { 03046 FailAndExecute(); End(); return; 03047 } 03048 03049 if (!DoRotateMould(pMould)) 03050 { 03051 FailAndExecute(); End(); return; 03052 } 03053 } 03054 pNode = Selected->FindNext(pNode); 03055 } 03056 End(); 03057 }
|
|
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 3010 of file moldtool.cpp. 03011 { 03012 *OpName = String_256(_R(IDS_UNDO_ROTATEMOULD)); 03013 }
|
|
For finding the OpRotateMould state.
Definition at line 2964 of file moldtool.cpp. 02965 { 02966 OpState OpSt; 02967 String_256 DisableReason; 02968 OpSt.Greyed = FALSE; 02969 02970 BOOL Sel = FALSE; 02971 if (Document::GetCurrent() != NULL) 02972 { 02973 SelRange* Selected = GetApplication()->FindSelection(); 02974 if (Selected) 02975 { 02976 Node* pNode = Selected->FindFirst(); 02977 while ((pNode!=NULL) && (!Sel)) 02978 { 02979 // only rotate mould objects if they're not detached. 02980 if (pNode->GetRuntimeClass() == CC_RUNTIME_CLASS(NodeMould)) 02981 { 02982 if ( !((NodeMould*)pNode)->IsDetached() ) 02983 Sel=TRUE; 02984 } 02985 pNode = Selected->FindNext(pNode); 02986 } 02987 } 02988 } 02989 02990 if (!Sel) 02991 OpSt.Greyed = TRUE; 02992 02993 return (OpSt); 02994 }
|
|
Initialise the rotate mould operation so that it can be accessed from the interface.
Reimplemented from SimpleCCObject. Definition at line 2929 of file moldtool.cpp. 02930 { 02931 return (RegisterOpDescriptor(0, // tool ID 02932 _R(IDS_ROTATEMOULD), // string resource ID 02933 CC_RUNTIME_CLASS(OpRotateMould), // runtime class for Op 02934 OPTOKEN_ROTATEMOULD, // Ptr to token string 02935 OpRotateMould::GetState, // GetState function 02936 0, // help ID 02937 _R(IDBBL_ROTATEMOULD), // bubble help ID 02938 _R(IDD_MOULDTOOLBAR), // resource ID 02939 _R(IDC_BTN_ROTATEMOULD), // control ID 02940 SYSTEMBAR_EDIT, // Group bar ID 02941 TRUE, // Receive messages 02942 FALSE, // Smart 02943 FALSE, // Clean 02944 0, // One open Instance ID 02945 (GREY_WHEN_NO_CURRENT_DOC | GREY_WHEN_NO_SELECTION) 02946 )); 02947 02948 }
|