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.
Index of the color to be retrieved. This must be within 0 (inclusive) and aNumberOfColors (exclusive).
Returns:
Color value as TInt. If the value is -1, RGB value should be queried instead.
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.
IMPORT_C TRgb CAknsColorTableItemData::ColorRgb
(
const TInt
aIndex
)
const
Returns the RGB color value.
Parameters:
aIndex
Index of the color to be retrieved. This must be within 0 (inclusive) and aNumberOfColors (exclusive).
Returns:
Color value as TRgb. Note that the value is only valid if ColorIndexed() returned -1.
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.
IMPORT_C void CAknsColorTableItemData::GetColorL
(
const TInt
aIndex,
TRgb &
aColor
)
const
Retrieves a color value (indexed or RGB) with bounds checking.
Parameters:
aIndex
Index of the color to be retrieved.
aColor
On return, contains the color as an RGB value. If the color is indexed, the appropriate mapping using current palette is used.
Exceptions:
If the given index is outside the bounds of the array, the method leaves with an error code.