Merge "Fix Ime Rotation" into tizen_2.1
[platform/framework/native/uifw.git] / inc / FUiAccessibilityElement.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        FUiAccessibilityElement.h
20  * @brief       This is the header file for the AccessibilityElement class.
21  *
22  * This header file contains the declarations of the AccessibilityElement class.
23  *
24  */
25
26 #ifndef _FUI_ACCESSIBILITY_ELEMENT_H_
27 #define _FUI_ACCESSIBILITY_ELEMENT_H_
28
29 #include <FOspConfig.h>
30 #include <FBaseObject.h>
31 #include <FUiAccessibilityTypes.h>
32
33 namespace Tizen { namespace Base
34 {
35         class String;
36 }} //Tizen::Base
37
38 namespace Tizen { namespace Graphics
39 {
40         class Rectangle;
41         class FloatRectangle;
42 }} //Tizen::Graphics
43
44 namespace Tizen { namespace Ui
45 {
46 class _AccessibilityElementImpl;
47
48 /**
49 * @class                AccessibilityElement
50 * @brief                This class represents an accessibility element.
51 * @since                2.0
52 *
53 * @final                This class is not intended for extension.
54 * This class represents an accessibility element.
55 */
56 class _OSP_EXPORT_ AccessibilityElement
57         : public Tizen::Base::Object
58 {
59 public:
60         /**
61         *  The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
62         *
63         * @since                2.0
64         */
65         AccessibilityElement(void);
66
67         /**
68         * This destructor overrides Tizen::Base::Object::~Object().
69         *
70         * @since                2.0
71         */
72         virtual ~AccessibilityElement(void);
73
74         /**
75         * Initializes the instance of %AccessibilityElement with the specified parameters.
76         *
77         * @since                2.0
78         *
79         * @return       An error code
80         * @param[in] bounds     The bounds  of the accessibility element
81         * @param[in] name       The name of the accessibility element
82         * @exception E_SUCCESS  The method is successful.
83         * @exception E_INVALID_ARG      Either the length of name parameter is @c 0, or the bounds are smaller than @c 0.
84         */
85         result Construct(const Tizen::Graphics::Rectangle& bounds, const Tizen::Base::String& name);
86
87         /**
88         * Initializes the instance of %AccessibilityElement with the specified parameters.
89         *
90         * @since                2.1
91         *
92         * @return       An error code
93         * @param[in] bounds     The bounds  of the accessibility element
94         * @param[in] name       The name of the accessibility element
95         * @exception E_SUCCESS  The method is successful.
96         * @exception E_INVALID_ARG      Either the length of name parameter is @c 0, or the bounds are smaller than @c 0.
97         */
98         result Construct(const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Base::String& name);
99
100         /**
101         * Gets the name of the element.
102         *
103         * @since                2.0
104         * @return       The name of the element
105         */
106         Tizen::Base::String GetName(void) const;
107
108         /**
109         * Sets the bounds to the element.
110         *
111         * @since                2.0
112         * @param[in] bounds     The bounds of the accessibility element.
113         */
114         void SetBounds(const Tizen::Graphics::Rectangle& bounds);
115
116         /**
117         * Sets the bounds to the element.
118         *
119         * @since                2.1
120         * @param[in] bounds     The bounds of the accessibility element.
121         */
122         void SetBounds(const Tizen::Graphics::FloatRectangle& bounds);
123         
124         /**
125         * Gets the bounds of the element.
126         *
127         * @since                2.0
128         * @return       The bounds of the element
129         */
130         Tizen::Graphics::Rectangle GetBounds(void) const;
131
132         /**
133         * Gets the bounds of the element.
134         *
135         * @since                2.1
136         * @return       The bounds of the element
137         */
138         Tizen::Graphics::FloatRectangle GetBoundsF(void) const;
139
140         /**
141         * Sets the label to the element.
142         *
143         * @since                2.0
144         * @param[in] label      The label of the accessibility element.
145         */
146         void SetLabel(const Tizen::Base::String& label);
147
148         /**
149         * Gets the label of the element.
150         *
151         * @since                2.0
152         * @return       The label of the element
153         */
154         Tizen::Base::String GetLabel(void) const;
155
156         /**
157         * Sets the hint to the element.
158         *
159         * @since                2.0
160         * @param[in] hint       The hint of the accessibility element.
161         */
162         void SetHint(const Tizen::Base::String& hint);
163
164         /**
165         * Gets the hint of the element.
166         *
167         * @since                2.0
168         * @return       The hint of the element
169         */
170         Tizen::Base::String GetHint(void) const;
171
172         /**
173         * Sets the trait to the element.
174         *
175         * @since                2.0
176         * @param[in] trait      The trait of the accessibility element.
177         */
178         void SetTrait(const Tizen::Base::String& trait);
179
180
181         /**
182         * Gets the trait of the element.
183         *
184         * @since                2.0
185         * @return       The trait of the element
186         */
187         Tizen::Base::String GetTrait(void) const;
188
189         /**
190         * Sets the value to the element.
191         *
192         * @since                2.0
193         * @param[in] value      The value of the accessibility element.
194         */
195         void SetValue(const Tizen::Base::String& value);
196
197         /**
198         * Gets the value of the element.
199         *
200         * @since                2.0
201         * @return       The value of the element
202         */
203         Tizen::Base::String GetValue(void) const;
204
205 private:
206         //
207         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
208         //
209         AccessibilityElement(const AccessibilityElement& rhs);
210
211         //
212         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
213         //
214         AccessibilityElement& operator =(const AccessibilityElement& rhs);
215
216 private:
217         friend class _AccessibilityElementImpl;
218         _AccessibilityElementImpl* __pAccessibilityElementImpl;
219 }; // AccessibilityElement
220
221 }} // Tizen::Ui
222 #endif //_FUI_ACCESSIBILITY_ELEMENT_H_