OpCopyAndTransform Class Reference

This operation creates a transformed copy of the selected objects. More...

#include <cutop.h>

Inheritance diagram for OpCopyAndTransform:

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

Public Member Functions

 OpCopyAndTransform ()
 OpCopyAndTransform default constructor. The CopyTransform matrix will be constructed, by default, as an Identity matrix. Therefore, using this constructor essentially creates a Clone operation.
 OpCopyAndTransform (Trans2DMatrix Transform, BOOL PassSelectCopy=FALSE)
 OpCopyAndTransform constructor.
virtual void Do (OpDescriptor *)
 Performs the CopyAndTransform operation with the current CopyTransform matrix and the current SelectCopy status.

Static Public Member Functions

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

Protected Attributes

Trans2DMatrix CopyTransform
BOOL SelectCopy

Detailed Description

This operation creates a transformed copy of the selected objects.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>, copying Peter's code heavily!
Date:
25/6/96

Definition at line 418 of file cutop.h.


Constructor & Destructor Documentation

OpCopyAndTransform::OpCopyAndTransform  ) 
 

OpCopyAndTransform default constructor. The CopyTransform matrix will be constructed, by default, as an Identity matrix. Therefore, using this constructor essentially creates a Clone operation.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/6/96
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
CarbonCopyOp

Definition at line 2483 of file cutop.cpp.

02483                                       : CarbonCopyOp()                              
02484 {                   
02485 }

OpCopyAndTransform::OpCopyAndTransform Trans2DMatrix  Transform,
BOOL  PassSelectCopy = FALSE
 

OpCopyAndTransform constructor.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/6/96
Parameters:
Transform,: The matrix by which to transform the copy [INPUTS]
PassSelectCopy: TRUE to select the copy and deselect the original FALSE (default) to leave the original selected and the copy deselected.
Parameters:
- [OUTPUTS]
Returns:
-
This creates a CopyAndTransform operation that transforms the copy by the Transform matrix.

Returns:
Errors: -
See also:
CarbonCopyOp

Definition at line 2510 of file cutop.cpp.

02510                                                                                   :CarbonCopyOp()                               
02511 {                              
02512     CopyTransform=Transform;
02513     SelectCopy=PassSelectCopy;
02514 }


Member Function Documentation

void OpCopyAndTransform::Do OpDescriptor  )  [virtual]
 

Performs the CopyAndTransform operation with the current CopyTransform matrix and the current SelectCopy status.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/6/96
Parameters:
OpDescriptor (unused) [INPUTS]
- [OUTPUTS]
Returns:
-
This creates a copy of the current selection, transformed by the CopyTransform matrix.

It keeps the original selection selected rather than selecting the copy.

Returns:
Errors: -
See also:
CarbonCopyOp::DoProcessing

Reimplemented from Operation.

Definition at line 2607 of file cutop.cpp.

02608 {       
02609     DoProcessing(CopyTransform, SelectCopy);
02610 }   

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

For finding the operations state.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/6/96
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The state of the OpCopyAndTransform

Errors: -

See also:
-

Reimplemented from CarbonCopyOp.

Definition at line 2575 of file cutop.cpp.

02576 {
02577     OpState OpSt;
02578 
02579     SetCutOpText(UIDescription, _R(IDS_CLIPBOARD_PRECOPYANDTRANSFORM));
02580 
02581     return(OpSt);   
02582 }

BOOL OpCopyAndTransform::Init void   )  [static]
 

OpCopyAndTransform initialiser method.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/6/96
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if the operation could be successfully initialised FALSE if no more memory could be allocated
Note that CopyAndTransform never appears on the menu or toolbar at the moment, but I have created menu strings just in case anyone wants it to. There is no button icon defined for this operation, however.

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

Reimplemented from SimpleCCObject.

Definition at line 2539 of file cutop.cpp.

02540 {
02541     return  (RegisterOpDescriptor(0,
02542                                 _R(IDS_COPYANDTRANSFORMOP),
02543                                 CC_RUNTIME_CLASS(OpCopyAndTransform),
02544                                 OPTOKEN_COPYANDTRANSFORM,
02545                                 OpCopyAndTransform::GetState,
02546                                 0,  /* help ID */
02547                                 _R(IDBBL_COPYANDTRANSFORM),
02548                                 0,      // resource ID
02549                                 0,
02550                                 SYSTEMBAR_ILLEGAL,              // Bar ID
02551                                 TRUE,                       // Receive messages
02552                                 FALSE,
02553                                 FALSE,
02554                                 0,
02555                                 (GREY_WHEN_NO_CURRENT_DOC | GREY_WHEN_NO_SELECTION) ));
02556 }


Member Data Documentation

Trans2DMatrix OpCopyAndTransform::CopyTransform [protected]
 

Definition at line 430 of file cutop.h.

BOOL OpCopyAndTransform::SelectCopy [protected]
 

Definition at line 431 of file cutop.h.


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