2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
19 * @file FUiAccessibilityContainer.h
20 * @brief This is the header file for the AccessibilityContainer class.
22 * This header file contains the declarations of the AccessibilityContainer class.
25 #ifndef _FUI_ACCESSIBILITY_CONTAINER_H_
26 #define _FUI_ACCESSIBILITY_CONTAINER_H_
28 #include <FOspConfig.h>
29 #include <FBaseObject.h>
30 #include <FUiAccessibilityTypes.h>
32 namespace Tizen { namespace Base
37 namespace Tizen { namespace Base { namespace Collection
40 }}} //Tizen::Base::Collection
43 namespace Tizen { namespace Ui
47 class AccessibilityElement;
48 class IAccessibilityListener;
49 class _AccessibilityContainerImpl;
52 * @class AccessibilityContainer
53 * @brief This class represents a container for accessibility element.
57 * @final This class is not intended for extension.
58 * This class represents a container for accessibility element.
59 * The following example demonstrates how to use the %AccessibilityContainer class.
62 // Sample code for AccessibilitySample.h
63 #include <FGraphics.h>
66 class AccessibilitySample
67 : public Tizen::Ui::Controls::Form
70 AccessibilitySample(void);
71 virtual ~AccessibilitySample(void);
73 result Initialize(void);
75 virtual result OnInitializing(void);
79 static const int ID_FOOTER_ITEM1 = 101;
80 static const int ID_FOOTER_ITEM2 = 102;
82 Tizen::Graphics::Bitmap *__pTizenBitmap;
87 * @final This class is not intended for extension.
88 * This class represents a container for accessibility element.
90 class _OSP_EXPORT_ AccessibilityContainer
91 : public Tizen::Base::Object
95 * Gets the owner of the accessibility container
98 * @return The control which owns this %AccessibilityContainer
99 * @see Control::GetAccessibilityContainer()
101 const Control* GetOwner(void) const;
104 * Gets the owner of the accessibility container
107 * @return The control which owns this %AccessibilityContainer
108 * @see Control::GetAccessibilityContainer()
110 Control* GetOwner(void);
113 * Adds the IAccessibilityListener instance to the %AccessibilityContainer. @n
114 * The added listener gets notified when the accessibility status is changed.
117 * @return An error code
118 * @param[in] listener The event listener to add
119 * @exception E_SUCCESS The method is successful.
120 * @exception E_OBJ_ALREADY_EXIST The instance of IAccessibilityListener is already registered.
121 * @see RemoveAccessibilityListener()
123 result AddAccessibilityListener(IAccessibilityListener& listener);
126 * Removes the IAccessibilityListener listener instance. @n
127 * The removed listener is not notified even when the accessibility status is changed.
131 * @return An error code
132 * @param[in] listener The listener to remove
133 * @exception E_SUCCESS The method is successful.
134 * @exception E_OBJ_NOT_FOUND The instance of listener is not found.
135 * @see AddAccessibilityListener()
137 result RemoveAccessibilityListener(IAccessibilityListener& listener);
140 * Adds the accessibility element to the %AccessibilityContainer.
143 * @return An error code
144 * @param[in] element The instance of AccessibilityElement
145 * @exception E_SUCCESS The method is successful.
146 * @exception E_OBJ_ALREADY_EXIST The instance of AccessibilityElement is already registered.
147 * @see RemoveElement(), RemoveAllElements()
150 result AddElement(AccessibilityElement& element);
153 * Removes the accessibility element in the %AccessibilityContainer.
157 * @return An error code
159 * @param[in] element The instance of AccessibilityElement
161 * @exception E_SUCCESS The method is successful.
162 * @exception E_OBJ_NOT_FOUND The instance of AccessibilityElement is already registered.
163 * @see AddElement(), InsertElement()
166 result RemoveElement(AccessibilityElement& element);
169 * Removes all of the accessibility elements in the %AccessibilityContainer.
173 * @see AddElement, InsertElement
176 void RemoveAllElements(void);
179 * Gets the instance of accessibility element which is the child of the %AccessibilityContainer by the name.
183 * @return The instance of child element, if there exists an element which has the given name @n
186 * @param[in] name The name of AccessibilityElement
189 AccessibilityElement* GetElement(const Tizen::Base::String& name) const;
192 * Gets the list of accessibility elements that are the child of the %AccessibilityContainer.
196 * @return The list of child element, if there exists some elements in the container. @n
200 Tizen::Base::Collection::IList* GetElementsN(void) const;
204 // This default constructor is intentionally declared as private so that only the platform can create an instance
206 AccessibilityContainer(void);
209 // This destructor is intentionally declared as private so that only the platform can delete an instance.
211 virtual ~AccessibilityContainer(void);
214 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
216 AccessibilityContainer(const AccessibilityContainer& rhs);
219 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
221 AccessibilityContainer& operator =(const AccessibilityContainer& rhs);
224 _AccessibilityContainerImpl* __pAccessibilityContainerImpl;
225 friend class _AccessibilityContainerImpl;
226 }; // AccessibilityContainer
229 #endif //_FUI_ACCESSIBILITY_CONTAINER_H_