epoc32/include/mw/coecoloruse.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 epoc32/include/coecoloruse.h@2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
williamr@2
     1
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     4
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
#ifndef __COECOLORUSE_H__
williamr@2
    17
#define __COECOLORUSE_H__
williamr@2
    18
williamr@2
    19
#include <e32std.h>
williamr@2
    20
williamr@2
    21
/** Logical colour used when drawing in controls.
williamr@2
    22
williamr@2
    23
This class pairs a logical colour value with an explanation of how it is used 
williamr@2
    24
when drawing a control. The explanation is in terms of categories of use, e.g. 
williamr@2
    25
in the TGround category, the colour can used for either the foreground or 
williamr@2
    26
background. 
williamr@2
    27
williamr@2
    28
@publishedAll 
williamr@2
    29
@released */
williamr@2
    30
class TCoeColorUse
williamr@2
    31
    {
williamr@2
    32
public:
williamr@2
    33
	/** Foreground and background category flags */
williamr@2
    34
	enum TGround
williamr@2
    35
		{
williamr@2
    36
		/** The logical colour is used to draw the control when it is in the foreground. */
williamr@2
    37
		EFore=0x01,
williamr@2
    38
		/** The logical colour is used to draw the control when it is in the background. */
williamr@2
    39
		EBack=0x02
williamr@2
    40
		};
williamr@2
    41
williamr@2
    42
	/** Flags that control the area in which colour is used. */
williamr@2
    43
	enum TAreas
williamr@2
    44
		{
williamr@2
    45
		/** The logical colour is used to draw a control's contents. */
williamr@2
    46
		EContents=0x10,
williamr@2
    47
		/** The logical colour is used to draw a control's highlighted contents. */
williamr@2
    48
		EHighlights=0x20,
williamr@2
    49
		/** The logical colour is used to draw a control's surrounds. */
williamr@2
    50
		ESurrounds=0x40,
williamr@2
    51
		/** The logical colour is used to draw a control's borders. */
williamr@2
    52
		EBorders=0x80
williamr@2
    53
		};
williamr@2
    54
williamr@2
    55
	/** Focus category flags */
williamr@2
    56
	enum TFocus
williamr@2
    57
		{
williamr@2
    58
		/** The logical colour is used to draw the control when active and either focused 
williamr@2
    59
		or unfocused. */
williamr@2
    60
		EActive=0x100,
williamr@2
    61
		/** The logical colour is used to draw the control when dimmed and either focused 
williamr@2
    62
		or unfocused. */
williamr@2
    63
		EDimmed=0x200,
williamr@2
    64
		/** The logical colour is used to draw the control when it is shadowed. */
williamr@2
    65
		EShadowed=0x400,	
williamr@2
    66
		/** The logical colour is used to draw the control when focused and pressed. */
williamr@2
    67
		EPressed=0x800
williamr@2
    68
		};
williamr@2
    69
williamr@2
    70
	/** State category flags */
williamr@2
    71
	enum TState
williamr@2
    72
		{
williamr@2
    73
		/** The logical colour is used to draw the control in the normal state. */
williamr@2
    74
		ENormal=0x1000,
williamr@2
    75
		/** The logical colour is used to draw the control in the set state. */
williamr@2
    76
		ESet=0x2000,
williamr@2
    77
		/** The logical colour is used to draw the control in the checked state. */
williamr@2
    78
		EChecked=0x4000
williamr@2
    79
		};
williamr@2
    80
williamr@2
    81
	/** Tone flags */
williamr@2
    82
	enum TTones
williamr@2
    83
		{
williamr@2
    84
		/** The logical colour is used to draw the control in neutral tones. */
williamr@2
    85
		ENeutral=0x10000,
williamr@2
    86
		/** The logical colour is used to draw the control in light tones. */
williamr@2
    87
		ELight=0x20000,
williamr@2
    88
		/** The logical colour is used to draw the control in midlight tones. */
williamr@2
    89
		EMidLight=0x40000,
williamr@2
    90
		/** The logical colour is used to draw the control in mid tones. */
williamr@2
    91
		EMid=0x80000,
williamr@2
    92
		/** The logical colour is used to draw the control in dark tones. */
williamr@2
    93
		EDark=0x100000
williamr@2
    94
		};
williamr@2
    95
public:
williamr@2
    96
	IMPORT_C TCoeColorUse();
williamr@2
    97
	//
williamr@2
    98
	IMPORT_C void SetUse(TInt aUse);
williamr@2
    99
	IMPORT_C void SetLogicalColor(TInt aLogicalColor);
williamr@2
   100
	IMPORT_C TInt LogicalColor() const;
williamr@2
   101
	IMPORT_C TInt Use() const;
williamr@2
   102
	//
williamr@2
   103
	IMPORT_C TBool IsForeground() const;
williamr@2
   104
	IMPORT_C TBool IsBackground() const;
williamr@2
   105
	//
williamr@2
   106
	IMPORT_C TBool IsContents() const;
williamr@2
   107
	IMPORT_C TBool IsHighlights() const;
williamr@2
   108
	IMPORT_C TBool IsSurrounds() const;
williamr@2
   109
	IMPORT_C TBool IsBorders() const;
williamr@2
   110
	IMPORT_C TBool IsActive() const;
williamr@2
   111
	IMPORT_C TBool IsDimmed() const;
williamr@2
   112
	IMPORT_C TBool IsPressed() const;
williamr@2
   113
	IMPORT_C TBool IsNormal() const;
williamr@2
   114
	IMPORT_C TBool IsSet() const;
williamr@2
   115
private:
williamr@2
   116
    TInt iLogicalColor;
williamr@2
   117
	TInt iUse;
williamr@2
   118
	TInt iTCoeColorUse_Reserved1;
williamr@2
   119
    };
williamr@2
   120
williamr@2
   121
williamr@2
   122
#endif // __COECOLORUSE_H__