CColorArray Class Reference

#include <mw/gulcolor.h>

Link against: egul.lib

class CColorArray : public CBase

Inherits from

Detailed Description

A dynamic array of mappings between logical and physical colours (TRgb values).

Constructor & Destructor Documentation

~CColorArray ( )

IMPORT_C~CColorArray()

Destructor.

Member Function Documentation

AddL ( TInt, TRgb )

IMPORT_C voidAddL(TIntaLogicalColor,
TRgbaColor
)

Adds a logical to physical colour mapping to the colour array. The specified logical colour must not already exist in the colour array.

Parameters
aLogicalColorThe logical colour.
aColorThe TRgb colour.
Panic Codes
EGUL4 The logical colour specified already exists in the array. Debug builds only.

Color ( TInt )

IMPORT_C TRgbColor(TIntaLogicalColor)const

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

Parameters
aLogicalColorThe logical colour.
Return Value
The TRgb value.
Panic Codes
EGUL3 The logical colour specified is not found in the colour array.

Contains ( TInt )

IMPORT_C TBoolContains(TIntaLogicalColor)const

Tests whether the colour array contains the specified logical colour.

Parameters
aLogicalColorThe logical colour.
Return Value
True if the logical colour is found in the colour array, false if not.

Count ( )

IMPORT_C TIntCount()const

Gets the number of logical to physical colour mappings in the array.

Return Value
The number of logical to physical colour mappings in the array.

ExternalizeL ( RWriteStream & )

voidExternalizeL(RWriteStream &aStream)const

InternalizeL ( RReadStream & )

voidInternalizeL(RReadStream &aStream)

NewL ( )

IMPORT_C CColorArray *NewL()[static]

Creates a colour array.

Return Value
Pointer to the colour array.

NewLC ( )

IMPORT_C CColorArray *NewLC()[static]

Creates a colour array and leaves it on the cleanup stack.

Return Value
Pointer to the colour array.

NewLC ( const CColorArray & )

CColorArray *NewLC(const CColorArray &aArray)[static]

Remove ( TInt )

IMPORT_C voidRemove(TIntaLogicalColor)

Removes a logical to physical colour mapping from the array.

Parameters
aLogicalColorThe logical colour to remove.
Panic Codes
EGUL3 The logical colour specified is not found in the array.

Reset ( )

IMPORT_C voidReset()

Resets the colour array.

SetColor ( TInt, TRgb )

IMPORT_C voidSetColor(TIntaLogicalColor,
TRgbaColor
)

Changes a logical to physical mapping in the colour array. The specified logical colour must already exist in the colour array.

Parameters
aLogicalColorThe logical colour.
aColorThe TRgb value.
Panic Codes
EGUL3 The logical colour specified is not found in the colour array.