RampItem Class Reference

Defines whats common to all ramp items, i.e. their position and selection state. More...

#include <fillramp.h>

Inheritance diagram for RampItem:

ListItem CCObject SimpleCCObject ColRampItem TranspRampItem List of all members.

Public Member Functions

 RampItem ()
 Constructors for ramp items.
 RampItem (float pos)
 RampItem (const RampItem &other)
void SetPosition (float pos)
 Set the position in the ramp for this colour.
void SetSelState (BOOL selstate)
 Set the state of the selection flag in this colour ramp item.
float GetPosition () const
BOOL GetSelState () const
BOOL IsSelected () const
virtual BOOL IsAColourRampItem () const
virtual BOOL IsATranspRampItem () const

Protected Attributes

float Position
BOOL Selected

Private Member Functions

 CC_DECLARE_DYNCREATE (RampItem)
void ClampPosition ()
 Make sure the position field is in range.

Detailed Description

Defines whats common to all ramp items, i.e. their position and selection state.

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

Definition at line 132 of file fillramp.h.


Constructor & Destructor Documentation

RampItem::RampItem  ) 
 

Constructors for ramp items.

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

Definition at line 141 of file fillramp.cpp.

00142 {
00143     Position=0.0f;
00144     Selected=FALSE;
00145 }

RampItem::RampItem float  pos  ) 
 

Definition at line 147 of file fillramp.cpp.

00148 {
00149     Position=pos;
00150     Selected=FALSE;
00151     ClampPosition();
00152 }

RampItem::RampItem const RampItem other  ) 
 

Definition at line 154 of file fillramp.cpp.

00155 {
00156     Position=other.GetPosition();
00157     Selected=other.GetSelState();
00158 }


Member Function Documentation

RampItem::CC_DECLARE_DYNCREATE RampItem   )  [private]
 

void RampItem::ClampPosition  )  [private]
 

Make sure the position field is in range.

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

Definition at line 171 of file fillramp.cpp.

00172 {
00173     if (Position<0.01f) Position=0.01f;
00174     if (Position>0.99f) Position=0.99f;
00175 }

float RampItem::GetPosition  )  const [inline]
 

Definition at line 144 of file fillramp.h.

00144 { return Position; }

BOOL RampItem::GetSelState  )  const [inline]
 

Definition at line 145 of file fillramp.h.

00145 { return Selected; }

virtual BOOL RampItem::IsAColourRampItem  )  const [inline, virtual]
 

Reimplemented in ColRampItem.

Definition at line 148 of file fillramp.h.

00148 { return (FALSE); }

virtual BOOL RampItem::IsATranspRampItem  )  const [inline, virtual]
 

Reimplemented in TranspRampItem.

Definition at line 149 of file fillramp.h.

00149 { return (FALSE); }

BOOL RampItem::IsSelected  )  const [inline]
 

Definition at line 146 of file fillramp.h.

00146 { return Selected; }

void RampItem::SetPosition float  pos  ) 
 

Set the position in the ramp for this colour.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/2/97
Parameters:
pos = a position value, 0<=pos<=1 [INPUTS]

Definition at line 189 of file fillramp.cpp.

00190 {
00191     Position=pos;
00192     ClampPosition();
00193 }

void RampItem::SetSelState BOOL  selstate  ) 
 

Set the state of the selection flag in this colour ramp item.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/2/97
Parameters:
a bool to set the state [INPUTS]

Definition at line 206 of file fillramp.cpp.

00207 {
00208     Selected=selstate;
00209 }


Member Data Documentation

float RampItem::Position [protected]
 

Definition at line 155 of file fillramp.h.

BOOL RampItem::Selected [protected]
 

Definition at line 156 of file fillramp.h.


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