epoc32/include/coefont.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/coefont.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/coefont.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,81 @@
     1.4 -coefont.h
     1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// 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
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +#ifndef __COEFONT_H__
    1.21 +#define __COEFONT_H__
    1.22 +
    1.23 +#include <e32def.h>
    1.24 +#include <gdi.h>
    1.25 +
    1.26 +/** A class to simplify font usage
    1.27 +
    1.28 +@publishedAll
    1.29 +@released
    1.30 +*/
    1.31 +class TCoeFont 
    1.32 +	{ 
    1.33 +public: 
    1.34 +	enum TFlags 
    1.35 +		{ 
    1.36 +		ENoFlags = 0x00, 
    1.37 +		ENonZooming = 0x01 
    1.38 +		}; 
    1.39 +
    1.40 +	enum TLogicalSize 
    1.41 +		{ 
    1.42 +		EExtraSmall = 0, 
    1.43 +		ESmall, 
    1.44 +		EMedium, 
    1.45 +		ELarge, 
    1.46 +		EExtraLarge,
    1.47 +		EUndefinedSize = -1
    1.48 +		};         
    1.49 +
    1.50 +	enum TStyle 
    1.51 +		{ 
    1.52 +		EPlain = 0x00, 
    1.53 +		EItalic = 0x01, 
    1.54 +		EBold = 0x02, 
    1.55 +		ESuper = 0x04, 
    1.56 +		ESub = 0x08 
    1.57 +		}; 
    1.58 +
    1.59 +public:
    1.60 +	IMPORT_C TCoeFont(TLogicalSize aSize, TInt aStyle, TInt aFlags = ENoFlags); 
    1.61 +	IMPORT_C TCoeFont(TInt aHeightInPixels, TInt aStyle, TInt aFlags = ENoFlags); 
    1.62 +	IMPORT_C TCoeFont(const TCoeFont& aFont);
    1.63 +	IMPORT_C TCoeFont(); 
    1.64 +	IMPORT_C static TCoeFont NormalFont(TInt aFlags = ENoFlags);	// Medium, Plain 
    1.65 +	IMPORT_C static TCoeFont LegendFont(TInt aFlags = ENoFlags);	// Medium, Bold 
    1.66 +	IMPORT_C static TCoeFont AnnotationFont(TInt aFlags = ENoFlags);// Small, Plain 
    1.67 +	IMPORT_C static TCoeFont TitleFont(TInt aFlags = ENoFlags);		// Large, Bold 
    1.68 +public: // properties         
    1.69 +	IMPORT_C TLogicalSize LogicalSize() const; 
    1.70 +	IMPORT_C TInt HeightInPixels() const; 
    1.71 +	IMPORT_C TFontStyle Style() const; 
    1.72 +	IMPORT_C TBool IsNonZooming() const; 
    1.73 +public:         
    1.74 +	static TInt Compare(const TCoeFont& aFirst, const TCoeFont& aSecond); 
    1.75 +private: 
    1.76 +	TLogicalSize iLogicalSize; 
    1.77 +	TInt8 iHeightInPixels; 
    1.78 +	TInt8 iStyle; 
    1.79 +	TInt8 iFlags; 
    1.80 +	TTypeface iTypeface;	// Member unused at the moment but included for possible future extension
    1.81 +private:         
    1.82 +	TInt iSpare; 
    1.83 +	}; 
    1.84 +
    1.85 +#endif	// __COEFONT_H__