#include <moldtool.h>
Inheritance diagram for OpCopyMouldShape:
Public Member Functions | |
OpCopyMouldShape () | |
Constructor for copy mould shape operation. | |
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 | Do (OpDescriptor *) |
Copies the mould node path to the clipboard so it can be used as a template object for further moulds. | |
Static Public Member Functions | |
static BOOL | Init () |
Initialise the copy mould operation so that it can be accessed from the interface. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
For finding the OpCopyMouldShape state. |
Definition at line 369 of file moldtool.h.
|
Constructor for copy mould shape operation.
Definition at line 1823 of file moldtool.cpp.
|
|
Copies the mould node path to the clipboard so it can be used as a template object for further moulds.
Reimplemented from Operation. Definition at line 1938 of file moldtool.cpp. 01939 { 01940 NodeMould* pNodeMould; 01941 NodeMouldPath* pMouldPath; 01942 01943 if (!DoStartSelOp(TRUE,TRUE)) 01944 goto Failed; 01945 01946 if (IsAMouldSelected(&pNodeMould)) 01947 { 01948 // find the actual shape we need to copy. 01949 pMouldPath = pNodeMould->GetPathShape(); 01950 if (pMouldPath==NULL) 01951 goto Failed; 01952 01953 // RangeControl Cntrl = Selected + Unselected + don't cross layers 01954 Range CopyRange(pMouldPath,pMouldPath,RangeControl(TRUE,TRUE,FALSE)); 01955 if (!DoCopyNodesToClipboard(CopyRange)) 01956 goto Failed; 01957 } 01958 End(); 01959 return; 01960 01961 Failed: 01962 FailAndExecute(); 01963 End(); 01964 return; 01965 }
|
|
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 1912 of file moldtool.cpp. 01913 { 01914 *OpName = String_256(_R(IDS_UNDO_COPYMOULD)); 01915 }
|
|
For finding the OpCopyMouldShape state.
Definition at line 1884 of file moldtool.cpp. 01885 { 01886 OpState OpSt; 01887 String_256 DisableReason; 01888 OpSt.Greyed = FALSE; 01889 01890 if (!IsAMouldSelected(NULL)) 01891 OpSt.Greyed=TRUE; 01892 01893 return (OpSt); 01894 }
|
|
Initialise the copy mould operation so that it can be accessed from the interface.
Reimplemented from SimpleCCObject. Definition at line 1849 of file moldtool.cpp. 01850 { 01851 return (RegisterOpDescriptor(0, // tool ID 01852 _R(IDS_COPYMOULD), // string resource ID 01853 CC_RUNTIME_CLASS(OpCopyMouldShape), // runtime class for Op 01854 OPTOKEN_COPYMOULD, // Ptr to token string 01855 OpCopyMouldShape::GetState, // GetState function 01856 0, // help ID 01857 _R(IDBBL_COPYMOULD), // bubble help ID 01858 _R(IDD_MOULDTOOLBAR), // resource ID 01859 _R(IDC_BTN_COPYMOULD), // control ID 01860 SYSTEMBAR_EDIT, // Group bar ID 01861 TRUE, // Receive messages 01862 FALSE, // Smart 01863 FALSE, // Clean 01864 0, // One open Instance ID 01865 (GREY_WHEN_NO_CURRENT_DOC | GREY_WHEN_NO_SELECTION) 01866 )); 01867 01868 }
|