Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUi_UiBuilderControlLayout.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 * @file    FUi_UiBuilderControlLayout.h
19 * @brief      This is the header file for the %_UiBuilderControlLayout class.
20 *
21 * This header file contains the declarations of the %_UiBuilderControlLayout class.
22 */
23
24 #ifndef _FUI_INTERNAL_UI_BUILDER_CONTROL_LAYOUT_H_
25 #define _FUI_INTERNAL_UI_BUILDER_CONTROL_LAYOUT_H_
26
27 #include <FGrpRectangle.h>
28 #include "FUi_UiBuilderControlItem.h"
29
30 namespace Tizen { namespace Ui
31 {
32 /**
33 * @class   _UiBuilderControlLayout
34 * @brief      This class is an implementation of a %_UiBuilderControlLayout.
35 * @since 2.0
36 *
37 * The %_UiBuilderControlLayout Class contains that coordinates of the control.
38 *
39 *
40 */
41 class _OSP_EXPORT_ _UiBuilderControlLayout
42         : public Tizen::Base::Object
43 {
44 public:
45         _UiBuilderControlLayout(void);
46         virtual ~_UiBuilderControlLayout(void);
47         void SetStyle(const Tizen::Base::String& style);
48         void SetRect(const Tizen::Base::String& x, const Tizen::Base::String& y, Tizen::Base::String& width, Tizen::Base::String& height);
49         void SetRect(const int x, const int y, const int width, const int height);
50         void SetLayoutElement(int index, const Tizen::Base::String& name, const Tizen::Base::String& value);
51         Tizen::Base::String GetStyle(void) const;
52         Tizen::Graphics::Rectangle& GetRect(void) const;
53         bool GetLayoutElement(const Tizen::Base::String& layoutElementName, Tizen::Base::String& outValue) const;
54
55 private:
56         _UiBuilderControlLayout(const _UiBuilderControlLayout& rhs);
57         _UiBuilderControlLayout& operator =(const _UiBuilderControlLayout& rhs);
58         enum _UiBuilderDockTypeDef
59         {
60                 _UIBUILDER_DOCK_LEFT = 0x00001,
61                 _UIBUILDER_DOCK_RIGHT = 0x00002,
62                 _UIBUILDER_DOCK_TOP = 0x00004,
63                 _UIBUILDER_DOCK_BOTTOM = 0x00008
64         };
65
66         enum _UiBuilderFitTypeDef
67         {
68                 _UIBUILDER_FIT_WIDTH = 0x00001,
69                 _UIBUILDER_FIT_HEIGHT = 0x00002
70         };
71
72 protected:
73         Tizen::Base::String _styleInformation; /** stored the style information. It is different each control.*/
74         Tizen::Graphics::Rectangle _rect; /** stored rectangle value. This values are ignored sometimes by the Docking and Fit value. */
75         _UiBuilderControlElement _layoutElement[UIBUILDER_CONTROL_ELEMENT_NUMBER];
76 }; // _UiBuilderControlLayout
77
78 } } // Tizen::Ui
79
80 #endif //_FUI_INTERNAL_UI_BUILDER_CONTROL_LAYOUT_H_