OpDuplicate Class Reference

#include <cutop.h>

Inheritance diagram for OpDuplicate:

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

Public Member Functions

 OpDuplicate ()
 OpDuplicate constructor.
virtual void Do (OpDescriptor *)
 Performs the Duplicate operation, duplicates are placed as Last children of their layer.

Static Public Member Functions

static BOOL Init ()
 OpDuplicate initialiser method.
static OpState GetState (String_256 *, OpDescriptor *)
 For finding the operations state.

Static Public Attributes

static INT32 DuplicatePlacementX = INT32( (PX_MP_VAL*20) )
static INT32 DuplicatePlacementY = INT32( -(PX_MP_VAL*20) )

Detailed Description

Definition at line 363 of file cutop.h.


Constructor & Destructor Documentation

OpDuplicate::OpDuplicate  ) 
 

OpDuplicate constructor.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/9/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
CarbonCopyOp

Definition at line 2235 of file cutop.cpp.

02235                         : CarbonCopyOp()                                
02236 {                              
02237 }


Member Function Documentation

void OpDuplicate::Do OpDescriptor  )  [virtual]
 

Performs the Duplicate operation, duplicates are placed as Last children of their layer.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/8/93
Parameters:
OpDescriptor (unused) [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
CarbonCopyOp::DoProcessing

Reimplemented from Operation.

Definition at line 2328 of file cutop.cpp.

02329 {   
02330     //Graham 25/6/96: Now you pass a matrix instead of individual parameters.
02331 
02332     INT32 dx = DuplicatePlacementX;
02333     INT32 dy = DuplicatePlacementY;
02334     Document* pDoc = Document::GetCurrent();
02335     if (pDoc)
02336     {
02337         DocCoord offset = pDoc->GetDuplicationOffset();
02338         dx = offset.x;
02339         dy = offset.y;
02340     }
02341 
02342     Trans2DMatrix MatrixToPass(dx, dy);
02343 
02344     DoProcessing(MatrixToPass);
02345 }   

OpState OpDuplicate::GetState String_256 UIDescription,
OpDescriptor Bob
[static]
 

For finding the operations state.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/5/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The state of the OpDuplicate

Errors: -

See also:
-

Reimplemented from CarbonCopyOp.

Definition at line 2301 of file cutop.cpp.

02302 {
02303     OpState OpSt;
02304 
02305     SetCutOpText(UIDescription, _R(IDS_CLIPBOARD_PREDUPLICATE));
02306 
02307     return(OpSt);   
02308 }

BOOL OpDuplicate::Init void   )  [static]
 

OpDuplicate initialiser method.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/93
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 2257 of file cutop.cpp.

02258 {
02259     BOOL ok =  Camelot.DeclareSection(TEXT("Duplicate"), 10) &&
02260                Camelot.DeclarePref(TEXT("Duplicate"), TEXT("DuplicatePlacementX"),
02261                                     &OpDuplicate::DuplicatePlacementX, INT_MIN, INT_MAX) &&
02262                Camelot.DeclarePref(TEXT("Duplicate"), TEXT("DuplicatePlacementY"),
02263                                     &OpDuplicate::DuplicatePlacementY,INT_MIN, INT_MAX) &&
02264      
02265                 (RegisterOpDescriptor(0,
02266                             _R(IDS_DUPLICATEOP),
02267                             CC_RUNTIME_CLASS(OpDuplicate),
02268                             OPTOKEN_DUPLICATE,
02269                             OpDuplicate::GetState,
02270                             0,                          // help ID
02271                             _R(IDBBL_DUPLICATE),
02272                             0,                          // bitmap ID
02273                             0,
02274                             SYSTEMBAR_ILLEGAL,          // For now !
02275                             TRUE,                       // Receive messages
02276                             FALSE,
02277                             FALSE,
02278                             0,
02279                             (GREY_WHEN_NO_CURRENT_DOC | GREY_WHEN_NO_SELECTION)
02280 ));
02281     return ok; 
02282     return true;
02283 }               


Member Data Documentation

INT32 OpDuplicate::DuplicatePlacementX = INT32( (PX_MP_VAL*20) ) [static]
 

Definition at line 379 of file cutop.h.

INT32 OpDuplicate::DuplicatePlacementY = INT32( -(PX_MP_VAL*20) ) [static]
 

Definition at line 380 of file cutop.h.


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