OpPasteEnvelope Class Reference

An undoable operation to paste the contents of the clipboard as a mould shape. More...

#include <moldtool.h>

Inheritance diagram for OpPasteEnvelope:

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

Public Member Functions

 OpPasteEnvelope ()
 Constructor for paste envelope 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 *)

Static Public Member Functions

static BOOL Init ()
 Initialise the paste mould operation so that it can be accessed from the interface.
static OpState GetState (String_256 *, OpDescriptor *)
 For finding the OpPasteMouldShape state.

Detailed Description

An undoable operation to paste the contents of the clipboard as a mould shape.

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

Definition at line 420 of file moldtool.h.


Constructor & Destructor Documentation

OpPasteEnvelope::OpPasteEnvelope  ) 
 

Constructor for paste envelope operation.

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

Definition at line 2257 of file moldtool.cpp.

02258 {
02259     // Dummy constructor
02260 }


Member Function Documentation

void OpPasteEnvelope::Do OpDescriptor pOpDescr  )  [virtual]
 

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/01/95
Parameters:
pointer to an OpDescriptor (unused) [INPUTS] pointer to a pastemould parameter block
- [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 2393 of file moldtool.cpp.

02394 {
02395     // just call the parent class
02396     OpPasteMouldShape::Do(MOULDSPACE_ENVELOPE);
02397 }

void OpPasteEnvelope::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 2369 of file moldtool.cpp.

02370 {
02371     *OpName = String_256(_R(IDS_UNDO_PASTEENVELOPE));
02372 }

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

For finding the OpPasteMouldShape state.

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

Definition at line 2316 of file moldtool.cpp.

02317 {
02318     OpState OpSt;
02319 //  String_256 DisableReason; 
02320 //  OpSt.Greyed=(!FindPasteObject(NULL));
02321 
02322     OpSt.Greyed = TRUE;
02323 
02324     if (FindPasteObject(NULL))
02325     {
02326         // Get the selection and the number of selected objects
02327         SelRange* Selected = GetApplication()->FindSelection();
02328         INT32 Count = Selected->Count();
02329 
02330         // Are there any selected objects?
02331         if (Count > 0)
02332         {
02333             ObjChangeFlags cFlags;
02334             cFlags.DeleteNode  = TRUE;
02335             OpPasteEnvelope* op = new OpPasteEnvelope ();       // need an op to do correct processing
02336             ObjChangeParam ObjChange(OBJCHANGE_STARTING,cFlags,NULL,op);
02337 
02338             Node* pNode = Selected->FindFirst();
02339             OpSt.Greyed = FALSE;
02340             while (pNode != NULL && !OpSt.Greyed)
02341             {
02342                 OpSt.Greyed = !pNode->AllowOp(&ObjChange,FALSE);
02343                 pNode = Selected->FindNext(pNode);
02344             }
02345             delete (op);
02346         }
02347     }
02348 
02349     return(OpSt);   
02350 }

BOOL OpPasteEnvelope::Init void   )  [static]
 

Initialise the paste 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 2282 of file moldtool.cpp.

02283 {
02284     return (RegisterOpDescriptor(0,                                 // tool ID
02285                                 _R(IDS_PASTEENVELOPE),                  // string resource ID
02286                                 CC_RUNTIME_CLASS(OpPasteEnvelope),  // runtime class for Op
02287                                 OPTOKEN_PASTEENVELOPE,              // Ptr to token string
02288                                 OpPasteEnvelope::GetState,          // GetState function
02289                                 0,                                  // help ID
02290                                 _R(IDBBL_PASTEENVELOPE),                // bubble help ID
02291                                 _R(IDD_MOULDTOOLBAR),                   // resource ID
02292                                 _R(IDC_BTN_PASTEENVELOPE),              // control ID
02293                                 SYSTEMBAR_EDIT,                     // Group bar ID
02294                                 TRUE,                               // Receive messages
02295                                 FALSE,                              // Smart
02296                                 FALSE,                              // Clean
02297                                 0,                                  // One open Instance ID
02298                                 (GREY_WHEN_NO_CURRENT_DOC | GREY_WHEN_NO_SELECTION)
02299                                 )); 
02300 }               


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