Tizen 2.1 base
[framework/osp/uifw.git] / inc / FUiControl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file        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 <FUiCompositeMode.h>
40
41 namespace Tizen { namespace Ui { namespace Animations {
42 class ControlAnimator;
43 class VisualElement;
44 }}}
45
46 namespace Tizen { namespace Ui {
47
48 class AccessibilityContainer;
49 class Container;
50 class _ControlImpl;
51 class TouchGestureDetector;
52
53 /**
54  * @class       Control
55  * @brief       This class is the abstract base class of all the UI control classes.
56  *
57  * @since       2.0
58  *
59  * @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
60  * created when it (or its ancestor) is added to a valid control containment hierarchy. A containment hierarchy is valid if and
61  * only if the root of the hierarchy is an instance of the Window class.
62  *
63  * The %Control class is the abstract base class of all user interface elements. It encapsulates a
64  * "window" of the underlying window system, and provides the infrastructure necessary for the
65  * elements to respond to user inputs. The %Control class also determines how a key event is dispatched
66  * and processed.
67  *
68  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/controls.htm">UI Controls</a>.
69  *
70  *
71  * The following examples demonstrate how to use the %Control class.
72  *
73  * Size and Position
74  *
75  * @code
76  * // Sets the size
77  * pControl->SetSize(100, 100); // 100 pixels wide and 100 pixels long
78  *
79  * // Sets the position
80  * pControl->SetPosition(5, 5); // Control is drawn 5 pixels down and 5 pixels left from the top-left corner of its parent
81  * @endcode
82  *
83  * Draw and Show
84  *
85  * @code
86  * // Gets a instance of Canvas
87  * Canvas* pCanvas = pControl->GetCanvasN();
88  *
89  * // Fills the canvas with white color
90  * pCanvas->Clear(Tizen::Graphics::Color(255, 255, 255));
91  *
92  * // Shows changes on screen
93  * pControl->Invalidate(true);
94  *
95  * delete pCanvas;
96  * @endcode
97  *
98  * Key and input focus
99  *
100  * @code
101  * // Implements MyKeyEventListener
102  * IKeyEventListener* pKeyListener = new MyKeyEventListener();
103  * pControl->SetFocus();
104  *
105  * // The added key listener should be deleted after use
106  * pControl->AddKeyEventListener(*pKeyListener);
107  * @endcode
108  *
109  */
110 class _OSP_EXPORT_ Control
111         : public Tizen::Base::Object
112 {
113
114 public:
115         /**
116          * This destructor overrides Tizen::Base::Object::~Object().
117          *
118          * @since       2.0
119          */
120         virtual ~Control(void);
121
122         /**
123          * Adds the IFocusEventListener instance to the %Control instance. @n
124          * The added listener gets notified when the control gains or loses its focus.
125          *
126          * @since               2.0
127          *
128          * @param[in]   listener        The event listener to add
129          * @see                 RemoveFocusEventListener()
130          */
131         void AddFocusEventListener(IFocusEventListener& listener);
132
133         /**
134          * Adds the IKeyEventListener instance to the %Control instance. @n
135          * The added listener gets notified when a key is pressed, released, or long pressed.
136          *
137          * @since               2.0
138          *
139          * @param[in]   listener    The event listener to add
140          * @see                 RemoveKeyEventListener()
141          */
142         void AddKeyEventListener(IKeyEventListener& listener);
143
144         /**
145          * Adds the ITouchEventListener instance to the %Control instance. @n
146          * The added listener gets notified when a touch event such as a press or a release is fired.
147          *
148          * @since                2.0
149          *
150          * @param[in]   listener        The event listener to add
151          * @see                 RemoveTouchEventListener()
152          */
153         void AddTouchEventListener(ITouchEventListener& listener);
154
155         /**
156          * Adds the ITouchModeChangedEventListener instance to the %Control instance. @n
157          * The added listener gets notified when the device's touch mode is changed.
158          *
159          * @since               2.0
160          *
161          * @param[in]   listener        The event listener to add
162          * @see                 RemoveTouchModeChangedEventListener()
163          */
164         void AddTouchModeChangedEventListener(Tizen::Ui::ITouchModeChangedEventListener& listener);
165
166         /**
167          * Adds the IDragDropEventListener instance to the %Control instance. @n
168          * The added listener gets notified when a drag or a drop happens in the control.
169          *
170          * @since               2.0
171          *
172          * @param[in]   listener        The event listener to add
173          * @see                 RemoveDragDropEventListener()
174          */
175         void AddDragDropEventListener(IDragDropEventListener& listener);
176
177         /**
178          * Removes the focus listener instance. @n
179          * The removed listener is not notified even when focus events are fired.
180          *
181          * @since               2.0
182          *
183          * @param[in]   listener        The listener to remove
184          * @see                 AddFocusEventListener()
185          */
186         void RemoveFocusEventListener(IFocusEventListener& listener);
187
188         /**
189          * Removes the key event listener instance. @n
190          * The removed listener is not notified even when key events are fired.
191          *
192          * @since               2.0
193          *
194          * @param[in]   listener        The listener to remove
195          * @see                 AddKeyEventListener()
196          */
197         void RemoveKeyEventListener(IKeyEventListener& listener);
198
199         /**
200          * Removes the touch event listener instance. @n
201          * The removed listener is not notified even when touch events are fired.
202          *
203          * @since               2.0
204          *
205          * @param[in]   listener        The listener to remove
206          * @see                 AddTouchEventListener()
207          */
208         void RemoveTouchEventListener(ITouchEventListener& listener);
209
210         /**
211          * Removes the touch mode changed event listener instance. @n
212          * The removed listener is not notified even when the touch mode changed events are fired.
213          *
214          * @since               2.0
215          *
216          * @param[in]   listener        The listener to remove
217          * @see                 AddTouchModeChangedEventListener()
218          */
219         void RemoveTouchModeChangedEventListener(Tizen::Ui::ITouchModeChangedEventListener& listener);
220
221         /**
222          * Adds the IDragDropEventListener instance to the %Control instance. @n
223          * The added listener gets notified when a drag or a drop happens in the control.
224          *
225          * @since                2.0
226          *
227          * @param[in]   listener        The event listener to add
228          * @see                 Tizen::Ui::IDragDropEventListener::OnTouchDragged()
229          * @see                 Tizen::Ui::IDragDropEventListener::OnTouchDropped()
230          * @see                 RemoveDragDropEventListener()
231          */
232         void RemoveDragDropEventListener(IDragDropEventListener& listener);
233
234         /**
235          * Overrides this method to provide user-specific initialization code before the control is added to a container.
236          *
237          * @since               2.0
238          *
239          * @return              An error code
240          * @exception   E_SUCCESS       The method is successful.
241          * @exception   E_FAILURE       The method has failed.
242          * @remarks             This method is called when the control is about to be added to a container.
243          * @remarks             To cancel adding this control to the parent, return @c E_FAILURE in this method.
244          * @see                 OnTerminating()
245          */
246         virtual result OnInitializing(void);
247
248         /**
249          * Overrides this method to provide user-specific termination code.
250          *
251          * @if OSPCOMPAT
252          * @brief <i> [Compatibility] </i>
253          * @endif
254          * @since               2.0
255          *
256          * @if OSPCOMPAT
257          * @compatibility This method has compatibility issues with OSP compatible applications. @n
258          *                       For more information, see @ref CompOnTerminatingPage "here".
259          * @endif
260          * @return              An error code
261          * @exception   E_SUCCESS       The method is successful.
262          * @exception   E_FAILURE       The method has failed.
263          * @remarks             This method is called right before the control is removed successfully from the container.
264          * @remarks             To cancel removing this control from the parent, return @c E_FAILURE in this method.
265          * @see                 OnInitializing()
266          */
267         virtual result OnTerminating(void);
268
269         /**
270          * @if OSPCOMPAT
271          * @page               CompOnTerminatingPage        Compatibility for OnTerminating()
272          * @section            CompOnterminatingPage IssueSection          Issues
273          * Implementing this method in OSP compatible applications has the following issues: @n
274          * -# OnTerminating() callback is called from child to parent.
275          *
276          * @section            CompOnTerminatingPage SolutionSection               Resolutions
277          * This issue has been resolved in Tizen.  @n
278          * -# OnTerminating() callback is called from parent to child.
279          * @endif
280          */
281
282         /**
283          * Called asynchronously when the user event that is sent by SendUserEvent() method is
284          * dispatched to the control.
285          *
286          * @since               2.0
287          *
288          * @param[in]   requestId       The user-defined event ID
289          * @param[in]   pArgs  A pointer to the argument list
290          * @see                 SendUserEvent()
291          */
292         virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
293
294         /**
295          * Checks whether the control is movable.
296          *
297          * @since               2.0
298          *
299          * @return              @c true if the control is movable, @n
300          *                              else @c false
301          * @exception   E_SUCCESS                       The method is successful.
302          * @remarks             The specific error code can be accessed using the GetLastResult() method.
303          * @remarks             When control is not movable SetPosition() and SetBounds() return @c E_UNSUPPORTED_OPERATION.
304          * @see                 SetPosition()
305          * @see                 SetBounds()
306          */
307         bool IsMovable(void) const;
308
309         /**
310          * Checks whether the control is resizable.
311          *
312          * @since               2.0
313          *
314          * @return              @c true if the control is resizable, @n
315          *                              else @c false
316          * @exception   E_SUCCESS                       The method is successful.
317          * @remarks             Even if this method returns @c true, the size can be changed internally.
318          * @remarks             The specific error code can be accessed using the GetLastResult() method.
319          * @remarks             When control is not resizable,
320          *                              SetSize(), SetBounds(), SetMinimumSize() and SetMaximumSize() return @c E_UNSUPPORTED_OPERATION.
321          * @see                 SetSize()
322          * @see                 SetBounds()
323          * @see                 SetMinimumSize()
324          * @see                 SetMaximumSize()
325          */
326         bool IsResizable(void) const;
327
328         /**
329          * Gets the position and the size of the control.
330          *
331          * @since               2.0
332          *
333          * @return              An instance of the Tizen::Graphics::Rectangle that represents the position of top-left corner,
334          *                              the width, and the height of the control
335          * @remarks             The shape of the control is rectangular that is defined by the top-left point,
336          *                              and the width or height. The position
337          *                              of the top-left point is relative to the top-left corner of the parent container.
338          * @see                 SetBounds()
339          */
340         Tizen::Graphics::Rectangle GetBounds(void) const;
341
342         /**
343          * Gets the position and the size of the control.
344          *
345          * @since               2.0
346          *
347          * @param[out]  x               The x position of top-left corner of the control
348          * @param[out]  y               The y position of top-left corner of the control
349          * @param[out]  width   The width of the rectangular region
350          * @param[out]  height  The height of the rectangular region
351          * @remarks             The shape of the control is regarded as a rectangle that is defined
352          *                              by the top-left point and the width or height.
353          *                              The position of the top-left point is relative to the top-left corner of
354          *                              the parent container.
355          * @see                 SetBounds()
356          */
357         void GetBounds(int& x, int& y, int& width, int& height) const;
358
359         /**
360          * Gets the position of the control's top-left corner.
361          *
362          * @since               2.0
363          *
364          * @return              The position of the control's top-left corner
365          * @remarks             The position of top-left corner is relative to the top-left corner of its parent container.
366          * @see                 GetBounds()
367          */
368         Tizen::Graphics::Point GetPosition(void) const;
369
370         /**
371          * Gets the position of the control's top-left corner.
372          *
373          * @since               2.0
374          *
375          * @param[out]  x The x position of the control's top-left corner
376          * @param[out]  y The y position of the control's top-left corner
377          * @remarks             The position of top-left corner is relative to the top-left corner of its parent container.
378          * @see                 GetBounds()
379          */
380         void GetPosition(int& x, int& y) const;
381
382         /**
383          * Gets the size of the control.
384          *
385          * @since               2.0
386          *
387          * @return              The size of the control
388          * @see                 GetBounds()
389          */
390         Tizen::Graphics::Dimension GetSize(void) const;
391
392         /**
393          * Gets the size of the control.
394          *
395          * @since               2.0
396          *
397          * @param[out]  width   The width of the control
398          * @param[out]  height  The height of the control
399          * @see         GetBounds()
400          */
401         void GetSize(int& width, int& height) const;
402
403         /**
404          * Gets the x position of the control. @n
405          * The position of control is relative to the top-left corner of its parent container.
406          *
407          * @since               2.0
408          *
409          * @return              The x position of the control
410          * @see                 GetBounds()
411          * @see                 GetPosition()
412          * @see                 GetY()
413          */
414         int GetX(void) const;
415
416         /**
417          * Gets the y position of the control. @n
418          * The position of control is relative to the top-left corner of its parent container.
419          *
420          * @since               2.0
421          *
422          * @return              The y position of the control
423          * @see                 GetBounds()
424          * @see                 GetPosition()
425          * @see                 GetX()
426          */
427         int GetY(void) const;
428
429         /**
430          * Gets the width of the control.
431          *
432          * @since               2.0
433          *
434          * @return              The width of the control
435          * @see                 GetBounds()
436          * @see                 GetSize()
437          * @see                 GetHeight()
438          */
439         int GetWidth(void) const;
440
441         /**
442          * Gets the height of the control.
443          *
444          * @since               2.0
445          *
446          * @return              The height of the control
447          * @see                 GetBounds()
448          * @see                 GetSize()
449          * @see                 GetWidth()
450          */
451         int GetHeight(void) const;
452
453         /**
454          * Gets the minimum size of the control.
455          *
456          * @since               2.0
457          *
458          * @return              The minimum size of the control
459          * @exception   E_SUCCESS                               The method is successful.
460          * @exception   E_SYSTEM                                A system error has occurred.
461          * @remarks             The first call of the method returns the system-defined minimum size.
462          * @remarks             The specific error code can be accessed using the GetLastResult() method.
463          */
464         Tizen::Graphics::Dimension GetMinimumSize(void) const;
465
466         /**
467          * Gets the maximum size of the control.
468          *
469          * @since               2.0
470          *
471          * @return              The maximum size of the control
472          * @exception   E_SUCCESS                               The method is successful.
473          * @exception   E_SYSTEM                                A system error has occurred.
474          * @remarks             The first call of the method returns the system-defined maximum size.
475          * @remarks             The specific error code can be accessed using the GetLastResult() method.
476          */
477         Tizen::Graphics::Dimension GetMaximumSize(void) const;
478
479         /**
480          * Gets a font of the control.
481          *
482          * @since 2.0
483          *
484          * @return                   The font name set in the control, @n
485          *                                         else an empty string if the font is not set
486          * @see         SetFont()
487          */
488         Tizen::Base::String GetFont(void) const;
489
490         /**
491          * Sets the position and size of the control.
492          *
493          * @since               2.0
494          *
495          * @return              An error code
496          * @param[in]   rect                                    The new bounds of the control
497          * @exception   E_SUCCESS                               The method is successful.
498          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.
499          * @exception   E_UNSUPPORTED_OPERATION This control is neither movable nor resizable.
500          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.
501          * @exception   E_SYSTEM                                A system error has occurred.
502          * @remarks             Do not override this method.
503          * @remarks             The size of the control must be within the range defined by the minimum size and the maximum size.
504          * @see                 IsMovable()
505          * @see                 IsResizable()
506          * @see                 GetMinimumSize()
507          * @see                 GetMaximumSize()
508          * @see                 SetPosition()
509          * @see                 SetSize()
510          */
511         result SetBounds(const Tizen::Graphics::Rectangle& rect);
512
513         /**
514          * Sets the position and size of the control. @n
515          * The position is set at (x, y), and the @c width and @c height parameters contain
516          * the width and height values of the object, respectively.
517          *
518          * @since               2.0
519          *
520          * @return              An error code
521          * @param[in]   x                                               The new x position of the control
522          * @param[in]   y                                               The new y position of the control
523          * @param[in]   width                                   The new width of the control
524          * @param[in]   height                                  The new height of the control
525          * @exception   E_SUCCESS                               The method is successful.
526          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.
527          * @exception   E_UNSUPPORTED_OPERATION This control is neither movable nor resizable.
528          * @exception   E_INVALID_ARG                   A specified input parameter is invalid.
529          * @exception   E_SYSTEM                                A system error has occurred.
530          * @remarks             Do not override this method.
531          * @remarks             The size of the control must be within the range defined by the minimum size and the maximum size.
532          * @see                 IsMovable()
533          * @see                 IsResizable()
534          * @see                 GetMinimumSize()
535          * @see                 GetMaximumSize()
536          * @see                 SetPosition()
537          * @see                 SetSize()
538          */
539         result SetBounds(int x, int y, int width, int height);
540
541         /**
542          * Sets the relative position of the control.
543          *
544          * @since               2.0
545          *
546          * @return              An error code
547          * @param[in]   Position                                The new position
548          * @exception   E_SUCCESS                               The method is successful.
549          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.
550          * @exception   E_UNSUPPORTED_OPERATION This control is not movable.
551          * @exception   E_SYSTEM                                A system error has occurred.
552          * @remarks             Do not override this method.
553          * @remarks             The position of the control are relative to the top-left corner of its parent.
554          * @see                 IsMovable()
555          * @see                 SetBounds()
556          */
557         result SetPosition(const Tizen::Graphics::Point& Position);
558
559         /**
560          * Sets the position of the control.
561          *
562          * @since               2.0
563          * @return              An error code
564          * @param[in]   x                                               The new x position of the control
565          * @param[in]   y                                               The new y position of the control
566          * @exception   E_SUCCESS                               The method is successful.
567          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.
568          * @exception   E_UNSUPPORTED_OPERATION This control is not movable.
569          * @exception   E_SYSTEM                                A system error has occurred.
570          * @remarks             Do not override this method.
571          * @remarks             The x,y position of the control are relative to the top-left corner of its parent.
572          * @see                 IsMovable()
573          * @see                 SetBounds()
574          */
575         result SetPosition(int x, int y);
576
577         /**
578          * Sets the size of the control. @n
579          *
580          * @since               2.0
581          *
582          * @return              An error code
583          * @param[in]   size                                    The new width and height
584          * @exception   E_SUCCESS                               The method is successful.
585          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.
586          * @exception   E_UNSUPPORTED_OPERATION This control is not resizable.
587          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.
588          * @exception   E_SYSTEM                                A system error has occurred.
589          * @remarks             Do not override this method.
590          * @remarks             The size of the control must be within the range defined by the minimum size and the maximum size.
591          * @see                 IsResizable()
592          * @see                 GetMinimumSize()
593          * @see                 GetMaximumSize()
594          * @see                 SetBounds()
595          */
596         result SetSize(const Tizen::Graphics::Dimension& size);
597
598         /**
599          * Sets the size of the control. @n
600          * The @c width and @c height parameters contain the width and height values of the object, respectively.
601          *
602          * @since       2.0
603          *
604          * @return              An error code
605          * @param[in]   width                                   The new width of the control
606          * @param[in]   height                                  The new height of the control
607          * @exception   E_SUCCESS                               The method is successful.
608          * @exception   E_INVALID_OPERATION             The control has not been constructed as yet.
609          * @exception   E_UNSUPPORTED_OPERATION This control is not resizable.
610          * @exception   E_INVALID_ARG                   A specified input parameter is invalid.
611          * @exception   E_SYSTEM                                A system error has occurred.
612          * @remarks             Do not override this method.
613          * @remarks             The size of the control must be within the range defined by the minimum size and the maximum size.
614          * @see                 IsResizable()
615          * @see                 GetMinimumSize()
616          * @see                 GetMaximumSize()
617          * @see                 SetBounds()
618          */
619         result SetSize(int width, int height);
620
621         /**
622          * Sets the minimum size of the control.
623          *
624          * @since               2.0
625          *
626          * @return              An error code
627          * @param[in]   newMinDim                               The new minimum size of the control
628          * @exception   E_SUCCESS                               The method is successful.
629          * @exception   E_UNSUPPORTED_OPERATION This control is not resizable.
630          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.
631          * @exception   E_SYSTEM                                A system error has occurred.
632          * @remarks             This method can affect the maximum size and the current size of the control. @n
633          *                              The control needs to be redrawn to reflect the change in its size. @n
634          *                              If the current maximum size or the control size is smaller than the new minimum size,
635          *                              it becomes the same as the new minimum size.
636          * @see                 IsResizable()
637          */
638         result SetMinimumSize(const Tizen::Graphics::Dimension& newMinDim);
639
640         /**
641          * Sets the maximum size of the control.
642          *
643          * @since               2.0
644          *
645          * @return              An error code
646          * @param[in]   newMaxDim                               The new maximum size of the control
647          * @exception   E_SUCCESS                               The method is successful.
648          * @exception   E_UNSUPPORTED_OPERATION This control is not resizable.
649          * @exception   E_INVALID_ARG                   The specified input parameter is invalid.
650          * @exception   E_SYSTEM                                A system error has occurred.
651          * @remarks             This method can affect the minimum size and the current size of the control. @n
652          *                              The control needs to be redrawn to reflect the change in its size. @n
653          *                              If the current minimum size or the control size is greater than the new maximum size,
654          *                              it becomes the same as the new maximum size.
655          * @see                 IsResizable()
656          */
657         result SetMaximumSize(const Tizen::Graphics::Dimension& newMaxDim);
658
659         /**
660          * Converts the specified screen position to the position in control's coordinate system.
661          *
662          * @since 2.0
663          *
664          * @return              The position relative to the top-left corner of the control's client-area
665          * @param[in]   screenPosition                  The position relative to the top-left corner of the screen
666          * @see                 ConvertToScreenPosition()
667          */
668         Tizen::Graphics::Point ConvertToControlPosition(const Tizen::Graphics::Point& screenPosition) const;
669
670         /**
671          * Converts the specified position in the control's coordinate system to the screen position.
672          *
673          * @since 2.0
674          *
675          * @return      The position relative to the top-left corner of the screen
676          * @param[in]   controlPosition                 The position relative to the top-left corner of the control's client-area
677          * @see         ConvertToControlPosition()
678          */
679         Tizen::Graphics::Point ConvertToScreenPosition(const Tizen::Graphics::Point& controlPosition) const;
680
681         /**
682          * Sets the font of the control.
683          *
684          * @since 2.0
685          *
686          * @return              An error code
687          * @param[in]   fontName                                The app font name or system font name @n
688          *                                                                              The app font name is retrieved using Tizen::Graphics::Font::GetFaceName(Tizen::Base::String& filepath). @n
689          *                                                                              The system font name is retrieved using Tizen::Graphics::Font::GetSystemFontListN().
690          *                                                                              Sets an empty string to reset.
691          * @exception   E_SUCCESS                               The method is successful.
692          * @exception   E_FILE_NOT_FOUND                The specified font cannot be found or accessed.
693          * @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'.
694          *                              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().
695          * @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.
696          * @see                 GetFont()
697          */
698         result SetFont(const Tizen::Base::String& fontName);
699
700         /**
701          * Checks whether the specified @c point is inside the control.
702          *
703          * @since               2.0
704          *
705          * @return              @c true if the specified @c point is inside the control, @n
706          *                              else @c false
707          * @param[in]   point The point to check
708          * @remarks             The specified @c point must be defined relative to the top-left corner of the control.
709          */
710         bool Contains(const Tizen::Graphics::Point& point) const;
711
712         /**
713          * Checks whether the specified point is inside the control.
714          *
715          * @since               2.0
716          *
717          * @return              @c true if the specified point is inside the control, @n
718          *                              else @c false
719          * @param[in]   x The x position of the point to check
720          * @param[in]   y The y position of the point to check
721          * @remarks             The specified point must be defined relative to the top-left corner of the control.
722          */
723         bool Contains(int x, int y) const;
724
725         /**
726          * Draws child controls recursively.
727          *
728          * @if OSPCOMPAT
729          * @brief <i> [Compatibility] </i>
730          * @endif
731          * @since                    2.0
732          *
733          * @if OSPCOMPAT
734          * @compatibility This method has compatibility issues with OSP compatible applications. @n
735          *                       For more information, see @ref CompDrawPage "here".
736          * @endif
737          * @return                  An error code
738          * @exception    E_SUCCESS           The method is successful.
739          * @exception    E_INVALID_OPERATION    The current state of the instance prohibits the execution of the specified operation. @n
740          *                                                                                             Note: This control cannot be displayed.
741          * @exception    E_SYSTEM                              A system error has occurred.
742          * @remarks     This method calls OnDraw() immediately in a synchronous way.
743          * @see                      Show()
744          */
745         result Draw(void);
746
747         /**
748          * @if OSPCOMPAT
749          * @page               CompDrawPage        Compatibility for Draw()
750          * @section            CompDrawPage IssueSection          Issues
751          * Implementing this method in OSP compatible applications has the following issues: @n
752          * -# Draw() method draws child controls in a recursive way regardless of the visibility of the parent.
753          *
754          * @section            CompDrawPage SolutionSection               Resolutions
755          * This issue has been resolved in Tizen.  @n
756          * -# Draw() method does not draw child controls if the control itself is not visible.
757          * @endif
758          */
759
760         /**
761          * Draws the control.
762          *
763          * @since 2.0
764          *
765          * @param[in]   recursive                       Set to @c true to draw child controls recursively, @n
766          *                                                                        else @c false
767          * @return              An error code
768          * @exception   E_SUCCESS                       The method is successful.
769          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
770          *                                                                      Note: This control cannot be displayed.
771          * @exception   E_SYSTEM                        A system error has occurred.
772          * @remarks     This method calls OnDraw() immediately in a synchronous way.
773          * @see                 Show()
774          */
775         result Draw(bool recursive);
776
777         /**
778          * Shows the control on the screen.
779          *
780          * @since               2.0
781          * @final               Although this method is virtual, it should not be overridden.
782      * If overridden, it may not work as expected.
783          *
784          * @return              An error code
785          * @exception   E_SUCCESS                       The method is successful.
786          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
787          *                                                                      Note: This control cannot be displayed.
788          * @exception   E_SYSTEM                        A system error has occurred.
789          * @remarks             Do not override this method.
790          */
791         virtual result Show(void);
792
793         /**
794          * Invalidates the control.
795          *
796          * @since 2.0
797          *
798          * @param[in]   recursive       Set to @c true to invalidate child controls recursively, @n
799          *                                                      else @c false
800          * @exception   E_SUCCESS           The method is successful.
801          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
802          *                                                                      Note: This control cannot be displayed.
803          * @exception   E_SYSTEM                        A system error has occurred.
804          * @remarks             The specific error code can be accessed using the GetLastResult() method.
805          * @remarks             OnDraw() is not called immediately, but called asynchronously just before the screen is updated.
806          * @see                 Show()
807          */
808         void Invalidate(bool recursive);
809
810         /**
811          * Invalidates the control of the specified position and size.
812          *
813          * @since 2.0
814          *
815          * @param[in]    bounds                 The position relative to the top-left corner of the control
816          * @exception   E_SUCCESS           The method is successful.
817          * @exception   E_INVALID_OPERATION  The current state of the instance prohibits the execution of the specified operation. @n
818          *                                                                                             Note: This control cannot be displayed.
819          * @remarks  The specific error code can be accessed using the GetLastResult() method.
820          * @see                      Show()
821          */
822         void InvalidateBounds(const Tizen::Graphics::Rectangle& bounds);
823
824         /**
825          * Draws the control asynchronously.
826          *
827          * @since               2.0
828          *
829          * @param[in]   show    Set to @c true to also show the control, @n
830          *                                              else @c false
831          * @remarks             This method posts a draw event in the event queue. @n
832          *                              Drawing requested by %RequestRedraw() occurs when the draw event is fired to the control.
833          */
834         void RequestRedraw(bool show = true) const;
835
836         /**
837          * Creates and returns a graphics canvas whose bounds (that is, position and size) are equal to those
838          * of the control.
839          *
840          * @since               2.0
841          *
842          * @return              The graphic canvas of the control, @n
843          *                              else @c null if an exception occurs
844          * @exception   E_SUCCESS                               The method is successful.
845          * @exception   E_SYSTEM                        A system error has occurred.
846          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.
847          * @remarks             The method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the control.
848          *                              It is the developer's responsibility to deallocate the canvas after use.
849          *                              The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged.
850          *                              Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method
851          *                              if the size or position of the control is changed.
852          * @remarks             The specific error code can be accessed using the GetLastResult() method.
853          * @remarks             The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,
854          *                              if custom drawing is performed on the graphic canvas of Frame and Form
855          *                              then it will appear on the screen regardless of which control is currently visible on the screen.
856          * @see                 GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const
857          * @see                 GetCanvasN(int x, int y, int width, int height) const
858          * @code
859          * result
860          * MyForm::OnDraw(void)
861          * {
862          *     result r = E_SUCCESS;
863          *     Canvas* pCanvas = GetCanvasN();
864          *     if (pCanvas != null)
865          *     {
866          *         // add your drawing code here
867          *     }
868          *     if (pCanvas)
869          *         delete pCanvas;
870          *         // Do not call Show(). It will be called automatically after OnDraw() callback.
871          *     return r;
872          * }
873          * @endcode
874          */
875         Tizen::Graphics::Canvas* GetCanvasN(void) const;
876
877         /**
878          * Creates and returns a graphic canvas of the control of the specified position and size.
879          *
880          * @since               2.0
881          *
882          * @return              The graphic canvas of the control, @n
883          *                              else @c null if an exception occurs
884          * @param[in]   bounds          The bounds of the graphic canvas
885          * @exception   E_SUCCESS                               The method is successful.
886          * @exception   E_OUT_OF_RANGE                  The specified bounds does not intercept with the bounds of the control.
887          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.
888          * @remarks             Only the graphic canvas of displayable controls can be obtained.
889          *                              If the specified area is not inside the control,
890          *                              the graphics canvas of overlapped area between the control and the specified bound is returned. @n
891          * @remarks             The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control.
892          *                              It is the developer's responsibility to deallocate the canvas after use.
893          *                              The canvas is guaranteed to be valid only if the properties of the parent controls of the canvas remain unchanged.
894          *                              Therefore, one must delete previously allocated canvas and create a new canvas using the %GetCanvasN() method
895          *                              if the size or position of the control is changed.
896          * @remarks             The specific error code can be accessed using the GetLastResult() method.
897          * @remarks             The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,
898          *                              if custom drawing is performed on the graphic canvas of Frame and Form
899          *                              then it will appear on the screen regardless of which control is currently visible on the screen.
900          * @see                 GetCanvasN(void) const
901          * @see                 GetCanvasN(int x, int y, int width, int height) const
902          */
903         Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const;
904
905         /**
906          * Creates and returns a graphic canvas of the specified position and size in the control.
907          *
908          * @since               2.0
909          *
910          * @return              The graphic canvas of the control, @n
911          *                              else @c null if an exception occurs
912          * @param[in]   x  The x position relative to the top-left corner of the control
913          * @param[in]   y  The y position relative to the top-left corner of the control
914          * @param[in]   width   The width of a graphic canvas
915          * @param[in]   height  The height of a graphic canvas
916          * @exception   E_SUCCESS                               The method is successful.
917          * @exception   E_OUT_OF_RANGE                  The specified bounds does not intercept with the bounds of the control.
918          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.
919          * @remarks             Only the graphic canvas of displayable controls can be obtained.
920          *                              If the specified area is not inside the control,
921          *                              the graphics canvas of the overlapped area between the control and the specified bound is returned. @n
922          * @remarks             The method allocates an Tizen::Graphics::Canvas whose bounds are equal to that of the control.
923          *                              It is the developer's responsibility to deallocate the canvas after use.
924          *                              The canvas is guaranteed to be valid only if properties of the parent controls of the canvas remain unchanged.
925          *                              Therefore, one must delete the previously allocated canvas and create a new canvas using the %GetCanvasN() method
926          *                              if the size or position of the control is changed.
927          * @remarks             The specific error code can be accessed using the GetLastResult() method.
928          * @remarks             The Frame and Form (and between different Form instances) share a single frame-buffer. Therefore,
929          *                              if custom drawing is performed on the graphic canvas of Frame and Form
930          *                              then it will appear on the screen regardless of which control is currently visible on the screen.
931          * @see                 GetCanvasN(void) const
932          * @see                 GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const
933          */
934         Tizen::Graphics::Canvas* GetCanvasN(int x, int y, int width, int height) const;
935
936         /**
937          * Checks whether the control is currently visible on the screen.
938          *
939          * @since               2.0
940          *
941          * @return              @c true if the control is currently visible on the screen, @n
942          *                              else @c false
943          * @remarks             If this method is called before the control is added to a parent, @c false is returned.
944          * @see                 GetShowState()
945          * @see                 SetShowState()
946          */
947         bool IsVisible(void) const;
948
949         /**
950          * Gets the current show state of the control.
951          *
952          * @since               2.0
953          *
954          * @return              The show state of the control
955          * @remarks             Even if the control's state is "show", the control may not be visible.
956          * @see                 SetShowState()
957          * @see                 IsVisible()
958          */
959         bool GetShowState(void) const;
960
961         /**
962          * Sets the show state of the control.
963          *
964          * @since               2.0
965          *
966          * @return              An error code
967          * @param[in]   state                           The new show state
968          * @exception   E_SUCCESS                       The method is successful.
969          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.
970          *                                                                      Note: This control cannot be displayed.
971          * @exception   E_SYSTEM                        A system error has occurred.
972          * @remarks             Do not override this method.
973          * @remarks             Even if this method is invoked, the control is not drawn or shown. @n
974          *                              To draw and show the control, use Invalidate() method. @n
975          *                              Once the control's show state is set to @c false,
976          *                              the show state needs to be set to @c true again before you draw and show the control.
977          * @see                 GetShowState()
978          * @see                 Invalidate()
979          */
980         result SetShowState(bool state);
981
982         /**
983          * Gets the dedicated %VisualElement instance for this control.
984          *
985          * @since               2.0
986          *
987          * @return              An instance of the VisualElement
988          * @remarks             If an application developer modifies the state of the returned VisualElement
989          *                              and the host control is not aware of this change, then the control may behave egregiously.
990          *                              It is highly recommended to restore the %VisualElement state to avoid such conflicts.
991          */
992         Tizen::Ui::Animations::VisualElement* GetVisualElement(void) const;
993
994         /**
995          * Gets the parent of the control.
996          *
997          * @since               2.0
998          *
999          * @return              The current parent of the control
1000          */
1001         Container* GetParent(void) const;
1002
1003         /**
1004          * Gets the name of the control.
1005          *
1006          * @since               2.0
1007          *
1008          * @return              The name of the control
1009          */
1010         Tizen::Base::String GetName(void) const;
1011
1012         /**
1013          * Sets the name of the control.
1014          *
1015          * @since               2.0
1016          *
1017          * @param[in]   name    The name of the control
1018          */
1019         void SetName(const Tizen::Base::String& name);
1020
1021         /**
1022          * Checks whether the control is focusable.
1023          *
1024          * @since               2.0
1025          *
1026          * @return              @c true if control is focusable, @n
1027          *                              else @c false
1028          * @remarks             The focus ability of the container classes like Panel is @c false by default.
1029          */
1030         bool IsFocusable(void) const;
1031
1032         /**
1033          * Sets the focus ability of the control. @n
1034          * Non-Focusable controls cannot take the key focus.
1035          *
1036          * @since               2.0
1037          *
1038          * @return              An error code
1039          * @exception   E_SUCCESS                       The method is successful.
1040          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.
1041          *                                                                      Note: The control does not permit to change its focus ability.
1042          * @exception   E_SYSTEM                        A system error has occurred.
1043          * @remarks             The focus ability of the container classes like Panel is @c false by default.
1044          * @remarks             The RadioGroup class does not render the UI.
1045          *                              Therefore, RadioGroup::SetFocusable() returns @c E_SYSTEM.
1046          */
1047         result SetFocusable(bool focusable);
1048
1049         /**
1050          * Checks whether the control currently has the input focus.
1051          *
1052          * @since               2.0
1053          *
1054          * @return              @c true if the control currently has the input focus, @n
1055          *                              else @c false
1056          * @remarks             If this method is called before the control is added to a parent, @c false is returned.
1057          * @see                 SetFocus()
1058          */
1059         bool HasFocus(void) const;
1060
1061         /**
1062          * Sets the focus to the control. @n
1063          * This method is called if the control needs to listen to user input events such as key pressed.
1064          *
1065          * @since               2.0
1066          *
1067          * @return              An error code
1068          * @exception   E_SUCCESS                       The method is successful.
1069          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.
1070          *                                                                      Note: This control cannot be displayed.
1071          * @exception   E_INVALID_CONDITION     The control is not contained in, or is not the top z-order frame or form.
1072          * @remarks             Do not override this method.
1073          */
1074         result SetFocus(void);
1075
1076         /**
1077          * Checks whether the control is enabled.
1078          *
1079          * @since               2.0
1080          *
1081          * @return              @c true if the control is enabled, @n
1082          *                              else @c false
1083          * @remarks             If this method is called before the control is added to a parent, @c false is returned.
1084          * @see                 SetEnabled()
1085          */
1086         bool IsEnabled(void) const;
1087
1088         /**
1089          * Enables or disables the control. @n
1090          * Only an enabled control can respond to the user input. By default, the control is enabled.
1091          *
1092          * @since               2.0
1093          *
1094          * @return              An error code
1095          * @param[in]   enable                          The new state of the object
1096          * @exception   E_SUCCESS                       The method is successful.
1097          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation.
1098          * @exception   E_SYSTEM                        A system error has occurred.
1099          * @remarks             Do not override this method.
1100          */
1101         result SetEnabled(bool enable);
1102
1103         /**
1104          * Checks whether the device is in touch mode. @n
1105          * When the user interacts with the device by touching it, the device is in touch mode.
1106          *
1107          * @since               2.0
1108          *
1109          * @return              @c true if the device is in touch mode, @n
1110          *                              else @c false
1111          * @remarks             This method returns @c false, for devices with QWERTY keyboard.
1112          *                              The user can navigate the UI using directional keys.
1113          */
1114         bool IsInTouchMode(void) const;
1115
1116         /**
1117          * Enables or disables the drag operation in the %Control.
1118          *
1119          * @since               2.0
1120          *
1121          * @param[in]   enable  Set to @c true to enable the drag operation, @n
1122          *                                              else @c false
1123          * @see                 SetDropEnabled()
1124          */
1125         void SetDragEnabled(bool enable);
1126
1127         /**
1128          * Enables or disables the drop operations in the %Control.
1129          *
1130          * @since               2.0
1131          *
1132          * @param[in]   enable  Set to @c true to enable drop operations, @n
1133          *                              else @c false
1134          * @remarks             To receive drop event, control's drag property has to be enabled.
1135          * @see                 SetDragEnabled()
1136          */
1137         void SetDropEnabled(bool enable);
1138
1139         /**
1140          * Sends a user event to the control.
1141          *
1142          * @since               2.0
1143          *
1144          * @param[in]   requestId The user-defined event ID
1145          * @param[in]   pArgs  A pointer to the argument list
1146          * @remarks             This method posts a user event in the event queue
1147          *                              and returns immediately to support asynchronous actions of the framework.
1148          * @see                 OnUserEventReceived()
1149          */
1150         void SendUserEvent(RequestId requestId, const Tizen::Base::Collection::IList* pArgs) const;
1151
1152         /**
1153          * Stops the current UI event dispatch sequence by indicating the current input event is consumed.
1154          *
1155          * @since               2.0
1156          *
1157          * @return              An error code
1158          * @exception   E_SUCCESS                               The method is successful.
1159          * @exception   E_SYSTEM                                A system error has occurred.
1160          * @remarks             If this method is invoked during an UI event (key or touch) propagation sequence,
1161          *                              the method will stop the propagation and consequently the system will not be notified of the event. @n
1162          *                              The method will not have any effect if no UI event is being dispatched. @n
1163          *                              It is recommended that this method is called within IKeyEventListener or
1164          *                              ITouchEventListener to stop the event from propagating to the next step.
1165          */
1166         result ConsumeInputEvent(void);
1167
1168         /**
1169          * Gets the control animator of the current instance of %Control
1170          *
1171          * @since               2.0
1172          *
1173          * @return              A pointer to ControlAnimator, @n
1174          *                              else @c null if this instance is not constructed or not added to a parent or non-animatable
1175          */
1176         Tizen::Ui::Animations::ControlAnimator* GetControlAnimator(void) const;
1177
1178         /**
1179          * Adds the gesture detector to the %Control. @n
1180          * The added gesture detector receives touch events prior to %Control.
1181          *
1182          * @since 2.0
1183          *
1184          * @return              An error code
1185          * @param[in]   gestureDetector                                 The gesture detector
1186          * @exception   E_SUCCESS                       The method is successful.
1187          * @see                 RemoveGestureDetector()
1188          */
1189         result AddGestureDetector(const TouchGestureDetector& gestureDetector);
1190
1191         /**
1192          * Removes the gesture detector from the %Control.
1193          *
1194          * @since 2.0
1195          *
1196          * @return              An error code
1197          * @param[in]   gestureDetector                                 The gesture detector
1198          * @exception   E_SUCCESS                       The method is successful.
1199          * @see                 AddGestureDetector()
1200          */
1201         result RemoveGestureDetector(const TouchGestureDetector& gestureDetector);
1202
1203         /**
1204          * @if OSPDEPREC
1205          * Gets the composite mode for merging with other controls.
1206          *
1207          * @brief <i> [Deprecated] </i>
1208          * @deprecated  This method is deprecated because changing composition mode is not allowed any more.
1209          * @since               2.0
1210          *
1211          * @return              The composite mode
1212          * @exception   E_SUCCESS                               The method is successful.
1213          * @remarks             In Tizen, this method only returns @c COMPOSITE_MODE_ALPHA_BLENDING.
1214          * @remarks             The specific error code can be accessed using the GetLastResult() method.
1215          * @endif
1216          */
1217         Tizen::Ui::CompositeMode GetCompositeMode(void) const;
1218
1219         /**
1220          * @if OSPDEPREC
1221          * Sets the composite mode for merging with other controls.
1222          *
1223          * @brief <i> [Deprecated] </i>
1224          * @deprecated  This method is deprecated because changing composition mode is not allowed any more.
1225          * @since               2.0
1226          *
1227          * @return              An error code
1228          * @param[in]   compositeMode                   The composite mode
1229          * @exception   E_SUCCESS                               The method is successful.
1230          * @exception   E_UNSUPPORTED_OPERATION The method is not supported.
1231          * @remarks             In Tizen, only @c COMPOSITE_MODE_ALPHA_BLENDING is allowed.
1232          *                              Otherwise, this method returns @c E_UNSUPPORTED_OPERATION.
1233          * @endif
1234          */
1235         result SetCompositeMode(Tizen::Ui::CompositeMode compositeMode);
1236
1237         /**
1238          * @if OSPDEPREC
1239          * Gets the chroma key color value that is used for the control composition.
1240          *
1241          * @brief <i> [Deprecated] </i>
1242          * @deprecated  This method is deprecated because chroma key color is not supported any more.
1243          * @since               2.0
1244          *
1245          * @return              The chroma key color
1246          * @exception   E_UNSUPPORTED_OPERATION The method is not supported.
1247          * @remarks             In Tizen, this method always fails and returns Tizen::Graphics::Color(0, 0, 0, 0).
1248          * @remarks             The specific error code can be accessed using the GetLastResult() method.
1249          * @endif
1250          */
1251         Tizen::Graphics::Color GetChromaKeyColor(void) const;
1252
1253         /**
1254          * @if OSPDEPREC
1255          * Sets the chroma key color value that is used for the control composition.
1256          *
1257          * @brief <i> [Deprecated] </i>
1258          * @deprecated  This method is deprecated because chroma key color is not supported any more.
1259          * @since               2.0
1260          *
1261          * @return              An error code
1262          * @param[in]   chromaKeyColor                  The chroma key color
1263          * @exception   E_UNSUPPORTED_OPERATION The method is not supported.
1264          * @remarks             In Tizen, this method always fails.
1265          * @endif
1266          */
1267         result SetChromaKeyColor(Tizen::Graphics::Color chromaKeyColor);
1268
1269         /**
1270          * Captures the composited scene of the Panel control.
1271          *
1272          * @since               2.0
1273          *
1274          * @return              A Tizen::Graphics::Bitmap instance that captures the current composited scene of the Panel control, @n
1275          *                              else @c null if an error occurs
1276          * @exception   E_SUCCESS                                       The method is successful.
1277          * @exception   E_UNSUPPORTED_OPERATION         This method is not supported.
1278          * @exception   E_SYSTEM                                        A system error has occurred.
1279          * @remarks             The specific error code can be accessed using the GetLastResult() method.
1280          * @remarks             This method is not supported in the following class that is derived from Panel class:
1281          *                              @li OverlayPanel
1282          * @remarks             The bounds of the %Panel control must be within the client area of the Form control to get a valid composited scene.
1283          */
1284         Tizen::Graphics::Bitmap* GetCapturedBitmapN(void) const;
1285
1286         /**
1287          * Gets the position and the size of the invalidated bounds.
1288          *
1289          * @since 2.0
1290          *
1291          * @return      An instance of Tizen::Graphics::Rectangle that represents the position of top-left corner,
1292          *                                        the width, and the height of the invalidated bounds
1293          */
1294         Tizen::Graphics::Rectangle GetInvalidatedBounds(void) const;
1295
1296         /**
1297          * Enables or disables the multi-point touch of the %Control.
1298          *
1299          * @since               2.0
1300          *
1301          * @param[in]   enable                          A Boolean flag indicating whether to enable the multi-point touch
1302          *
1303          * @see                 IsMultipointTouchEnabled()
1304          */
1305
1306          void SetMultipointTouchEnabled(bool enable);
1307
1308         /**
1309          * Checks whether the multi-point touch is enabled.
1310          *
1311          * @since               2.0
1312          *
1313          * @return              @c true if the multi-point touch is enabled, @n
1314          *                              else @c false
1315          * @see                 SetMultipointTouchEnabled()
1316          */
1317         bool IsMultipointTouchEnabled(void) const;
1318
1319         /**
1320          * Gets the accessibility container.
1321          *
1322          * @since 2.0
1323          *
1324          * @return              The accessibilit container of the control, if the control supports accessibility feature. @n
1325          *                              Else @c null.
1326          * @see                 AccessibilityContainer::GetOwner()
1327          */
1328         const AccessibilityContainer* GetAccessibilityContainer(void) const;
1329
1330         /**
1331          * Gets the accessibility container.
1332          *
1333          * @since 2.0
1334          *
1335          * @return              The accessibilit container of the control, if the control supports accessibility feature. @n
1336          *                              Else @c null.
1337          * @see                 AccessibilityContainer::GetOwner()
1338          */
1339         AccessibilityContainer* GetAccessibilityContainer(void);
1340
1341 protected:
1342         /**
1343          * Gets the default key event listener.
1344          *
1345          * @since               2.0
1346          *
1347          * @return              The default key event listener, @n
1348          *                              else @null is returned if listener is not set or a system error has occurred
1349          * @see                 SetDefaultKeyEventListener()
1350          */
1351         IKeyEventListener* GetDefaultkeyEventListener(void) const;
1352
1353         /**
1354          * Gets the default touch event listener.
1355          *
1356          * @since               2.0
1357          *
1358          * @return              The default touch event listener @n
1359          *                              If not listener has been set or a system error has occurred @c null is returned.
1360          * @see                 SetDefaultTouchEventListener()
1361          */
1362         ITouchEventListener* GetDefaultTouchEventListener(void) const;
1363
1364         /**
1365          * Sets the default key event listener.
1366          *
1367          * @since               2.0
1368          *
1369          * @return              An error code
1370          * @param[in]   pDefaultListener                The default key event listener
1371          * @exception   E_SUCCESS                               The method is successful.
1372          * @exception   E_SYSTEM                                A system error has occurred.
1373          * @remarks             The registered listener will be notified to handle the key events
1374          *                              after all application event listeners have been notified.
1375          * @see                 GetDefaultkeyEventListener()
1376          */
1377         result SetDefaultKeyEventListener(IKeyEventListener* pDefaultListener);
1378
1379         /**
1380          * Sets the default touch event listener.
1381          *
1382          * @since               2.0
1383          *
1384          * @return              An error code
1385          * @param[in]   pDefaultListener                The default touch event listener
1386          * @exception   E_SUCCESS                               The method is successful.
1387          * @exception   E_SYSTEM                                A system error has occurred.
1388          * @remarks             The registered listener will be notified to handle the touch events
1389          *                              after all application event listeners have been notified.
1390          * @see                 GetDefaultTouchEventListener()
1391          */
1392         result SetDefaultTouchEventListener(ITouchEventListener* pDefaultListener);
1393
1394         /**
1395          * 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.
1396          *
1397          * @since       2.0
1398          */
1399         Control(void);
1400
1401         /**
1402          * This method is for internal use only. Using this method can cause behavioral, security-related,
1403          * and consistency-related issues in the application.
1404          *
1405          * Initializes this instance of %Control.
1406          *
1407          * @since               2.0
1408          * @return              An error code
1409          * @exception   E_SUCCESS                       The method is successful.
1410          * @exception   E_SYSTEM                        A system error has occurred.
1411          */
1412         result Construct(void);
1413
1414         /**
1415          * Frees the resources allocated by Construct().
1416          *
1417          * @since 2.0
1418          */
1419         void Dispose(void);
1420
1421 protected:
1422         _ControlImpl* _pControlImpl;
1423
1424         //
1425         // This method is for internal use only. Using this method can cause behavioral, security-related,
1426         // and consistency-related issues in the application.
1427         //
1428         // This method is reserved and may change its name at any time without prior notice.
1429         //
1430         virtual void Control_Reserved1(void) {}
1431
1432         //
1433         // This method is for internal use only. Using this method can cause behavioral, security-related,
1434         // and consistency-related issues in the application.
1435         //
1436         // This method is reserved and may change its name at any time without prior notice.
1437         //
1438         virtual void Control_Reserved2(void) {}
1439
1440         //
1441         // This method is for internal use only. Using this method can cause behavioral, security-related,
1442         // and consistency-related issues in the application.
1443         //
1444         // This method is reserved and may change its name at any time without prior notice.
1445         //
1446         virtual void Control_Reserved3(void) {}
1447
1448         //
1449         // This method is for internal use only. Using this method can cause behavioral, security-related,
1450         // and consistency-related issues in the application.
1451         //
1452         // This method is reserved and may change its name at any time without prior notice.
1453         //
1454         virtual void Control_Reserved4(void) {}
1455
1456         //
1457         // This method is for internal use only. Using this method can cause behavioral, security-related,
1458         // and consistency-related issues in the application.
1459         //
1460         // This method is reserved and may change its name at any time without prior notice.
1461         //
1462         virtual void Control_Reserved5(void) {}
1463
1464         //
1465         // This method is for internal use only. Using this method can cause behavioral, security-related,
1466         // and consistency-related issues in the application.
1467         //
1468         // This method is reserved and may change its name at any time without prior notice.
1469         //
1470         virtual void Control_Reserved6(void) {}
1471
1472 private:
1473         //
1474         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1475         //
1476         Control(const Control& rhs);
1477
1478         //
1479         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1480         //
1481         Control& operator =(const Control& rhs);
1482
1483 private:
1484         friend class _ControlImpl;
1485 }; // Control
1486
1487 }} // Tizen::Ui
1488
1489 #endif // _FUI_CONTROL_H_