|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Interface for Series 60 layout font managed by series 60 font ids |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef AKNFONTIDLAYOUTFONT_H |
|
22 #define AKNFONTIDLAYOUTFONT_H |
|
23 |
|
24 #include "AknLayoutFont.h" |
|
25 |
|
26 class CBitmapDevice; |
|
27 |
|
28 NONSHARABLE_CLASS(CAknFontSpecificationLayoutFont) : public CAknLayoutFont |
|
29 { |
|
30 |
|
31 public: // Constructors and destructor |
|
32 |
|
33 /** |
|
34 * Create a layout font object from the passed in font specification. |
|
35 * The Font category within the specification is the primary determinant of the |
|
36 * typeface that will be selected via fontprovider |
|
37 */ |
|
38 static CAknFontSpecificationLayoutFont* NewL( |
|
39 CBitmapDevice& aScreenDevice, |
|
40 const TAknFontSpecification& aSpec ); |
|
41 |
|
42 /** |
|
43 * Create a layout font object from the passed in Typeface and specification |
|
44 * The FontCategory within the TAknFontSpecifation copied into the constructed object is |
|
45 * is cleared (set to EAknFontCategoryUndefined). Font matching will be performed based upon the |
|
46 * passed in typeface information. |
|
47 */ |
|
48 static CAknFontSpecificationLayoutFont* NewL( |
|
49 CBitmapDevice& aScreenDevice, |
|
50 const TTypeface& aTypeface, |
|
51 const TAknFontSpecification& aSpec ); |
|
52 |
|
53 /** |
|
54 * C++ Destructor. |
|
55 */ |
|
56 virtual ~CAknFontSpecificationLayoutFont(); |
|
57 |
|
58 /** |
|
59 */ |
|
60 void ConstructL(); |
|
61 |
|
62 public: // New functions |
|
63 |
|
64 /** |
|
65 * Change the font specification and update the binding of the font |
|
66 * |
|
67 * @param aFontId The new font specification |
|
68 */ |
|
69 void UpdateWithSpecification( const TAknFontSpecification& aSpec, const TTypeface& aTypeface ); |
|
70 |
|
71 public: // Functions from CFont |
|
72 |
|
73 public:// Functions from CFbsFont |
|
74 |
|
75 private: // Functions from CAknLayoutFont |
|
76 CFbsFont* SupplyFont(); |
|
77 |
|
78 TAknTextDecorationMetrics DoTextDecorationMetrics() const; |
|
79 |
|
80 TAknFontSpecification DoFontSpecification() const; |
|
81 |
|
82 TInt DoAscentForCharacter( TChar aCharacter ) const; |
|
83 |
|
84 void Reserved_1(); |
|
85 |
|
86 private: |
|
87 |
|
88 /** |
|
89 * C++ Constructors. |
|
90 */ |
|
91 CAknFontSpecificationLayoutFont( |
|
92 CBitmapDevice& aScreenDevice, |
|
93 const TAknFontSpecification& aSpec); |
|
94 |
|
95 CAknFontSpecificationLayoutFont( |
|
96 CBitmapDevice& aScreenDevice, |
|
97 const TTypeface& aTypeface, |
|
98 const TAknFontSpecification& aSpec ); |
|
99 |
|
100 private: |
|
101 |
|
102 TAknFontSpecification iSpec; |
|
103 TTypeface iTypeface; |
|
104 TInt iFontProviderId; // Identifier in FontProvider for a callback |
|
105 TBitFlags32 iFlags; |
|
106 TInt iSpare; |
|
107 }; |
|
108 |
|
109 #endif |