CAknsColorTableItemData Class Reference
#include
<mw/AknsItemData.h>
Link against: AknSkins.lib
class CAknsColorTableItemData : public CAknsImageItemData |
Detailed Description
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.
Member Attribute Documentation
iColorArraySize
TInt
| iColorArraySize | [protected] |
Constructor & Destructor Documentation
CAknsColorTableItemData ( const TAknsItemType )
C++ protected constructor. Constructs a new CAknsColorItemData without an array.
Parameter | Description | aType | Item 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 Function Documentation
ColorIndexed ( const TInt )
IMPORT_C TInt | ColorIndexed | ( | const TInt | aIndex | ) | 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.
Parameter | Description | aIndex | 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.
ColorRgb ( const TInt )
IMPORT_C TRgb | ColorRgb | ( | const TInt | aIndex | ) | 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.
Parameter | Description | 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.
GetColorL ( const TInt, TRgb & )
IMPORT_C void | GetColorL | ( | const TInt | aIndex, |
| 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.
Parameter | Description | 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. |
NewL ( )
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.
Returns: Newly constructed CAknsColorTableItemData object.
SetColorsL ( const TInt, const TAknsColorTableEntry * )
Sets color values for this item data instance.
Parameter | Description | aNumberOfColors | Number of colors in aColors. |
aColors | Pointer to first color value. Values are copied into an internal array. |