AttrColFillRampChange Class Reference

An attribute to control the changes of colour on a fill ramp. More...

#include <fillattr2.h>

Inheritance diagram for AttrColFillRampChange:

AttrValueChange AttrFillGeometry NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrColFillRampChange ()
 A class to edit colour ramps.
virtual UINT32 GetAttrNameID (void)
 Returns a string resource ID describing the attribute.
virtual AttrFillGeometryMutateFill (AttrFillGeometry *FillToMutate)
 Changes the colours in a fill ramp. FillToMutate contains all the info necessary to do the edit.
virtual AttributeValueGetAttributeValue ()
virtual CCRuntimeClassGetAttributeType ()
 Determines the scope of the value change.
void InitForColourAdd (DocColour *pColour, float pos)
 All the init functions to set this AttrColFillRampChange object.
void InitForColourEdit (UINT32 i, DocColour *pColour)
void InitForSelEdit (DocColour *pColour)
RampEdit GetAction () const
UINT32 GetIndex () const
float GetPosition () const

Protected Attributes

RampEdit action
UINT32 index
float position
FlatFillAttribute Value

Detailed Description

An attribute to control the changes of colour on a fill ramp.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/03/97

Definition at line 483 of file fillattr2.h.


Constructor & Destructor Documentation

AttrColFillRampChange::AttrColFillRampChange  ) 
 

A class to edit colour ramps.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/03/97

Definition at line 4535 of file fillattr.cpp.

04536 {
04537     action   = ACT_DONOTHING;
04538     index    = FILLRAMP_ILLEGALINDEX;
04539     position = 0.0f;
04540 }


Member Function Documentation

RampEdit AttrColFillRampChange::GetAction  )  const [inline]
 

Definition at line 503 of file fillattr2.h.

00503 { return action; }

virtual CCRuntimeClass* AttrColFillRampChange::GetAttributeType  )  [inline, virtual]
 

Determines the scope of the value change.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/94
Returns:
A CC_RUNTIME_CLASS depending on whether this should change colour or transparency attribute.

Reimplemented from AttrValueChange.

Definition at line 494 of file fillattr2.h.

virtual AttributeValue* AttrColFillRampChange::GetAttributeValue  )  [inline, virtual]
 

Implements AttrValueChange.

Definition at line 493 of file fillattr2.h.

00493 { return &Value; }

UINT32 AttrColFillRampChange::GetAttrNameID void   )  [virtual]
 

Returns a string resource ID describing the attribute.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/03/97
Returns:
Attribute description ID

Reimplemented from AttrValueChange.

Definition at line 4590 of file fillattr.cpp.

04591 {
04592     return (_R(IDS_FILLRAMP_COLOURCHANGE));
04593 }

UINT32 AttrColFillRampChange::GetIndex  )  const [inline]
 

Definition at line 504 of file fillattr2.h.

00504 { return index;  }

float AttrColFillRampChange::GetPosition  )  const [inline]
 

Definition at line 505 of file fillattr2.h.

00505 { return position; }

void AttrColFillRampChange::InitForColourAdd DocColour pColour,
float  pos
 

All the init functions to set this AttrColFillRampChange object.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/03/97

Definition at line 4557 of file fillattr.cpp.

04558 {
04559     action   = ACT_CREATENEWCOL;
04560     position = pos;
04561     Value.SetStartColour(pColour);
04562 }

void AttrColFillRampChange::InitForColourEdit UINT32  i,
DocColour pColour
 

Definition at line 4564 of file fillattr.cpp.

04565 {
04566     action = ACT_EDITCOLOFITEM;
04567     index  = i;
04568     Value.SetStartColour(pColour);
04569 }

void AttrColFillRampChange::InitForSelEdit DocColour pColour  ) 
 

Definition at line 4571 of file fillattr.cpp.

04572 {
04573     action = ACT_EDITCOLOFSELECTED;
04574     index  = FILLRAMP_ILLEGALINDEX;
04575     Value.SetStartColour(pColour);
04576 }

AttrFillGeometry * AttrColFillRampChange::MutateFill AttrFillGeometry FillToMutate  )  [virtual]
 

Changes the colours in a fill ramp. FillToMutate contains all the info necessary to do the edit.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/03/97
Parameters:
FillToMutate = a pointer to a fill attribute to alter. [INPUTS]
Returns:
A pointer to a copy which contains the alteration.

Reimplemented from AttrValueChange.

Definition at line 4609 of file fillattr.cpp.

04610 { 
04611 #if !defined(EXCLUDE_FROM_RALPH)
04612     if (FillToMutate->IsVisible() && 
04613         FillToMutate->GetSelectionCount() == 0 &&
04614         SelectionCount > 0)
04615         return NULL;
04616 
04617     // Make a copy of this Fill to change
04618     AttrFillGeometry* NewFill = (AttrFillGeometry*)FillToMutate->SimpleCopy();
04619     if (NewFill == NULL)
04620         return NULL;
04621 
04622     // do the actual editing here
04623     BOOL Changed = NewFill->EditColourFillRamp(this);
04624 
04625     // Did we change any colours ?
04626     if (!Changed)
04627     {
04628         delete NewFill;
04629         return NULL;
04630     }
04631     // Return the Mutated Fill
04632     return NewFill;
04633 #else
04634     return NULL;
04635 #endif
04636 }


Member Data Documentation

RampEdit AttrColFillRampChange::action [protected]
 

Definition at line 508 of file fillattr2.h.

UINT32 AttrColFillRampChange::index [protected]
 

Definition at line 509 of file fillattr2.h.

float AttrColFillRampChange::position [protected]
 

Definition at line 510 of file fillattr2.h.

FlatFillAttribute AttrColFillRampChange::Value [protected]
 

Definition at line 512 of file fillattr2.h.


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