OpChangeFillProfile Class Reference

#include <filltool.h>

Inheritance diagram for OpChangeFillProfile:

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

Public Member Functions

 OpChangeFillProfile ()
 Construct an object of this type.
 ~OpChangeFillProfile ()
 Destruct an object of this type.
virtual void DoWithParam (OpDescriptor *pOp, OpParam *pParam)
 Saves the fill profile at this point, so it can be restored on an undo.

Static Public Member Functions

static OpState GetState (String_256 *Description, OpDescriptor *)
 Determines the state of the op.
static BOOL Declare ()
 Adds the operation to the list of all known operations.

Detailed Description

Definition at line 835 of file filltool.h.


Constructor & Destructor Documentation

OpChangeFillProfile::OpChangeFillProfile  ) 
 

Construct an object of this type.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/2/2000
Parameters:
- [INPUTS]

Definition at line 10162 of file filltool.cpp.

10163 {
10164 }

OpChangeFillProfile::~OpChangeFillProfile  ) 
 

Destruct an object of this type.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/2/2000
Parameters:
- [INPUTS]

Definition at line 10179 of file filltool.cpp.

10180 {
10181 }


Member Function Documentation

BOOL OpChangeFillProfile::Declare  )  [static]
 

Adds the operation to the list of all known operations.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/2/2000
Returns:
TRUE if all went OK, False otherwise

Definition at line 10196 of file filltool.cpp.

10197 {
10198     return (RegisterOpDescriptor(
10199                                 0, 
10200                                 _R(IDS_FILLPROFILE),
10201                                 CC_RUNTIME_CLASS(OpChangeFillProfile), 
10202                                 OPTOKEN_FILLPROFILE,
10203                                 OpChangeFillProfile::GetState));
10204 }

void OpChangeFillProfile::DoWithParam OpDescriptor pOp,
OpParam pParam
[virtual]
 

Saves the fill profile at this point, so it can be restored on an undo.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/2/2000
Returns:
-

Reimplemented from Operation.

Definition at line 10219 of file filltool.cpp.

10220 {
10221     // Start a slow job
10222     //BeginSlowJob();
10223     DoStartSelOp(TRUE);
10224 
10225     // run through the selection changing all profiles
10226     CProfileBiasGain Profile;
10227 
10228     // recast the op param
10229     FillProfileOpParam * pProfileParam = (FillProfileOpParam *)pParam;
10230 
10231     List ShadowList;
10232 // Why does this change ALL profiles - even those deep down in the selection???
10233 //  FillTools::BuildListOfSelectedNodes(&ShadowList, CC_RUNTIME_CLASS(AttrFillGeometry));
10234     FillTools::GetSelectedAttrList(&ShadowList, CC_RUNTIME_CLASS(AttrFillGeometry), TRUE, FALSE);
10235 
10236     NodeListItem * pItem = (NodeListItem *)ShadowList.GetHead();
10237 
10238     CProfileBiasGain OldGain;
10239 
10240     while (pItem)
10241     {
10242         if (pItem->pNode)
10243         {
10244             // initialise the action
10245             ChangeFillProfileAction * pAction;
10246 
10247             ChangeFillProfileAction::Init(this, GetUndoActionList(), (AttrFillGeometry *)pItem->pNode, pProfileParam->Profile,
10248                 &pAction);
10249 
10250             // Inform the effected parents of the change
10251 
10252             ObjChangeFlags cFlags;
10253             cFlags.Attribute = TRUE;        // Needed to make Blends re-calc themselves
10254 
10255             ObjChangeParam ObjChange(OBJCHANGE_STARTING,cFlags,NULL,NULL);
10256 
10257             /*(AttrFillGeometry *)*/ (pItem->pNode)->AllowOp(&ObjChange);
10258 
10259             ObjChange.Define(OBJCHANGE_FINISHED,cFlags,NULL,NULL);
10260             UpdateAllChangedNodes(&ObjChange);
10261         }
10262 
10263         pItem = (NodeListItem *)ShadowList.GetNext(pItem);
10264     }
10265 
10266     ShadowList.DeleteAll();
10267 
10268     End();
10269 }

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

Determines the state of the op.

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/2/2000
Returns:
Ungreyed, Unticked

Definition at line 10284 of file filltool.cpp.

10285 {
10286     OpState Blobby;
10287     
10288     return Blobby;
10289 }


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