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