Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <GULCOLOR.H>
Link against: egul.lib

Class CColorArray

class CColorArray : public CBase;

Description

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

Derivation

Members

Defined in CColorArray:

Inherited from CBase:


Construction and destruction


NewL()

IMPORT_C static CColorArray* NewL();

Description

Creates a colour array.

Return value

CColorArray *

Pointer to the colour array.


NewLC()

IMPORT_C static CColorArray* NewLC();

Description

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

Return value

CColorArray *

Pointer to the colour array.


~CColorArray()

IMPORT_C ~CColorArray();

Description

Destructor.

[Top]


Member functions


Color(TInt)const

IMPORT_C TRgb Color(TInt aLogicalColor) const;

Description

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

Parameters

TInt aLogicalColor

The logical colour.

Return value

TRgb

The TRgb value.

Panic codes

EGUL

3 The logical colour specified is not found in the colour array.


SetColor(TInt,TRgb)

IMPORT_C void SetColor(TInt aLogicalColor, TRgb aColor);

Description

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

Parameters

TInt aLogicalColor

The logical colour.

TRgb aColor

The TRgb value.

Panic codes

EGUL

3 The logical colour specified is not found in the colour array.


Contains(TInt)const

IMPORT_C TBool Contains(TInt aLogicalColor) const;

Description

Tests whether the colour array contains the specified logical colour.

Parameters

TInt aLogicalColor

The logical colour.

Return value

TBool

True if the logical colour is found in the colour array, false if not.


Count()const

IMPORT_C TInt Count() const;

Description

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

Return value

TInt

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


Reset()

IMPORT_C void Reset();

Description

Resets the colour array.


AddL(TInt,TRgb)

IMPORT_C void AddL(TInt aLogicalColor, TRgb aColor);

Description

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

Parameters

TInt aLogicalColor

The logical colour.

TRgb aColor

The TRgb colour.

Panic codes

EGUL

4 The logical colour specified already exists in the array. Debug builds only.


Remove(TInt)

IMPORT_C void Remove(TInt aLogicalColor);

Description

Removes a logical to physical colour mapping from the array.

Parameters

TInt aLogicalColor

The logical colour to remove.

Panic codes

EGUL

3 The logical colour specified is not found in the array.