OpBlendTangential Class Reference

This changes the Tangential flag of all selected blends. More...

#include <blndtool.h>

Inheritance diagram for OpBlendTangential:

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

Public Member Functions

 OpBlendTangential ()
 ~OpBlendTangential ()
virtual void Do (OpDescriptor *)
 Changes the Tangential 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 (OpBlendTangential)

Detailed Description

This changes the Tangential flag of all selected blends.

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

Definition at line 892 of file blndtool.h.


Constructor & Destructor Documentation

OpBlendTangential::OpBlendTangential  )  [inline]
 

Definition at line 898 of file blndtool.h.

00898 {}

OpBlendTangential::~OpBlendTangential  )  [inline]
 

Definition at line 899 of file blndtool.h.

00899 {}


Member Function Documentation

OpBlendTangential::CC_DECLARE_DYNCREATE OpBlendTangential   )  [private]
 

BOOL OpBlendTangential::Declare  )  [static]
 

Adds the operation to the list of all known operations.

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

Reimplemented from OpChangeBlend.

Definition at line 7713 of file blndtool.cpp.

07714 {
07715     return (RegisterOpDescriptor(
07716                                 0, 
07717                                 _R(IDBBL_TANGENTIAL),
07718                                 CC_RUNTIME_CLASS(OpBlendTangential), 
07719                                 OPTOKEN_BLENDTANGENTIAL,
07720                                 OpBlendTangential::GetState,
07721                                 0,  /* help ID */
07722                                 0,  /* bubble ID */
07723                                 0   /* bitmap ID */
07724                                 ));
07725 }

void OpBlendTangential::Do OpDescriptor pOpDesc  )  [virtual]
 

Changes the Tangential flag of the selected blend by toggling the flag.

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

Reimplemented from Operation.

Definition at line 7675 of file blndtool.cpp.

07676 {
07677     SelRange* pSel = GetApplication()->FindSelection();
07678     if (pSel != NULL)
07679     {
07680         Node* pSelNode = pSel->FindFirst();
07681         while (pSelNode != NULL)
07682         {
07683             if (IS_A(pSelNode,NodeBlend))
07684             {
07685                 NodeBlend* pNodeBlend = (NodeBlend*)pSelNode;
07686 
07687                 ChangeBlendOpParam Param;
07688                 Param.ChangeType   = CHANGEBLEND_TANGENTIAL;
07689                 Param.NewTangential = !pNodeBlend->IsTangential();
07690                 DoWithParam(pOpDesc,&Param);
07691 
07692                 // Only call DoWithParam() once as this func acts upon the whole selection.
07693                 // We only need to scan the selection here in order to find the first selected blend
07694                 // node which is used to determine the state of the NewTangential flag
07695                 return;
07696             }
07697             pSelNode = pSel->FindNext(pSelNode);
07698         }
07699     }
07700 }

OpState OpBlendTangential::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:
21/5/99
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 7742 of file blndtool.cpp.

07743 {
07744     OpState State(FALSE,TRUE);  // not ticked & greyed by default
07745 
07746     SelRange* pSel = GetApplication()->FindSelection();
07747     if (pSel != NULL)
07748     {
07749         Node* pSelNode = pSel->FindFirst();
07750         while (pSelNode != NULL && !State.Ticked)
07751         {
07752             if (IS_A(pSelNode,NodeBlend))
07753             {
07754                 NodeBlend* pNodeBlend = (NodeBlend*)pSelNode;
07755 
07756                 if (!State.Ticked)
07757                     State.Ticked = pNodeBlend->IsTangential();
07758 
07759                 if (State.Greyed)
07760                     State.Greyed = (pNodeBlend->GetNodeBlendPath(0) != NULL);
07761             }
07762             pSelNode = pSel->FindNext(pSelNode);
07763         }
07764     }
07765 
07766     return State;
07767 }


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