DALi Version 2.2.11
[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) 2022 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 /**
56  * @brief This is the internal base class for all controls.
57  *
58  * It will provide some common functionality required by all controls.
59  * Implements ConnectionTrackerInterface so that signals (typically connected to member functions) will
60  * be disconnected automatically when the control is destroyed.
61  * @SINCE_1_0.0
62  */
63 class DALI_TOOLKIT_API Control : public CustomActorImpl, public ConnectionTrackerInterface
64 {
65 public:
66   class Extension; ///< Forward declare future extension interface
67
68   // Creation & Destruction
69   /**
70    * @brief Creates a new ControlImpl instance that does not require touch by default.
71    *
72    * If touch is required, then the user can connect to this class' touch signal.
73    * @SINCE_1_0.0
74    * @return A handle to the ControlImpl instance
75    */
76   static Toolkit::Control New();
77
78 protected:
79   /**
80    * @brief Virtual destructor.
81    * @SINCE_1_0.0
82    */
83   virtual ~Control();
84
85 public:
86   // Styling
87
88   /**
89    * @copydoc Dali::Toolkit::Control::SetStyleName
90    */
91   void SetStyleName(const std::string& styleName);
92
93   /**
94    * @copydoc Dali::Toolkit::Control::GetStyleName
95    */
96   const std::string& GetStyleName() const;
97
98   // Background
99
100   /**
101    * @copydoc Dali::Toolkit::Control::SetBackgroundColor
102    */
103   void SetBackgroundColor(const Vector4& color);
104
105   /**
106    * @brief Sets the background with a property map.
107    *
108    * @SINCE_1_0.0
109    * @param[in] map The background property map
110    */
111   void SetBackground(const Property::Map& map);
112
113   /**
114    * @copydoc Dali::Toolkit::Control::ClearBackground
115    */
116   void ClearBackground();
117
118   /**
119    * @brief Called when resources of control are ready.
120    * @param[in] relayoutRequest True to request relayout
121    */
122   void SetResourceReady(bool relayoutRequest);
123
124   // Accessibility
125
126   /**
127    * @brief Gets the Accessible object that represents this control.
128    *
129    * This method calls CreateAccessibleObject() if necessary, so a non-null return is expected.
130    *
131    * @return The Accessible object
132    *
133    * @see CreateAccessibleObject()
134    */
135   Toolkit::DevelControl::ControlAccessible* GetAccessibleObject();
136
137   // Gesture Detection
138
139   /**
140    * @brief Allows deriving classes to enable any of the gesture detectors that are available.
141    *
142    * Gesture detection can be enabled one at a time or in bitwise format as shown:
143    * @code
144    * EnableGestureDetection(GestureType::Value(GestureType::PINCH | GestureType::TAP | GestureType::PAN));
145    * @endcode
146    * @SINCE_1_0.0
147    * @param[in] type The gesture type(s) to enable
148    */
149   void EnableGestureDetection(GestureType::Value type);
150
151   /**
152    * @brief Allows deriving classes to disable any of the gesture detectors.
153    *
154    * Like EnableGestureDetection, this can also be called using bitwise or.
155    * @SINCE_1_0.0
156    * @param[in] type The gesture type(s) to disable
157    * @see EnableGetureDetection
158    */
159   void DisableGestureDetection(GestureType::Value type);
160
161   /**
162    * @brief If deriving classes wish to fine tune pinch gesture
163    * detection, then they can access the gesture detector through this
164    * API and modify the detection.
165    *
166    * @SINCE_1_0.0
167    * @return The pinch gesture detector
168    * @pre Pinch detection should have been enabled via EnableGestureDetection().
169    * @see EnableGestureDetection
170    */
171   PinchGestureDetector GetPinchGestureDetector() const;
172
173   /**
174    * @brief If deriving classes wish to fine tune pan gesture
175    * detection, then they can access the gesture detector through this
176    * API and modify the detection.
177    *
178    * @SINCE_1_0.0
179    * @return The pan gesture detector
180    * @pre Pan detection should have been enabled via EnableGestureDetection().
181    * @see EnableGestureDetection
182    */
183   PanGestureDetector GetPanGestureDetector() const;
184
185   /**
186    * @brief If deriving classes wish to fine tune tap gesture
187    * detection, then they can access the gesture detector through this
188    * API and modify the detection.
189    *
190    * @SINCE_1_0.0
191    * @return The tap gesture detector
192    * @pre Tap detection should have been enabled via EnableGestureDetection().
193    * @see EnableGestureDetection
194    */
195   TapGestureDetector GetTapGestureDetector() const;
196
197   /**
198    * @brief If deriving classes wish to fine tune long press gesture
199    * detection, then they can access the gesture detector through this
200    * API and modify the detection.
201    *
202    * @SINCE_1_0.0
203    * @return The long press gesture detector
204    * @pre Long press detection should have been enabled via EnableGestureDetection().
205    * @see EnableGestureDetection
206    */
207   LongPressGestureDetector GetLongPressGestureDetector() const;
208
209   // Keyboard Navigation
210
211   /**
212    * @brief Sets whether this control supports two dimensional
213    * keyboard navigation (i.e. whether it knows how to handle the
214    * keyboard focus movement between its child actors).
215    *
216    * The control doesn't support it by default.
217    * @SINCE_1_0.0
218    * @param[in] isSupported Whether this control supports two dimensional keyboard navigation
219    */
220   void SetKeyboardNavigationSupport(bool isSupported);
221
222   /**
223    * @brief Gets whether this control supports two dimensional keyboard navigation.
224    *
225    * @SINCE_1_0.0
226    * @return true if this control supports two dimensional keyboard navigation
227    */
228   bool IsKeyboardNavigationSupported();
229
230   // Key Input
231
232   /**
233    * @copydoc Toolkit::Control::SetKeyInputFocus()
234    */
235   void SetKeyInputFocus();
236
237   /**
238    * @copydoc Toolkit::Control::HasKeyInputFocus()
239    */
240   bool HasKeyInputFocus();
241
242   /**
243    * @copydoc Toolkit::Control::ClearKeyInputFocus()
244    */
245   void ClearKeyInputFocus();
246
247   // Keyboard Focus
248
249   /**
250    * @brief Sets whether this control is a focus group for keyboard navigation.
251    *
252    * (i.e. the scope of keyboard focus movement
253    * can be limited to its child actors). The control is not a focus group by default.
254    * @SINCE_1_0.0
255    * @param[in] isFocusGroup Whether this control is set as a focus group for keyboard navigation
256    */
257   void SetAsKeyboardFocusGroup(bool isFocusGroup);
258
259   /**
260    * @brief Gets whether this control is a focus group for keyboard navigation.
261    *
262    * @SINCE_1_0.0
263    * @return true if this control is set as a focus group for keyboard navigation
264    */
265   bool IsKeyboardFocusGroup();
266
267   /// @cond internal
268   /**
269    * @brief Called by the AccessibilityManager to activate the Control.
270    * @SINCE_1_0.0
271    */
272   DALI_INTERNAL void AccessibilityActivate();
273
274   /**
275    * @brief Called by the KeyboardFocusManager.
276    * @SINCE_1_0.0
277    */
278   DALI_INTERNAL void KeyboardEnter();
279   /// @endcond
280
281
282   // Signals
283
284   /**
285    * @copydoc Dali::Toolkit::Control::KeyEventSignal()
286    */
287   Toolkit::Control::KeyEventSignalType& KeyEventSignal();
288
289   /**
290    * @copydoc Dali::Toolkit::Control::KeyInputFocusGainedSignal()
291    */
292   Toolkit::Control::KeyInputFocusSignalType& KeyInputFocusGainedSignal();
293
294   /**
295    * @copydoc Dali::Toolkit::Control::KeyInputFocusLostSignal()
296    */
297   Toolkit::Control::KeyInputFocusSignalType& KeyInputFocusLostSignal();
298
299   /// @cond internal
300   /**
301    * @brief Called by the KeyInputFocusManager to emit key event signals.
302    *
303    * @SINCE_1_0.0
304    * @param[in] event The key event
305    * @return True if the event was consumed
306    */
307   DALI_INTERNAL bool EmitKeyEventSignal(const KeyEvent& event);
308   /// @endcond
309
310 protected: // For derived classes to call
311   /**
312    * @brief Emits KeyInputFocusGained signal if true else emits KeyInputFocusLost signal.
313    *
314    * Should be called last by the control after it acts on the Input Focus change.
315    *
316    * @SINCE_1_0.0
317    * @param[in] focusGained True if gained, False if lost
318    */
319   void EmitKeyInputFocusSignal(bool focusGained);
320
321 protected: // From CustomActorImpl
322   /**
323    * @copydoc CustomActorImpl::OnSceneConnection()
324    * @note If overridden, then an up-call to Control::OnSceneConnection MUST be made at the end.
325    */
326   void OnSceneConnection(int depth) override;
327
328   /**
329    * @copydoc CustomActorImpl::OnSceneDisconnection()
330    * @note If overridden, then an up-call to Control::OnSceneDisconnection MUST be made at the end.
331    */
332   void OnSceneDisconnection() override;
333
334   /**
335    * @copydoc CustomActorImpl::OnChildAdd()
336    * @note If overridden, then an up-call to Control::OnChildAdd MUST be made at the end.
337    */
338   void OnChildAdd(Actor& child) override;
339
340   /**
341    * @copydoc CustomActorImpl::OnChildRemove()
342    * @note If overridden, then an up-call to Control::OnChildRemove MUST be made at the end.
343    */
344   void OnChildRemove(Actor& child) override;
345
346   /**
347    * @copydoc CustomActorImpl::OnPropertySet()
348    * @note If overridden, then an up-call to Control::OnChildRemove MUST be made at the end.
349    */
350   void OnPropertySet(Property::Index index, const Property::Value& propertyValue) override;
351
352   /**
353    * @copydoc CustomActorImpl::OnSizeSet()
354    * @note If overridden, then an up-call to Control::OnSizeSet MUST be made at the end.
355    */
356   void OnSizeSet(const Vector3& targetSize) override;
357
358   /**
359    * @copydoc CustomActorImpl::OnSizeAnimation()
360    * @note If overridden, then an up-call to Control::OnSizeAnimation MUST be made at the end.
361    */
362   void OnSizeAnimation(Animation& animation, const Vector3& targetSize) override;
363
364   /**
365    * @copydoc CustomActorImpl::OnRelayout()
366    */
367   void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
368
369   /**
370    * @copydoc CustomActorImpl::OnSetResizePolicy()
371    */
372   void OnSetResizePolicy(ResizePolicy::Type policy, Dimension::Type dimension) override;
373
374   /**
375    * @copydoc CustomActorImpl::GetNaturalSize()
376    */
377   Vector3 GetNaturalSize() override;
378
379   /**
380    * @copydoc CustomActorImpl::CalculateChildSize()
381    */
382   float CalculateChildSize(const Dali::Actor& child, Dimension::Type dimension) override;
383
384   /**
385    * @copydoc CustomActorImpl::GetHeightForWidth()
386    */
387   float GetHeightForWidth(float width) override;
388
389   /**
390    * @copydoc CustomActorImpl::GetWidthForHeight()
391    */
392   float GetWidthForHeight(float height) override;
393
394   /**
395    * @copydoc CustomActorImpl::RelayoutDependentOnChildren()
396    */
397   bool RelayoutDependentOnChildren(Dimension::Type dimension = Dimension::ALL_DIMENSIONS) override;
398
399   /**
400    * @copydoc CustomActorImpl::OnCalculateRelayoutSize()
401    */
402   void OnCalculateRelayoutSize(Dimension::Type dimension) override;
403
404   /**
405    * @copydoc CustomActorImpl::OnLayoutNegotiated()
406    */
407   void OnLayoutNegotiated(float size, Dimension::Type dimension) override;
408
409 public: // Helpers for deriving classes
410
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,
693                             Dali::Toolkit::Control source, Dali::Toolkit::Control destination, Dali::Property::Index visualIndex);
694
695   /**
696    * @brief Retrieves source and destination visual properties for the Transition of this Control.
697    * The properties of this Control will be transitioned from the propeties of source Control to that of destination control.
698    * If a property value is different between source and destination Control,
699    * the property information of each Control will be included in sourceProperties and destinationProperties.
700    *
701    * @param[out] sourceProperties Source property list to be applied on this Control.
702    * @param[out] destinationProperties Destination property list to be applied on this Control.
703    * @param[in] source Source control of the animation.
704    * @param[in] destination Destination control of the animation.
705    *
706    * @note This method do not handle Actor properties.
707    * And the size and order of the sourceProperties and destinationProperties must be synchronized.
708    */
709   virtual void OnCreateTransitions(std::vector<std::pair<Dali::Property::Index, Dali::Property::Map>>& sourceProperties,
710                                    std::vector<std::pair<Dali::Property::Index, Dali::Property::Map>>& destinationProperties,
711                                    Dali::Toolkit::Control                                              source,
712                                    Dali::Toolkit::Control                                              destination)
713   {
714   }
715
716   /**
717    * @brief Update visual properties.
718    * @param[in] properties Property list to be used to update visual properties of this Control.
719    */
720   virtual void OnUpdateVisualProperties(const std::vector<std::pair<Dali::Property::Index, Dali::Property::Map>>& properties)
721   {
722   }
723
724 private:
725   /// @cond internal
726
727   // Not copyable or movable
728   DALI_INTERNAL Control(const Control&) = delete;            ///< Deleted copy constructor.
729   DALI_INTERNAL Control(Control&&)      = delete;            ///< Deleted move constructor.
730   DALI_INTERNAL Control& operator=(const Control&) = delete; ///< Deleted copy assignment operator.
731   DALI_INTERNAL Control& operator=(Control&&) = delete;      ///< Deleted move assignment operator.
732
733 public:
734   class DALI_INTERNAL Impl; // Class declaration is public so we can internally add devel API's to the Controls Impl
735
736 private:
737   Impl* mImpl;
738   /// @endcond
739 };
740
741 /**
742  * @brief Gets implementation from the handle.
743  *
744  * @SINCE_1_0.0
745  * @param handle
746  * @return Implementation
747  * @pre handle is initialized and points to a control
748  */
749 DALI_TOOLKIT_API Internal::Control& GetImplementation(Dali::Toolkit::Control& handle);
750
751 /**
752  * @brief Gets implementation from the handle.
753  *
754  * @SINCE_1_0.0
755  * @param handle
756  * @return Implementation
757  * @pre Handle is initialized and points to a control.
758  */
759 DALI_TOOLKIT_API const Internal::Control& GetImplementation(const Dali::Toolkit::Control& handle);
760
761 } // namespace Internal
762
763 /**
764  * @}
765  */
766 } // namespace Toolkit
767
768 } // namespace Dali
769
770 #endif // DALI_TOOLKIT_CONTROL_IMPL_H