TCoeColorUse Class Reference

#include <mw/coecoloruse.h>

class TCoeColorUse
Public Member Enumerations
enumTAreas { EContents, EHighlights, ESurrounds, EBorders }
enumTFocus { EActive, EDimmed, EShadowed, EPressed }
enumTGround { EFore, EBack }
enumTState { ENormal, ESet, EChecked }
enumTTones { ENeutral, ELight, EMidLight, EMid, EDark }
Public Member Functions
TCoeColorUse()
IMPORT_C TBoolIsActive()
IMPORT_C TBoolIsBackground()
IMPORT_C TBoolIsBorders()
IMPORT_C TBoolIsContents()
IMPORT_C TBoolIsDimmed()
IMPORT_C TBoolIsForeground()
IMPORT_C TBoolIsHighlights()
IMPORT_C TBoolIsNormal()
IMPORT_C TBoolIsPressed()
IMPORT_C TBoolIsSet()
IMPORT_C TBoolIsSurrounds()
IMPORT_C TIntLogicalColor()
IMPORT_C voidSetLogicalColor(TInt)
IMPORT_C voidSetUse(TInt)
IMPORT_C TIntUse()

Detailed Description

Logical colour used when drawing in controls.

This class pairs a logical colour value with an explanation of how it is used when drawing a control. The explanation is in terms of categories of use, e.g. in the TGround category, the colour can used for either the foreground or background.

Member Enumeration Documentation

Enum TAreas

Flags that control the area in which colour is used.

EnumeratorValueDescription
EContents0x10

The logical colour is used to draw a control's contents.

EHighlights0x20

The logical colour is used to draw a control's highlighted contents.

ESurrounds0x40

The logical colour is used to draw a control's surrounds.

EBorders0x80

The logical colour is used to draw a control's borders.

Enum TFocus

Focus category flags

EnumeratorValueDescription
EActive0x100

The logical colour is used to draw the control when active and either focused or unfocused.

EDimmed0x200

The logical colour is used to draw the control when dimmed and either focused or unfocused.

EShadowed0x400

The logical colour is used to draw the control when it is shadowed.

EPressed0x800

The logical colour is used to draw the control when focused and pressed.

Enum TGround

Foreground and background category flags

EnumeratorValueDescription
EFore0x01

The logical colour is used to draw the control when it is in the foreground.

EBack0x02

The logical colour is used to draw the control when it is in the background.

Enum TState

State category flags

EnumeratorValueDescription
ENormal0x1000

The logical colour is used to draw the control in the normal state.

ESet0x2000

The logical colour is used to draw the control in the set state.

EChecked0x4000

The logical colour is used to draw the control in the checked state.

Enum TTones

Tone flags

EnumeratorValueDescription
ENeutral0x10000

The logical colour is used to draw the control in neutral tones.

ELight0x20000

The logical colour is used to draw the control in light tones.

EMidLight0x40000

The logical colour is used to draw the control in midlight tones.

EMid0x80000

The logical colour is used to draw the control in mid tones.

EDark0x100000

The logical colour is used to draw the control in dark tones.

Constructor & Destructor Documentation

TCoeColorUse ( )

IMPORT_CTCoeColorUse()

Constructor.

Member Function Documentation

IsActive ( )

IMPORT_C TBoolIsActive()const

Tests whether the logical colour is active. i.e. whether or not it is used to draw the control when active and either focused or unfocused.

Return Value
ETrue if the logical colour is active, otherwise EFalse.

IsBackground ( )

IMPORT_C TBoolIsBackground()const

Tests whether the logical colour is used as a background colour.

Return Value
ETrue if the logical colour is used as a background colour, otherwise EFalse.

IsBorders ( )

IMPORT_C TBoolIsBorders()const

Tests whether the logical colour is used to draw a control's borders.

Return Value
ETrue if the logical colour is used to draw a control's borders, otherwise EFalse.

IsContents ( )

IMPORT_C TBoolIsContents()const

Tests whether the logical colour is used to draw a control's contents.

The contents are the parts of the control that the user interacts with, e.g. an editor field, the contents of a list box, the page of a web browser. This is opposed to the fascia (or 'surrounds') which are the parts of controls which make up the illusion that the contents are set into some sort of solid frontage.

Return Value
ETrue if the logical colour is used to draw a control's contents, otherwise EFalse.

IsDimmed ( )

IMPORT_C TBoolIsDimmed()const

Tests whether the logical colour is used to draw the control when dimmed and either focused or unfocused.

Return Value
ETrue if the logical colour is used to draw the control when dimmed and either focused or unfocused, otherwise EFalse.

IsForeground ( )

IMPORT_C TBoolIsForeground()const

Tests whether the logical colour is used as a foreground colour.

Return Value
ETrue if the logical colour is used as a foreground colour, otherwise EFalse.

IsHighlights ( )

IMPORT_C TBoolIsHighlights()const

Tests whether the logical colour is used to draw a control's highlighted contents.

Return Value
ETrue if the logical colour is used to draw a control's highlighted contents, otherwise EFalse.

IsNormal ( )

IMPORT_C TBoolIsNormal()const

Tests whether the logical colour is used to draw the control in a normal state.

Return Value
ETrue if the logical colour is used to draw the control in a normal state, otherwise EFalse.

IsPressed ( )

IMPORT_C TBoolIsPressed()const

Tests whether the logical colour is used to draw the control when focused and pressed.

Return Value
ETrue if the logical colour is used to draw the control when focused and pressed, otherwise EFalse.

IsSet ( )

IMPORT_C TBoolIsSet()const

Tests whether the logical colour is used to draw the control in a set state.

Return Value
ETrue if the logical colour is used to draw the control in a set state, otherwise EFalse.

IsSurrounds ( )

IMPORT_C TBoolIsSurrounds()const

Tests whether the logical colour is used to draw a control's surrounds.

Return Value
ETrue if the logical colour is used to draw a control's surrounds, otherwise EFalse.

LogicalColor ( )

IMPORT_C TIntLogicalColor()const

Gets the logical colour which has its use described by this TCoeColourUse.

Return Value
The logical colour.

SetLogicalColor ( TInt )

IMPORT_C voidSetLogicalColor(TIntaLogicalColor)

Sets the logical colour which has its use described by this object.

Parameters
aLogicalColorThe logical colour.

SetUse ( TInt )

IMPORT_C voidSetUse(TIntaUse)

Sets the use of the logical colour.

Parameters
aUseThe use of the logical colour. A valid value describing a colour use consists of choices of one value from each of the enums TGround, TAreas, TFocus, TState and TTones ORed together.

Use ( )

IMPORT_C TIntUse()const

Gets the value describing the use of the logical colour.

Return Value
The use of the logical colour. This is the logical OR of one value from each of the enums TGround, TAreas, TFocus, TState and TTones.