williamr@2: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __COECOLORUSE_H__ williamr@2: #define __COECOLORUSE_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: /** Logical colour used when drawing in controls. williamr@2: williamr@2: This class pairs a logical colour value with an explanation of how it is used williamr@2: when drawing a control. The explanation is in terms of categories of use, e.g. williamr@2: in the TGround category, the colour can used for either the foreground or williamr@2: background. williamr@2: williamr@2: @publishedAll williamr@2: @released */ williamr@2: class TCoeColorUse williamr@2: { williamr@2: public: williamr@2: /** Foreground and background category flags */ williamr@2: enum TGround williamr@2: { williamr@2: /** The logical colour is used to draw the control when it is in the foreground. */ williamr@2: EFore=0x01, williamr@2: /** The logical colour is used to draw the control when it is in the background. */ williamr@2: EBack=0x02 williamr@2: }; williamr@2: williamr@2: /** Flags that control the area in which colour is used. */ williamr@2: enum TAreas williamr@2: { williamr@2: /** The logical colour is used to draw a control's contents. */ williamr@2: EContents=0x10, williamr@2: /** The logical colour is used to draw a control's highlighted contents. */ williamr@2: EHighlights=0x20, williamr@2: /** The logical colour is used to draw a control's surrounds. */ williamr@2: ESurrounds=0x40, williamr@2: /** The logical colour is used to draw a control's borders. */ williamr@2: EBorders=0x80 williamr@2: }; williamr@2: williamr@2: /** Focus category flags */ williamr@2: enum TFocus williamr@2: { williamr@2: /** The logical colour is used to draw the control when active and either focused williamr@2: or unfocused. */ williamr@2: EActive=0x100, williamr@2: /** The logical colour is used to draw the control when dimmed and either focused williamr@2: or unfocused. */ williamr@2: EDimmed=0x200, williamr@2: /** The logical colour is used to draw the control when it is shadowed. */ williamr@2: EShadowed=0x400, williamr@2: /** The logical colour is used to draw the control when focused and pressed. */ williamr@2: EPressed=0x800 williamr@2: }; williamr@2: williamr@2: /** State category flags */ williamr@2: enum TState williamr@2: { williamr@2: /** The logical colour is used to draw the control in the normal state. */ williamr@2: ENormal=0x1000, williamr@2: /** The logical colour is used to draw the control in the set state. */ williamr@2: ESet=0x2000, williamr@2: /** The logical colour is used to draw the control in the checked state. */ williamr@2: EChecked=0x4000 williamr@2: }; williamr@2: williamr@2: /** Tone flags */ williamr@2: enum TTones williamr@2: { williamr@2: /** The logical colour is used to draw the control in neutral tones. */ williamr@2: ENeutral=0x10000, williamr@2: /** The logical colour is used to draw the control in light tones. */ williamr@2: ELight=0x20000, williamr@2: /** The logical colour is used to draw the control in midlight tones. */ williamr@2: EMidLight=0x40000, williamr@2: /** The logical colour is used to draw the control in mid tones. */ williamr@2: EMid=0x80000, williamr@2: /** The logical colour is used to draw the control in dark tones. */ williamr@2: EDark=0x100000 williamr@2: }; williamr@2: public: williamr@2: IMPORT_C TCoeColorUse(); williamr@2: // williamr@2: IMPORT_C void SetUse(TInt aUse); williamr@2: IMPORT_C void SetLogicalColor(TInt aLogicalColor); williamr@2: IMPORT_C TInt LogicalColor() const; williamr@2: IMPORT_C TInt Use() const; williamr@2: // williamr@2: IMPORT_C TBool IsForeground() const; williamr@2: IMPORT_C TBool IsBackground() const; williamr@2: // williamr@2: IMPORT_C TBool IsContents() const; williamr@2: IMPORT_C TBool IsHighlights() const; williamr@2: IMPORT_C TBool IsSurrounds() const; williamr@2: IMPORT_C TBool IsBorders() const; williamr@2: IMPORT_C TBool IsActive() const; williamr@2: IMPORT_C TBool IsDimmed() const; williamr@2: IMPORT_C TBool IsPressed() const; williamr@2: IMPORT_C TBool IsNormal() const; williamr@2: IMPORT_C TBool IsSet() const; williamr@2: private: williamr@2: TInt iLogicalColor; williamr@2: TInt iUse; williamr@2: TInt iTCoeColorUse_Reserved1; williamr@2: }; williamr@2: williamr@2: williamr@2: #endif // __COECOLORUSE_H__