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