Adjust the position of the partial Frame
[platform/framework/native/uifw.git] / inc / FUiControl.h
1 //\r
2 // Open Service Platform\r
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.\r
4 //\r
5 // Licensed under the Flora License, Version 1.0 (the License);\r
6 // you may not use this file except in compliance with the License.\r
7 // You may obtain a copy of the License at\r
8 //\r
9 //     http://floralicense.org/license/\r
10 //\r
11 // Unless required by applicable law or agreed to in writing, software\r
12 // distributed under the License is distributed on an AS IS BASIS,\r
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14 // See the License for the specific language governing permissions and\r
15 // limitations under the License.\r
16 //\r
17 \r
18 /**\r
19  * @file        FUiControl.h\r
20  * @brief       This is the header file for the %Control class.\r
21  *\r
22  * This header file contains the declarations of the %Control class.\r
23  */\r
24 \r
25 #ifndef _FUI_CONTROL_H_\r
26 #define _FUI_CONTROL_H_\r
27 \r
28 #include <FBaseTypes.h>\r
29 #include <FBaseString.h>\r
30 #include <FGrpCanvas.h>\r
31 #include <FGrpColor.h>\r
32 #include <FGrpPoint.h>\r
33 #include <FGrpRectangle.h>\r
34 #include <FUiIFocusEventListener.h>\r
35 #include <FUiIKeyEventListener.h>\r
36 #include <FUiITouchEventListener.h>\r
37 #include <FUiITouchModeChangedEventListener.h>\r
38 #include <FUiIDragDropEventListener.h>\r
39 #include <FUiIDragDropEventListenerF.h>\r
40 #include <FUiCompositeMode.h>\r
41 #include <FUiIPropagatedKeyEventListener.h>\r
42 #include <FUiIPropagatedTouchEventListener.h>\r
43 \r
44 namespace Tizen { namespace Ui { namespace Animations {\r
45 class ControlAnimator;\r
46 class VisualElement;\r
47 }}}\r
48 \r
49 namespace Tizen { namespace Ui {\r
50 \r
51 class AccessibilityContainer;\r
52 class Container;\r
53 class _ControlImpl;\r
54 class TouchGestureDetector;\r
55 \r
56 /**\r
57  * @class       Control\r
58  * @brief       This class is the abstract base class of all the UI control classes.\r
59  *\r
60  * @since       2.0\r
61  *\r
62  * @remarks     In order for a control to be displayed, it must first be bound to a window of the underlying window system. The control's window is\r
63  * created when it (or its ancestor) is added to a valid control containment hierarchy. A containment hierarchy is valid if and\r
64  * only if the root of the hierarchy is an instance of the Window class.\r
65  *\r
66  * The %Control class is the abstract base class of all user interface elements. It encapsulates a\r
67  * "window" of the underlying window system, and provides the infrastructure necessary for the\r
68  * elements to respond to user inputs. The %Control class also determines how a key event is dispatched\r
69  * and processed.\r
70  *\r
71  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/controls.htm">UI Controls</a>.\r
72  *\r
73  *\r
74  * The following examples demonstrate how to use the %Control class.\r
75  *\r
76  * Size and Position\r
77  *\r
78  * @code\r
79  * // Sets the size\r
80  * pControl->SetSize(100, 100); // 100 pixels wide and 100 pixels long\r
81  *\r
82  * // Sets the position\r
83  * pControl->SetPosition(5, 5); // Control is drawn 5 pixels down and 5 pixels left from the top-left corner of its parent\r
84  * @endcode\r
85  *\r
86  * Draw and Show\r
87  *\r
88  * @code\r
89  * // Gets a instance of Canvas\r
90  * Canvas* pCanvas = pControl->GetCanvasN();\r
91  *\r
92  * // Fills the canvas with white color\r
93  * pCanvas->Clear(Tizen::Graphics::Color(255, 255, 255));\r
94  *\r
95  * // Shows changes on screen\r
96  * pControl->Invalidate(true);\r
97  *\r
98  * delete pCanvas;\r
99  * @endcode\r
100  *\r
101  * Key and input focus\r
102  *\r
103  * @code\r
104  * // Implements MyKeyEventListener\r
105  * IKeyEventListener* pKeyListener = new MyKeyEventListener();\r
106  * pControl->SetFocus();\r
107  *\r
108  * // The added key listener should be deleted after use\r
109  * pControl->AddKeyEventListener(*pKeyListener);\r
110  * @endcode\r
111  *\r
112  */\r
113 class _OSP_EXPORT_ Control\r
114         : public Tizen::Base::Object\r
115 {\r
116 \r
117 public:\r
118         /**\r
119          * This destructor overrides Tizen::Base::Object::~Object().\r
120          *\r
121          * @since       2.0\r
122          */\r
123         virtual ~Control(void);\r
124 \r
125         /**\r
126          * Adds the IFocusEventListener instance to the %Control instance. @n\r
127          * The added listener gets notified when the control gains or loses its focus.\r
128          *\r
129          * @since               2.0\r
130          *\r
131          * @param[in]   listener        The event listener to add\r
132          * @see                 RemoveFocusEventListener()\r
133          */\r
134         void AddFocusEventListener(IFocusEventListener& listener);\r
135 \r
136         /**\r
137          * Adds the IKeyEventListener instance to the %Control instance. @n\r
138          * The added listener gets notified when a key is pressed, released, or long pressed.\r
139          *\r
140          * @since               2.0\r
141          *\r
142          * @param[in]   listener    The event listener to add\r
143          * @see                 RemoveKeyEventListener()\r
144          */\r
145         void AddKeyEventListener(IKeyEventListener& listener);\r
146 \r
147         /**\r
148          * Adds the ITouchEventListener instance to the %Control instance. @n\r
149          * The added listener gets notified when a touch event such as a press or a release is fired.\r
150          *\r
151          * @since                2.0\r
152          *\r
153          * @param[in]   listener        The event listener to add\r
154          * @see                 RemoveTouchEventListener()\r
155          */\r
156         void AddTouchEventListener(ITouchEventListener& listener);\r
157 \r
158         /**\r
159          * Adds the ITouchModeChangedEventListener instance to the %Control instance. @n\r
160          * The added listener gets notified when the device's touch mode is changed.\r
161          *\r
162          * @since               2.0\r
163          *\r
164          * @param[in]   listener        The event listener to add\r
165          * @see                 RemoveTouchModeChangedEventListener()\r
166          */\r
167         void AddTouchModeChangedEventListener(Tizen::Ui::ITouchModeChangedEventListener& listener);\r
168 \r
169         /**\r
170          * Adds the IDragDropEventListener instance to the %Control instance. @n\r
171          * The added listener gets notified when a drag or a drop happens in the control.\r
172          *\r
173          * @since               2.0\r
174          *\r
175          * @param[in]   listener        The event listener to add\r
176          * @see                 RemoveDragDropEventListener()\r
177          */\r
178         void AddDragDropEventListener(IDragDropEventListener& listener);\r
179 \r
180         /**\r
181          * Adds the IDragDropEventListenerF instance to the %Control instance. @n\r
182          * The added listener gets notified when a drag or a drop happens in the control.\r
183          *\r
184          * @since               2.1\r
185          *\r
186          * @param[in]   listener        The event listener to add\r
187          * @see                 RemoveDragDropEventListenerF()\r
188          */\r
189         void AddDragDropEventListener(IDragDropEventListenerF& listener);\r
190 \r
191         /**\r
192          * Removes the focus listener instance. @n\r
193          * The removed listener is not notified even when focus events are fired.\r
194          *\r
195          * @since               2.0\r
196          *\r
197          * @param[in]   listener        The listener to remove\r
198          * @see                 AddFocusEventListener()\r
199          */\r
200         void RemoveFocusEventListener(IFocusEventListener& listener);\r
201 \r
202         /**\r
203          * Removes the key event listener instance. @n\r
204          * The removed listener is not notified even when key events are fired.\r
205          *\r
206          * @since               2.0\r
207          *\r
208          * @param[in]   listener        The listener to remove\r
209          * @see                 AddKeyEventListener()\r
210          */\r
211         void RemoveKeyEventListener(IKeyEventListener& listener);\r
212 \r
213         /**\r
214          * Removes the touch event listener instance. @n\r
215          * The removed listener is not notified even when touch events are fired.\r
216          *\r
217          * @since               2.0\r
218          *\r
219          * @param[in]   listener        The listener to remove\r
220          * @see                 AddTouchEventListener()\r
221          */\r
222         void RemoveTouchEventListener(ITouchEventListener& listener);\r
223 \r
224         /**\r
225          * Removes the touch mode changed event listener instance. @n\r
226          * The removed listener is not notified even when the touch mode changed events are fired.\r
227          *\r
228          * @since               2.0\r
229          *\r
230          * @param[in]   listener        The listener to remove\r
231          * @see                 AddTouchModeChangedEventListener()\r
232          */\r
233         void RemoveTouchModeChangedEventListener(Tizen::Ui::ITouchModeChangedEventListener& listener);\r
234 \r
235         /**\r
236          * Adds the IDragDropEventListener instance to the %Control instance. @n\r
237          * The added listener gets notified when a drag or a drop happens in the control.\r
238          *\r
239          * @since                2.0\r
240          *\r
241          * @param[in]   listener        The event listener to add\r
242          * @see                 Tizen::Ui::IDragDropEventListener::OnTouchDragged()\r
243          * @see                 Tizen::Ui::IDragDropEventListener::OnTouchDropped()\r
244          * @see                 RemoveDragDropEventListener()\r
245          */\r
246         void RemoveDragDropEventListener(IDragDropEventListener& listener);\r
247 \r
248         /**\r
249          * Adds the IDragDropEventListenerF instance to the %Control instance. @n\r
250          * The added listener gets notified when a drag or a drop happens in the control.\r
251          *\r
252          * @since                2.1\r
253          *\r
254          * @param[in]   listener        The event listener to add\r
255          * @see                 Tizen::Ui::IDragDropEventListenerF::OnTouchDraggedF()\r
256          * @see                 Tizen::Ui::IDragDropEventListenerF::OnTouchDroppedF()\r
257          * @see                 RemoveDragDropEventListenerF()\r
258          */\r
259         void RemoveDragDropEventListenerF(IDragDropEventListenerF& listener);\r
260 \r
261         /**\r
262          * Overrides this method to provide user-specific initialization code before the control is added to a container.\r
263          *\r
264          * @since               2.0\r
265          *\r
266          * @return              An error code\r
267          * @exception   E_SUCCESS       The method is successful.\r
268          * @exception   E_FAILURE       The method has failed.\r
269          * @remarks             This method is called when the control is about to be added to a container.\r
270          * @remarks             To cancel adding this control to the parent, return @c E_FAILURE in this method.\r
271          * @see                 OnTerminating()\r
272          */\r
273         virtual result OnInitializing(void);\r
274 \r
275         /**\r
276          * Overrides this method to provide user-specific termination code.\r
277          *\r
278          * @if OSPCOMPAT\r
279          * @brief <i> [Compatibility] </i>\r
280          * @endif\r
281          * @since               2.0\r
282          *\r
283          * @if OSPCOMPAT\r
284          * @compatibility This method has compatibility issues with OSP compatible applications. @n\r
285          *                       For more information, see @ref CompOnTerminatingPage "here".\r
286          * @endif\r
287          * @return              An error code\r
288          * @exception   E_SUCCESS       The method is successful.\r
289          * @exception   E_FAILURE       The method has failed.\r
290          * @remarks             This method is called right before the control is removed from the container, or Destroy() method is being called.\r
291          * @remarks             To cancel the removal or Destroy() operation, return any exception other than E_SUCCESS.\r
292          * @see                 OnInitializing()\r
293          */\r
294         virtual result OnTerminating(void);\r
295 \r
296         /**\r
297          * @if OSPCOMPAT\r
298          * @page               CompOnTerminatingPage        Compatibility for OnTerminating()\r
299          * @section            CompOnterminatingPageIssueSection          Issues\r
300          * Implementation of this method in %Tizen API versions prior to 2.1 has the following issue: @n\r
301          * -# OnTerminating() callback is called from child to parent.\r
302          *\r
303          * @section            CompOnTerminatingPageSolutionSection               Resolutions\r
304          * The issue mentioned above is resolved in %Tizen API version 2.1 as follows: @n\r
305          * -# OnTerminating() callback is called from parent to child.\r
306          * @endif\r
307          */\r
308 \r
309         /**\r
310          * Called asynchronously when the user event that is sent by SendUserEvent() method is\r
311          * dispatched to the control.\r
312          *\r
313          * @since               2.0\r
314          *\r
315          * @param[in]   requestId       The user-defined event ID\r
316          * @param[in]   pArgs  A pointer to the argument list\r
317          * @see                 SendUserEvent()\r
318          */\r
319         virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);\r
320 \r
321         /**\r
322          * Deallocates this instance after removing all child controls of this control\r
323          *\r
324          * @since 2.1\r
325          *\r
326          * @exception   E_SUCCESS       The method is successful.\r
327          * @remarks             The control will be deleted from memory. Before it is deleted, OnTerminating() is called if it is attached to the main tree.\r
328          * @remarks             If OnTerminating() method is overrided and returns an exception, that exception will be propagated. \r
329          * @see                 Tizen::Ui::Control:OnTerminating()\r
330          */\r
331         result Destroy(void);\r
332 \r
333         /**\r
334          * Checks whether the control is movable.\r
335          *\r
336          * @since               2.0\r
337          *\r
338          * @return              @c true if the control is movable, @n\r
339          *                              else @c false\r
340          * @exception   E_SUCCESS                       The method is successful.\r
341          * @remarks             The specific error code can be accessed using the GetLastResult() method.\r
342          * @remarks             When control is not movable SetPosition() and SetBounds() return @c E_UNSUPPORTED_OPERATION.\r
343          * @see                 SetPosition()\r
344          * @see                 SetBounds()\r
345          */\r
346         bool IsMovable(void) const;\r
347 \r
348         /**\r
349          * Checks whether the control is resizable.\r
350          *\r
351          * @since               2.0\r
352          *\r
353          * @return              @c true if the control is resizable, @n\r
354          *                              else @c false\r
355          * @exception   E_SUCCESS                       The method is successful.\r
356          * @remarks             Even if this method returns @c true, the size can be changed internally.\r
357          * @remarks             The specific error code can be accessed using the GetLastResult() method.\r
358          * @remarks             When control is not resizable,\r
359          *                              SetSize(), SetBounds(), SetMinimumSize() and SetMaximumSize() return @c E_UNSUPPORTED_OPERATION.\r
360          * @see                 SetSize()\r
361          * @see                 SetBounds()\r
362          * @see                 SetMinimumSize()\r
363          * @see                 SetMaximumSize()\r
364          */\r
365         bool IsResizable(void) const;\r
366 \r
367         /**\r
368          * Gets the position and the size of the control.\r
369          *\r
370          * @since               2.0\r
371          *\r
372          * @return              An instance of the Tizen::Graphics::Rectangle that represents the position of top-left corner,\r
373          *                              the width, and the height of the control\r
374          * @remarks             The shape of the control is rectangular that is defined by the top-left point,\r
375          *                              and the width or height. The position\r
376          *                              of the top-left point is relative to the top-left corner of the parent container.\r
377          * @see                 SetBounds()\r
378          */\r
379         Tizen::Graphics::Rectangle GetBounds(void) const;\r
380 \r
381         /**\r
382          * Gets the position and the size of the control.\r
383          *\r
384          * @since               2.1\r
385          *\r
386          * @return              An instance of the Tizen::Graphics::FloatRectangle that represents the position of top-left corner,\r
387          *                              the width, and the height of the control\r
388          * @remarks             The shape of the control is rectangular that is defined by the top-left point,\r
389          *                              and the width or height. The position\r
390          *                              of the top-left point is relative to the top-left corner of the parent container.\r
391          * @see                 SetBounds()\r
392          */\r
393         Tizen::Graphics::FloatRectangle GetBoundsF(void) const;\r
394 \r
395         /**\r
396          * Gets the position and the size of the control.\r
397          *\r
398          * @since               2.0\r
399          *\r
400          * @param[out]  x               The x position of top-left corner of the control\r
401          * @param[out]  y               The y position of top-left corner of the control\r
402          * @param[out]  width   The width of the rectangular region\r
403          * @param[out]  height  The height of the rectangular region\r
404          * @remarks             The shape of the control is regarded as a rectangle that is defined\r
405          *                              by the top-left point and the width or height.\r
406          *                              The position of the top-left point is relative to the top-left corner of\r
407          *                              the parent container.\r
408          * @see                 SetBounds()\r
409          */\r
410         void GetBounds(int& x, int& y, int& width, int& height) const;\r
411 \r
412         /**\r
413          * Gets the position and the size of the control.\r
414          *\r
415          * @since               2.1\r
416          *\r
417          * @param[out]  x               The x position of top-left corner of the control\r
418          * @param[out]  y               The y position of top-left corner of the control\r
419          * @param[out]  width   The width of the rectangular region\r
420          * @param[out]  height  The height of the rectangular region\r
421          * @remarks             The shape of the control is regarded as a rectangle that is defined\r
422          *                              by the top-left point and the width or height.\r
423          *                              The position of the top-left point is relative to the top-left corner of\r
424          *                              the parent container.\r
425          * @see                 SetBounds()\r
426          */\r
427         void GetBounds(float& x, float& y, float& width, float& height) const;\r
428 \r
429         /**\r
430          * Gets the position of the control's top-left corner.\r
431          *\r
432          * @since               2.0\r
433          *\r
434          * @return              The position of the control's top-left corner\r
435          * @remarks             The position of top-left corner is relative to the top-left corner of its parent container.\r
436          * @see                 GetBounds()\r
437          */\r
438         Tizen::Graphics::Point GetPosition(void) const;\r
439 \r
440         /**\r
441          * Gets the position of the control's top-left corner.\r
442          *\r
443          * @since               2.1\r
444          *\r
445          * @return              The position of the control's top-left corner\r
446          * @remarks             The position of top-left corner is relative to the top-left corner of its parent container.\r
447          * @see                 GetBounds()\r
448          */\r
449         Tizen::Graphics::FloatPoint GetPositionF(void) const;\r
450 \r
451         /**\r
452          * Gets the position of the control's top-left corner.\r
453          *\r
454          * @since               2.0\r
455          *\r
456          * @param[out]  x The x position of the control's top-left corner\r
457          * @param[out]  y The y position of the control's top-left corner\r
458          * @remarks             The position of top-left corner is relative to the top-left corner of its parent container.\r
459          * @see                 GetBounds()\r
460          */\r
461         void GetPosition(int& x, int& y) const;\r
462 \r
463         /**\r
464          * Gets the position of the control's top-left corner.\r
465          *\r
466          * @since               2.1\r
467          *\r
468          * @param[out]  x The x position of the control's top-left corner\r
469          * @param[out]  y The y position of the control's top-left corner\r
470          * @remarks             The position of top-left corner is relative to the top-left corner of its parent container.\r
471          * @see                 GetBounds()\r
472          */\r
473         void GetPosition(float& x, float& y) const;\r
474 \r
475         /**\r
476          * Gets the size of the control.\r
477          *\r
478          * @since               2.0\r
479          *\r
480          * @return              The size of the control\r
481          * @see                 GetBounds()\r
482          */\r
483         Tizen::Graphics::Dimension GetSize(void) const;\r
484 \r
485         /**\r
486          * Gets the size of the control.\r
487          *\r
488          * @since               2.1\r
489          *\r
490          * @return              The size of the control\r
491          * @see                 GetBounds()\r
492          */\r
493         Tizen::Graphics::FloatDimension GetSizeF(void) const;\r
494 \r
495         /**\r
496          * Gets the size of the control.\r
497          *\r
498          * @since               2.0\r
499          *\r
500          * @param[out]  width   The width of the control\r
501          * @param[out]  height  The height of the control\r
502          * @see         GetBounds()\r
503          */\r
504         void GetSize(int& width, int& height) const;\r
505 \r
506         /**\r
507          * Gets the size of the control.\r
508          *\r
509          * @since               2.1\r
510          *\r
511          * @param[out]  width   The width of the control\r
512          * @param[out]  height  The height of the control\r
513          * @see         GetBounds()\r
514          */\r
515         void GetSize(float& width, float& height) const;\r
516 \r
517         /**\r
518          * Gets the x position of the control. @n\r
519          * The position of control is relative to the top-left corner of its parent container.\r
520          *\r
521          * @since               2.0\r
522          *\r
523          * @return              The x position of the control\r
524          * @see                 GetBounds()\r
525          * @see                 GetPosition()\r
526          * @see                 GetY()\r
527          */\r
528         int GetX(void) const;\r
529 \r
530         /**\r
531          * Gets the x position of the control. @n\r
532          * The position of control is relative to the top-left corner of its parent container.\r
533          *\r
534          * @since               2.1\r
535          *\r
536          * @return              The x position of the control\r
537          * @see                 GetBounds()\r
538          * @see                 GetPosition()\r
539          * @see                 GetYF()\r
540          */\r
541         float GetXF(void) const;\r
542 \r
543         /**\r
544          * Gets the y position of the control. @n\r
545          * The position of control is relative to the top-left corner of its parent container.\r
546          *\r
547          * @since               2.0\r
548          *\r
549          * @return              The y position of the control\r
550          * @see                 GetBounds()\r
551          * @see                 GetPosition()\r
552          * @see                 Get()\r
553          */\r
554         int GetY(void) const;\r
555 \r
556         /**\r
557          * Gets the y position of the control. @n\r
558          * The position of control is relative to the top-left corner of its parent container.\r
559          *\r
560          * @since               2.1\r
561          *\r
562          * @return              The y position of the control\r
563          * @see                 GetBounds()\r
564          * @see                 GetPosition()\r
565          * @see                 GetXF()\r
566          */\r
567         float GetYF(void) const;\r
568 \r
569         /**\r
570          * Gets the width of the control.\r
571          *\r
572          * @since               2.0\r
573          *\r
574          * @return              The width of the control\r
575          * @see                 GetBounds()\r
576          * @see                 GetSize()\r
577          * @see                 GetHeight()\r
578          */\r
579         int GetWidth(void) const;\r
580 \r
581         /**\r
582          * Gets the width of the control.\r
583          *\r
584          * @since               2.1\r
585          *\r
586          * @return              The width of the control\r
587          * @see                 GetBounds()\r
588          * @see                 GetSizeF()\r
589          * @see                 GetHeightF()\r
590          */\r
591         float GetWidthF(void) const;\r
592 \r
593         /**\r
594          * Gets the height of the control.\r
595          *\r
596          * @since               2.0\r
597          *\r
598          * @return              The height of the control\r
599          * @see                 GetBounds()\r
600          * @see                 GetSize()\r
601          * @see                 GetWidth()\r
602          */\r
603         int GetHeight(void) const;\r
604 \r
605         /**\r
606          * Gets the height of the control.\r
607          *\r
608          * @since               2.1\r
609          *\r
610          * @return              The height of the control\r
611          * @see                 GetBounds()\r
612          * @see                 GetSizeF()\r
613          * @see                 GetWidthF()\r
614          */\r
615         float GetHeightF(void) const;\r
616 \r
617         /**\r
618          * Gets the minimum size of the control.\r
619          *\r
620          * @since               2.0\r
621          *\r
622          * @return              The minimum size of the control\r
623          * @exception   E_SUCCESS                               The method is successful.\r
624          * @exception   E_SYSTEM                                A system error has occurred.\r
625          * @remarks             The first call of the method returns the system-defined minimum size.\r
626          * @remarks             The specific error code can be accessed using the GetLastResult() method.\r
627          */\r
628         Tizen::Graphics::Dimension GetMinimumSize(void) const;\r
629 \r
630         /**\r
631          * Gets the minimum size of the control.\r
632          *\r
633          * @since               2.1\r
634          *\r
635          * @return              The minimum size of the control\r
636          * @exception   E_SUCCESS                               The method is successful.\r
637          * @exception   E_SYSTEM                                A system error has occurred.\r
638          * @remarks             The first call of the method returns the system-defined minimum size.\r
639          * @remarks             The specific error code can be accessed using the GetLastResult() method.\r
640          */\r
641         Tizen::Graphics::FloatDimension GetMinimumSizeF(void) const;\r
642 \r
643         /**\r
644          * Gets the maximum size of the control.\r
645          *\r
646          * @since               2.0\r
647          *\r
648          * @return              The maximum size of the control\r
649          * @exception   E_SUCCESS                               The method is successful.\r
650          * @exception   E_SYSTEM                                A system error has occurred.\r
651          * @remarks             The first call of the method returns the system-defined maximum size.\r
652          * @remarks             The specific error code can be accessed using the GetLastResult() method.\r
653          */\r
654         Tizen::Graphics::Dimension GetMaximumSize(void) const;\r
655 \r
656         /**\r
657          * Gets the maximum size of the control.\r
658          *\r
659          * @since               2.1\r
660          *\r
661          * @return              The maximum size of the control\r
662          * @exception   E_SUCCESS                               The method is successful.\r
663          * @exception   E_SYSTEM                                A system error has occurred.\r
664          * @remarks             The first call of the method returns the system-defined maximum size.\r
665          * @remarks             The specific error code can be accessed using the GetLastResult() method.\r
666          */\r
667         Tizen::Graphics::FloatDimension GetMaximumSizeF(void) const;\r
668 \r
669         /**\r
670          * Gets a font of the control.\r
671          *\r
672          * @since 2.0\r
673          *\r
674          * @return                   The font name set in the control  @n\r
675          *                                         else an empty string if the font is not set\r
676          * @see         SetFont()\r
677          */\r
678         Tizen::Base::String GetFont(void) const;\r
679 \r
680         /**\r
681          * Sets the position and size of the control.\r
682          *\r
683          * @since               2.0\r
684          *\r
685          * @return              An error code\r
686          * @param[in]   rect                                    The new bounds of the control\r
687          * @exception   E_SUCCESS                               The method is successful.\r
688          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.\r
689          * @exception   E_UNSUPPORTED_OPERATION This control is neither movable nor resizable.\r
690          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.\r
691          * @exception   E_SYSTEM                                A system error has occurred.\r
692          * @remarks             Do not override this method.\r
693          * @remarks             The size of the control must be within the range defined by the minimum size and the maximum size.\r
694          * @see                 IsMovable()\r
695          * @see                 IsResizable()\r
696          * @see                 GetMinimumSize()\r
697          * @see                 GetMaximumSize()\r
698          * @see                 SetPosition()\r
699          * @see                 SetSize()\r
700          */\r
701         result SetBounds(const Tizen::Graphics::Rectangle& rect);\r
702 \r
703         /**\r
704          * Sets the position and size of the control.\r
705          *\r
706          * @since               2.1\r
707          *\r
708          * @return              An error code\r
709          * @param[in]   rect                                    The new bounds of the control\r
710          * @exception   E_SUCCESS                               The method is successful.\r
711          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.\r
712          * @exception   E_UNSUPPORTED_OPERATION This control is neither movable nor resizable.\r
713          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.\r
714          * @exception   E_SYSTEM                                A system error has occurred.\r
715          * @remarks             Do not override this method.\r
716          * @remarks             The size of the control must be within the range defined by the minimum size and the maximum size.\r
717          * @see                 IsMovable()\r
718          * @see                 IsResizable()\r
719          * @see                 GetMinimumSize()\r
720          * @see                 GetMaximumSize()\r
721          * @see                 SetPosition()\r
722          * @see                 SetSiz()\r
723          */\r
724         result SetBounds(const Tizen::Graphics::FloatRectangle& rect);\r
725 \r
726         /**\r
727          * Sets the position and size of the control. @n\r
728          * The position is set at (x, y), and the @c width and @c height parameters contain\r
729          * the width and height values of the object, respectively.\r
730          *\r
731          * @since               2.0\r
732          *\r
733          * @return              An error code\r
734          * @param[in]   x                                               The new x position of the control\r
735          * @param[in]   y                                               The new y position of the control\r
736          * @param[in]   width                                   The new width of the control\r
737          * @param[in]   height                                  The new height of the control\r
738          * @exception   E_SUCCESS                               The method is successful.\r
739          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.\r
740          * @exception   E_UNSUPPORTED_OPERATION This control is neither movable nor resizable.\r
741          * @exception   E_INVALID_ARG                   A specified input parameter is invalid.\r
742          * @exception   E_SYSTEM                                A system error has occurred.\r
743          * @remarks             Do not override this method.\r
744          * @remarks             The size of the control must be within the range defined by the minimum size and the maximum size.\r
745          * @see                 IsMovable()\r
746          * @see                 IsResizable()\r
747          * @see                 GetMinimumSize()\r
748          * @see                 GetMaximumSize()\r
749          * @see                 SetPosition()\r
750          * @see                 SetSize()\r
751          */\r
752         result SetBounds(int x, int y, int width, int height);\r
753 \r
754         /**\r
755          * Sets the position and size of the control. @n\r
756          * The position is set at (x, y), and the @c width and @c height parameters contain\r
757          * the width and height values of the object, respectively.\r
758          *\r
759          * @since               2.1\r
760          *\r
761          * @return              An error code\r
762          * @param[in]   x                                               The new x position of the control\r
763          * @param[in]   y                                               The new y position of the control\r
764          * @param[in]   width                                   The new width of the control\r
765          * @param[in]   height                                  The new height of the control\r
766          * @exception   E_SUCCESS                               The method is successful.\r
767          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.\r
768          * @exception   E_UNSUPPORTED_OPERATION This control is neither movable nor resizable.\r
769          * @exception   E_INVALID_ARG                   A specified input parameter is invalid.\r
770          * @exception   E_SYSTEM                                A system error has occurred.\r
771          * @remarks             Do not override this method.\r
772          * @remarks             The size of the control must be within the range defined by the minimum size and the maximum size.\r
773          * @see                 IsMovable()\r
774          * @see                 IsResizable()\r
775          * @see                 GetMinimumSize()\r
776          * @see                 GetMaximumSize()\r
777          * @see                 SetPosition()\r
778          * @see                 SetSize()\r
779          */\r
780         result SetBounds(float x, float y, float width, float height);\r
781 \r
782         /**\r
783          * Sets the relative position of the control.\r
784          *\r
785          * @since               2.0\r
786          *\r
787          * @return              An error code\r
788          * @param[in]   Position                                The new position\r
789          * @exception   E_SUCCESS                               The method is successful.\r
790          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.\r
791          * @exception   E_UNSUPPORTED_OPERATION This control is not movable.\r
792          * @exception   E_SYSTEM                                A system error has occurred.\r
793          * @remarks             Do not override this method.\r
794          * @remarks             The position of the control are relative to the top-left corner of its parent.\r
795          * @see                 IsMovable()\r
796          * @see                 SetBounds()\r
797          */\r
798         result SetPosition(const Tizen::Graphics::Point& position);\r
799 \r
800         /**\r
801          * Sets the relative position of the control.\r
802          *\r
803          * @since               2.1\r
804          *\r
805          * @return              An error code\r
806          * @param[in]   Position                                The new position\r
807          * @exception   E_SUCCESS                               The method is successful.\r
808          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.\r
809          * @exception   E_UNSUPPORTED_OPERATION This control is not movable.\r
810          * @exception   E_SYSTEM                                A system error has occurred.\r
811          * @remarks             Do not override this method.\r
812          * @remarks             The position of the control are relative to the top-left corner of its parent.\r
813          * @see                 IsMovable()\r
814          * @see                 SetBounds()\r
815          */\r
816         result SetPosition(const Tizen::Graphics::FloatPoint& position);\r
817 \r
818         /**\r
819          * Sets the position of the control.\r
820          *\r
821          * @since               2.0\r
822          * @return              An error code\r
823          * @param[in]   x                                               The new x position of the control\r
824          * @param[in]   y                                               The new y position of the control\r
825          * @exception   E_SUCCESS                               The method is successful.\r
826          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.\r
827          * @exception   E_UNSUPPORTED_OPERATION This control is not movable.\r
828          * @exception   E_SYSTEM                                A system error has occurred.\r
829          * @remarks             Do not override this method.\r
830          * @remarks             The x,y position of the control are relative to the top-left corner of its parent.\r
831          * @see                 IsMovable()\r
832          * @see                 SetBounds()\r
833          */\r
834         result SetPosition(int x, int y);\r
835 \r
836         /**\r
837          * Sets the position of the control.\r
838          *\r
839          * @since               2.1\r
840          * @return              An error code\r
841          * @param[in]   x                                               The new x position of the control\r
842          * @param[in]   y                                               The new y position of the control\r
843          * @exception   E_SUCCESS                               The method is successful.\r
844          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.\r
845          * @exception   E_UNSUPPORTED_OPERATION This control is not movable.\r
846          * @exception   E_SYSTEM                                A system error has occurred.\r
847          * @remarks             Do not override this method.\r
848          * @remarks             The x,y position of the control are relative to the top-left corner of its parent.\r
849          * @see                 IsMovable()\r
850          * @see                 SetBounds()\r
851          */\r
852         result SetPosition(float x, float y);\r
853 \r
854         /**\r
855          * Sets the size of the control. @n
856          * The @c width and @c height parameters contain the width and height values of the object, respectively.\r
857          *\r
858          * @since               2.0\r
859          *\r
860          * @return              An error code\r
861          * @param[in]   size                                    The new width and height\r
862          * @exception   E_SUCCESS                               The method is successful.\r
863          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.\r
864          * @exception   E_UNSUPPORTED_OPERATION This control is not resizable.\r
865          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.\r
866          * @exception   E_SYSTEM                                A system error has occurred.\r
867          * @remarks             Do not override this method.\r
868          * @remarks             The size of the control must be within the range defined by the minimum size and the maximum size.\r
869          * @see                 IsResizable()\r
870          * @see                 GetMinimumSize()\r
871          * @see                 GetMaximumSize()\r
872          * @see                 SetBounds()\r
873          */\r
874         result SetSize(const Tizen::Graphics::Dimension& size);\r
875 \r
876         /**\r
877          * Sets the size of the control.\r
878          * The @c width and @c height parameters contain the width and height values of the object, respectively.\r
879          *\r
880          * @since               2.1\r
881          *\r
882          * @return              An error code\r
883          * @param[in]   size                                    The new width and height\r
884          * @exception   E_SUCCESS                               The method is successful.\r
885          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.\r
886          * @exception   E_UNSUPPORTED_OPERATION This control is not resizable.\r
887          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.\r
888          * @exception   E_SYSTEM                                A system error has occurred.\r
889          * @remarks             Do not override this method.\r
890          * @remarks             The size of the control must be within the range defined by the minimum size and the maximum size.\r
891          * @see                 IsResizable()\r
892          * @see                 GetMinimumSize()\r
893          * @see                 GetMaximumSize()\r
894          * @see                 SetBounds()\r
895          */\r
896         result SetSize(const Tizen::Graphics::FloatDimension& size);\r
897 \r
898         /**\r
899          * Sets the size of the control. @n
900          * The @c width and @c height parameters contain the width and height values of the object, respectively.\r
901          *\r
902          * @since       2.0\r
903          *\r
904          * @return              An error code\r
905          * @param[in]   width                                   The new width of the control\r
906          * @param[in]   height                                  The new height of the control\r
907          * @exception   E_SUCCESS                               The method is successful.\r
908          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.\r
909          * @exception   E_UNSUPPORTED_OPERATION This control is not resizable.\r
910          * @exception   E_INVALID_ARG                   A specified input parameter is invalid.\r
911          * @exception   E_SYSTEM                                A system error has occurred.\r
912          * @remarks             Do not override this method.\r
913          * @remarks             The size of the control must be within the range defined by the minimum size and the maximum size.\r
914          * @see                 IsResizable()\r
915          * @see                 GetMinimumSize()\r
916          * @see                 GetMaximumSize()\r
917          * @see                 SetBounds()\r
918          */\r
919         result SetSize(int width, int height);\r
920 \r
921         /**\r
922          * Sets the size of the control.\r
923          * The @c width and @c height parameters contain the width and height values of the object, respectively.\r
924          *\r
925          * @since       2.1\r
926          *\r
927          * @return              An error code\r
928          * @param[in]   width                                   The new width of the control\r
929          * @param[in]   height                                  The new height of the control\r
930          * @exception   E_SUCCESS                               The method is successful.\r
931          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.\r
932          * @exception   E_UNSUPPORTED_OPERATION This control is not resizable.\r
933          * @exception   E_INVALID_ARG                   A specified input parameter is invalid.\r
934          * @exception   E_SYSTEM                                A system error has occurred.\r
935          * @remarks             Do not override this method.\r
936          * @remarks             The size of the control must be within the range defined by the minimum size and the maximum size.\r
937          * @see                 IsResizable()\r
938          * @see                 GetMinimumSize()\r
939          * @see                 GetMaximumSize()\r
940          * @see                 SetBounds()\r
941          */\r
942         result SetSize(float width, float height);\r
943 \r
944         /**\r
945          * Sets the minimum size of the control.\r
946          *\r
947          * @since               2.0\r
948          *\r
949          * @return              An error code\r
950          * @param[in]   newMinDim                               The new minimum size of the control\r
951          * @exception   E_SUCCESS                               The method is successful.\r
952          * @exception   E_UNSUPPORTED_OPERATION This control is not resizable.\r
953          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.\r
954          * @exception   E_SYSTEM                                A system error has occurred.\r
955          * @remarks             This method can affect the maximum size and the current size of the control. @n\r
956          *                              The control needs to be redrawn to reflect the change in its size. @n\r
957          *                              If the current maximum size or the control size is smaller than the new minimum size,\r
958          *                              it becomes the same as the new minimum size.\r
959          * @see                 IsResizable()\r
960          */\r
961         result SetMinimumSize(const Tizen::Graphics::Dimension& newMinDim);\r
962 \r
963         /**\r
964          * Sets the minimum size of the control.\r
965          *\r
966          * @since               2.1\r
967          *\r
968          * @return              An error code\r
969          * @param[in]   newMinDim                               The new minimum size of the control\r
970          * @exception   E_SUCCESS                               The method is successful.\r
971          * @exception   E_UNSUPPORTED_OPERATION This control is not resizable.\r
972          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.\r
973          * @exception   E_SYSTEM                                A system error has occurred.\r
974          * @remarks             This method can affect the maximum size and the current size of the control. @n\r
975          *                              The control needs to be redrawn to reflect the change in its size. @n\r
976          *                              If the current maximum size or the control size is smaller than the new minimum size,\r
977          *                              it becomes the same as the new minimum size.\r
978          * @see                 IsResizable()\r
979          */\r
980         result SetMinimumSize(const Tizen::Graphics::FloatDimension& newMinDim);\r
981 \r
982         /**\r
983          * Sets the maximum size of the control.\r
984          *\r
985          * @since               2.0\r
986          *\r
987          * @return              An error code\r
988          * @param[in]   newMaxDim                                       The new maximum size of the control\r
989          * @exception   E_SUCCESS                               The method is successful.\r
990          * @exception   E_UNSUPPORTED_OPERATION This control is not resizable.\r
991          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.\r
992          * @exception   E_SYSTEM                                A system error has occurred.\r
993          * @remarks             This method can affect the minimum size and the current size of the control. @n\r
994          *                              The control needs to be redrawn to reflect the change in its size. @n\r
995          *                              If the current minimum size or the control size is greater than the new maximum size,\r
996          *                              it becomes the same as the new maximum size.\r
997          * @see                 IsResizable()\r
998          */\r
999         result SetMaximumSize(const Tizen::Graphics::Dimension& newMaxDim);\r
1000 \r
1001         /**\r
1002          * Sets the maximum size of the control.\r
1003          *\r
1004          * @since               2.1\r
1005          *\r
1006          * @return              An error code\r
1007          * @param[in]   newMaxDim                                       The new maximum size of the control\r
1008          * @exception   E_SUCCESS                               The method is successful.\r
1009          * @exception   E_UNSUPPORTED_OPERATION This control is not resizable.\r
1010          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.\r
1011          * @exception   E_SYSTEM                                A system error has occurred.\r
1012          * @remarks             This method can affect the minimum size and the current size of the control. @n\r
1013          *                              The control needs to be redrawn to reflect the change in its size. @n\r
1014          *                              If the current minimum size or the control size is greater than the new maximum size,\r
1015          *                              it becomes the same as the new maximum size.\r
1016          * @see                 IsResizable()\r
1017          */\r
1018         result SetMaximumSize(const Tizen::Graphics::FloatDimension& newMaxDim);\r
1019 \r
1020         /**\r
1021          * Converts the specified screen position to the position in control's coordinate system.\r
1022          *\r
1023          * @since 2.0\r
1024          *\r
1025          * @return      The position relative to the top-left corner of the control's client-area\r
1026          * @param[in]   screenPosition  The position relative to the top-left corner of the screen\r
1027          * @see         ConvertToScreenPosition()\r
1028          */\r
1029         Tizen::Graphics::Point ConvertToControlPosition(const Tizen::Graphics::Point& screenPosition) const;\r
1030 \r
1031         /**\r
1032          * Converts the specified screen position to the position in control's coordinate system.\r
1033          *\r
1034          * @since 2.1\r
1035          *\r
1036          * @return      The position relative to the top-left corner of the control's client-area\r
1037          * @param[in]   screenPosition  The position relative to the top-left corner of the screen\r
1038          * @see         ConvertToScreenPosition()\r
1039          */\r
1040         Tizen::Graphics::FloatPoint ConvertToControlPosition(const Tizen::Graphics::FloatPoint& screenPosition) const;\r
1041 \r
1042         /**\r
1043          * Converts the specified position in the control's coordinate system to the screen position.\r
1044          *\r
1045          * @since 2.0\r
1046          *\r
1047          * @return      The position relative to the top-left corner of the screen\r
1048          * @param[in]   controlPosition         The position relative to the top-left corner of the control's client-area\r
1049          * @see         ConvertToControlPosition()\r
1050          */\r
1051         Tizen::Graphics::Point ConvertToScreenPosition(const Tizen::Graphics::Point& controlPosition) const;\r
1052 \r
1053         /**\r
1054          * Converts the specified position in the control's coordinate system to the screen position.\r
1055          *\r
1056          * @since 2.1\r
1057          *\r
1058          * @return      The position relative to the top-left corner of the screen\r
1059          * @param[in]   controlPosition         The position relative to the top-left corner of the control's client-area\r
1060          * @see         ConvertToControlPosition()\r
1061          */\r
1062         Tizen::Graphics::FloatPoint ConvertToScreenPosition(const Tizen::Graphics::FloatPoint& controlPosition) const;\r
1063 \r
1064         /**\r
1065          * Sets the font of the control.\r
1066          *\r
1067          * @since 2.0\r
1068          *\r
1069          * @return      An error code\r
1070          * @param[in]   fontName                        The app font name or system font name @n\r
1071          *                                              The app font name is retrieved using Tizen::Graphics::Font::GetFaceName(Tizen::Base::String& filepath). @n\r
1072          *                                              The system font name is retrieved using Tizen::Graphics::Font::GetSystemFontListN().\r
1073          *                                              Sets an empty string to reset.\r
1074          * @exception   E_SUCCESS                       The method is successful.\r
1075          * @exception   E_FILE_NOT_FOUND                The specified font cannot be found or accessed.\r
1076          * @remarks     At first, the value of @c fontName is considered app font name if it matches one of the face names of the font files which are located in @b '/res/font'.\r
1077          *              If not, the value of @c fontName is considered system font name if it matches one of the retrieved values using Tizen::Graphics::Font::GetSystemFontListN().\r
1078          * @remarks     The control first attempts to find the control font. If it fails, then it searches for the application default font and the system font, in sequence.\r
1079          * @see         GetFont()\r
1080          */\r
1081         result SetFont(const Tizen::Base::String& fontName);\r
1082 \r
1083         /**\r
1084          * Checks whether the specified @c point is inside the control.\r
1085          *\r
1086          * @since               2.0\r
1087          *\r
1088          * @return              @c true if the specified @c point is inside the control, @n\r
1089          *                              else @c false\r
1090          * @param[in]   point The point to check\r
1091          * @remarks             The specified @c point must be defined relative to the top-left corner of the control.\r
1092          */\r
1093         bool Contains(const Tizen::Graphics::Point& point) const;\r
1094 \r
1095         /**\r
1096          * Checks whether the specified @c point is inside the control.\r
1097          *\r
1098          * @since               2.1\r
1099          *\r
1100          * @return              @c true if the specified @c point is inside the control, @n\r
1101          *                              else @c false\r
1102          * @param[in]   point The point to check\r
1103          * @remarks             The specified @c point must be defined relative to the top-left corner of the control.\r
1104          */\r
1105         bool Contains(const Tizen::Graphics::FloatPoint& point) const;\r
1106 \r
1107         /**\r
1108          * Checks whether the specified point is inside the control.\r
1109          *\r
1110          * @since               2.0\r
1111          *\r
1112          * @return              @c true if the specified point is inside the control, @n\r
1113          *                              else @c false\r
1114          * @param[in]   x The x position of the point to check\r
1115          * @param[in]   y The y position of the point to check\r
1116          * @remarks             The specified point must be defined relative to the top-left corner of the control.\r
1117          */\r
1118         bool Contains(int x, int y) const;\r
1119 \r
1120         /**\r
1121          * Checks whether the specified point is inside the control.\r
1122          *\r
1123          * @since               2.1\r
1124          *\r
1125          * @return              @c true if the specified point is inside the control, @n\r
1126          *                              else @c false\r
1127          * @param[in]   x The x position of the point to check\r
1128          * @param[in]   y The y position of the point to check\r
1129          * @remarks             The specified point must be defined relative to the top-left corner of the control.\r
1130          */\r
1131         bool Contains(float x, float y) const;\r
1132 \r
1133         /**\r
1134          * Draws child controls recursively.\r
1135          *\r
1136          * @if OSPCOMPAT\r
1137          * @brief <i> [Compatibility] </i>\r
1138          * @endif\r
1139          * @since                    2.0\r
1140          *\r
1141          * @if OSPCOMPAT\r
1142          * @compatibility This method has compatibility issues with OSP compatible applications. @n\r
1143          *                       For more information, see @ref CompDrawPage "here".\r
1144          * @endif\r
1145          * @return                  An error code\r
1146          * @exception    E_SUCCESS           The method is successful.\r
1147          * @exception    E_INVALID_OPERATION    The current state of the instance prohibits the execution of the specified operation. @n\r
1148          *                                                                                             Note: This control cannot be displayed.\r
1149          * @exception    E_SYSTEM                              A system error has occurred.\r
1150          * @remarks     This method calls OnDraw() immediately in a synchronous way.\r
1151          * @see                      Show()\r
1152          */\r
1153         result Draw(void);\r
1154 \r
1155         /**\r
1156          * @if OSPCOMPAT\r
1157          * @page               CompDrawPage        Compatibility for Draw()\r
1158          * @section            CompDrawPageIssueSection          Issues\r
1159          * Implementation of this method in %Tizen API versions prior to 2.1 has the following issue: @n\r
1160          * -# Draw() method draws child controls in a recursive way regardless of the visibility of the parent.\r
1161          *\r
1162          * @section            CompDrawPageSolutionSection               Resolutions\r
1163          * The issue mentioned above is resolved in %Tizen API version 2.1 as follows: @n\r
1164          * -# Draw() method does not draw child controls if the control itself is not visible.\r
1165          * @endif\r
1166          */\r
1167 \r
1168         /**\r
1169          * Draws the control.\r
1170          *\r
1171          * @since 2.0\r
1172          *\r
1173          * @param[in]   recursive               Set to @c true to draw child controls recursively, @n\r
1174          *                                                                              else @c false\r
1175          * @return      An error code\r
1176          * @exception   E_SUCCESS               The method is successful.\r
1177          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n\r
1178          *              Note: This control cannot be displayed.\r
1179          * @exception   E_SYSTEM                              A system error has occurred.\r
1180          * @remarks     This method calls OnDraw() immediately in a synchronous way.\r
1181          * @see         Show()\r
1182          */\r
1183         result Draw(bool recursive);\r
1184 \r
1185         /**\r
1186          * Shows the control on the screen.\r
1187          *\r
1188          * @since               2.0\r
1189          * @final       Although this method is virtual, it should not be overridden.\r
1190      * If overridden, it may not work as expected.\r
1191          *\r
1192          * @return              An error code\r
1193          * @exception   E_SUCCESS                       The method is successful.\r
1194          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n\r
1195          *                                                                      Note: This control cannot be displayed.\r
1196          * @exception   E_SYSTEM                        A system error has occurred.\r
1197          * @remarks             Do not override this method.\r
1198          */\r
1199         virtual result Show(void);\r
1200 \r
1201         /**\r
1202          * Invalidates the control.\r
1203          *\r
1204          * @since 2.0\r
1205          *\r
1206          * @param[in]   recursive       Set to @c true to invalidate child controls recursively, @n\r
1207          *                                                      else @c false\r
1208          * @exception   E_SUCCESS           The method is successful.\r
1209          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n\r
1210          *                                                                      Note: This control cannot be displayed.\r
1211          * @exception   E_SYSTEM                        A system error has occurred.\r
1212          * @remarks             The specific error code can be accessed using the GetLastResult() method.\r
1213          * @remarks             OnDraw() is not called immediately, but called asynchronously just before the screen is updated.\r
1214          * @see                 InvalidateBounds()\r
1215          * @see                 Show()\r
1216          */\r
1217         void Invalidate(bool recursive);\r
1218 \r
1219         /**\r
1220          * Invalidates the control of the specified position and size.\r
1221          *\r
1222          * @since 2.0\r
1223          *\r
1224          * @param[in]    bounds                 The position relative to the top-left corner of the control\r
1225          * @exception   E_SUCCESS           The method is successful.\r
1226          * @exception   E_INVALID_OPERATION  The current state of the instance prohibits the execution of the specified operation. @n\r
1227          *                                                                                             Note: This control cannot be displayed.\r
1228          * @remarks  The specific error code can be accessed using the GetLastResult() method.\r
1229          * @see                 Invalidate()\r
1230          * @see                 Show()\r
1231          */\r
1232         void InvalidateBounds(const Tizen::Graphics::Rectangle& bounds);\r
1233 \r
1234         /**\r
1235          * Invalidates the control of the specified position and size.\r
1236          *\r
1237          * @since 2.1\r
1238          *\r
1239          * @param[in]    bounds                 The position relative to the top-left corner of the control\r
1240          * @exception   E_SUCCESS           The method is successful.\r
1241          * @exception   E_INVALID_OPERATION  The current state of the instance prohibits the execution of the specified operation. @n\r
1242          *                                                                                             Note: This control cannot be displayed.\r
1243          * @remarks  The specific error code can be accessed using the GetLastResult() method.\r
1244          * @see                 Invalidate()\r
1245          * @see                 Show()\r
1246          */\r
1247         void InvalidateBounds(const Tizen::Graphics::FloatRectangle& bounds);\r
1248 \r
1249         /**\r
1250          * Draws the control asynchronously.\r
1251          *\r
1252          * @since               2.0\r
1253          *\r
1254          * @param[in]   show    Set to @c true to also show the %Control, @n\r
1255          *                                              else @c false\r
1256          * @remarks             This method posts a draw event in the event queue. @n\r
1257          *                              Drawing requested by %RequestRedraw() occurs when the draw event is fired to the control.\r
1258          */\r
1259         void RequestRedraw(bool show = true) const;\r
1260 \r
1261         /**\r
1262          * Creates and returns a graphics canvas whose bounds (that is, position and size) are equal to those\r
1263          * of the control.\r
1264          *\r
1265          * @since               2.0\r
1266          *\r
1267          * @return              The graphic canvas of the control, @n\r
1268          *                              else @c null if an exception occurs\r
1269          * @exception   E_SUCCESS                               The method is successful.\r
1270          * @exception   E_SYSTEM                        A system error has occurred.\r
1271          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.\r
1272          * @remarks             The method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the control.\r
1273          *                              It is the developer's responsibility to deallocate the canvas after use.\r
1274          *                              The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged.\r
1275          *                              Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method\r
1276          *                              if the size or position of the control is changed.\r
1277          * @remarks             The specific error code can be accessed using the GetLastResult() method.\r
1278          * @remarks             The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,\r
1279          *                              if custom drawing is performed on the graphic canvas of Frame and Form\r
1280          *                              then it will appear on the screen regardless of which control is currently visible on the screen.\r
1281          * @see                 GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const\r
1282          * @see                 GetCanvasN(int x, int y, int width, int height) const\r
1283          * @code\r
1284          * result\r
1285          * MyForm::OnDraw(void)\r
1286          * {\r
1287          *     result r = E_SUCCESS;\r
1288          *     Canvas* pCanvas = GetCanvasN();\r
1289          *     if (pCanvas != null)\r
1290          *     {\r
1291          *         // add your drawing code here\r
1292          *     }\r
1293          *     if (pCanvas)\r
1294          *         delete pCanvas;\r
1295          *         // Do not call Show(). It will be called automatically after OnDraw() callback.\r
1296          *     return r;\r
1297          * }\r
1298          * @endcode\r
1299          */\r
1300         Tizen::Graphics::Canvas* GetCanvasN(void) const;\r
1301 \r
1302         /**\r
1303          * Creates and returns a graphic canvas of the control of the specified position and size.\r
1304          *\r
1305          * @since               2.0\r
1306          *\r
1307          * @return              The graphic canvas of the control, @n\r
1308          *                              else @c null if an exception occurs\r
1309          * @param[in]   bounds          The bounds of the graphic canvas\r
1310          * @exception   E_SUCCESS                               The method is successful.\r
1311          * @exception   E_OUT_OF_RANGE                  The specified bounds does not intercept with the bounds of the control.\r
1312          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.\r
1313          * @remarks             Only the graphic canvas of displayable controls can be obtained.\r
1314          *                              If the specified area is not inside the control,\r
1315          *                              the graphics canvas of overlapped area between the control and the specified bound is returned. @n\r
1316          * @remarks             The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control.\r
1317          *                              It is the developer's responsibility to deallocate the canvas after use.\r
1318          *                              The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged.\r
1319          *                              Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method\r
1320          *                              if the size or position of the control is changed.\r
1321          * @remarks             The specific error code can be accessed using the GetLastResult() method.\r
1322          * @remarks             The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,\r
1323          *                              if custom drawing is performed on the graphic canvas of Frame and Form\r
1324          *                              then it will appear on the screen regardless of which control is currently visible on the screen.\r
1325          * @see                 GetCanvasN(void) const\r
1326          * @see                 GetCanvasN(int x, int y, int width, int height) const\r
1327          */\r
1328         Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const;\r
1329 \r
1330         /**\r
1331          * Creates and returns a graphic canvas of the control of the specified position and size.\r
1332          *\r
1333          * @since               2.1\r
1334          *\r
1335          * @return              The graphic canvas of the control, @n\r
1336          *                              else @c null if an exception occurs\r
1337          * @param[in]   bounds          The bounds of the graphic canvas\r
1338          * @exception   E_SUCCESS                               The method is successful.\r
1339          * @exception   E_OUT_OF_RANGE                  The specified bounds does not intercept with the bounds of the control.\r
1340          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.\r
1341          * @remarks             Only the graphic canvas of displayable controls can be obtained.\r
1342          *                              If the specified area is not inside the control,\r
1343          *                              the graphics canvas of overlapped area between the control and the specified bound is returned. @n\r
1344          * @remarks             The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control.\r
1345          *                              It is the developer's responsibility to deallocate the canvas after use.\r
1346          *                              The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged.\r
1347          *                              Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method\r
1348          *                              if the size or position of the control is changed.\r
1349          * @remarks             The specific error code can be accessed using the GetLastResult() method.\r
1350          * @remarks             The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,\r
1351          *                              if custom drawing is performed on the graphic canvas of Frame and Form\r
1352          *                              then it will appear on the screen regardless of which control is currently visible on the screen.\r
1353          * @see                 GetCanvasN(void) const\r
1354          * @see                 GetCanvasN(float x, float y, float width, float height) const\r
1355          */\r
1356         Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds) const;\r
1357 \r
1358         /**\r
1359          * Creates and returns a graphic canvas of the specified position and size in the control.\r
1360          *\r
1361          * @since               2.0\r
1362          *\r
1363          * @return              The graphic canvas of the control, @n\r
1364          *                              else @c null if an exception occurs\r
1365          * @param[in]   x  The x position relative to the top-left corner of the control\r
1366          * @param[in]   y  The y position relative to the top-left corner of the control\r
1367          * @param[in]   width   The width of a graphic canvas\r
1368          * @param[in]   height  The height of a graphic canvas\r
1369          * @exception   E_SUCCESS                               The method is successful.\r
1370          * @exception   E_OUT_OF_RANGE                  The specified bounds do not intercept with the bounds of the control.\r
1371          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.\r
1372          * @remarks             Only the graphic canvas of displayable controls can be obtained.\r
1373          *                              If the specified area is not inside the control,\r
1374          *                              the graphics canvas of the overlapped area between the control and the specified bound is returned. @n\r
1375          * @remarks             The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control.\r
1376          *                              It is the developer's responsibility to deallocate the canvas after use.\r
1377          *                              The canvas is guaranteed to be valid only if properties of the parent controls of the canvas remain unchanged.\r
1378          *                              Therefore, one must delete the previously allocated canvas and create a new canvas using the %GetCanvasN() method\r
1379          *                              if the size or position of the control is changed.\r
1380          * @remarks             The specific error code can be accessed using the GetLastResult() method.\r
1381          * @remarks             The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,\r
1382          *                              if custom drawing is performed on the graphic canvas of Frame and Form\r
1383          *                              then it will appear on the screen regardless of which control is currently visible on the screen.\r
1384          * @see                 GetCanvasN(void) const\r
1385          * @see                 GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const\r
1386          */\r
1387         Tizen::Graphics::Canvas* GetCanvasN(int x, int y, int width, int height) const;\r
1388 \r
1389         /**\r
1390          * Creates and returns a graphic canvas of the specified position and size in the control.\r
1391          *\r
1392          * @since               2.1\r
1393          *\r
1394          * @return              The graphic canvas of the control, @n\r
1395          *                              else @c null if an exception occurs\r
1396          * @param[in]   x  The x position relative to the top-left corner of the control\r
1397          * @param[in]   y  The y position relative to the top-left corner of the control\r
1398          * @param[in]   width   The width of a graphic canvas\r
1399          * @param[in]   height  The height of a graphic canvas\r
1400          * @exception   E_SUCCESS                               The method is successful.\r
1401          * @exception   E_OUT_OF_RANGE                  The specified bounds do not intercept with the bounds of the control.\r
1402          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.\r
1403          * @remarks             Only the graphic canvas of displayable controls can be obtained.\r
1404          *                              If the specified area is not inside the control,\r
1405          *                              the graphics canvas of the overlapped area between the control and the specified bound is returned. @n\r
1406          * @remarks             The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control.\r
1407          *                              It is the developer's responsibility to deallocate the canvas after use.\r
1408          *                              The canvas is guaranteed to be valid only if properties of the parent controls of the canvas remain unchanged.\r
1409          *                              Therefore, one must delete the previously allocated canvas and create a new canvas using the %GetCanvasN() method\r
1410          *                              if the size or position of the control is changed.\r
1411          * @remarks             The specific error code can be accessed using the GetLastResult() method.\r
1412          * @remarks             The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,\r
1413          *                              if custom drawing is performed on the graphic canvas of Frame and Form\r
1414          *                              then it will appear on the screen regardless of which control is currently visible on the screen.\r
1415          * @see                 GetCanvasN(void) const\r
1416          * @see                 GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds) const\r
1417          */\r
1418         Tizen::Graphics::Canvas* GetCanvasN(float x, float y, float width, float height) const;\r
1419 \r
1420         /**\r
1421          * Checks whether the control is currently visible on the screen.\r
1422          *\r
1423          * @since               2.0\r
1424          *\r
1425          * @return              @c true if the control is currently visible on the screen, @n\r
1426          *                              else @c false\r
1427          * @remarks             If this method is called before the control is added to a parent, @c false is returned.\r
1428          * @see                 GetShowState()\r
1429          * @see                 SetShowState()\r
1430          */\r
1431         bool IsVisible(void) const;\r
1432 \r
1433         /**\r
1434          * Gets the current show state of the control.\r
1435          *\r
1436          * @since               2.0\r
1437          *\r
1438          * @return              The show state of the control\r
1439          * @remarks             Even if the control's state is "show", the control may not be visible.\r
1440          * @see                 SetShowState()\r
1441          * @see                 IsVisible()\r
1442          */\r
1443         bool GetShowState(void) const;\r
1444 \r
1445         /**\r
1446          * Sets the show state of the control.\r
1447          *\r
1448          * @since               2.0\r
1449          *\r
1450          * @return              An error code\r
1451          * @param[in]   state                           The new show state\r
1452          * @exception   E_SUCCESS                       The method is successful.\r
1453          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.\r
1454          *                                                                      Note: This control cannot be displayed.\r
1455          * @exception   E_SYSTEM                        A system error has occurred.\r
1456          * @remarks             Do not override this method.\r
1457          * @remarks             Even if this method is invoked, the control is not drawn or shown. @n\r
1458          *                              To display the control, use the Invalidate() methods. @n
1459          *                              Once the control's show state is set to @c false,\r
1460          *                              the show state needs to be set to @c true again before you invalidate the control.\r
1461          * @see                 GetShowState()\r
1462          * @see                 Invalidate()\r
1463          */\r
1464         result SetShowState(bool state);\r
1465 \r
1466         /**\r
1467          * Gets the dedicated %VisualElement instance for this control.\r
1468          *\r
1469          * @since               2.0\r
1470          *\r
1471          * @return              An instance of the VisualElement\r
1472          * @remarks             If an application developer modifies the state of the returned VisualElement\r
1473          *                              and the host control is not aware of this change, then the control may behave egregiously.\r
1474          *                              It is highly recommended to restore the %VisualElement state to avoid such conflicts.\r
1475          */\r
1476         Tizen::Ui::Animations::VisualElement* GetVisualElement(void) const;\r
1477 \r
1478         /**\r
1479          * Gets the parent of the control.\r
1480          *\r
1481          * @since               2.0\r
1482          *\r
1483          * @return              The current parent of the control\r
1484          */\r
1485         Container* GetParent(void) const;\r
1486 \r
1487         /**\r
1488          * Gets the name of the control.\r
1489          *\r
1490          * @since               2.0\r
1491          *\r
1492          * @return              The name of the control\r
1493          */\r
1494         Tizen::Base::String GetName(void) const;\r
1495 \r
1496         /**\r
1497          * Sets the name of the control.\r
1498          *\r
1499          * @since               2.0\r
1500          *\r
1501          * @param[in]   name    The name of the control\r
1502          */\r
1503         void SetName(const Tizen::Base::String& name);\r
1504 \r
1505         /**\r
1506          * Checks whether the control is focusable.\r
1507          *\r
1508          * @since               2.0\r
1509          *\r
1510          * @return              @c true if control is focusable, @n\r
1511          *                              else @c false\r
1512          * @remarks             The focus ability of the container classes like Panel is @c false by default.\r
1513          */\r
1514         bool IsFocusable(void) const;\r
1515 \r
1516         /**\r
1517          * Sets the focus ability of the control. @n\r
1518          * Non-Focusable controls cannot take the key focus.\r
1519          *\r
1520          * @since               2.0\r
1521          *\r
1522          * @return              An error code\r
1523          * @exception   E_SUCCESS                       The method is successful.\r
1524          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.\r
1525          *                                                                      Note: The control does not permit to change its focus ability.\r
1526          * @exception   E_SYSTEM                        A system error has occurred.\r
1527          * @remarks             The focus ability of the container classes like Panel is @c false by default.\r
1528          * @remarks             The RadioGroup class does not render the UI.\r
1529          *                              Therefore, RadioGroup::SetFocusable() returns @c E_SYSTEM.\r
1530          */\r
1531         result SetFocusable(bool focusable);\r
1532 \r
1533         /**\r
1534          * Checks whether the control currently has the input focus.\r
1535          *\r
1536          * @since               2.0\r
1537          *\r
1538          * @return              @c true if the control currently has the input focus, @n\r
1539          *                              else @c false\r
1540          * @remarks             If this method is called before the control is added to a parent, @c false is returned.\r
1541          * @see                 SetFocus()\r
1542          */\r
1543         bool HasFocus(void) const;\r
1544 \r
1545         /**\r
1546          * Sets the focus to the control. @n\r
1547          * This method is called if the control needs to listen to user input events such as key pressed.\r
1548          *\r
1549          * @since               2.0\r
1550          *\r
1551          * @return              An error code\r
1552          * @exception   E_SUCCESS                       The method is successful.\r
1553          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.\r
1554          *                                                                      Note: This control cannot be displayed.\r
1555          * @exception   E_INVALID_CONDITION     The control is not contained in, or is not the top z-order frame or form.\r
1556          * @remarks             Do not override this method.\r
1557          */\r
1558         result SetFocus(void);\r
1559 \r
1560         /**\r
1561          * Checks whether the control is enabled.\r
1562          *\r
1563          * @since               2.0\r
1564          *\r
1565          * @return              @c true if the control is enabled, @n\r
1566          *                              else @c false\r
1567          * @remarks             If this method is called before the control is added to a parent, @c false is returned.\r
1568          * @see                 SetEnabled()\r
1569          */\r
1570         bool IsEnabled(void) const;\r
1571 \r
1572         /**\r
1573          * Enables or disables the control. @n\r
1574          * Only an enabled control can respond to the user input. By default, the control is enabled.\r
1575          *\r
1576          * @since               2.0\r
1577          *\r
1578          * @return              An error code\r
1579          * @param[in]   enable                          The new state of the object\r
1580          * @exception   E_SUCCESS                       The method is successful.\r
1581          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.\r
1582          * @exception   E_SYSTEM                        A system error has occurred.\r
1583          * @remarks             Do not override this method.\r
1584          */\r
1585         result SetEnabled(bool enable);\r
1586 \r
1587         /**\r
1588          * Checks whether the device is in touch mode. @n\r
1589          * When the user interacts with the device by touching it, the device is in touch mode.\r
1590          *\r
1591          * @since               2.0\r
1592          *\r
1593          * @return              @c true if the device is in touch mode, @n\r
1594          *                              else @c false\r
1595          * @remarks             This method returns @c false, for devices with QWERTY keyboard.\r
1596          *                              The user can navigate the UI using directional keys.\r
1597          */\r
1598         bool IsInTouchMode(void) const;\r
1599 \r
1600         /**\r
1601          * Enables or disables the drag operation in the %Control.\r
1602          *\r
1603          * @since               2.0\r
1604          *\r
1605          * @param[in]   enable  Set to @c true to enable the drag operation, @n\r
1606          *                                              else @c false\r
1607          * @see                 SetDropEnabled()\r
1608          */\r
1609         void SetDragEnabled(bool enable);\r
1610 \r
1611         /**\r
1612          * Enables or disables the drop operations in the %Control.\r
1613          *\r
1614          * @since               2.0\r
1615          *\r
1616          * @param[in]   enable  Set to @c true to enable drop operations, @n\r
1617          *                              else @c false\r
1618          * @remarks             To receive drop event, control's drag property has to be enabled.\r
1619          * @see                 SetDragEnabled()\r
1620          */\r
1621         void SetDropEnabled(bool enable);\r
1622 \r
1623         /**\r
1624          * Sends a user event to the control.\r
1625          *\r
1626          * @since               2.0\r
1627          *\r
1628          * @param[in]   requestId The user-defined event ID\r
1629          * @param[in]   pArgs  A pointer to the argument list\r
1630          * @remarks             This method posts a user event in the event queue\r
1631          *                              and returns immediately to support asynchronous actions of the framework.\r
1632          * @see                 OnUserEventReceived()\r
1633          */\r
1634         void SendUserEvent(RequestId requestId, const Tizen::Base::Collection::IList* pArgs) const;\r
1635 \r
1636         /**\r
1637          * Stops the current UI event dispatch sequence by indicating the current input event is consumed.\r
1638          *\r
1639          * @brief <i> [Deprecated] </i>\r
1640          * @deprecated   This method is deprecated. Instead of using this method, use IPropagatedKeyEventListener or IPropagatedTouchEventListener to consume event. @n To propagate the event, return @c true inside the implementation of IPropagatedKeyEventListener or IPropagatedTouchEventListener.
1641          * @since                  2.0\r
1642          *\r
1643          * @return                 An error code\r
1644          * @exception E_SUCCESS                                   The method is successful.\r
1645          * @exception E_SYSTEM                                     A system error has occurred.\r
1646          * @remarks              If this method is invoked during an UI event (key or touch) propagation sequence,\r
1647          *                                        the method will stop the propagation and consequently the system will not be notified of the event.@n\r
1648          *                                        The method will not have any effect if no UI event is being dispatched. @n\r
1649          *                                        It is recommended that this method is called within IKeyEventListener or\r
1650          *                                        ITouchEventListener to stop the event from propagating to the next step.\r
1651          */\r
1652         result ConsumeInputEvent(void);\r
1653 \r
1654         /**\r
1655          * Gets the control animator of the current instance of %Control.\r
1656          *\r
1657          * @since               2.0\r
1658          *\r
1659          * @return              A pointer to ControlAnimator, @n\r
1660          *                              else @c null if this instance is not constructed or not added to a parent or non-animatable\r
1661          */\r
1662         Tizen::Ui::Animations::ControlAnimator* GetControlAnimator(void) const;\r
1663 \r
1664         /**\r
1665          * Adds the gesture detector to the %Control. @n\r
1666          * The added gesture detector receives touch events prior to %Control.\r
1667          *\r
1668          * @brief       <i> [Deprecated] </i>\r
1669          * @deprecated  This API is deprecated.\r
1670          * @since 2.0\r
1671          *\r
1672          * @return              An error code\r
1673          * @param[in]   gestureDetector                                 The gesture detector\r
1674          * @exception   E_SUCCESS                       The method is successful.\r
1675          * @see                 RemoveGestureDetector()\r
1676          */\r
1677         result AddGestureDetector(const TouchGestureDetector& gestureDetector);\r
1678 \r
1679         /**\r
1680          * Adds the gesture detector to the %Control. @n\r
1681          * The added gesture detector receives touch events prior to %Control.\r
1682          *\r
1683          * @since 2.1\r
1684          *\r
1685          * @return      An error code\r
1686          * @param[in]   pGestureDetector         Pointer of gesture detector\r
1687          * @exception   E_SUCCESS                The method is successful.\r
1688          * @exception   E_INVALID_ARG            The specified @c pGestureDetector is null.\r
1689          * @see           RemoveGestureDetector()\r
1690          */\r
1691         result AddGestureDetector(TouchGestureDetector* pGestureDetector);\r
1692 \r
1693         /**\r
1694          * Removes the gesture detector from the %Control.\r
1695          *\r
1696          * @brief       <i> [Deprecated] </i>\r
1697          * @deprecated  This API is deprecated.\r
1698          * @since 2.0\r
1699          *\r
1700          * @return                      An error code\r
1701          * @param[in]           gestureDetector         The gesture detector\r
1702          * @exception   E_SUCCESS                       The method is successful.\r
1703          * @see                 AddGestureDetector()\r
1704          */\r
1705         result RemoveGestureDetector(const TouchGestureDetector& gestureDetector);\r
1706 \r
1707         /**\r
1708          * Removes the gesture detector from the %Control.\r
1709          *\r
1710          * @since 2.1\r
1711          *\r
1712          * @return      An error code\r
1713          * @param[in]   pGestureDetector                Pointer of gesture detector\r
1714          * @exception   E_SUCCESS              The method is successful.\r
1715          * @exception   E_INVALID_ARG                   The specified @c pGestureDetector is null.\r
1716          * @see         AddGestureDetector()\r
1717          */\r
1718         result RemoveGestureDetector(TouchGestureDetector* pGestureDetector);\r
1719 \r
1720         /**\r
1721          * @if OSPDEPREC\r
1722          * Gets the composite mode for merging with other controls.\r
1723          *\r
1724          * @brief <i> [Deprecated] </i>\r
1725          * @deprecated  This method is deprecated because changing composition mode is not allowed any more.\r
1726          * @since               2.0\r
1727          *\r
1728          * @return              The composite mode\r
1729          * @exception   E_SUCCESS                               The method is successful.\r
1730          * @remarks             Since API version 2.1, this method only returns COMPOSITE_MODE_ALPHA_BLENDING.\r
1731          * @remarks             The specific error code can be accessed using the GetLastResult() method.\r
1732          * @endif\r
1733          */\r
1734         Tizen::Ui::CompositeMode GetCompositeMode(void) const;\r
1735 \r
1736         /**\r
1737          * @if OSPDEPREC\r
1738          * Sets the composite mode for merging with other controls.\r
1739          *\r
1740          * @brief <i> [Deprecated] </i>\r
1741          * @deprecated  This method is deprecated because changing composition mode is not allowed any more.\r
1742          * @since               2.0\r
1743          *\r
1744          * @return              An error code\r
1745          * @param[in]   compositeMode                   The composite mode\r
1746          * @exception   E_SUCCESS                               The method is successful.\r
1747          * @exception   E_UNSUPPORTED_OPERATION The method is not supported.\r
1748          * @remarks     In Tizen, only @c COMPOSITE_MODE_ALPHA_BLENDING is allowed.\r
1749          *              Otherwise, this method returns @c E_UNSUPPORTED_OPERATION.\r
1750          * @endif\r
1751          */\r
1752         result SetCompositeMode(Tizen::Ui::CompositeMode compositeMode);\r
1753 \r
1754         /**\r
1755          * @if OSPDEPREC\r
1756          * Gets the chroma key color value that is used for the control composition.\r
1757          *\r
1758          * @brief <i> [Deprecated]  </i>\r
1759          * @deprecated  This method is deprecated because chromakey color is not supported any more.\r
1760          * @since               2.0\r
1761          *\r
1762          * @return              The chroma key color\r
1763          * @exception   E_UNSUPPORTED_OPERATION The method is not supported.\r
1764          * @remarks     In Tizen, this method always fails and returns Tizen::Graphics::Color(0, 0, 0, 0).\r
1765          * @remarks     The specific error code can be accessed using the GetLastResult() method.\r
1766          * @endif\r
1767          */\r
1768         Tizen::Graphics::Color GetChromaKeyColor(void) const;\r
1769 \r
1770         /**\r
1771          * @if OSPDEPREC\r
1772          * Sets the chroma key color value that is used for the control composition.\r
1773          *\r
1774          * @brief <i> [Deprecated]  </i>\r
1775          * @deprecated  This method is deprecated because chromakey color is not supported any more.\r
1776          * @since               2.0\r
1777          *\r
1778          * @return              An error code\r
1779          * @param[in]   chromaKeyColor                  The chroma key color\r
1780          * @exception   E_UNSUPPORTED_OPERATION The method is not supported.\r
1781          * @remarks     In Tizen, this method always fails.\r
1782          * @endif\r
1783          */\r
1784         result SetChromaKeyColor(Tizen::Graphics::Color chromaKeyColor);\r
1785 \r
1786         /**\r
1787          * Sets the bounds of the content area.\r
1788          *\r
1789          * @since                    2.1\r
1790          *\r
1791          * @param[in]    rect      The bounds of the content area\r
1792          * @see                      GetContentAreaBounds()\r
1793          */\r
1794         void SetContentAreaBounds(const Tizen::Graphics::Rectangle& rect);\r
1795 \r
1796         /**\r
1797          * Sets the bounds of the content area.\r
1798          *\r
1799          * @since                    2.1\r
1800          *\r
1801          * @param[in]    rect      The bounds of the content area\r
1802          * @see                      GetContentAreaBoundsF()\r
1803          */\r
1804         void SetContentAreaBounds(const Tizen::Graphics::FloatRectangle& rect);\r
1805 \r
1806         /**\r
1807          * Gets the bounds of the content area.\r
1808          *\r
1809          * @since                     2.1\r
1810          *\r
1811          * @return        The bounds of the content area\r
1812          * @see                      SetContentAreaBounds()\r
1813          */\r
1814         Tizen::Graphics::Rectangle GetContentAreaBounds(void) const;\r
1815 \r
1816         /**\r
1817          * Gets the bounds of the content area.\r
1818          *\r
1819          * @since                     2.1\r
1820          *\r
1821          * @return        The bounds of the content area\r
1822          * @see                      SetContentAreaBoundsF()
1823          */\r
1824         Tizen::Graphics::FloatRectangle GetContentAreaBoundsF(void) const;\r
1825 \r
1826         /**\r
1827          * Captures the composited scene of the %Panel control.\r
1828          *\r
1829          * @since               2.0\r
1830          *\r
1831          * @return              A Tizen::Graphics::Bitmap instance that captures the current composited scene of the Panel control, @n\r
1832          *                              else @c null if an error occurs\r
1833          * @exception   E_SUCCESS                                       The method is successful.\r
1834          * @exception   E_UNSUPPORTED_OPERATION         This method is not supported.\r
1835          * @exception   E_SYSTEM                                        A system error has occurred.\r
1836          * @remarks             The specific error code can be accessed using the GetLastResult() method.\r
1837          * @remarks             This method is not supported in the following class that is derived from Panel class:\r
1838          *                              @li OverlayPanel\r
1839          * @remarks             The bounds of the %Panel control must be within the client area of the Form control to get a valid composited scene.\r
1840          */\r
1841         Tizen::Graphics::Bitmap* GetCapturedBitmapN(void) const;\r
1842 \r
1843         /**\r
1844          * Gets the position and the size of the invalidated bounds.\r
1845          *\r
1846          * @since 2.0\r
1847          *\r
1848          * @return              An instance of Tizen::Graphics::Rectangle that represents the position of top-left corner,\r
1849          *                                        the width, and the height of the invalidated bounds\r
1850          */\r
1851         Tizen::Graphics::Rectangle GetInvalidatedBounds(void) const;\r
1852 \r
1853         /**\r
1854          * Gets the position and the size of the invalidated bounds.\r
1855          *\r
1856          * @since 2.1\r
1857          *\r
1858          * @return              An instance of Tizen::Graphics::Rectangle that represents the position of top-left corner,\r
1859          *                                        the width, and the height of the invalidated bounds\r
1860          */\r
1861         Tizen::Graphics::FloatRectangle GetInvalidatedBoundsF(void) const;\r
1862 \r
1863         /**\r
1864          * Enables or disables the multi-point touch of the %Control.\r
1865          *\r
1866          * @since 2.0\r
1867          *\r
1868          * @param[in]   enable                          A Boolean flag indicating whether to enable the multi-point touch\r
1869          *\r
1870          * @see                 IsMultipointTouchEnabled()\r
1871          */\r
1872          void SetMultipointTouchEnabled(bool enable);\r
1873 \r
1874         /**\r
1875          * Checks whether the multi-point touch is enabled.\r
1876          *\r
1877          * @since 2.0\r
1878          *\r
1879          * @return              @c true if the multi-point touch is enabled, @n\r
1880          *                              else @c false\r
1881          * @see                 SetMultipointTouchEnabled()\r
1882          */\r
1883         bool IsMultipointTouchEnabled(void) const;\r
1884 \r
1885         /**\r
1886          * Gets the accessibility container.\r
1887          *\r
1888          * @since 2.0\r
1889          *\r
1890          * @return              The accessibility container of the control, if the control supports accessibility feature, @n
1891          *                              else @c null
1892          * @see                 AccessibilityContainer::GetOwner()\r
1893          */\r
1894         const AccessibilityContainer* GetAccessibilityContainer(void) const;\r
1895 \r
1896         /**\r
1897          * Gets the accessibility container.\r
1898          *\r
1899          * @since 2.0\r
1900          *\r
1901          * @return              The accessibility container of the control, if the control supports accessibility feature, @n
1902          *                              else @c null
1903          * @see                 AccessibilityContainer::GetOwner()\r
1904          */\r
1905         AccessibilityContainer* GetAccessibilityContainer(void);\r
1906 \r
1907         /**\r
1908          * Sets a propagated touch event listener to the %Control instance. @n
1909          * The registered listener is notified when a touch event occurs in the control. Using the propagated touch event listener, an application can control the touch event routing path.
1910          *\r
1911          * @since                    2.1\r
1912          *\r
1913          * @param[in]    pListener                                     The event listener to which the propagated touch events are dispatched
1914          * @remarks The specified event listener should be allocated in heap memory.\r
1915          *          To unregister the event listener, pass @c null to @c pListener.\r
1916 \r
1917          */\r
1918         void SetPropagatedTouchEventListener(IPropagatedTouchEventListener* pListener);\r
1919 \r
1920         /**\r
1921          * Sets a propagated key event listener to the %Control instance.
1922          * The registered listener is notified when a key event occurs in the control. Using the propagated key event listener, an application can control the key event routing path.
1923          *\r
1924          * @since                    2.1\r
1925          *\r
1926          * @param[in]    pListener                                     The event listener to which the propagated touch events are dispatched
1927          * @remarks The specified event listener should be allocated in heap memory.\r
1928          *          To unregister the event listener, pass @c null to @c pListener.\r
1929 \r
1930          */\r
1931         void SetPropagatedKeyEventListener(IPropagatedKeyEventListener* pListener);\r
1932 \r
1933 \r
1934         /**\r
1935          * Sets the previous focus of the control.\r
1936          *\r
1937          * @since 2.1\r
1938          *\r
1939          * @param[in]   pPreviousFocus  The pointer to the previous focus of the control
1940          * @remarks             Focus UI supports linear navigation of controls from top-left to bottom-right direction. This method allows for customizing the default navigation behavior.\r
1941          * @remarks             The platform will not take the ownership of @c pPreviousFocus after this call.
1942          * @see                 SetNextFocus()\r
1943          * @see                 GetPreviousFocus()\r
1944          */\r
1945         void SetPreviousFocus(Control* pPreviousFocus);\r
1946 \r
1947         /**\r
1948          * Sets the next focus of the control.\r
1949          *\r
1950          * @since 2.1\r
1951          *\r
1952          * @param[in]   pNextFocus      The pointer to the next focus of the control
1953          * @remarks             Focus UI supports linear navigation of controls from top-left to bottom-right direction. This method allows for customizing the default navigation behavior.\r
1954          * @remarks             The platform will not take the ownership of @c pNextFocus after this call.
1955          * @see                 SetPreviousFocus()\r
1956          * @see                 GetNextFocus()\r
1957         */\r
1958         void SetNextFocus(Control* pNextFocus);\r
1959 \r
1960         /**\r
1961          * Gets the previous focus of the control.
1962          *\r
1963          * @since 2.1\r
1964          *\r
1965          * @return              The pointer to the previous focus of the control, @n
1966          *                              else  @c null if the previous focus of the control is not set\r
1967          * @see         GetNextFocus()\r
1968          * @see         SetNextFocus ()\r
1969         */\r
1970         Control* GetPreviousFocus(void) const;\r
1971 \r
1972 \r
1973         /**\r
1974          * Gets the next focus of the control.
1975          *\r
1976          * @since 2.1\r
1977          *\r
1978          * @return              The pointer to the next focus of the control, @n
1979          *                              else @c null if the next focus of the control is not set\r
1980          * @see         GetPreviousFocus()\r
1981          * @see         SetPreviousFocus ()\r
1982         */\r
1983         Control* GetNextFocus(void) const;\r
1984 \r
1985         /**
1986          * Sets the touch press threshold of the Control in inch.
1987          *
1988          * @since               2.1
1989          *
1990          * @param[in]   distance        The logical threshold to fire touch move event
1991          * @remark              A touch move events will start to fire if the move distance exceeds the set allowance value.
1992          * For example, Set 0.5 if the distance is 0.5 inch.
1993          * This method is offered to control sensitivity of move events.
1994         */
1995         void SetTouchPressThreshold(float distance);
1996
1997         /**
1998          * Gets the touch press threshold of the Control in inch.
1999          * If the threshold has not been set, it returns the default value.
2000          *
2001          * @since                    2.1
2002          *
2003          * @return    The threshold to fire touch move event
2004          */
2005         float GetTouchPressThreshold(void) const;\r
2006 \r
2007 \r
2008         /**\r
2009          * Sets the font of the control with the specified file name.\r
2010          *\r
2011          * @since 2.1\r
2012          *\r
2013          * @return                      An error code\r
2014          * @param[in]           fileName                                        The file name of a font-resource located in @b â€˜/res/font’, @n
2015          *                                                                                              else an empty string to reset
2016          * @exception           E_SUCCESS                                       The method is successful.\r
2017          * @exception           E_FILE_NOT_FOUND                        The specified font cannot be found or accessed.\r
2018          * @exception           E_UNSUPPORTED_FORMAT            The specified font format is not supported.\r
2019          * @see                 GetFontFile()\r
2020         */\r
2021         result SetFontFromFile(const Tizen::Base::String& fileName);\r
2022 \r
2023         /**\r
2024          * Gets a font file name of the control.\r
2025          *\r
2026          * @since 2.1\r
2027          *\r
2028          * @return                              The font name set in the control, @n
2029          *                                              else an empty string if the font is not set\r
2030          * @see                         SetFontFromFile()\r
2031         */\r
2032         Tizen::Base::String GetFontFile(void) const;\r
2033 \r
2034 protected:\r
2035         /**\r
2036          * Gets the default key event listener.\r
2037          *\r
2038          * @brief <i> [Deprecated] </i>\r
2039          * @deprecated  This method is deprecated.\r
2040          * @since               2.0\r
2041          *\r
2042          * @return              The default key event listener @n
2043          *                              If no listener has been set or a system error has occurred @c null is returned.
2044          * @see                 SetDefaultKeyEventListener()\r
2045          */\r
2046         IKeyEventListener* GetDefaultkeyEventListener(void) const;\r
2047 \r
2048         /**\r
2049          * Gets the default touch event listener.\r
2050          *\r
2051          * @brief <i> [Deprecated] </i>\r
2052          * @deprecated   This method is deprecated.\r
2053          * @since               2.0\r
2054          *\r
2055          * @return             The default touch event listener @n
2056          *                                 If no listener has been set or a system error has occurred @c null is returned.\r
2057          * @see                         SetDefaultTouchEventListener()\r
2058          */\r
2059         ITouchEventListener* GetDefaultTouchEventListener(void) const;\r
2060 \r
2061         /**\r
2062          * Sets the default key event listener.\r
2063          *\r
2064          * @brief <i> [Deprecated] </i>\r
2065          * @deprecated   This method is deprecated. Instead of using this method, use the SetPropagatedKeyEventListener() method.\r
2066          * @since               2.0\r
2067          *\r
2068          * @return             An error code\r
2069          * @param[in] pDefaultListener               The default key event listener\r
2070          * @exception         E_SUCCESS                               The method is successful.\r
2071          * @exception         E_SYSTEM                                A system error has occurred.\r
2072          * @remarks           The registered listener will be notified to handle the key events\r
2073          *                                 after all application event listeners has been notified.\r
2074          * @see                         GetDefaultkeyEventListener()\r
2075          */\r
2076         result SetDefaultKeyEventListener(IKeyEventListener* pDefaultListener);\r
2077 \r
2078         /**\r
2079          * Sets the default touch event listener.\r
2080          *\r
2081          * @brief <i> [Deprecated] </i>\r
2082          * @deprecated   This method is deprecated. Instead of using this method, use the SetPropagatedTouchEventListener() method.\r
2083          * @since               2.0\r
2084          *\r
2085          * @return             An error code\r
2086          * @param[in] pDefaultListener               The default key event listener\r
2087          * @exception         E_SUCCESS                               The method is successful.\r
2088          * @exception         E_SYSTEM                                A system error has occurred.\r
2089          * @remarks           The registered listener will be notified to handle the touch events\r
2090          *                                 after all application event listeners has been notified.\r
2091          * @see                         GetDefaultTouchEventListener()\r
2092          */\r
2093         result SetDefaultTouchEventListener(ITouchEventListener* pDefaultListener);\r
2094 \r
2095         /**\r
2096          * 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.\r
2097          *\r
2098          * @since       2.0\r
2099          */\r
2100         Control(void);\r
2101 \r
2102         /**\r
2103          * This method is for internal use only. Using this method can cause behavioral, security-related,\r
2104          * and consistency-related issues in the application.\r
2105          *\r
2106          * Initializes this instance of %Control.\r
2107          *\r
2108          * @since               2.0\r
2109          * @return              An error code\r
2110          * @exception   E_SUCCESS                       The method is successful.\r
2111          * @exception   E_SYSTEM                        A system error has occurred.\r
2112          */\r
2113         result Construct(void);\r
2114 \r
2115         /**\r
2116          * Frees the resources allocated by Construct().\r
2117          *\r
2118          * @since 2.0\r
2119          */\r
2120         void Dispose(void);\r
2121 \r
2122 protected:\r
2123         _ControlImpl* _pControlImpl;\r
2124 \r
2125         //\r
2126         // This method is for internal use only. Using this method can cause behavioral, security-related,\r
2127         // and consistency-related issues in the application.\r
2128         //\r
2129         // This method is reserved and may change its name at any time without prior notice.\r
2130         //\r
2131         virtual void Control_Reserved1(void) {}\r
2132 \r
2133         //\r
2134         // This method is for internal use only. Using this method can cause behavioral, security-related,\r
2135         // and consistency-related issues in the application.\r
2136         //\r
2137         // This method is reserved and may change its name at any time without prior notice.\r
2138         //\r
2139         virtual void Control_Reserved2(void) {}\r
2140 \r
2141         //\r
2142         // This method is for internal use only. Using this method can cause behavioral, security-related,\r
2143         // and consistency-related issues in the application.\r
2144         //\r
2145         // This method is reserved and may change its name at any time without prior notice.\r
2146         //\r
2147         virtual void Control_Reserved3(void) {}\r
2148 \r
2149         //\r
2150         // This method is for internal use only. Using this method can cause behavioral, security-related,\r
2151         // and consistency-related issues in the application.\r
2152         //\r
2153         // This method is reserved and may change its name at any time without prior notice.\r
2154         //\r
2155         virtual void Control_Reserved4(void) {}\r
2156 \r
2157         //\r
2158         // This method is for internal use only. Using this method can cause behavioral, security-related,\r
2159         // and consistency-related issues in the application.\r
2160         //\r
2161         // This method is reserved and may change its name at any time without prior notice.\r
2162         //\r
2163 \r
2164         virtual void Control_Reserved5(void) {}\r
2165 \r
2166         //\r
2167         // This method is for internal use only. Using this method can cause behavioral, security-related,\r
2168         // and consistency-related issues in the application.\r
2169         //\r
2170         // This method is reserved and may change its name at any time without prior notice.\r
2171         //\r
2172         virtual void Control_Reserved6(void) {}\r
2173 \r
2174 private:\r
2175         //\r
2176         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.\r
2177         //\r
2178         Control(const Control& rhs);\r
2179 \r
2180         //\r
2181         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.\r
2182         //\r
2183         Control& operator =(const Control& rhs);\r
2184 \r
2185 private:\r
2186         friend class _ControlImpl;\r
2187 }; // Control\r
2188 \r
2189 }} // Tizen::Ui\r
2190 \r
2191 #endif // _FUI_CONTROL_H_\r