[dali_2.3.42] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / 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) 2023 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/animation/alpha-function.h>
24 #include <dali/public-api/animation/time-period.h>
25 #include <dali/public-api/events/long-press-gesture.h>
26 #include <dali/public-api/events/pan-gesture.h>
27 #include <dali/public-api/events/pinch-gesture.h>
28 #include <dali/public-api/events/tap-gesture.h>
29 #include <dali/public-api/object/property-index-ranges.h>
30 #include <dali/public-api/object/type-info.h>
31
32 // INTERNAL INCLUDES
33 #include <dali-toolkit/public-api/controls/control.h>
34
35 namespace Dali
36 {
37 namespace Toolkit
38 {
39 /**
40  * @addtogroup dali_toolkit_controls
41  * @{
42  */
43
44 class StyleManager;
45
46 namespace DevelControl
47 {
48 class ControlAccessible;
49
50 } // namespace DevelControl
51
52 namespace Internal
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  * @SINCE_1_0.0
61  */
62 class DALI_TOOLKIT_API Control : public CustomActorImpl, public ConnectionTrackerInterface
63 {
64 public:
65   class Extension; ///< Forward declare future extension interface
66
67   // Creation & Destruction
68   /**
69    * @brief Creates 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    * @SINCE_1_0.0
73    * @return A handle to the ControlImpl instance
74    */
75   static Toolkit::Control New();
76
77 protected:
78   /**
79    * @brief Virtual destructor.
80    * @SINCE_1_0.0
81    */
82   virtual ~Control();
83
84 public:
85   // Styling
86
87   /**
88    * @copydoc Dali::Toolkit::Control::SetStyleName
89    */
90   void SetStyleName(const std::string& styleName);
91
92   /**
93    * @copydoc Dali::Toolkit::Control::GetStyleName
94    */
95   const std::string& GetStyleName() const;
96
97   // Background
98
99   /**
100    * @copydoc Dali::Toolkit::Control::SetBackgroundColor
101    */
102   void SetBackgroundColor(const Vector4& color);
103
104   /**
105    * @brief Sets the background with a property map.
106    *
107    * @SINCE_1_0.0
108    * @param[in] map The background property map
109    */
110   void SetBackground(const Property::Map& map);
111
112   /**
113    * @copydoc Dali::Toolkit::Control::ClearBackground
114    */
115   void ClearBackground();
116
117   /**
118    * @copydoc Dali::Toolkit::Control::SetRenderEffect
119    */
120   void SetRenderEffect(Toolkit::RenderEffect effect);
121
122   /**
123    * @copydoc Dali::Toolkit::Control::ClearRenderEffect
124    */
125   void ClearRenderEffect();
126
127   /**
128    * @brief Called when resources of control are ready. this api does not request relayout.
129    */
130   void SetResourceReady();
131
132   // Accessibility
133
134   /**
135    * @brief Gets the Accessible object that represents this control.
136    *
137    * This method calls CreateAccessibleObject() if CreateAccessible is true.
138    *
139    * @return The Accessible object
140    *
141    * @see CreateAccessibleObject()
142    */
143   std::shared_ptr<Toolkit::DevelControl::ControlAccessible> GetAccessibleObject();
144
145   // Gesture Detection
146
147   /**
148    * @brief Allows deriving classes to enable any of the gesture detectors that are available.
149    *
150    * Gesture detection can be enabled one at a time or in bitwise format as shown:
151    * @code
152    * EnableGestureDetection(GestureType::Value(GestureType::PINCH | GestureType::TAP | GestureType::PAN));
153    * @endcode
154    * @SINCE_1_0.0
155    * @param[in] type The gesture type(s) to enable
156    */
157   void EnableGestureDetection(GestureType::Value type);
158
159   /**
160    * @brief Allows deriving classes to disable any of the gesture detectors.
161    *
162    * Like EnableGestureDetection, this can also be called using bitwise or.
163    * @SINCE_1_0.0
164    * @param[in] type The gesture type(s) to disable
165    * @see EnableGetureDetection
166    */
167   void DisableGestureDetection(GestureType::Value type);
168
169   /**
170    * @brief If deriving classes wish to fine tune pinch gesture
171    * detection, then they can access the gesture detector through this
172    * API and modify the detection.
173    *
174    * @SINCE_1_0.0
175    * @return The pinch gesture detector
176    * @pre Pinch detection should have been enabled via EnableGestureDetection().
177    * @see EnableGestureDetection
178    */
179   PinchGestureDetector GetPinchGestureDetector() const;
180
181   /**
182    * @brief If deriving classes wish to fine tune pan gesture
183    * detection, then they can access the gesture detector through this
184    * API and modify the detection.
185    *
186    * @SINCE_1_0.0
187    * @return The pan gesture detector
188    * @pre Pan detection should have been enabled via EnableGestureDetection().
189    * @see EnableGestureDetection
190    */
191   PanGestureDetector GetPanGestureDetector() const;
192
193   /**
194    * @brief If deriving classes wish to fine tune tap gesture
195    * detection, then they can access the gesture detector through this
196    * API and modify the detection.
197    *
198    * @SINCE_1_0.0
199    * @return The tap gesture detector
200    * @pre Tap detection should have been enabled via EnableGestureDetection().
201    * @see EnableGestureDetection
202    */
203   TapGestureDetector GetTapGestureDetector() const;
204
205   /**
206    * @brief If deriving classes wish to fine tune long press gesture
207    * detection, then they can access the gesture detector through this
208    * API and modify the detection.
209    *
210    * @SINCE_1_0.0
211    * @return The long press gesture detector
212    * @pre Long press detection should have been enabled via EnableGestureDetection().
213    * @see EnableGestureDetection
214    */
215   LongPressGestureDetector GetLongPressGestureDetector() const;
216
217   // Keyboard Navigation
218
219   /**
220    * @brief Sets whether this control supports two dimensional
221    * keyboard navigation (i.e. whether it knows how to handle the
222    * keyboard focus movement between its child actors).
223    *
224    * The control doesn't support it by default.
225    * @SINCE_1_0.0
226    * @param[in] isSupported Whether this control supports two dimensional keyboard navigation
227    */
228   void SetKeyboardNavigationSupport(bool isSupported);
229
230   /**
231    * @brief Gets whether this control supports two dimensional keyboard navigation.
232    *
233    * @SINCE_1_0.0
234    * @return true if this control supports two dimensional keyboard navigation
235    */
236   bool IsKeyboardNavigationSupported();
237
238   // Key Input
239
240   /**
241    * @copydoc Toolkit::Control::SetKeyInputFocus()
242    */
243   void SetKeyInputFocus();
244
245   /**
246    * @copydoc Toolkit::Control::HasKeyInputFocus()
247    */
248   bool HasKeyInputFocus();
249
250   /**
251    * @copydoc Toolkit::Control::ClearKeyInputFocus()
252    */
253   void ClearKeyInputFocus();
254
255   // Keyboard Focus
256
257   /**
258    * @brief Sets whether this control is a focus group for keyboard navigation.
259    *
260    * (i.e. the scope of keyboard focus movement
261    * can be limited to its child actors). The control is not a focus group by default.
262    * @SINCE_1_0.0
263    * @param[in] isFocusGroup Whether this control is set as a focus group for keyboard navigation
264    */
265   void SetAsKeyboardFocusGroup(bool isFocusGroup);
266
267   /**
268    * @brief Gets whether this control is a focus group for keyboard navigation.
269    *
270    * @SINCE_1_0.0
271    * @return true if this control is set as a focus group for keyboard navigation
272    */
273   bool IsKeyboardFocusGroup();
274
275   /// @cond internal
276   /**
277    * @brief Called by the KeyboardFocusManager.
278    * @SINCE_1_0.0
279    */
280   DALI_INTERNAL void KeyboardEnter();
281   /// @endcond
282
283   // Signals
284
285   /**
286    * @copydoc Dali::Toolkit::Control::KeyEventSignal()
287    */
288   Toolkit::Control::KeyEventSignalType& KeyEventSignal();
289
290   /**
291    * @copydoc Dali::Toolkit::Control::KeyInputFocusGainedSignal()
292    */
293   Toolkit::Control::KeyInputFocusSignalType& KeyInputFocusGainedSignal();
294
295   /**
296    * @copydoc Dali::Toolkit::Control::KeyInputFocusLostSignal()
297    */
298   Toolkit::Control::KeyInputFocusSignalType& KeyInputFocusLostSignal();
299
300   /// @cond internal
301   /**
302    * @brief Called by the KeyInputFocusManager to emit key event signals.
303    *
304    * @SINCE_1_0.0
305    * @param[in] event The key event
306    * @return True if the event was consumed
307    */
308   DALI_INTERNAL bool EmitKeyEventSignal(const KeyEvent& event);
309   /// @endcond
310
311 protected: // For derived classes to call
312   /**
313    * @brief Emits KeyInputFocusGained signal if true else emits KeyInputFocusLost signal.
314    *
315    * Should be called last by the control after it acts on the Input Focus change.
316    *
317    * @SINCE_1_0.0
318    * @param[in] focusGained True if gained, False if lost
319    */
320   void EmitKeyInputFocusSignal(bool focusGained);
321
322 protected: // From CustomActorImpl
323   /**
324    * @copydoc CustomActorImpl::OnSceneConnection()
325    * @note If overridden, then an up-call to Control::OnSceneConnection MUST be made at the end.
326    */
327   void OnSceneConnection(int depth) override;
328
329   /**
330    * @copydoc CustomActorImpl::OnSceneDisconnection()
331    * @note If overridden, then an up-call to Control::OnSceneDisconnection MUST be made at the end.
332    */
333   void OnSceneDisconnection() override;
334
335   /**
336    * @copydoc CustomActorImpl::OnChildAdd()
337    * @note If overridden, then an up-call to Control::OnChildAdd MUST be made at the end.
338    */
339   void OnChildAdd(Actor& child) override;
340
341   /**
342    * @copydoc CustomActorImpl::OnChildRemove()
343    * @note If overridden, then an up-call to Control::OnChildRemove MUST be made at the end.
344    */
345   void OnChildRemove(Actor& child) override;
346
347   /**
348    * @copydoc CustomActorImpl::OnPropertySet()
349    * @note If overridden, then an up-call to Control::OnChildRemove MUST be made at the end.
350    */
351   void OnPropertySet(Property::Index index, const Property::Value& propertyValue) override;
352
353   /**
354    * @copydoc CustomActorImpl::OnSizeSet()
355    * @note If overridden, then an up-call to Control::OnSizeSet MUST be made at the end.
356    */
357   void OnSizeSet(const Vector3& targetSize) override;
358
359   /**
360    * @copydoc CustomActorImpl::OnSizeAnimation()
361    * @note If overridden, then an up-call to Control::OnSizeAnimation MUST be made at the end.
362    */
363   void OnSizeAnimation(Animation& animation, const Vector3& targetSize) override;
364
365   /**
366    * @copydoc CustomActorImpl::OnRelayout()
367    */
368   void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
369
370   /**
371    * @copydoc CustomActorImpl::OnSetResizePolicy()
372    */
373   void OnSetResizePolicy(ResizePolicy::Type policy, Dimension::Type dimension) override;
374
375   /**
376    * @copydoc CustomActorImpl::GetNaturalSize()
377    */
378   Vector3 GetNaturalSize() override;
379
380   /**
381    * @copydoc CustomActorImpl::CalculateChildSize()
382    */
383   float CalculateChildSize(const Dali::Actor& child, Dimension::Type dimension) override;
384
385   /**
386    * @copydoc CustomActorImpl::GetHeightForWidth()
387    */
388   float GetHeightForWidth(float width) override;
389
390   /**
391    * @copydoc CustomActorImpl::GetWidthForHeight()
392    */
393   float GetWidthForHeight(float height) override;
394
395   /**
396    * @copydoc CustomActorImpl::RelayoutDependentOnChildren()
397    */
398   bool RelayoutDependentOnChildren(Dimension::Type dimension = Dimension::ALL_DIMENSIONS) override;
399
400   /**
401    * @copydoc CustomActorImpl::OnCalculateRelayoutSize()
402    */
403   void OnCalculateRelayoutSize(Dimension::Type dimension) override;
404
405   /**
406    * @copydoc CustomActorImpl::OnLayoutNegotiated()
407    */
408   void OnLayoutNegotiated(float size, Dimension::Type dimension) override;
409
410 public: // Helpers for deriving classes
411   /**
412    * @brief Flags for the constructor.
413    * @SINCE_1_0.0
414    */
415   enum ControlBehaviour
416   {
417     CONTROL_BEHAVIOUR_DEFAULT            = 0, ///< Default behaviour: Size negotiation is enabled & listens to Style Change signal, but doesn't receive event callbacks. @SINCE_1_2_10
418     NOT_IN_USE_1                         = 1 << (CustomActorImpl::ACTOR_FLAG_COUNT + 0),
419     REQUIRES_KEYBOARD_NAVIGATION_SUPPORT = 1 << (CustomActorImpl::ACTOR_FLAG_COUNT + 1), ///< True if needs to support keyboard navigation @SINCE_1_0.0
420     DISABLE_STYLE_CHANGE_SIGNALS         = 1 << (CustomActorImpl::ACTOR_FLAG_COUNT + 2), ///< True if control should not monitor style change signals @SINCE_1_2_10
421
422     LAST_CONTROL_BEHAVIOUR_FLAG
423   };
424
425   static const int CONTROL_BEHAVIOUR_FLAG_COUNT = Log<LAST_CONTROL_BEHAVIOUR_FLAG - 1>::value + 1; ///< Total count of flags
426
427   /**
428    * @brief Creates a new ControlImpl instance that does not require touch by default.
429    *
430    * If touch is required, then the user can connect to this class' touch signal.
431    * @SINCE_2_1.8
432    * @param[in] additionalBehaviour Additional control behaviour.
433    * @return A handle to the ControlImpl instance
434    */
435   static Toolkit::Control New(ControlBehaviour additionalBehaviour);
436
437 protected:
438   // Construction
439
440   /**
441    * @brief Control constructor.
442    *
443    * @SINCE_1_0.0
444    * @param[in] behaviourFlags Behavioural flags from ControlBehaviour enum
445    */
446   Control(ControlBehaviour behaviourFlags);
447
448   /**
449    * @brief Second phase initialization.
450    * @SINCE_1_0.0
451    */
452   void Initialize();
453
454 public: // API for derived classes to override
455   // Lifecycle
456
457   /**
458    * @brief This method is called after the Control has been initialized.
459    *
460    * Derived classes should do any second phase initialization by overriding this method.
461    * @SINCE_1_0.0
462    */
463   virtual void OnInitialize();
464
465   /**
466    * @copydoc Dali::Toolkit::Control::IsResourceReady
467    */
468   virtual bool IsResourceReady() const;
469
470   // Styling
471
472   /**
473    * @brief This method should be overridden by deriving classes requiring notifications when the style changes.
474    *
475    * @SINCE_1_0.0
476    * @param[in] styleManager The StyleManager object
477    * @param[in] change Information denoting what has changed
478    */
479   virtual void OnStyleChange(Toolkit::StyleManager styleManager, StyleChange::Type change);
480
481   // Accessibility
482
483   /**
484    * @brief This method is called when the control is accessibility activated.
485    *
486    * Derived classes should override this to perform custom accessibility activation.
487    * @SINCE_1_0.0
488    * @return true if this control can perform accessibility activation
489    */
490   virtual bool OnAccessibilityActivated();
491
492   /**
493    * @brief This method should be overridden by deriving classes when they wish to respond the accessibility
494    * pan gesture.
495    *
496    * @SINCE_1_0.0
497    * @param[in] gesture The pan gesture
498    * @return true if the pan gesture has been consumed by this control
499    */
500   virtual bool OnAccessibilityPan(PanGesture gesture);
501
502   /**
503    * @brief This method should be overridden by deriving classes when they wish to respond
504    * the accessibility up and down action (i.e. value change of slider control).
505    *
506    * @SINCE_1_0.0
507    * @param[in] isIncrease Whether the value should be increased or decreased
508    * @return true if the value changed action has been consumed by this control
509    */
510   virtual bool OnAccessibilityValueChange(bool isIncrease);
511
512   /**
513    * @brief This method should be overridden by deriving classes when they wish to respond
514    * the accessibility zoom action.
515    *
516    * @SINCE_1_0.0
517    * @return true if the zoom action has been consumed by this control
518    */
519   virtual bool OnAccessibilityZoom();
520
521   /**
522    * @brief This method should be overriden by deriving classes when they wish to be
523    * represented by a custom Accessible object implementation.
524    *
525    * The AT-SPI infrastructure is responsible for destroying the returned object.
526    *
527    * Currently, this method is called at most once in a given Control's lifetime, when
528    * GetAccessibleObject() is called for the first time. A future version of the
529    * AT-SPI infrastructure, however, may delete the Accessible object and request a new
530    * one to be created (by calling this method) multiple times, for example during
531    * scene connection and disconnection.
532    *
533    * @return The newly created Accessible object
534    *
535    * @see GetAccessibleObject()
536    */
537   virtual DevelControl::ControlAccessible* CreateAccessibleObject();
538
539   // Keyboard focus
540
541   /**
542    * @brief Called when the control gains key input focus.
543    *
544    * Should be overridden by derived classes if they need to customize what happens when focus is gained.
545    * @SINCE_1_0.0
546    */
547   virtual void OnKeyInputFocusGained();
548
549   /**
550    * @brief Called when the control loses key input focus.
551    *
552    * Should be overridden by derived classes if they need to customize what happens when focus is lost.
553    * @SINCE_1_0.0
554    */
555   virtual void OnKeyInputFocusLost();
556
557   /**
558    * @brief Gets the next keyboard focusable actor in this control towards the given direction.
559    *
560    * A control needs to override this function in order to support two dimensional keyboard navigation.
561    * @SINCE_1_0.0
562    * @param[in] currentFocusedActor The current focused actor
563    * @param[in] direction The direction to move the focus towards
564    * @param[in] loopEnabled Whether the focus movement should be looped within the control
565    * @return The next keyboard focusable actor in this control or an empty handle if no actor can be focused
566    */
567   virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled);
568
569   /**
570    * @brief Informs this control that its chosen focusable actor will be focused.
571    *
572    * This allows the application to perform any actions if wishes
573    * before the focus is actually moved to the chosen actor.
574    *
575    * @SINCE_1_0.0
576    * @param[in] commitedFocusableActor The commited focusable actor
577    */
578   virtual void OnKeyboardFocusChangeCommitted(Actor commitedFocusableActor);
579
580   /**
581    * @brief This method is called when the control has enter pressed on it.
582    *
583    * Derived classes should override this to perform custom actions.
584    * @SINCE_1_0.0
585    * @return true if this control supported this action
586    */
587   virtual bool OnKeyboardEnter();
588
589   /**
590    * @brief Called after a key-event is received by the actor that has had its focus set.
591    *
592    * @SINCE_1_0.0
593    * @param[in] event The Key Event
594    * @return True if the event should be consumed
595    */
596   virtual bool OnKeyEvent(const KeyEvent& event);
597
598   // Gestures
599
600   /**
601    * @brief Called whenever a pinch gesture is detected on this control.
602    *
603    * This can be overridden by deriving classes when pinch detection
604    * is enabled.  The default behaviour is to scale the control by the
605    * pinch scale.
606    *
607    * @SINCE_1_0.0
608    * @param[in] pinch The pinch gesture
609    * @note If overridden, then the default behavior will not occur.
610    * @note Pinch detection should be enabled via EnableGestureDetection().
611    * @see EnableGestureDetection
612    */
613   virtual void OnPinch(const PinchGesture& pinch);
614
615   /**
616    * @brief Called whenever a pan gesture is detected on this control.
617    *
618    * This should be overridden by deriving classes when pan detection
619    * is enabled.
620    *
621    * @SINCE_1_0.0
622    * @param[in] pan The pan gesture
623    * @note There is no default behavior with panning.
624    * @note Pan detection should be enabled via EnableGestureDetection().
625    * @see EnableGestureDetection
626    */
627   virtual void OnPan(const PanGesture& pan);
628
629   /**
630    * @brief Called whenever a tap gesture is detected on this control.
631    *
632    * This should be overridden by deriving classes when tap detection
633    * is enabled.
634    *
635    * @SINCE_1_0.0
636    * @param[in] tap The tap gesture
637    * @note There is no default behavior with a tap.
638    * @note Tap detection should be enabled via EnableGestureDetection().
639    * @see EnableGestureDetection
640    */
641   virtual void OnTap(const TapGesture& tap);
642
643   /**
644    * @brief Called whenever a long press gesture is detected on this control.
645    *
646    * This should be overridden by deriving classes when long press
647    * detection is enabled.
648    *
649    * @SINCE_1_0.0
650    * @param[in] longPress The long press gesture
651    * @note There is no default behaviour associated with a long press.
652    * @note Long press detection should be enabled via EnableGestureDetection().
653    * @see EnableGestureDetection
654    */
655   virtual void OnLongPress(const LongPressGesture& longPress);
656
657   // From ConnectionTrackerInterface
658
659   /**
660    * @copydoc ConnectionTrackerInterface::SignalConnected
661    */
662   void SignalConnected(SlotObserver* slotObserver, CallbackBase* callback) override;
663
664   /**
665    * @copydoc ConnectionTrackerInterface::SignalDisconnected
666    */
667   void SignalDisconnected(SlotObserver* slotObserver, CallbackBase* callback) override;
668
669   /**
670    * @brief Retrieves the extension for this control.
671    *
672    * @SINCE_1_0.0
673    * @return The extension if available, NULL otherwise
674    */
675   virtual Extension* GetControlExtension()
676   {
677     return NULL;
678   }
679
680   // Transition APIs
681
682   /**
683    * @brief Make visual transition from source control to destination control about specific Visual.
684    * If both of source and destination control have same visual index, than generates information for the transition of this Control.
685    *
686    * @param[out] sourcePropertyMap Source property map to be applied on this Control.
687    * @param[out] destinationPropertyMap Destination property map to be applied on this Control.
688    * @param[in] source Source control of the animation.
689    * @param[in] destination Destination control of the animation.
690    * @param[in] visualIndex Property::Index to make animation.
691    */
692   void MakeVisualTransition(Dali::Property::Map& sourcePropertyMap, Dali::Property::Map& destinationPropertyMap, Dali::Toolkit::Control source, Dali::Toolkit::Control destination, Dali::Property::Index visualIndex);
693
694   /**
695    * @brief Retrieves source and destination visual properties for the Transition of this Control.
696    * The properties of this Control will be transitioned from the propeties of source Control to that of destination control.
697    * If a property value is different between source and destination Control,
698    * the property information of each Control will be included in sourceProperties and destinationProperties.
699    *
700    * @param[out] sourceProperties Source property list to be applied on this Control.
701    * @param[out] destinationProperties Destination property list to be applied on this Control.
702    * @param[in] source Source control of the animation.
703    * @param[in] destination Destination control of the animation.
704    *
705    * @note This method do not handle Actor properties.
706    * And the size and order of the sourceProperties and destinationProperties must be synchronized.
707    */
708   virtual void OnCreateTransitions(std::vector<std::pair<Dali::Property::Index, Dali::Property::Map>>& sourceProperties,
709                                    std::vector<std::pair<Dali::Property::Index, Dali::Property::Map>>& destinationProperties,
710                                    Dali::Toolkit::Control                                              source,
711                                    Dali::Toolkit::Control                                              destination)
712   {
713   }
714
715   /**
716    * @brief Update visual properties.
717    * @param[in] properties Property list to be used to update visual properties of this Control.
718    */
719   virtual void OnUpdateVisualProperties(const std::vector<std::pair<Dali::Property::Index, Dali::Property::Map>>& properties)
720   {
721   }
722
723 private:
724   /// @cond internal
725
726   // Not copyable or movable
727   DALI_INTERNAL Control(const Control&) = delete;            ///< Deleted copy constructor.
728   DALI_INTERNAL Control(Control&&)      = delete;            ///< Deleted move constructor.
729   DALI_INTERNAL Control& operator=(const Control&) = delete; ///< Deleted copy assignment operator.
730   DALI_INTERNAL Control& operator=(Control&&) = delete;      ///< Deleted move assignment operator.
731
732 public:
733   class DALI_INTERNAL Impl; // Class declaration is public so we can internally add devel API's to the Controls Impl
734
735 private:
736   Impl* mImpl;
737   /// @endcond
738 };
739
740 /**
741  * @brief Gets implementation from the handle.
742  *
743  * @SINCE_1_0.0
744  * @param handle
745  * @return Implementation
746  * @pre handle is initialized and points to a control
747  */
748 DALI_TOOLKIT_API Internal::Control& GetImplementation(Dali::Toolkit::Control& handle);
749
750 /**
751  * @brief Gets implementation from the handle.
752  *
753  * @SINCE_1_0.0
754  * @param handle
755  * @return Implementation
756  * @pre Handle is initialized and points to a control.
757  */
758 DALI_TOOLKIT_API const Internal::Control& GetImplementation(const Dali::Toolkit::Control& handle);
759
760 } // namespace Internal
761
762 /**
763  * @}
764  */
765 } // namespace Toolkit
766
767 } // namespace Dali
768
769 #endif // DALI_TOOLKIT_CONTROL_IMPL_H