OpPastePerspective Class Reference

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

#include <moldtool.h>

Inheritance diagram for OpPastePerspective:

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

Public Member Functions

 OpPastePerspective ()
 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 446 of file moldtool.h.


Constructor & Destructor Documentation

OpPastePerspective::OpPastePerspective  ) 
 

Constructor for paste envelope operation.

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

Definition at line 2413 of file moldtool.cpp.

02414 {
02415     // Dummy constructor
02416 }


Member Function Documentation

void OpPastePerspective::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 2549 of file moldtool.cpp.

02550 {
02551     // just call the parent class
02552     OpPasteMouldShape::Do(MOULDSPACE_PERSPECTIVE);
02553 }

void OpPastePerspective::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 2525 of file moldtool.cpp.

02526 {
02527     *OpName = String_256(_R(IDS_UNDO_PASTEPERSPECTIVE));
02528 }

OpState OpPastePerspective::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 2472 of file moldtool.cpp.

02473 {
02474     OpState OpSt;
02475 //  String_256 DisableReason; 
02476 //  OpSt.Greyed=(!FindPasteObject(NULL));
02477 
02478     OpSt.Greyed = TRUE;
02479 
02480     if (FindPasteObject(NULL))
02481     {
02482         // Get the selection and the number of selected objects
02483         SelRange* Selected = GetApplication()->FindSelection();
02484         INT32 Count = Selected->Count();
02485 
02486         // Are there any selected objects?
02487         if (Count > 0)
02488         {
02489             ObjChangeFlags cFlags;
02490             cFlags.DeleteNode  = TRUE;
02491             OpPasteEnvelope* op = new OpPasteEnvelope ();       // need an op to do correct processing
02492             ObjChangeParam ObjChange(OBJCHANGE_STARTING,cFlags,NULL,op);
02493 
02494             Node* pNode = Selected->FindFirst();
02495             OpSt.Greyed = FALSE;
02496             while (pNode != NULL && !OpSt.Greyed)
02497             {
02498                 OpSt.Greyed = !pNode->AllowOp(&ObjChange,FALSE);
02499                 pNode = Selected->FindNext(pNode);
02500             }
02501             delete (op);
02502         }
02503     }
02504 
02505     return(OpSt);   
02506 }

BOOL OpPastePerspective::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 2438 of file moldtool.cpp.

02439 {
02440     return (RegisterOpDescriptor(0,                                 // tool ID
02441                                 _R(IDS_PASTEPERSPECTIVE),               // string resource ID
02442                                 CC_RUNTIME_CLASS(OpPastePerspective),   // runtime class for Op
02443                                 OPTOKEN_PASTEPERSPECTIVE,           // Ptr to token string
02444                                 OpPastePerspective::GetState,       // GetState function
02445                                 0,                                  // help ID
02446                                 _R(IDBBL_PASTEPERSPECTIVE),             // bubble help ID
02447                                 _R(IDD_MOULDTOOLBAR),                   // resource ID
02448                                 _R(IDC_BTN_PASTEPERSPECTIVE),               // control ID
02449                                 SYSTEMBAR_EDIT,                     // Group bar ID
02450                                 TRUE,                               // Receive messages
02451                                 FALSE,                              // Smart
02452                                 FALSE,                              // Clean
02453                                 0,                                  // One open Instance ID
02454                                 (GREY_WHEN_NO_CURRENT_DOC | GREY_WHEN_NO_SELECTION)
02455                                 )); 
02456 }               


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