Fix to adjust the position of the partial Frame
[platform/framework/native/uifw.git] / inc / FUiUiConfiguration.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 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 /**
19  * @file        FUiUiConfiguration.h
20  * @brief       This is the header file for the %UiConfiguration class.
21  *
22  * This header file contains the declarations of the %UiConfiguration class.
23  */
24
25 #ifndef _FUI_UI_CONFIGURATION_H_
26 #define _FUI_UI_CONFIGURATION_H_
27
28 #include <FGrpColor.h>
29 #include <FUiUiConfigurationTypes.h>
30
31 namespace Tizen { namespace Base {
32 class String;
33 }} // Tizen::Base
34
35 namespace Tizen { namespace Ui {
36
37 class _OSP_EXPORT_ UiConfiguration
38 {
39 public:
40         /**
41          * Sets the default font to all the Controls.
42          *
43          * @since 2.0
44          *
45          * @return      An error code
46          * @param[in]   fontName                        The app font name or system font name @n
47          *                                                                      The app font name is retrieved using Tizen::Graphics::GetFaceName(Tizen::Base::String& filepath).
48          *                                                                      The system font name is retrieved using Tizen::Graphics::Font::GetSystemFontListN().
49          *                                                                      Sets an empty string if you want to reset
50          * @exception   E_SUCCESS                       The method is successful.
51          * @exception   E_FILE_NOT_FOUND        The specified font cannot be found or accessed.
52          * @remarks                                             At First, the value of fontName is considered app font name if it matches one of the face names of the font files which is located in '/res/font'.
53          *                                                                      If not, the value of fontName is considered system font name if it matches one of the retrieved values using GetSystemFontListN().
54          * @remarks                                             The control first attempt to find the control font. If it fails, then it searches for the application default font and the system font, in sequence.
55          * @see                                                 GetDefaultFont()
56         */
57         static result SetDefaultFont(const Tizen::Base::String& fontName);
58
59         /**
60         * Gets the default font for all the Controls.
61         *
62         * @since 2.0
63         *
64         * @return                                                       The app font name or system font name @n
65         *                                                                       else an empty string if the default font is not set
66         * @see                                                          SetDefaultFont()
67         */
68         static Tizen::Base::String GetDefaultFont(void);
69
70         /**
71          * Sets the font of the control with the specified file name.
72          *
73          * @since 2.1
74          *
75          * @return             An error code
76          * @param[in]  fileName                                                         The file name of a font-resource located in @b '/res/font', @n
77          *                                                                                                              else sets an empty string to reset
78          * @exception  E_SUCCESS                                                                The method is successful.
79          * @exception  E_FILE_NOT_FOUND                                         The specified font cannot be found or accessed.
80          * @exception  E_UNSUPPORTED_FORMAT                             The specified font format is not supported.
81          * @see        GetDefaultFontFile()
82         */
83         static result SetDefaultFontFromFile(const Tizen::Base::String& fileName);
84
85         /**
86          * Gets a font file name of the control.
87          *
88          * @since 2.1
89          *
90          * @return                                      The font name set in the control  @n
91          *                                                      else an empty string if the font is not set
92          * @see                                 SetDefaultFontFromFile()
93         */
94         static Tizen::Base::String GetDefaultFontFile(void);
95
96         /**
97         * Gets the actual font size
98         *
99         * @since 2.1
100         *
101         * @return                                       An actual font size of given font size string.
102         * @param[in]  sizeString                The predefined string value, such as "giant", "huge", "large", "medium", or "small". @n
103         *                                               It is case-insensitive and can be retrieved using Tizen:System:SettingInfo::GetValue().
104
105         * @remarks                              If the specified @c sizeString is not defined, -1 is returned.
106         */
107         static float GetFontSize(const Tizen::Base::String& sizeString);
108
109         /**
110         * Gets the color of controls
111         *
112         * @since 2.1
113         *
114         * @return     The color of the given color key
115         * @param[in]  colorKey                  The color key. 
116         * @exception  E_SUCCESS         The method is successful.
117         * @exception  E_KEY_NOT_FOUND   The specified color cannot be found or accessed.
118         * @remarks                      1. Color keys are defined in FUiUiConfigurationTypes.h.
119         *                                       2. The specific error code can be accessed using the GetLastResult() method.
120         *                                       3. Using the return value without checking the return value of GetLastResult is prohibited.
121         */
122         static Tizen::Graphics::Color GetColor(int colorKey);
123
124 private:
125         //
126         // This default constructor is intentionally declared as private because this class cannot be constructed.
127         // 
128         UiConfiguration(void);
129
130         //
131         // This destructor is intentionally declared as private because this class cannot be constructed.
132         // 
133          ~UiConfiguration(void);
134
135         //
136         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
137         //
138         UiConfiguration(const UiConfiguration& rhs);
139
140         //
141         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
142         //
143         UiConfiguration& operator =(const UiConfiguration& rhs);
144
145 }; // UiConfiguration
146
147 }} // Tizen::Ui
148
149 #endif // _FUI_UI_CONFIGURATION_H_