CAknsColorTableItemData Class Reference

class CAknsColorTableItemData : public CAknsImageItemData

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

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

AknSkins.lib

Since
2.0

Inherits from

Constructor & Destructor Documentation

CAknsColorTableItemData(const TAknsItemType)

CAknsColorTableItemData(const TAknsItemTypeaType)[protected]

C++ protected constructor. Constructs a new CAknsColorItemData without an array.

Parameters

const TAknsItemType aTypeItem type of the new item data object. While this is always EAknsITColorTable for instances of this class, derived classes may specify another value.

~CAknsColorTableItemData()

~CAknsColorTableItemData()[virtual]

Destructor. Destroys color value array.

Member Functions Documentation

ColorIndexed(const TInt)

IMPORT_C TIntColorIndexed(const TIntaIndex)const

Returns the indexed color value.

Since
2.0
Note:
This method does not perform any bounds checking. An access violation or panic will occur, if the given index is not within the bounds of the internal array. Use GetColorL instead, if such checking is required.

Parameters

const TInt aIndexIndex of the color to be retrieved. This must be within 0 (inclusive) and aNumberOfColors (exclusive).

ColorRgb(const TInt)

IMPORT_C TRgbColorRgb(const TIntaIndex)const

Returns the RGB color value.

Since
2.0
Note:
This method does not perform any bounds checking. An access violation or panic will occur, if the given index is not within the bounds of the internal array. Use GetColorL instead, if such checking is required.

Parameters

const TInt aIndexIndex of the color to be retrieved. This must be within 0 (inclusive) and aNumberOfColors (exclusive).

GetColorL(const TInt, TRgb &)

IMPORT_C voidGetColorL(const TIntaIndex,
TRgb &aColor
)const

Retrieves a color value (indexed or RGB) with bounds checking.

Since
2.6
Exceptions:
If the given index is outside the bounds of the array, the method leaves with an error code.

Parameters

const TInt aIndexIndex of the color to be retrieved.
TRgb & aColorOn return, contains the color as an RGB value. If the color is indexed, the appropriate mapping using current palette is used.

NewL()

IMPORT_C CAknsColorTableItemData *NewL()[static]

Two-phased constructor. Constructs a new CAknsColorTableItemData object. Values must be set separately using SetColorsL.

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

SetColorsL(const TInt, const TAknsColorTableEntry *)

IMPORT_C voidSetColorsL(const TIntaNumberOfColors,
const TAknsColorTableEntry *aColors
)

Sets color values for this item data instance.

Since
2.0

Parameters

const TInt aNumberOfColorsNumber of colors in aColors.
const TAknsColorTableEntry * aColorsPointer to first color value. Values are copied into an internal array.

Member Data Documentation

TAknsColorTableEntry * iColorArray

TAknsColorTableEntry *iColorArray[protected]

TInt iColorArraySize

TInt iColorArraySize[protected]