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