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