73bb35146b2c476354c14ca4437ea5af8a1224c9
[apps/osp/Internet.git] / inc / IntFontManager.h
1 //\r
2 \r
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
4 //\r
5 // Licensed under the Flora License, Version 1.0 (the License);\r
6 // you may not use this file except in compliance with the License.\r
7 // You may obtain a copy of the License at\r
8 //\r
9 //     http://floralicense.org/license/\r
10 //\r
11 // Unless required by applicable law or agreed to in writing, software\r
12 // distributed under the License is distributed on an AS IS BASIS,\r
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14 // See the License for the specific language governing permissions and\r
15 // limitations under the License.\r
16 //\r
17 \r
18 //!Internet\r
19 /*@file:    FontManager.h\r
20  *@brief: This header file contains the declarations of the %FontManager class.\r
21  */\r
22 \r
23 #ifndef _INT_FONT_MANAGER_H_\r
24 #define _INT_FONT_MANAGER_H_\r
25 \r
26 #include <FBase.h>\r
27 #include <FGraphics.h>\r
28 \r
29 \r
30 /**\r
31 * @enum FontId\r
32 *\r
33 * Defines a ID for a different font size\r
34 *\r
35 */\r
36 enum FontId\r
37 {\r
38         FONT_INVALID = -1,\r
39 \r
40         FONT_GT34 = 0,\r
41         FONT_GT32,\r
42         FONT_GT30,\r
43         FONT_GT26,\r
44         FONT_GT20,\r
45         FONT_GT14,\r
46 \r
47         FONT_GP40,\r
48         FONT_GP38,\r
49         FONT_GP36,\r
50         FONT_GP34,\r
51         FONT_GP30,\r
52         FONT_GP26,\r
53         FONT_GP24,\r
54         FONT_GP18,\r
55 \r
56         FONT_GS30,\r
57         FONT_GS34,\r
58 \r
59         MAX_FONT\r
60 };\r
61 \r
62 /**\r
63 * @struct FontTable\r
64 *\r
65 * Defines a table for text fontName, fontStyle and fontSize\r
66 *\r
67 */\r
68 struct FontTable\r
69 {\r
70         Tizen::Graphics::Font* pInstance;\r
71         Tizen::Base::String fontName;\r
72         int fontStyle;\r
73         int fontSize;\r
74 };\r
75 \r
76 /**\r
77  * @class FontManager\r
78  * @brief This class declares functions which can change text font properties\r
79  */\r
80 class FontManager\r
81 {\r
82 public:\r
83         /**\r
84          * Gets the font using fontValue\r
85          *\r
86          * @return      * This header file contains the declarations of the %FontManager class.\r
87          *\r
88          *  pointer to a font value\r
89          * @param[in]   fontValue       The ID of the font\r
90          * @remarks             To work properly, the existing fontValue has to be passed.\r
91          */\r
92         static Tizen::Graphics::Font* GetFont(FontId fontValue);\r
93 \r
94         /**\r
95          * Release all the created fonts\r
96          *\r
97          * @return              no return value\r
98          * @param[in]   no input parameters\r
99          */\r
100         static void ReleaseFonts(void);\r
101 \r
102 private:\r
103         /**\r
104          * Creates a font using fontValue\r
105          *\r
106          * @return              no return value\r
107          * @param[in]   fontValue       The ID of the font\r
108          * @remarks             To work properly, the existing fontValue has to be passed.\r
109          */\r
110         static void CreateFont(FontId fontValue);\r
111 \r
112 };\r
113 \r
114 \r
115 #endif //_INT_FONT_MANAGER_H_\r