#include <mw/gulcolor.h>
Link against: egul.lib
| class CColorList : public CBase |
| Public Member Functions | |
|---|---|
| ~CColorList() | |
| IMPORT_C void | AddColorArrayL(TUid, CColorArray *) |
| IMPORT_C TRgb | Color(TLogicalColor) |
| IMPORT_C TRgb | Color(TUid, TInt) |
| IMPORT_C CColorArray * | ColorArray(TUid) |
| IMPORT_C TBool | ContainsColorArray(TUid) |
| IMPORT_C TInt | Count() |
| IMPORT_C void | DeleteColorArray(TUid) |
| IMPORT_C void | ExternalizeL(RWriteStream &) |
| IMPORT_C void | InternalizeL(RReadStream &) |
| IMPORT_C void | MergeL(const CColorList &) |
| IMPORT_C CColorList * | NewL(CArrayFix< TRgb > *) |
| IMPORT_C CColorList * | NewLC() |
| IMPORT_C void | SetColor(TLogicalColor, TRgb) |
A palette that maps logical colours (TLogicalColor) to physical (TRgb) values. It also supports independent sections for applications: a section is identified by an application UID, and the mappings are held as a colour array (CColorArray).
A colour list also supports mapping for both four-grey and 256-colour schemes; the 256-colour scheme will be used and will look good if the screen mode supports 16 or more colours. Otherwise, the four-grey scheme will be used.
| IMPORT_C void | AddColorArrayL | ( | TUid | aApp, |
| CColorArray * | aArray | |||
| ) | ||||
Creates a new entry in the colour list with the specified application UID and its colour array.
| Parameters | |
|---|---|
| aApp | The UID of the application. |
| aArray | The application's colour array. The colour list takes ownership. |
| IMPORT_C TRgb | Color | ( | TLogicalColor | aColor | ) | const |
Gets the physical colour (TRgb) equivalent of a logical colour.
| Parameters | |
|---|---|
| aColor | Logical colour value. |
| Panic Codes | |
|---|---|
| EGUL | 3 The logical color specified is not found in the colour list. |
Gets the physical colour (TRgb) equivalent of a logical colour from the specified application's colour array.
| Parameters | |
|---|---|
| aApp | The UID of the application. |
| aColor | A logical colour supported by the application. |
| Panic Codes | |
|---|---|
| EGUL | 6 The specified application does not have an entry in the colour list. |
| IMPORT_C CColorArray * | ColorArray | ( | TUid | aApp | ) | const |
Gets an application's colour array.
| Parameters | |
|---|---|
| aApp | The UID of the application. |
| Panic Codes | |
|---|---|
| EGUL | 6 The specified application does not have an entry in the colour list. |
| IMPORT_C TInt | Count | ( | ) | const |
Gets the number of colors in the list.
| IMPORT_C void | DeleteColorArray | ( | TUid | aApp | ) |
Deletes the entry in the colour list for the specified application, and deletes the application's colour array.
| Parameters | |
|---|---|
| aApp | The UID of the application whose entry is deleted from the colour list. |
| Panic Codes | |
|---|---|
| EGUL | 6 The specified application does not have an entry in the colour list. |
| IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Externalises the colour list to a write stream.
| Parameters | |
|---|---|
| aStream | Stream to which the object should be externalised. |
| IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) |
Internalises the colour list from a read stream.
| Parameters | |
|---|---|
| aStream | Stream from which the object should be internalised. |
| IMPORT_C void | MergeL | ( | const CColorList & | aList | ) |
Merges the specified CColorList with target object.
| Parameters | |
|---|---|
| aList | A reference to the colour list object, set by calling CColorList::AddColorArray() |
| IMPORT_C CColorList * | NewL | ( | CArrayFix< TRgb > * | aColors | ) | [static] |
Allocates and constructs a new colour list.
| Parameters | |
|---|---|
| aColors | The array of physical colours to store in the list. The colour list takes ownership. |
| IMPORT_C CColorList * | NewLC | ( | ) | [static] |
Allocates and constructs a new colour list and puts the pointer to the new colour list object onto the cleanup stack.
| IMPORT_C void | SetColor | ( | TLogicalColor | aLogicalColor, |
| TRgb | aColor | |||
| ) | ||||
Sets the TRgb colour value that a logical colour maps to.
| Parameters | |
|---|---|
| aLogicalColor | The logical colour that needs to be set. |
| aColor | The TRgb colour value. |