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 FUiCustomControlBase.h
20 * @brief This is the header file for the %CustomControlBase class.
22 * This header file contains the declarations of the %CustomControlBase class and its helper classes.
25 #ifndef _FUI_CUSTOM_CONTROL_BASE_H_
26 #define _FUI_CUSTOM_CONTROL_BASE_H_
28 #include <FUiContainer.h>
30 namespace Tizen { namespace Ui
33 class _CustomControlBaseImpl;
37 * @class CustomControlBase
38 * @brief <i> [Deprecated] </i> This is the base class for the user-defined UI control classes.
40 * @deprecated This class is deprecated. Instead of using this class, use the Container class.
43 * The %CustomControlBase class is the base class for the user-defined UI control classes.
45 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_customcontrolbase.htm">CustomControlBase</a>.
48 class _OSP_EXPORT_ CustomControlBase
55 * This destructor overrides Tizen::Base::Object::~Object().
57 * @brief <i> [Deprecated] </i>
58 * @deprecated This class is deprecated. Instead of using this class, use the Container class.
62 virtual ~CustomControlBase(void);
66 * Notifies that the bounds of the control is about to change.
68 * @brief <i> [Deprecated] </i>
69 * @deprecated This class is deprecated. Instead of using this class, use the Container class.
72 * @return An error code
73 * @param[in] oldRect The old position and size values of the control
74 * @param[in] newRect The new position and size values of the control
75 * @remarks If the method returns an exception, the resulting exception
76 * is propagated and the control's size is unchanged. @n
77 * Provide control specific exceptions.
78 * @see Tizen::Ui::Control::SetBounds()
79 * @see Tizen::Ui::Control::SetSize()
82 virtual result PrepareBoundsChange(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect);
86 * Overrides this method to indicate that the specified @c width and @c height
87 * can be supported or a new @c width and @c height must be applied instead
88 * of the specified values.
90 * @brief <i> [Deprecated] </i>
91 * @deprecated This class is deprecated. Instead of using this class, use the Container class.
94 * @return A Boolean flag that indicates whether the specified @c width
95 * and @ height are supported
96 * @param[in, out] width The width that needs to evaluate
97 * @param[in, out] height The height that needs to evaluate
100 virtual bool EvaluateSize(int& width, int& height);
105 * The object is not fully constructed after this constructor is called. For full construction, one of the %Construct() method must be called right after calling this constructor.
107 * @brief <i> [Deprecated] </i>
108 * @deprecated This class is deprecated. Instead of using this class, use the Container class.
112 CustomControlBase(void);
116 * Initializes this instance of %CustomControlBase.
118 * @brief <i> [Deprecated] </i>
119 * @deprecated This class is deprecated. Instead of using this class, use the Container class.
122 * @return An error code
123 * @param[in] rect The rectangle bounds to set
124 * @param[in] resizable Set to @c true to make the control resizable, @n
126 * @param[in] movable Set to @c true to make the control movable, @n
128 * @exception E_SUCCESS The method is successful.
129 * @exception E_INVALID_ARG A specified input parameter is invalid.
130 * @exception E_SYSTEM A system error has occurred.
131 * @remarks This method must be called from the derived classes's construct methods.
132 * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
136 result Construct(const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true);
140 * Initializes this instance of %CustomControlBase with the specified layout and rectangular region.
142 * @brief <i> [Deprecated] </i>
143 * @deprecated This class is deprecated. Instead of using this class, use the Container class.
146 * @return An error code
147 * @param[in] layout The layout for both the portrait and landscape mode
148 * @param[in] rect The location and size of the %CustomControlBase
149 * @param[in] resizable Set to @c true to make the control resizable, @n
151 * @param[in] movable Set to @c true to make the control movable, @n
153 * @exception E_SUCCESS The method is successful.
154 * @exception E_INVALID_ARG A specified input parameter is invalid.
155 * @exception E_SYSTEM A system error has occurred.
156 * @remarks This method must be called from the derived classes's construct methods.
157 * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
159 * @see Tizen::Ui::Layout
160 * @see Tizen::Ui::Container::GetLayoutN()
163 result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true);
167 * Initializes this instance of %CustomControlBase with the specified layouts and rectangular region.
169 * @brief <i> [Deprecated] </i>
170 * @deprecated This class is deprecated. Instead of using this class, use the Container class.
173 * @return An error code
174 * @param[in] portraitLayout The layout for the portrait mode
175 * @param[in] landscapeLayout The layout for the landscape mode
176 * @param[in] rect The location and size of the %CustomControlBase
177 * @param[in] resizable Set to @c true to make the control resizable, @n
179 * @param[in] movable Set to @c true to make the control movable, @n
181 * @exception E_SUCCESS The method is successful.
182 * @exception E_INVALID_ARG A specified input parameter is invalid.
183 * @exception E_SYSTEM A system error has occurred.
184 * @remarks If the @c resizable is @c false, IsResizable() returns @c false.
186 * @see Tizen::Ui::Layout
187 * @see Tizen::Ui::Container::GetLayoutN()
188 * @see Tizen::Ui::Container::GetPortraitLayoutN()
189 * @see Tizen::Ui::Container::GetLandscapeLayoutN()
192 result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true);
197 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
199 * @brief <i> [Deprecated] </i>
200 * @deprecated This class is deprecated. Instead of using this class, use the Container class.
204 CustomControlBase(const CustomControlBase& rhs);
208 * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
210 * @brief <i> [Deprecated] </i>
211 * @deprecated This class is deprecated. Instead of using this class, use the Container class.
215 CustomControlBase& operator =(const CustomControlBase& rhs);
218 friend class _CustomControlBaseImpl;
221 // This method is for internal use only.
222 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
224 // This method is reserved and may change its name at any time without prior notice.
226 virtual void CustomControlBase_Reserved1(void) {}
229 // This method is for internal use only.
230 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
232 // This method is reserved and may change its name at any time without prior notice.
234 virtual void CustomControlBase_Reserved2(void) {}
237 // This method is for internal use only.
238 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
240 // This method is reserved and may change its name at any time without prior notice.
242 virtual void CustomControlBase_Reserved3(void) {}
243 }; // CustomControlBase
247 #endif // _FUI_CUSTOM_CONTROL_BASE_H_