Fix for klockwork minor issues.
[platform/framework/native/uifw.git] / inc / FUiLayoutTypes.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0/
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                FUiLayoutTypes.h
20  * @brief               This is the header file for the layout enumerations.
21  *
22  * This header file contains the declarations of the layout enumerations.
23  */
24 #ifndef _FUI_LAYOUT_ENUM_H_
25 #define _FUI_LAYOUT_ENUM_H_
26
27 namespace Tizen { namespace Ui
28 {
29
30 /**
31  *      @enum   LayoutType
32  *
33  *      Defines the layout type.
34  *
35  *  @since      2.0
36  */
37 enum LayoutType
38 {
39         LAYOUT_RELATIVE,       /**< The relative layout */
40         LAYOUT_VERTICAL_BOX,   /**< The vertical box layout */
41         LAYOUT_HORIZONTAL_BOX, /**< The horizontal box layout */
42         LAYOUT_GRID,            /**< The grid layout */
43         LAYOUT_CARD                     /**< The card layout */
44 };
45
46 /**
47  *      @enum   RectangleEdgeRelation
48  *
49  *      Defines the relative relation between the source control and the target control.
50  *
51  *  @since      2.0
52  */
53 enum RectangleEdgeRelation
54 {
55         RECT_EDGE_RELATION_LEFT_TO_LEFT,     /**< The left edge of the source control is aligned with the left edge of the target control */
56         RECT_EDGE_RELATION_LEFT_TO_RIGHT,    /**< The left edge of the source control is aligned with the right edge of the target control */
57         RECT_EDGE_RELATION_RIGHT_TO_RIGHT,   /**< The right edge of the source control is aligned with the right edge of the target control */
58         RECT_EDGE_RELATION_RIGHT_TO_LEFT,    /**< The right edge of the source control is aligned with the left edge of the target control */
59         RECT_EDGE_RELATION_TOP_TO_TOP,       /**< The top edge of the source control is aligned with the top edge of the target control */
60         RECT_EDGE_RELATION_TOP_TO_BOTTOM,    /**< The top edge of the source control is aligned with the bottom edge of the target control */
61         RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM, /**< The bottom edge of the source control is aligned with the bottom edge of the target control */
62         RECT_EDGE_RELATION_BOTTOM_TO_TOP     /**< The bottom edge of the source control is aligned with the top edge of the target control */
63 };
64
65 /**
66  *      @enum   RectangleEdgeType
67  *
68  *      Defines the edges of a rectangle.
69  *
70  *  @since      2.0
71  */
72 enum RectangleEdgeType
73 {
74         RECT_EDGE_LEFT,   /**< The left edge of a rectangle */
75         RECT_EDGE_RIGHT,  /**< The right edge of a rectangle */
76         RECT_EDGE_TOP,    /**< The top edge of a rectangle */
77         RECT_EDGE_BOTTOM  /**< The bottom edge of a rectangle */
78 };
79
80 /**
81  *      @enum   CenterAlignmentType
82  *
83  *      Defines the center alignment for a control.
84  *
85  *  @since      2.0
86  */
87 enum CenterAlignmentType
88 {
89         CENTER_ALIGN_HORIZONTAL, /**< Centers the child control horizontally with respect to the left and right side of its parent control */
90         CENTER_ALIGN_VERTICAL    /**< Centers the child control vertically with respect to the top and bottom side of its parent control */
91 };
92
93 /**
94  *      @enum   FitPolicy
95  *
96  *      Defines the fitting policy for a control.
97  *
98  *  @since      2.0
99  */
100 enum FitPolicy
101 {
102         FIT_POLICY_FIXED,   /**< The fixed size of a control */
103         FIT_POLICY_CONTENT, /**< The size of the control that is large enough to fit its internal content */
104         FIT_POLICY_PARENT   /**< The size of the control that is as large as its parent control */
105 };
106
107 /**
108  *      @enum   VerticalDirection
109  *
110  *      Defines the direction for the vertical box layout.
111  *
112  *  @since      2.0
113  */
114 enum VerticalDirection
115 {
116         VERTICAL_DIRECTION_DOWNWARD, /**< The direction that runs from top to bottom */
117         VERTICAL_DIRECTION_UPWARD    /**< The direction that runs from bottom to top */
118 };
119
120 /**
121  *      @enum   HorizontalDirection
122  *
123  *      Defines the direction for the horizontal box layout.
124  *
125  *  @since      2.0
126  */
127 enum HorizontalDirection
128 {
129         HORIZONTAL_DIRECTION_RIGHTWARD, /**< The direction that runs from left to right */
130         HORIZONTAL_DIRECTION_LEFTWARD   /**< The direction that runs from right to left */
131 };
132
133 /**
134  *      @enum   LayoutHorizontalAlignment
135  *
136  *      Defines the horizontal alignment for the grid layout.
137  *
138  *  @since      2.0
139  */
140 enum LayoutHorizontalAlignment
141 {
142         LAYOUT_HORIZONTAL_ALIGN_LEFT,   /**< The horizontal left alignment of the control */
143         LAYOUT_HORIZONTAL_ALIGN_CENTER, /**< The horizontal center alignment of the control */
144         LAYOUT_HORIZONTAL_ALIGN_RIGHT   /**< The horizontal right alignment of the control */
145 };
146
147 /**
148  *      @enum   LayoutVerticalAlignment
149  *
150  *      Defines the vertical alignment for the grid layout.
151  *
152  *  @since      2.0
153  */
154 enum LayoutVerticalAlignment
155 {
156         LAYOUT_VERTICAL_ALIGN_TOP,    /**< The vertical top alignment of the control */
157         LAYOUT_VERTICAL_ALIGN_MIDDLE, /**< The vertical middle alignment of the control */
158         LAYOUT_VERTICAL_ALIGN_BOTTOM  /**< The vertical bottom alignment of the control */
159 };
160
161 }} // Tizen::Ui
162
163 #endif // _FUI_LAYOUT_ENUM_H_