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

Constructor & Destructor Documentation

CAknsColorTableItemDef(const TAknsItemType, const TAknsItemID &)

CAknsColorTableItemDef(const TAknsItemTypeaType,
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 aTypeType of the definition object. While this is always EAknsITColorTable for CAknsColorTableItemDef objects, derived classes may specify other values.
const TAknsItemID & aIDItem 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 TIntaNumberOfColors,
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 & aIDItem ID of the new object.
const TInt aNumberOfColorsNumber of colors available in aColors.
const TAknsColorTableEntry *const aColorsPointer 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 & aIDItem ID of the new object.

NumberOfColors()

IMPORT_C TIntNumberOfColors()const

Returns the number of colors.

Since
2.0

SetColors(const TInt, const TAknsColorTableEntry *const)

IMPORT_C voidSetColors(const TIntaNumberOfColors,
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 aNumberOfColorsNumber of colors in aColors.
const TAknsColorTableEntry *const aColorsPointer 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 voidSetColorsL(const TIntaNumberOfColors,
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 aNumberOfColorsNumber of colors in aColors.
const TAknsColorTableEntry *const aColorsPointer to the first color.

Member Data Documentation

const TAknsColorTableEntry * iColorArray

const TAknsColorTableEntry *iColorArray[protected]

TAknsColorTableEntry * iInternalColorArray

TAknsColorTableEntry *iInternalColorArray[protected]

TInt iNumberOfColors

TInt iNumberOfColors[protected]