OpChangeContourColourType Class Reference

This changes the number of steps of the selected blends. More...

#include <opcntr.h>

Inheritance diagram for OpChangeContourColourType:

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

Public Member Functions

 OpChangeContourColourType ()
 ~OpChangeContourColourType ()
virtual void DoWithParam (OpDescriptor *, OpParam *pOpParam)
 This changes all the selected blend objects to have pOpParam->Param1 number of steps.
virtual 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.
virtual BOOL MayChangeNodeBounds () const

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 (OpChangeContourColourType)

Detailed Description

This changes the number of steps of the selected blends.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/11/94

Definition at line 532 of file opcntr.h.


Constructor & Destructor Documentation

OpChangeContourColourType::OpChangeContourColourType  )  [inline]
 

Definition at line 538 of file opcntr.h.

00538 {}

OpChangeContourColourType::~OpChangeContourColourType  )  [inline]
 

Definition at line 539 of file opcntr.h.

00539 {}


Member Function Documentation

OpChangeContourColourType::CC_DECLARE_DYNCREATE OpChangeContourColourType   )  [private]
 

BOOL OpChangeContourColourType::Declare  )  [static]
 

Adds the operation to the list of all known operations.

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

Definition at line 2834 of file opcntr.cpp.

02835 {
02836     return (RegisterOpDescriptor(
02837                                 0, 
02838                                 0,
02839                                 CC_RUNTIME_CLASS(OpChangeContourColourType), 
02840                                 OPTOKEN_CHANGECONTOURCOLOURTYPE,
02841                                 OpChangeContourColourType::GetState,
02842                                 0,  /* help ID */
02843                                 0,  /* bubble ID */
02844                                 0   /* bitmap ID */
02845                                 ));
02846 }

void OpChangeContourColourType::DoWithParam OpDescriptor ,
OpParam pOpParam
[virtual]
 

This changes all the selected blend objects to have pOpParam->Param1 number of steps.

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

Reimplemented from Operation.

Definition at line 2755 of file opcntr.cpp.

02756 {
02757     ERROR3IF(pOpParam == NULL,"NULL OpParam ptr");
02758     if (pOpParam == NULL) return;
02759 
02760     DoStartSelOp(TRUE, TRUE);
02761     BeginSlowJob(-1, TRUE);
02762 
02763     List NodeList;
02764     BevelTools::BuildListOfSelectedNodes(&NodeList, CC_RUNTIME_CLASS(NodeContourController));
02765 
02766     NodeListItem * pItem = (NodeListItem *)NodeList.GetHead();
02767 
02768     NodeContourController * pController = NULL;
02769 
02770     BOOL ok = TRUE;
02771 
02772     Node * pParent = NULL;
02773 
02774     while (pItem && ok)
02775     {
02776         pController = (NodeContourController *)pItem->pNode;
02777 
02778         ChangeContourColourTypeAction *pAction = NULL;
02779 
02780         if (ChangeContourColourTypeAction::Init(this, GetUndoActionList(), pController, (ColourBlendType)(INT32)(pOpParam->Param1),
02781             &pAction) != AC_OK)
02782         {
02783             FailAndExecute();
02784             End();
02785             return;
02786         }
02787 
02788         if (ok)
02789             ok = DoInvalidateNodeRegion(pController, TRUE);
02790 
02791         if (ok)
02792         {
02793             pParent = pController->FindParent();
02794 
02795             while (pParent)
02796             {
02797                 ObjChangeFlags flgs;
02798                 ObjChangeParam OP(OBJCHANGE_FINISHED, flgs, NULL, this, OBJCHANGE_CALLEDBYOP);
02799 
02800                 pParent->OnChildChange(&OP);
02801 
02802                 pParent = pParent->FindParent();
02803             }
02804         }       
02805 
02806         pItem = (NodeListItem *)NodeList.GetNext(pItem);
02807     }
02808 
02809     NodeList.DeleteAll();
02810 
02811     // Inform the effected parents of the change
02812     if (ok)
02813     {
02814         End();
02815     }
02816     else
02817     {
02818         FailAndExecute();
02819         End();
02820     }
02821 }

void OpChangeContourColourType::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:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/11/94
Parameters:
- [INPUTS]
The undo string for the operation [OUTPUTS]
Returns:

Errors: -

See also:
-

Reimplemented from Operation.

Definition at line 2903 of file opcntr.cpp.

02904 { 
02905     *OpName = String_256(_R(IDS_CONTOURCOLOURTYPE));
02906 }  

OpState OpChangeContourColourType::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:
7/11/94
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

Definition at line 2863 of file opcntr.cpp.

02864 {
02865     OpState State(FALSE,TRUE); // It's not ticked, but it is greyed by default
02866     
02867     // DMc - to test for bevels & contours
02868     // are there any contour nodes in the selection
02869     List NodeList;
02870     BevelTools::BuildListOfSelectedNodes(&NodeList, CC_RUNTIME_CLASS(NodeContourController));
02871 
02872     if (!NodeList.IsEmpty())
02873     {
02874         State.Greyed = FALSE;
02875     }
02876 
02877     NodeList.DeleteAll();
02878 
02879     if (State.Greyed)
02880         *Description = String_256(_R(IDS_CONTOURCOLOURTYPE));
02881     else
02882         *Description = String_256(_R(IDS_CONTOURCOLOURTYPE));
02883 
02884     return State;
02885 }

virtual BOOL OpChangeContourColourType::MayChangeNodeBounds  )  const [inline, virtual]
 

Reimplemented from SelOperation.

Definition at line 550 of file opcntr.h.

00550 { return FALSE; }


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