|
1 /* |
|
2 * Copyright (c) 2007 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: xhtmlfontspecs declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef XHTMLFONTSPECS_H |
|
21 #define XHTMLFONTSPECS_H |
|
22 |
|
23 #include <gdi.h> |
|
24 |
|
25 /** |
|
26 * CXhtmlFontSpecs class is used to encapsulate font-related information |
|
27 * |
|
28 * @code |
|
29 * ?good_class_usage_example(s) |
|
30 * @endcode |
|
31 * |
|
32 * @lib ?library |
|
33 * @since S60 v3.2 |
|
34 */ |
|
35 NONSHARABLE_CLASS( CXhtmlFontSpecs ) : public CBase |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Constructor. |
|
41 */ |
|
42 CXhtmlFontSpecs(); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 virtual ~CXhtmlFontSpecs(); |
|
48 |
|
49 /** |
|
50 * Sets fonts used when constructing the richtext object. |
|
51 * |
|
52 * @since S60 v3.2 |
|
53 * @param aBigFont Big font |
|
54 * @param aDefaultFont Default font |
|
55 * @param aSmallFont Small font |
|
56 * @param aCourierFont Courier font |
|
57 */ |
|
58 void SetFonts( const CFont* aBigFont, |
|
59 const CFont* aDefaultFont, |
|
60 const CFont* aSmallFont, |
|
61 const CFont* aCourierFont ); |
|
62 /** |
|
63 * Returns default font. |
|
64 * |
|
65 * @since S60 v3.2 |
|
66 * @return Default font |
|
67 */ |
|
68 inline const CFont* DefaultFont() { return iDefaultFont; }; |
|
69 |
|
70 /** |
|
71 * Returns courier font. |
|
72 * |
|
73 * @since S60 v3.2 |
|
74 * @return Courier font |
|
75 */ |
|
76 inline const CFont* CourierFont() { return iCourierFont; }; |
|
77 |
|
78 /** |
|
79 * Returns small font. |
|
80 * |
|
81 * @since S60 v3.2 |
|
82 * @return Small font |
|
83 */ |
|
84 inline const CFont* SmallFont() { return iSmallFont; }; |
|
85 |
|
86 /** |
|
87 * Returns big font. |
|
88 * |
|
89 * @since S60 v3.2 |
|
90 * @return Big font |
|
91 */ |
|
92 inline const CFont* BigFont() { return iBigFont; }; |
|
93 |
|
94 /** |
|
95 * Returns font used with <h1> tag. |
|
96 * |
|
97 * @since S60 v3.2 |
|
98 * @return Font used with <h1> tag |
|
99 */ |
|
100 inline const CFont* H1Font() { return iBigFont; }; |
|
101 |
|
102 /** |
|
103 * Returns font used with <h2> tag. |
|
104 * |
|
105 * @since S60 v3.2 |
|
106 * @return Font used with <h2> tag |
|
107 */ |
|
108 inline const CFont* H2Font() { return iBigFont; }; |
|
109 |
|
110 /** |
|
111 * Returns font used with <h3> tag. |
|
112 * |
|
113 * @since S60 v3.2 |
|
114 * @return Font used with <h3> tag |
|
115 */ |
|
116 inline const CFont* H3Font() { return iDefaultFont; }; |
|
117 |
|
118 /** |
|
119 * Returns font used with <h4> tag. |
|
120 * |
|
121 * @since S60 v3.2 |
|
122 * @return Font used with <h4> tag |
|
123 */ |
|
124 inline const CFont* H4Font() { return iDefaultFont; }; |
|
125 |
|
126 /** |
|
127 * Returns font used with <h5> tag. |
|
128 * |
|
129 * @since S60 v3.2 |
|
130 * @return Font used with <h5> tag |
|
131 */ |
|
132 inline const CFont* H5Font() { return iSmallFont; }; |
|
133 |
|
134 /** |
|
135 * Returns font used with <h6> tag. |
|
136 * |
|
137 * @since S60 v3.2 |
|
138 * @return Font used with <h6> tag |
|
139 */ |
|
140 inline const CFont* H6Font() { return iSmallFont; }; |
|
141 |
|
142 |
|
143 private: // data |
|
144 |
|
145 /** |
|
146 * Small font |
|
147 * Not own. |
|
148 */ |
|
149 const CFont* iSmallFont; |
|
150 |
|
151 /** |
|
152 * Default font |
|
153 * Not own. |
|
154 */ |
|
155 const CFont* iDefaultFont; |
|
156 |
|
157 /** |
|
158 * Big font |
|
159 * Not own. |
|
160 */ |
|
161 const CFont* iBigFont; |
|
162 |
|
163 /** |
|
164 * Courier font |
|
165 * Not own. |
|
166 */ |
|
167 const CFont* iCourierFont; |
|
168 }; |
|
169 |
|
170 #endif |
|
171 |
|
172 |
|
173 |