840af0a329a1f9db2d96d675a1af05e90b42ae28
[platform/core/uifw/dali-toolkit.git] / capi / dali-toolkit / public-api / controls / control-impl.h
1 #ifndef __DALI_TOOLKIT_CONTROL_IMPL_H__
2 #define __DALI_TOOLKIT_CONTROL_IMPL_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //     http://floralicense.org/license/
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19
20 /**
21  * @addtogroup CAPI_DALI_TOOLKIT_CONTROLS_MODULE
22  * @{
23  */
24
25 // INTERNAL INCLUDES
26 #include <dali-toolkit/public-api/controls/control.h>
27
28 namespace Dali DALI_IMPORT_API
29 {
30
31 namespace Toolkit
32 {
33
34 class StyleManager;
35
36 namespace Internal DALI_INTERNAL
37 {
38 class RelayoutControllerImpl;
39 class KeyInputFocusManager;
40 }
41
42 typedef std::pair< Actor, Vector2 > ActorSizePair;       ///< Pair of actor and size
43 typedef std::vector< ActorSizePair > ActorSizeContainer; ///< Container of actors and their sizes
44
45 namespace Internal
46 {
47
48 /**
49  * @brief This is the internal base class for all controls.
50  *
51  * It will provide some common functionality required by all controls.
52  * Implements ConnectionTrackerInterface so that signals (typically connected to member functions) will
53  * be disconnected automatically when the control is destroyed.
54  */
55 class DALI_IMPORT_API Control : public CustomActorImpl, public ConnectionTrackerInterface
56 {
57 public:
58
59   // Properties
60   enum
61   {
62     CONTROL_PROPERTY_START_INDEX = PROPERTY_REGISTRATION_START_INDEX,
63     CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
64   };
65
66   // Creation
67
68   /**
69    * @brief Create a new ControlImpl instance that does not require touch by default.
70    *
71    * If touch is required then the user can connect to this class' touch signal.
72    * @return A handle to the ConntrolImpl instance.
73    */
74   static Toolkit::Control New();
75
76   // Destruction
77
78   /**
79    * @brief Virtual destructor.
80    */
81   virtual ~Control();
82
83   // Actions
84
85   /**
86    * @brief This method should be overridden by deriving classes when they wish to be notified when they
87    * are activated.
88    */
89   virtual void OnActivated() { }
90
91   /**
92    * @brief This method should be overridden by deriving classes when they wish to respond the accessibility
93    * pan gesture.
94    *
95    * @param[in] gesture The pan gesture.
96    * @return true if the pan gesture has been consumed by this control
97    */
98   virtual bool OnAccessibilityPan(PanGesture gesture);
99
100   /**
101    * @brief This method should be overridden by deriving classes when they wish to respond the accessibility
102    * touch event.
103    *
104    * @param[in] touchEvent The touch event.
105    * @return true if the touch event has been consumed by this control
106    */
107   virtual bool OnAccessibilityTouch(const TouchEvent& touchEvent);
108
109   /**
110    * @brief This method should be overridden by deriving classes when they wish to respond
111    * the accessibility up and down action (i.e. value change of slider control).
112    *
113    * @param[in] isIncrease Whether the value should be increased or decreased
114    * @return true if the value changed action has been consumed by this control
115    */
116   virtual bool OnAccessibilityValueChange(bool isIncrease);
117
118   /**
119    * @brief Sets whether this control supports two dimensional
120    * keyboard navigation (i.e. whether it knows how to handle the
121    * keyboardn focus movement between its child actors).
122    *
123    * The control doesn't support it by default.
124    * @param[in] isSupported Whether this control supports two dimensional keyboard navigation.
125    */
126   void SetKeyboardNavigationSupport(bool isSupported);
127
128   /**
129    * @brief Gets whether this control supports two dimensional keyboard navigation.
130    *
131    * @return true if this control supports two dimensional keyboard navigation.
132    */
133   bool IsKeyboardNavigationSupported();
134
135   /**
136    * @brief Sets whether this control is a focus group for keyboard navigation.
137    *
138    * (i.e. the scope of keyboard focus movement
139    * can be limitied to its child actors). The control is not a focus group by default.
140    * @param[in] isFocusGroup Whether this control is set as a focus group for keyboard navigation.
141    */
142   void SetAsKeyboardFocusGroup(bool isFocusGroup);
143
144   /**
145    * @brief Gets whether this control is a focus group for keyboard navigation.
146    *
147    * @return true if this control is set as a focus group for keyboard navigation.
148    */
149   bool IsKeyboardFocusGroup();
150
151   /**
152    * @brief Gets the next keyboard focusable actor in this control towards the given direction.
153    *
154    * A control needs to override this function in order to support two dimensional keyboard navigation.
155    * @param[in] currentFocusedActor The current focused actor.
156    * @param[in] direction The direction to move the focus towards.
157    * @param[in] loopEnabled Whether the focus movement should be looped within the control.
158    * @return the next keyboard focusable actor in this control or an empty handle if no actor can be focused.
159    */
160   virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
161
162   /**
163    * @brief Informs this control that its chosen focusable actor will be focused.
164    *
165    * This allows the application to preform any actions if wishes
166    * before the focus is actually moved to the chosen actor.
167    *
168    * @param[in] commitedFocusableActor The commited focusable actor.
169    */
170   virtual void OnKeyboardFocusChangeCommitted(Actor commitedFocusableActor) { }
171
172   /**
173    * @brief Performs actions as requested using the action name.
174    *
175    * @param[in] object The object on which to perform the action.
176    * @param[in] actionName The action to perform.
177    * @param[in] attributes The attributes with which to perfrom this action.
178    * @return true if action has been accepted by this control
179    */
180   static bool DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes);
181
182   /**
183    * @brief If deriving classes wish to fine tune pinch gesture
184    * detection then they can access the gesture detector through this
185    * API and modify the detection.
186    *
187    * @return The pinch gesture detector.
188    * @pre Pinch detection should have been enabled via EnableGestureDetection().
189    * @see EnableGestureDetection
190    */
191   PinchGestureDetector GetPinchGestureDetector() const;
192
193   /**
194    * @brief If deriving classes wish to fine tune pan gesture
195    * detection then they can access the gesture detector through this
196    * API and modify the detection.
197    *
198    * @return The pan gesture detector.
199    * @pre Pan detection should have been enabled via EnableGestureDetection().
200    * @see EnableGestureDetection
201    */
202   PanGestureDetector GetPanGestureDetector() const;
203
204   /**
205    * @brief If deriving classes wish to fine tune tap gesture
206    * detection then they can access the gesture detector through this
207    * API and modify the detection.
208    *
209    * @return The tap gesture detector.
210    * @pre Tap detection should have been enabled via EnableGestureDetection().
211    * @see EnableGestureDetection
212    */
213   TapGestureDetector GetTapGestureDetector() const;
214
215   /**
216    * @brief If deriving classes wish to fine tune long press gesture
217    * detection then they can access the gesture detector through this
218    * API and modify the detection.
219    *
220    * @return The long press gesture detector.
221    * @pre Long press detection should have been enabled via EnableGestureDetection().
222    * @see EnableGestureDetection
223    */
224   LongPressGestureDetector GetLongPressGestureDetector() const;
225
226   // Background
227
228   /**
229    * @copydoc Dali::Toolkit::Control::SetBackgroundColor
230    */
231   void SetBackgroundColor( const Vector4& color );
232
233   /**
234    * @copydoc Dali::Toolkit::Control::GetBackgroundColor
235    */
236   Vector4 GetBackgroundColor() const;
237
238   /**
239    * @copydoc Dali::Toolkit::Control::SetBackground
240    */
241   void SetBackground( Image image );
242
243   /**
244    * @copydoc Dali::Toolkit::Control::ClearBackground
245    */
246   void ClearBackground();
247
248   /**
249    * @copydoc Dali::Toolkit::Control::GetBackgroundActor
250    */
251   Actor GetBackgroundActor() const;
252
253 public:
254
255   /**
256    * @copydoc Dali::Toolkit::Control::KeyEventSignal()
257    */
258   Toolkit::Control::KeyEventSignalV2& KeyEventSignal();
259
260 protected:
261
262   // Construction
263
264   /**
265    * @brief Second phase initialization.
266    */
267   void Initialize();
268
269   // Gesture Detection
270
271   /**
272    * @brief Allows deriving classes to enable any of the gesture detectors that are available.
273    *
274    * Gesture detection can be enabled one at a time or in bitwise format as shown:
275    * @code
276    * EnableGestureDetection(Gesture::Type(Gesture::Pinch | Gesture::Tap | Gesture::Pan));
277    * @endcode
278    * @param[in]  type  The gesture type(s) to enable.
279    */
280   void EnableGestureDetection(Gesture::Type type);
281
282   /**
283    * @brief Allows deriving classes to disable any of the gesture detectors.
284    *
285    * Like EnableGestureDetection, this can also be called using bitwise or.
286    * @param[in]  type  The gesture type(s) to disable.
287    * @see EnableGetureDetection
288    */
289   void DisableGestureDetection(Gesture::Type type);
290
291 private: // For derived classes to override
292
293   /**
294    * @brief This method is called after the Control has been initialized.
295    *
296    * Derived classes should do any second phase initialization by
297    * overriding this method.
298    */
299   virtual void OnInitialize() { }
300
301   /**
302    * @brief This method should be overridden by deriving classes when
303    * they wish to be notified when the style manager changes the theme.
304    *
305    * @param[in] styleManager  The StyleManager object.
306    */
307   virtual void OnThemeChange( Toolkit::StyleManager styleManager );
308
309   /**
310    * @brief This method should be overridden by deriving classes when
311    * they wish to be notified when the style changes the default font.
312    *
313    * @param[in] defaultFontChange  Information denoting whether the default font has changed.
314    * @param[in] defaultFontSizeChange Information denoting whether the default font size has changed.
315    */
316   virtual void OnFontChange( bool defaultFontChange, bool defaultFontSizeChange ){ }
317
318   /**
319    * @deprecated Use OnFontChange() instead.
320    * Before the using of StyleManager, the StyleChange only deals with font change.
321    *
322    * @brief This method should be overridden by deriving classes when
323    * they wish to be notified when the style changes.
324    *
325    * @param[in] change  Information denoting what has changed.
326    */
327   virtual void OnStyleChange( StyleChange change ) { }
328
329   /**
330    * @brief Called whenever a pinch gesture is detected on this control.
331    *
332    * This can be overridden by deriving classes when pinch detection
333    * is enabled.  The default behaviour is to scale the control by the
334    * pinch scale.
335    *
336    * @note If overridden, then the default behaviour will not occur.
337    * @note Pinch detection should be enabled via EnableGestureDetection().
338    * @param[in]  pinch  The pinch gesture.
339    * @see EnableGestureDetection
340    */
341   virtual void OnPinch(PinchGesture pinch);
342
343   /**
344    * @brief Called whenever a pan gesture is detected on this control.
345    *
346    * This should be overridden by deriving classes when pan detection
347    * is enabled.
348    *
349    * @note There is no default behaviour with panning.
350    * @note Pan detection should be enabled via EnableGestureDetection().
351    * @param[in]  pan  The pan gesture.
352    * @see EnableGestureDetection
353    */
354   virtual void OnPan(PanGesture pan) { }
355
356   /**
357    * @brief Called whenever a tap gesture is detected on this control.
358    *
359    * This should be overridden by deriving classes when tap detection
360    * is enabled.
361    *
362    * @note There is no default behaviour with a tap.
363    * @note Tap detection should be enabled via EnableGestureDetection().
364    * @param[in]  tap  The tap gesture.
365    * @see EnableGestureDetection
366    */
367   virtual void OnTap(TapGesture tap) { }
368
369   /**
370    * @brief Called whenever a long press gesture is detected on this control.
371    *
372    * This should be overridden by deriving classes when long press
373    * detection is enabled.
374    *
375    * @note There is no default behaviour associated with a long press.
376    * @note Long press detection should be enabled via EnableGestureDetection().
377    * @param[in]  longPress  The long press gesture.
378    * @see EnableGestureDetection
379    */
380   virtual void OnLongPress(LongPressGesture longPress) { }
381
382   /**
383    * @brief Called whenever the control is added to the stage.
384    *
385    * Could be overridden by derived classes.
386    */
387   virtual void OnControlStageConnection() { }
388
389   /**
390    * @brief Called whenever the control is removed from the stage.
391    *
392    * Could be overridden by derived classes.
393    */
394   virtual void OnControlStageDisconnection() { }
395
396   /**
397    * @brief Called whenever an Actor is added to the control.
398    *
399    * Could be overridden by derived classes.
400    *
401    * @param[in] child The added actor.
402    */
403   virtual void OnControlChildAdd( Actor& child ) { }
404
405   /**
406    * @brief Called whenever an Actor is removed from the control.
407    *
408    * Could be overridden by derived classes.
409    *
410    * @param[in] child The removed actor.
411    */
412   virtual void OnControlChildRemove( Actor& child ) { }
413
414   /**
415    * @brief Called whenever the Control's size is set.
416    *
417    * Could be overridden by derived classes.
418    *
419    * @param[in] size The new size.
420    */
421   virtual void OnControlSizeSet( const Vector3& size ) { }
422
423   /**
424    * @brief Called after the Dali::Stage::SignalMessageQueueFlushed()
425    * signal is emitted if this control requested to be relaid-out.
426    *
427    * Should be overridden by derived classes if they need to layout
428    * actors differently after certain operations like add or remove
429    * actors, resize or after changing especific properties.
430    *
431    * @param[in]      size       The allocated size.
432    * @param[in,out]  container  The control should add actors to this container that it is not able
433    *                            to allocate a size for.
434    */
435   virtual void OnRelaidOut( Vector2 size, ActorSizeContainer& container );
436
437 private: // From CustomActorImpl, derived classes can override these.
438
439   /**
440    * @brief Sends a request to relayout this control.
441    *
442    * The control will be relaid out after the
443    * Dali::Stage::SignalMessageQueueFlushed() signal is emitted.
444    *
445    * It calls OnControlStageConnection() to notify derived classes.
446    *
447    * @see Dali::CustomActorImpl::OnStageConnection()
448    */
449   virtual void OnStageConnection();
450
451   /**
452    * @brief Calls OnControlStageDisconnection() to notify derived classed.
453    *
454    * @see Dali::CustomActorImpl::OnStageDisconnection()
455    */
456   virtual void OnStageDisconnection();
457
458   /**
459    * @brief Sends a request to relayout this control.
460    *
461    * The control will be relaid out after the
462    * Dali::Stage::SignalMessageQueueFlushed() signal is emitted.  It
463    * calls OnControlChildAdd() to notify derived classes.
464    *
465    * @note This method shouldn't be overridden by derived classes.
466    *
467    * @param[in] child The added actor.
468    *
469    * @see Dali::CustomActorImpl::OnChildAdd(Actor&)
470    */
471   virtual void OnChildAdd(Actor& child);
472
473   /**
474    * @brief Sends a request to relayout this control.
475    *
476    * The control will be relaid out after the
477    * Dali::Stage::SignalMessageQueueFlushed() signal is emitted.  It
478    * calls OnControlChildRemove() to notify derived classes.
479    *
480    * @note This method shouldn't be overridden by derived classes.
481    *
482    * @param[in] child The removed actor.
483    *
484    * @see Dali::CustomActorImpl::OnChildRemove(Actor&)
485    */
486   virtual void OnChildRemove(Actor& child);
487
488   /**
489    * @brief It stores the size set by size negotiation and relayout.
490    *
491    * It also keeps a backup of the size set through the Actor's API used in the size negotiation.
492    * It calls the OnControlSizeSet() to notify derived classes.
493    *
494    * @param[in] targetSize The new size.
495    *
496    * @see Dali::CustomActorImpl::OnSizeSet(const Vector3&)
497    */
498   virtual void OnSizeSet(const Vector3& targetSize);
499
500   /**
501    * @copydoc Dali::CustomActorImpl::OnSizeAnimation(Animation&, const Vector3&)
502    */
503   virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize);
504
505   /**
506    * @copydoc Dali::CustomActorImpl::OnTouchEvent(const TouchEvent&)
507    */
508   virtual bool OnTouchEvent(const TouchEvent& event);
509
510   /**
511    * @copydoc Dali::CustomActorImpl::OnKeyEvent(const KeyEvent&)
512    */
513   virtual bool OnKeyEvent(const KeyEvent& event);
514
515   /**
516    * @copydoc Dali::CustomActorImpl::OnMouseWheelEvent(const MouseWheelEvent&)
517    */
518   virtual bool OnMouseWheelEvent(const MouseWheelEvent& event);
519
520   /**
521    * @copydoc Dali::CustomActorImpl::OnKeyInputFocusGained()
522    */
523   virtual void OnKeyInputFocusGained();
524
525   /**
526    * @copydoc Dali::CustomActorImpl::OnKeyInputFocusLost()
527    */
528   virtual void OnKeyInputFocusLost();
529
530   /**
531    * @copydoc Dali::CustomActorImpl::GetChildByAlias(const std::string& actorAlias)
532    */
533   virtual Actor GetChildByAlias(const std::string& actorAlias);
534
535 private:
536
537   /**
538    * @brief Perform the activated action.
539    *
540    * @param[in] attributes The attributes to perfrom this action.
541    */
542   void DoActivatedAction(const PropertyValueContainer& attributes);
543
544   /**
545    * @brief This method is the callback for the StyleChangeSignal from StyleManager
546    *
547    * @param[in] styleManager The StyleManager Object
548    * @param[in] change  Information denoting what has changed.
549    */
550   void DoStyleChange( Toolkit::StyleManager styleManager, StyleChange change );
551
552 protected: // Construction
553
554   // Flags for the constructor
555   enum ControlBehaviour
556   {
557     CONTROL_BEHAVIOUR_NONE         = 0x0,
558     REQUIRES_TOUCH_EVENTS          = 0x1,     ///< True if the OnTouchEvent() callback is required.
559     REQUIRES_STYLE_CHANGE_SIGNALS  = 0x2      ///< True if needs to monitor style change signals such as theme/font change
560   };
561
562   /**
563    * @deprecated Use the constructor taking flags instead
564    * @brief Create a Control.
565    *
566    * @param[in] requiresTouchEvents True if the OnTouchEvent() callback is required.
567    */
568   Control(bool requiresTouchEvents);
569
570   /**
571    * @brief Create a Control.
572    *
573    * @param[in] behaviourFlags Behavioural flags from ControlBehaviour enum
574    */
575   Control(ControlBehaviour behaviourFlags);
576
577 public:
578
579   // Size negotiation
580
581   /**
582    * @copydoc Toolkit::Control::SetSizePolicy()
583    */
584   void SetSizePolicy( Toolkit::Control::SizePolicy widthPolicy, Toolkit::Control::SizePolicy heightPolicy );
585
586   /**
587    * @copydoc Toolkit::Control::GetSizePolicy()
588    */
589   void GetSizePolicy( Toolkit::Control::SizePolicy& widthPolicy, Toolkit::Control::SizePolicy& heightPolicy ) const;
590
591   /**
592    * @copydoc Toolkit::Control::SetMinimumSize()
593    */
594   void SetMinimumSize( const Vector3& size );
595
596   /**
597    * @copydoc Toolkit::Control::GetMinimumSize()
598    */
599   const Vector3& GetMinimumSize() const;
600
601   /**
602    * @copydoc Toolkit::Control::SetMaximumSize()
603    */
604   void SetMaximumSize( const Vector3& size );
605
606   /**
607    * @copydoc Toolkit::Control::GetMaximumSize()
608    */
609   const Vector3& GetMaximumSize() const;
610
611   /**
612    * @copydoc Toolkit::Control::GetNaturalSize()
613    */
614   virtual Vector3 GetNaturalSize();
615
616   /**
617    * @copydoc Toolkit::Control::GetHeightForWidth()
618    */
619   virtual float GetHeightForWidth( float width );
620
621   /**
622    * @copydoc Toolkit::Control::GetWidthForHeight()
623    */
624   virtual float GetWidthForHeight( float height );
625
626   /**
627    * @brief Retrieves the current Control's size.
628    *
629    * @return The control's size.
630    */
631   const Vector3& GetControlSize() const;
632
633   /**
634    * @brief Retrieves the Control's size set by the Application / Control.
635    *
636    * @return The control's size.
637    */
638   const Vector3& GetSizeSet() const;
639
640   //KeyInput
641
642   /**
643    * @copydoc Toolkit::Control::SetKeyInputFocus()
644    */
645   void SetKeyInputFocus();
646
647   /**
648    * @copydoc Toolkit::Control::HasKeyInputFocus()
649    */
650   bool HasKeyInputFocus();
651
652   /**
653    * @copydoc Toolkit::Control::ClearKeyInputFocus()
654    */
655   void ClearKeyInputFocus();
656
657   /**
658    * @copydoc ConnectionTrackerInterface::SignalConnected
659    */
660   virtual void SignalConnected( SlotObserver* slotObserver, CallbackBase* callback );
661
662   /**
663    * @copydoc ConnectionTrackerInterface::SignalDisconnected
664    */
665   virtual void SignalDisconnected( SlotObserver* slotObserver, CallbackBase* callback );
666
667   /**
668    * @copydoc ConnectionTrackerInterface::GetConnectionCount
669    */
670   virtual std::size_t GetConnectionCount() const;
671
672 protected:
673
674   /**
675    * @brief Sends a request to be relaid-out.
676    *
677    * This method is called from OnStageConnection(), OnChildAdd(),
678    * OnChildRemove(), SetSizePolicy(), SetMinimumSize() and
679    * SetMaximumSize().
680    *
681    * This method could also be called from derived classes every time
682    * a control's poperty change and it needs to be relaid-out.  After
683    * the Dali::Stage::SignalMessageQueueFlushed() is emitted a
684    * relayout process starts and all controls which called this method
685    * will be relaid-out.
686    *
687    * @note RelayoutRequest() only sends a request per Control before
688    * the Dali::Stage::SignalMessageQueueFlushed() signal is
689    * emitted. That means a control will be relaid-out only once, even
690    * if more than one request is sent between two consecutive signals.
691    */
692   void RelayoutRequest();
693
694   /**
695    * @brief Helper method for controls to Relayout their children if
696    * they do not know whether that child is a control or not.
697    *
698    * @param[in]      actor      The actor to relayout.
699    * @param[in]      size       The size to allocate to the actor.
700    * @param[in,out]  container  The container that holds actors that have not been allocated a size yet.
701    */
702   static void Relayout( Actor actor, Vector2 size, ActorSizeContainer& container );
703
704 private: // Used by the RelayoutController
705
706   /**
707    * @brief Called by the RelayoutController to negotiate the size of a control.
708    *
709    * The size allocated by the the algorithm is passed in which the
710    * control must adhere to.  A container is passed in as well which
711    * the control should populate with actors it has not / or does not
712    * need to handle in its size negotiation.
713    *
714    * @param[in]      size       The allocated size.
715    * @param[in,out]  container  The container that holds actors that are fed back into the
716    *                            RelayoutController algorithm.
717    */
718   void NegotiateSize( Vector2 size, ActorSizeContainer& container );
719
720 private:
721
722   /**
723    * @brief Called by NegotiateSize when the size to allocate to the control has been calculated.
724    *
725    * It calls the OnRelaidOut() method which can be overridden by derived classes.
726    *
727    * @param[in]      size       The allocated size.
728    * @param[in,out]  container  The control should add actors to this container that it is not able
729    *                            to allocate a size for.
730    */
731   void Relayout( Vector2 size, ActorSizeContainer& container );
732
733   /**
734    * @brief Used by the KeyInputFocusManager to emit key event signals.
735    *
736    * @param[in] event The key event.
737    * @return True if the event was consumed.
738    */
739   bool EmitKeyEventSignal(const KeyEvent& event);
740
741
742
743 private:
744
745   // Undefined
746   Control(const Control&);
747   Control& operator=(const Control&);
748
749   class Impl;
750   Impl *mImpl;
751
752   friend class Internal::RelayoutControllerImpl;   ///< Relayout controller needs to call Relayout() which is private.
753   friend class Internal::KeyInputFocusManager;     ///< KeyInputFocusManager needs to call which is private.
754 };
755
756 } // namespace Internal
757
758 typedef Internal::Control ControlImpl; ///< @deprecated, Use Internal::Control
759
760 } // namespace Toolkit
761
762 } // namespace Dali
763
764 /**
765  * @}
766  */
767 #endif // __DALI_TOOLKIT_CONTROL_IMPL_H__