OpBlendOneToOne Class Reference

This changes the one-to-one flag of all selected blends. More...

#include <blndtool.h>

Inheritance diagram for OpBlendOneToOne:

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

Public Member Functions

 OpBlendOneToOne ()
 ~OpBlendOneToOne ()
virtual void Do (OpDescriptor *)
 Changes the 1 to 1 flag of the selected blend by toggling the flag.

Static Public Member Functions

static BOOL Declare ()
 Adds the operation to the list of all known operations.
static OpState GetState (String_256 *Description, OpDescriptor *)
 Find out the state of the operation at the specific time.

Private Member Functions

 CC_DECLARE_DYNCREATE (OpBlendOneToOne)

Detailed Description

This changes the one-to-one flag of all selected blends.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/5/94

Definition at line 838 of file blndtool.h.


Constructor & Destructor Documentation

OpBlendOneToOne::OpBlendOneToOne  )  [inline]
 

Definition at line 844 of file blndtool.h.

00844 {}

OpBlendOneToOne::~OpBlendOneToOne  )  [inline]
 

Definition at line 845 of file blndtool.h.

00845 {}


Member Function Documentation

OpBlendOneToOne::CC_DECLARE_DYNCREATE OpBlendOneToOne   )  [private]
 

BOOL OpBlendOneToOne::Declare  )  [static]
 

Adds the operation to the list of all known operations.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/5/95
Returns:
TRUE if all went OK, FALSE otherwise

Reimplemented from OpChangeBlend.

Definition at line 7487 of file blndtool.cpp.

07488 {
07489     return (RegisterOpDescriptor(
07490                                 0, 
07491                                 _R(IDBBL_ONETOONE),
07492                                 //_R(IDS_ONETOONE),
07493                                 CC_RUNTIME_CLASS(OpBlendOneToOne), 
07494                                 OPTOKEN_BLENDONETOONE,
07495                                 OpBlendOneToOne::GetState,
07496                                 0,  /* help ID */
07497                                 0,  /* bubble ID */
07498                                 0   /* bitmap ID */
07499                                 ));
07500 }

void OpBlendOneToOne::Do OpDescriptor pOpDesc  )  [virtual]
 

Changes the 1 to 1 flag of the selected blend by toggling the flag.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/5/94
Returns:
-

Reimplemented from Operation.

Definition at line 7449 of file blndtool.cpp.

07450 {
07451     SelRange* pSel = GetApplication()->FindSelection();
07452     if (pSel != NULL)
07453     {
07454         Node* pSelNode = pSel->FindFirst();
07455         while (pSelNode != NULL)
07456         {
07457             if (IS_A(pSelNode,NodeBlend))
07458             {
07459                 NodeBlend* pNodeBlend = (NodeBlend*)pSelNode;
07460 
07461                 ChangeBlendOpParam Param;
07462                 Param.ChangeType  = CHANGEBLEND_ONETOONE;
07463                 Param.NewOneToOne = !pNodeBlend->IsOneToOne();
07464                 DoWithParam(pOpDesc,&Param);
07465 
07466                 // Only call DoWithParam() once as this func acts upon the whole selection.
07467                 // We only need to scan the selection here in order to find the first selected blend
07468                 // node which is used to determine the state of the NewOneToOne flag
07469                 return;
07470             }
07471             pSelNode = pSel->FindNext(pSelNode);
07472         }
07473     }
07474 }

OpState OpBlendOneToOne::GetState String_256 Description,
OpDescriptor
[static]
 

Find out the state of the operation at the specific time.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/5/95
Parameters:
Description - GetState fills this string with an approriate description [OUTPUTS] of the current state of the operation
Returns:
The state of the operation, so that menu items (ticks and greying) can be done properly

Reimplemented from OpChangeBlend.

Definition at line 7517 of file blndtool.cpp.

07518 {
07519     OpState State(FALSE,TRUE);  // not ticked & greyed by default
07520 
07521     SelRange* pSel = GetApplication()->FindSelection();
07522     if (pSel != NULL)
07523     {
07524         Node* pSelNode = pSel->FindFirst();
07525         while (pSelNode != NULL && !State.Ticked)
07526         {
07527             if (IS_A(pSelNode,NodeBlend))
07528             {
07529                 State.Ticked = ((NodeBlend*)pSelNode)->IsOneToOne();
07530                 State.Greyed = FALSE;
07531 
07532                 // We only need to scan the selection here in order to find the first selected blend
07533                 // node which is used to determine the state of the Ticked flag
07534                 return State;
07535             }
07536             pSelNode = pSel->FindNext(pSelNode);
07537         }
07538     }
07539 
07540     return State;
07541 }


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