TCoeColorUse Class Reference

class TCoeColorUse

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.

Public Member Functions
TCoeColorUse ()
IMPORT_C TBool IsActive ()
IMPORT_C TBool IsBackground ()
IMPORT_C TBool IsBorders ()
IMPORT_C TBool IsContents ()
IMPORT_C TBool IsDimmed ()
IMPORT_C TBool IsForeground ()
IMPORT_C TBool IsHighlights ()
IMPORT_C TBool IsNormal ()
IMPORT_C TBool IsPressed ()
IMPORT_C TBool IsSet ()
IMPORT_C TBool IsSurrounds ()
IMPORT_C TInt LogicalColor ()
IMPORT_C void SetLogicalColor ( TInt )
IMPORT_C void SetUse ( TInt )
IMPORT_C TInt Use ()
Public Member Enumerations
enum TAreas { EContents  = 0x10, EHighlights  = 0x20, ESurrounds  = 0x40, EBorders  = 0x80 }
enum TFocus { EActive  = 0x100, EDimmed  = 0x200, EShadowed  = 0x400, EPressed  = 0x800 }
enum TGround { EFore  = 0x01, EBack  = 0x02 }
enum TState { ENormal  = 0x1000, ESet  = 0x2000, EChecked  = 0x4000 }
enum TTones { ENeutral  = 0x10000, ELight  = 0x20000, EMidLight  = 0x40000, EMid  = 0x80000, EDark  = 0x100000 }
Private Attributes
TInt iLogicalColor
TInt iTCoeColorUse_Reserved1
TInt iUse

Constructor & Destructor Documentation

TCoeColorUse()

IMPORT_C TCoeColorUse ( )

Constructor.

Member Functions Documentation

IsActive()

IMPORT_C TBool IsActive ( ) 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.

IsBackground()

IMPORT_C TBool IsBackground ( ) const

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

IsBorders()

IMPORT_C TBool IsBorders ( ) const

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

IsContents()

IMPORT_C TBool IsContents ( ) 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.

IsDimmed()

IMPORT_C TBool IsDimmed ( ) const

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

IsForeground()

IMPORT_C TBool IsForeground ( ) const

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

IsHighlights()

IMPORT_C TBool IsHighlights ( ) const

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

IsNormal()

IMPORT_C TBool IsNormal ( ) const

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

IsPressed()

IMPORT_C TBool IsPressed ( ) const

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

IsSet()

IMPORT_C TBool IsSet ( ) const

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

IsSurrounds()

IMPORT_C TBool IsSurrounds ( ) const

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

LogicalColor()

IMPORT_C TInt LogicalColor ( ) const

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

SetLogicalColor(TInt)

IMPORT_C void SetLogicalColor ( TInt aLogicalColor )

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

Parameters

TInt aLogicalColor The logical colour.

SetUse(TInt)

IMPORT_C void SetUse ( TInt aUse )

Sets the use of the logical colour.

Parameters

TInt aUse The 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 TInt Use ( ) const

Gets the value describing the use of the logical colour.

Member Enumerations Documentation

Enum TAreas

Flags that control the area in which colour is used.

Enumerators

EContents = 0x10

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

EHighlights = 0x20

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

ESurrounds = 0x40

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

EBorders = 0x80

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

Enum TFocus

Focus category flags

Enumerators

EActive = 0x100

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

EDimmed = 0x200

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

EShadowed = 0x400

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

EPressed = 0x800

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

Enum TGround

Foreground and background category flags

Enumerators

EFore = 0x01

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

EBack = 0x02

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

Enum TState

State category flags

Enumerators

ENormal = 0x1000

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

ESet = 0x2000

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

EChecked = 0x4000

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

Enum TTones

Tone flags

Enumerators

ENeutral = 0x10000

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

ELight = 0x20000

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

EMidLight = 0x40000

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

EMid = 0x80000

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

EDark = 0x100000

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

Member Data Documentation

TInt iLogicalColor

TInt iLogicalColor [private]

TInt iTCoeColorUse_Reserved1

TInt iTCoeColorUse_Reserved1 [private]

TInt iUse

TInt iUse [private]