CAknsColorTableItemDef Class Reference

class CAknsColorTableItemDef : public CAknsImageItemDef

Color table item definition. Color table item definition contains (in addition to base class data) an array of color values. Item type for color table item definitions is always EAknsITColorTable .

This is a public class with exported functions. The class is not intended for derivation outside the library.

AknSkinSrv.lib

Since
2.0

Inherits from

Public Member Functions
~CAknsColorTableItemDef ()
IMPORT_C const TAknsColorTableEntry * Colors ()
IMPORT_C CAknsColorTableItemDef * NewL (const TAknsItemID &, const TInt , const TAknsColorTableEntry *const )
IMPORT_C CAknsColorTableItemDef * NewL (const TAknsItemID &)
IMPORT_C TInt NumberOfColors ()
IMPORT_C void SetColors (const TInt , const TAknsColorTableEntry *const )
IMPORT_C void SetColorsL (const TInt , const TAknsColorTableEntry *const )
Protected Member Functions
CAknsColorTableItemDef (const TAknsItemType , const TAknsItemID &)
Inherited Functions
CAknsImageItemDef::Attributes()const
CAknsImageItemDef::CAknsImageItemDef(const TAknsItemType,const TAknsItemID &)
CAknsImageItemDef::SetAttributesL(const TAknsImageAttributeData &)
CAknsImageItemDef::~CAknsImageItemDef()
CAknsItemDef::CAknsItemDef(const TAknsItemType,const TAknsItemID &)
CAknsItemDef::ID()const
CAknsItemDef::LinearOrder(const CAknsItemDef &,const CAknsItemDef &)
CAknsItemDef::Type()const
CAknsItemDef::~CAknsItemDef()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Protected Attributes
const TAknsColorTableEntry * iColorArray
TAknsColorTableEntry * iInternalColorArray
TInt iNumberOfColors
Inherited Attributes
CAknsImageItemDef::iAttributeData
CAknsItemDef::iID
CAknsItemDef::iSpare1
CAknsItemDef::iSpare2
CAknsItemDef::iType

Constructor & Destructor Documentation

CAknsColorTableItemDef(const TAknsItemType, const TAknsItemID &)

CAknsColorTableItemDef ( const TAknsItemType aType,
const TAknsItemID & aID
) [protected]

C++ constructor for internal use. Constructs color item definition object with given ID. Color array must be set separately.

Parameters

const TAknsItemType aType Type of the definition object. While this is always EAknsITColorTable for CAknsColorTableItemDef objects, derived classes may specify other values.
const TAknsItemID & aID Item ID of the new item definition.

~CAknsColorTableItemDef()

~CAknsColorTableItemDef ( ) [virtual]

Destructor. If the object owns a color array, it is destroyed.

Member Functions Documentation

Colors()

IMPORT_C const TAknsColorTableEntry * Colors ( ) const

Returns pointer to color values.

Since
2.0

NewL(const TAknsItemID &, const TInt, const TAknsColorTableEntry *const)

IMPORT_C CAknsColorTableItemDef * NewL ( const TAknsItemID & aID,
const TInt aNumberOfColors,
const TAknsColorTableEntry *const aColors
) [static]

Two-phased constructor, complete initialization. Constructs a new color table item definition object.

Exceptions:
If allocation fails, function leaves with a system-wide error code.

Parameters

const TAknsItemID & aID Item ID of the new object.
const TInt aNumberOfColors Number of colors available in aColors.
const TAknsColorTableEntry *const aColors Pointer to the first color. Internal pointer is set to point to the same place as the given one. Ownership of the color array stays with the caller and it must ensure that its lifetime is appropriate.

NewL(const TAknsItemID &)

IMPORT_C CAknsColorTableItemDef * NewL ( const TAknsItemID & aID ) [static]

Two-phased constructor, partial initialization. Constructs a new color table item definition object. Colors must be set separately by using SetColorsL or SetColors.

Exceptions:
If allocation fails, function leaves with a system-wide error code.

Parameters

const TAknsItemID & aID Item ID of the new object.

NumberOfColors()

IMPORT_C TInt NumberOfColors ( ) const

Returns the number of colors.

Since
2.0

SetColors(const TInt, const TAknsColorTableEntry *const)

IMPORT_C void SetColors ( const TInt aNumberOfColors,
const TAknsColorTableEntry *const aColors
)

Sets the colors, ownership of the color array stays with the caller. If this object already owns a color array, it is destroyed.

Since
2.0

Parameters

const TInt aNumberOfColors Number of colors in aColors.
const TAknsColorTableEntry *const aColors Pointer to the first color. The caller still owns the color array and must ensure that its lifetime is appropriate.

SetColorsL(const TInt, const TAknsColorTableEntry *const)

IMPORT_C void SetColorsL ( const TInt aNumberOfColors,
const TAknsColorTableEntry *const aColors
)

Sets the colors, content of the array is copied to an internal array. If this object already owns a color array, it is destroyed.

Since
2.0
Exceptions:
If allocation fails, returns with an error code.

Parameters

const TInt aNumberOfColors Number of colors in aColors.
const TAknsColorTableEntry *const aColors Pointer to the first color.

Member Data Documentation

const TAknsColorTableEntry * iColorArray

const TAknsColorTableEntry * iColorArray [protected]

TAknsColorTableEntry * iInternalColorArray

TAknsColorTableEntry * iInternalColorArray [protected]

TInt iNumberOfColors

TInt iNumberOfColors [protected]