epoc32/include/coefont.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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 __COEFONT_H__
    17 #define __COEFONT_H__
    18 
    19 #include <e32def.h>
    20 #include <gdi.h>
    21 
    22 /** A class to simplify font usage
    23 
    24 @publishedAll
    25 @released
    26 */
    27 class TCoeFont 
    28 	{ 
    29 public: 
    30 	enum TFlags 
    31 		{ 
    32 		ENoFlags = 0x00, 
    33 		ENonZooming = 0x01 
    34 		}; 
    35 
    36 	enum TLogicalSize 
    37 		{ 
    38 		EExtraSmall = 0, 
    39 		ESmall, 
    40 		EMedium, 
    41 		ELarge, 
    42 		EExtraLarge,
    43 		EUndefinedSize = -1
    44 		};         
    45 
    46 	enum TStyle 
    47 		{ 
    48 		EPlain = 0x00, 
    49 		EItalic = 0x01, 
    50 		EBold = 0x02, 
    51 		ESuper = 0x04, 
    52 		ESub = 0x08 
    53 		}; 
    54 
    55 public:
    56 	IMPORT_C TCoeFont(TLogicalSize aSize, TInt aStyle, TInt aFlags = ENoFlags); 
    57 	IMPORT_C TCoeFont(TInt aHeightInPixels, TInt aStyle, TInt aFlags = ENoFlags); 
    58 	IMPORT_C TCoeFont(const TCoeFont& aFont);
    59 	IMPORT_C TCoeFont(); 
    60 	IMPORT_C static TCoeFont NormalFont(TInt aFlags = ENoFlags);	// Medium, Plain 
    61 	IMPORT_C static TCoeFont LegendFont(TInt aFlags = ENoFlags);	// Medium, Bold 
    62 	IMPORT_C static TCoeFont AnnotationFont(TInt aFlags = ENoFlags);// Small, Plain 
    63 	IMPORT_C static TCoeFont TitleFont(TInt aFlags = ENoFlags);		// Large, Bold 
    64 public: // properties         
    65 	IMPORT_C TLogicalSize LogicalSize() const; 
    66 	IMPORT_C TInt HeightInPixels() const; 
    67 	IMPORT_C TFontStyle Style() const; 
    68 	IMPORT_C TBool IsNonZooming() const; 
    69 public:         
    70 	static TInt Compare(const TCoeFont& aFirst, const TCoeFont& aSecond); 
    71 private: 
    72 	TLogicalSize iLogicalSize; 
    73 	TInt8 iHeightInPixels; 
    74 	TInt8 iStyle; 
    75 	TInt8 iFlags; 
    76 	TTypeface iTypeface;	// Member unused at the moment but included for possible future extension
    77 private:         
    78 	TInt iSpare; 
    79 	}; 
    80 
    81 #endif	// __COEFONT_H__