Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: gulcolor.h
Link against: egul.lib

Class CColorList

CColorList

Support

Supported from 6.0

Description

Provides a list of colours for an array.

A colour list is a type of palette used to map logical colours into TRgb values. It supports logical-to-Rgb colour mappings that are loaded from resource files or specified in the program. It supports independent sections for applications: a section is identified by an application UID, and held as an array list.

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

CBaseBase class for all classes to be instantiated on the heap
CColorListProvides a list of colours for an array

Defined in CColorList:
AddColorArrayL(), Color(), ColorArray(), ContainsColorArray(), DeleteColorArray(), ExternalizeL(), InternalizeL(), MergeL(), NewL(), SetColor(), ~CColorList()

Inherited from CBase:
operator new()


Construction/destruction


NewL()

static CColorList* NewL(CArrayFix<TRgb>* aColors);

Description

Creates a new colour list.

Parameters

CArrayFix<TRgb>* aColors

List of colours.

Return value

CColorList*

The colour list.


~CColorList()

~CColorList();

Description

Destructor.

[Top]


Colour settings


Color()

TRgb Color(TLogicalColor aColor) const;

Description

Gets the physical (TRgb) colour which corresponds to a logical colour.

Parameters

TLogicalColor aColor

Logical colour value.

Return value

TRgb

The physical colour which corresponds to aColor.


Color()

TRgb Color(TUid aApp,TInt aColor) const;

Description

Gets the physical (TRgb) colour which corresponds to the specified logical colour for the specified application.

Parameters

TUid aApp

The application.

TInt aColor

The logical colour.

Return value

TRgb

The physical colour which corresponds to the logical colour.


ColorArray()

CColorArray* ColorArray(TUid aApp) const;

Description

Gets the color array for an application.

Parameters

TUid aApp

The application.

Return value

CColorArray*

Pointer to the colour array.


ContainsColorArray()

TBool ContainsColorArray(TUid aApp) const;

Description

Tests whether a colour array has been set for the specified application.

Parameters

TUid aApp

The application.

Return value

TBool

ETrue if a colour array has been set.

[Top]


Add/delete colour arrays


SetColor()

void SetColor(TLogicalColor aLogicalColor,TRgb aColor);

Description

Sets the TRgb colour of the logical colour.

Parameters

TLogicalColor aLogicalColor

The logical colour.

TRgb aColor

The TRgb colour.


AddColorArrayL()

void AddColorArrayL(TUid aApp,CColorArray* aArray);

Description

Adds a colour array for a specified application to the color list.

Parameters

TUid aApp

The application.

CColorArray* aArray

The colour array.


DeleteColorArray()

void DeleteColorArray(TUid aApp);

Description

Deletes the colour array for the specified application from the color list.

Parameters

TUid aApp

The application.


MergeL()

void MergeL(const CColorList& aList);

Description

Merges the colour list with another colour list.

Parameters

const CColorList& aList

The colour list to merge.

[Top]


Stream persistence


InternalizeL()

void InternalizeL(RReadStream& aStream);

Description

Internalises the colour list.

Parameters

RReadStream& aStream

Stream from which the the colour list should be internalised.


ExternalizeL()

void ExternalizeL(RWriteStream& aStream) const;

Description

Externalises the colour list.

Parameters

RWriteStream& aStream

Stream to which the the colour list should be externalised.