|
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 CWsScreenDevice; |
|
27 |
|
28 NONSHARABLE_CLASS(CAknFontIdLayoutFont) : public CAknLayoutFont |
|
29 { |
|
30 |
|
31 public: // Constructors and destructor |
|
32 |
|
33 /** |
|
34 * Create a layout font object from the passed in font id. |
|
35 */ |
|
36 IMPORT_C static CAknFontIdLayoutFont* NewL( CWsScreenDevice& aScreenDevice, TInt aFontId ); |
|
37 |
|
38 /** |
|
39 * C++ Destructor. |
|
40 */ |
|
41 virtual ~CAknFontIdLayoutFont(); |
|
42 |
|
43 /** |
|
44 */ |
|
45 void ConstructL(); |
|
46 |
|
47 public: // New functions |
|
48 |
|
49 /** |
|
50 * Extract the font id from the object |
|
51 * |
|
52 * @return the identifier currently set in the font |
|
53 */ |
|
54 IMPORT_C TInt FontId() const; |
|
55 |
|
56 /** |
|
57 * Change the font id and update the binding of the font |
|
58 * |
|
59 * @param aFontId The new font id. |
|
60 */ |
|
61 IMPORT_C void UpdateId( TInt aFontId ); |
|
62 |
|
63 public: // Functions from CFont |
|
64 |
|
65 public:// Functions from CFbsFont |
|
66 |
|
67 private: // Functions from CAknLayoutFont |
|
68 CFbsFont* SupplyFont(); |
|
69 |
|
70 TAknTextDecorationMetrics DoTextDecorationMetrics() const; |
|
71 |
|
72 TAknFontSpecification DoFontSpecification() const; |
|
73 |
|
74 TInt DoAscentForCharacter( TChar aCharacter ) const; |
|
75 |
|
76 void Reserved_1(); |
|
77 |
|
78 private: |
|
79 |
|
80 /** |
|
81 * C++ Constructor. |
|
82 */ |
|
83 CAknFontIdLayoutFont( CWsScreenDevice& aScreenDevice, TInt aFontId ); |
|
84 |
|
85 private: |
|
86 |
|
87 TInt iFontId; |
|
88 TInt iFontProviderId; // Identifier in FontProvider for a callback |
|
89 |
|
90 }; |
|
91 |
|
92 #endif |