Merge "Fix Ime Rotation" into tizen_2.1
[platform/framework/native/uifw.git] / inc / FGrpFloatDimension.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        FGrpFloatDimension.h
20  * @brief       This is the header file for the %FloatDimension class.
21  *
22  * This header file contains the declarations of the %FloatDimension class.
23  */
24
25 #ifndef _FGRP_FLOAT_DIMENSION_H_
26 #define _FGRP_FLOAT_DIMENSION_H_
27
28 #include <FBaseObject.h>
29
30 namespace Tizen { namespace Graphics {
31 /**
32  * @class       FloatDimension
33  * @brief       This class represents the width and height of a two-dimensional region.
34  *
35  * @since 2.0
36  *
37  * The %FloatDimension class provides methods to abstract and set the width and height of a two-dimensional region. @n
38  *
39  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/graphics/shapes.htm">Shapes</a>.
40  *
41  */
42 class _OSP_EXPORT_ FloatDimension :
43         public Tizen::Base::Object
44 {
45 public:
46         /**
47          * This is the default constructor for this class. @n
48          * This constructor initializes an instance of %FloatDimension with the width and the height set as @c 0.f.
49          *
50          * @since 2.0
51          */
52         FloatDimension(void);
53
54         /**
55          * This is the copy constructor for the %FloatDimension class.
56          *
57          * @since 2.0
58          *
59          * @param[in]     rhs                     An instance of %FloatDimension
60          */
61         FloatDimension(const FloatDimension& rhs);
62
63         /**
64          * Initializes an instance of %FloatDimension with the specified values of width and height.
65          *
66          * @since 2.0
67          *
68          * @param[in]   width   The width to set
69          * @param[in]   height  The height to set
70          */
71         FloatDimension(float width, float height);
72
73         /**
74          * This is the destructor for this class.
75          *
76          * @since 2.0
77          */
78         virtual ~FloatDimension(void);
79
80         /**
81          * This is the default assignment operator for this class.
82          *
83          * @since 2.0
84          *
85          * @param[in]     rhs                     An instance of %FloatDimension
86          */
87         FloatDimension& operator=(const FloatDimension& rhs);
88
89         /**
90          * Checks whether the two instances of %FloatDimension have equal width and height values.
91          *
92          * @since 2.0
93          *
94          * @return              @c true if the values of the width and height of the two instances of %FloatDimension are equal, @n
95          *                              else @c false
96          * @param[in]   rhs             An instance of %FloatDimension
97          */
98         bool operator==(const FloatDimension& rhs) const;
99
100         /**
101          * Checks whether the two instances of %FloatDimension have different width and height values.
102          *
103          * @since 2.0
104          *
105          * @return              @c true if the values of the width and height of the two instances of %FloatDimension are not equal, @n
106          *                              else @c false
107          * @param[in]   rhs             An instance of %FloatDimension
108          */
109         bool operator!=(const FloatDimension& rhs) const;
110
111         /**
112          * Checks whether the value of the current instance of %FloatDimension equals the value of the specified instance.
113          *
114          * @since 2.0
115          *
116          * @return              @c true if the value of the current instance equals the value of the specified instance, @n
117          *                              else @c false
118          * @param[in]   rhs             An instance of %FloatDimension
119          * @remarks             The %FloatDimension class has a semantic value, which means that the
120          *                              Equals() method checks whether the two instances have the same width and height.
121          */
122         virtual bool Equals(const Tizen::Base::Object& rhs) const;
123
124         /**
125          * Gets the hash value of the current instance.
126          *
127          * @since 2.0
128          *
129          * @return              The hash value of the current instance
130          * @remarks             Two equal instances must return the same hash value. For better performance,
131          *                              the used hash function must generate a random distribution for all inputs.
132          */
133         virtual int GetHashCode(void) const;
134
135         /**
136          * Sets the size of the current instance of %FloatDimension.
137          *
138          * @since 2.0
139          *
140          * @param[in]   width           The new width
141          * @param[in]   height          The new height
142          */
143         void SetSize(float width, float height);
144
145 public:
146         /**
147          * The width of the current instance of %FloatDimension.
148          *
149          * @since 2.0
150          */
151         float width;
152
153         /**
154          * The height of the current instance of %FloatDimension.
155          *
156          * @since 2.0
157          */
158         float height;
159
160 private:
161         friend class _FloatDimensionImpl;
162
163         //
164         // This variable is for internal use only.
165         // Using this variable can cause behavioral, security-related, and consistency-related issues in the application.
166         //
167         // @since 2.0
168         //
169         class _FloatDimensionImpl* __pImpl;
170
171 }; // FloatDimension
172
173 }} // Tizen::Graphics
174
175 #endif // _FGRP_FLOAT_DIMENSION_H_