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