OpCopyMouldShape Class Reference

An undoable operation to copy the mould shape to the clipboard. More...

#include <moldtool.h>

Inheritance diagram for OpCopyMouldShape:

OpMouldLibSel SelOperation UndoableOperation Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

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.

Detailed Description

An undoable operation to copy the mould shape to the clipboard.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/01/95
See also:
-

Definition at line 369 of file moldtool.h.


Constructor & Destructor Documentation

OpCopyMouldShape::OpCopyMouldShape  ) 
 

Constructor for copy mould shape operation.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/01/95
See also:
-

Definition at line 1823 of file moldtool.cpp.

01824 {
01825     // Dummy constructor
01826 }


Member Function Documentation

void OpCopyMouldShape::Do OpDescriptor  )  [virtual]
 

Copies the mould node path to the clipboard so it can be used as a template object for further moulds.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/01/95
Parameters:
pointer to an OpDescriptor (unused) [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: failandexecute will be called if the operation fails in some way, most likely when no memory is available.

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 }

void OpCopyMouldShape::GetOpName String_256 OpName  )  [virtual]
 

The GetOpName fn is overridden so that we return back a description appropriate to the type of attribute that the operation applies.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/01/95
Parameters:
- [INPUTS]
The undo string for the operation [OUTPUTS]
Returns:

Reimplemented from Operation.

Definition at line 1912 of file moldtool.cpp.

01913 {
01914     *OpName = String_256(_R(IDS_UNDO_COPYMOULD));
01915 }

OpState OpCopyMouldShape::GetState String_256 UIDescription,
OpDescriptor
[static]
 

For finding the OpCopyMouldShape state.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/01/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The state of the OpCopyMouldShape

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 }

BOOL OpCopyMouldShape::Init void   )  [static]
 

Initialise the copy mould operation so that it can be accessed from the interface.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/01/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if the operation could be successfully initialised FALSE if no more memory could be allocated

Errors: ERROR will be called if there was insufficient memory to allocate the operation.

See also:
-

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 }               


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:57:48 2007 for Camelot by  doxygen 1.4.4