»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Application Framework EGUL »
CColorList
Location:
gulcolor.h
Link against: egul.lib
class CColorList : public CBase;
Description
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.
Derivation
CBase
- Base class for all classes to be instantiated on the heap
CColorList
- A palette that maps logical colours (TLogicalColor) to physical (
TRgb) values
Members
Defined in CColorList
:
AddColorArrayL()
, Color()
, Color()
, ColorArray()
, ContainsColorArray()
, Count()
, DeleteColorArray()
, ExternalizeL()
, InternalizeL()
, MergeL()
, NewL()
, NewLC()
, SetColor()
, ~CColorList()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Construction and destruction
static IMPORT_C CColorList *NewL(CArrayFix< TRgb > *aColors);
Description
Allocates and constructs a new colour list.
Parameters
CArrayFix < TRgb > *aColors |
The array of physical colours to store in the list. The colour list takes ownership.
|
|
Return value
IMPORT_C ~CColorList();
Description
Destructor.
static IMPORT_C CColorList *NewLC();
Description
Allocates and constructs a new colour list and puts the pointer to the new colour list object onto the cleanup stack.
Return value
IMPORT_C TRgb Color(TLogicalColor aColor) const;
Description
Gets the physical colour (TRgb
) equivalent of a logical colour.
Parameters
Return value
TRgb
|
The physical colour equivalent of aColor.
|
|
Panic codes
EGUL |
3 The logical color specified is not found in the colour list.
|
|
IMPORT_C TInt Count() const;
Description
Gets the number of colors in the list.
Return value
TInt
|
The number of colors in the list
|
|
IMPORT_C TRgb Color(TUid aApp, TInt aColor) const;
Description
Gets the physical colour (TRgb
) equivalent of a logical colour from the specified application's colour array.
Parameters
TUid aApp |
The UID of the application.
|
TInt aColor |
A logical colour supported by the application.
|
|
Return value
TRgb
|
The physical colour equivalent of the logical colour.
|
|
Panic codes
EGUL |
6 The specified application does not have an entry in the colour list.
|
|
IMPORT_C CColorArray *ColorArray(TUid aApp) const;
Description
Gets an application's colour array.
Parameters
TUid aApp |
The UID of the application.
|
|
Return value
CColorArray *
|
The specified application's colour array. The caller does not take ownership.
|
|
Panic codes
EGUL |
6 The specified application does not have an entry in the colour list.
|
|
IMPORT_C TBool ContainsColorArray(TUid aApp) const;
Description
Tests whether the specified application has an entry in the colour list.
Parameters
TUid aApp |
The UID of the application.
|
|
Return value
TBool
|
True if a colour array is found for the application, false if not.
|
|
IMPORT_C void SetColor(TLogicalColor aLogicalColor, TRgb aColor);
Description
Sets the TRgb
colour value that a logical colour maps to.
Parameters
IMPORT_C void AddColorArrayL(TUid aApp, CColorArray *aArray);
Description
Creates a new entry in the colour list with the specified application UID and its colour array.
Parameters
TUid aApp |
The UID of the application.
|
CColorArray *aArray |
The application's colour array. The colour list takes ownership.
|
|
IMPORT_C void DeleteColorArray(TUid aApp);
Description
Deletes the entry in the colour list for the specified application, and deletes the application's colour array.
Parameters
TUid 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 InternalizeL(RReadStream &aStream);
Description
Internalises the colour list from a read stream.
Parameters
RReadStream &aStream |
Stream from which the object should be internalised.
|
|
IMPORT_C void ExternalizeL(RWriteStream &aStream) const;
Description
Externalises the colour list to a write stream.
Parameters
RWriteStream &aStream |
Stream to which the object should be externalised.
|
|
IMPORT_C void MergeL(const CColorList &aList);
Description
Merges the specified CColorList with target object.
Parameters
const CColorList &aList |
A reference to the colour list object, set by calling CColorList::AddColorArray()
|
|