2 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 public class CustomView : ViewWrapper
22 public CustomView(string typeName, ViewWrapperImpl.CustomViewBehaviour behaviour) : base(typeName, new ViewWrapperImpl(behaviour))
24 // Registering CustomView virtual functions to viewWrapperImpl delegates.
25 viewWrapperImpl.OnStageConnection = new ViewWrapperImpl.OnStageConnectionDelegate(OnStageConnection);
26 viewWrapperImpl.OnStageDisconnection = new ViewWrapperImpl.OnStageDisconnectionDelegate(OnStageDisconnection);
27 viewWrapperImpl.OnChildAdd = new ViewWrapperImpl.OnChildAddDelegate(OnChildAdd);
28 viewWrapperImpl.OnChildRemove = new ViewWrapperImpl.OnChildRemoveDelegate(OnChildRemove);
29 viewWrapperImpl.OnPropertySet = new ViewWrapperImpl.OnPropertySetDelegate(OnPropertySet);
30 viewWrapperImpl.OnSizeSet = new ViewWrapperImpl.OnSizeSetDelegate(OnSizeSet);
31 viewWrapperImpl.OnSizeAnimation = new ViewWrapperImpl.OnSizeAnimationDelegate(OnSizeAnimation);
32 viewWrapperImpl.OnTouch = new ViewWrapperImpl.OnTouchDelegate(OnTouch);
33 viewWrapperImpl.OnHover = new ViewWrapperImpl.OnHoverDelegate(OnHover);
34 viewWrapperImpl.OnKey = new ViewWrapperImpl.OnKeyDelegate(OnKey);
35 viewWrapperImpl.OnWheel = new ViewWrapperImpl.OnWheelDelegate(OnWheel);
36 viewWrapperImpl.OnRelayout = new ViewWrapperImpl.OnRelayoutDelegate(OnRelayout);
37 viewWrapperImpl.OnSetResizePolicy = new ViewWrapperImpl.OnSetResizePolicyDelegate(OnSetResizePolicy);
38 viewWrapperImpl.GetNaturalSize = new ViewWrapperImpl.GetNaturalSizeDelegate(GetNaturalSize);
39 viewWrapperImpl.CalculateChildSize = new ViewWrapperImpl.CalculateChildSizeDelegate(CalculateChildSize);
40 viewWrapperImpl.GetHeightForWidth = new ViewWrapperImpl.GetHeightForWidthDelegate(GetHeightForWidth);
41 viewWrapperImpl.GetWidthForHeight = new ViewWrapperImpl.GetWidthForHeightDelegate(GetWidthForHeight);
42 viewWrapperImpl.RelayoutDependentOnChildrenDimension = new ViewWrapperImpl.RelayoutDependentOnChildrenDimensionDelegate(RelayoutDependentOnChildren);
43 viewWrapperImpl.RelayoutDependentOnChildren = new ViewWrapperImpl.RelayoutDependentOnChildrenDelegate(RelayoutDependentOnChildren);
44 viewWrapperImpl.OnCalculateRelayoutSize = new ViewWrapperImpl.OnCalculateRelayoutSizeDelegate(OnCalculateRelayoutSize);
45 viewWrapperImpl.OnLayoutNegotiated = new ViewWrapperImpl.OnLayoutNegotiatedDelegate(OnLayoutNegotiated);
46 viewWrapperImpl.OnControlChildAdd = new ViewWrapperImpl.OnControlChildAddDelegate(OnControlChildAdd);
47 viewWrapperImpl.OnControlChildRemove = new ViewWrapperImpl.OnControlChildRemoveDelegate(OnControlChildRemove);
48 viewWrapperImpl.OnStyleChange = new ViewWrapperImpl.OnStyleChangeDelegate(OnStyleChange);
49 viewWrapperImpl.OnAccessibilityActivated = new ViewWrapperImpl.OnAccessibilityActivatedDelegate(OnAccessibilityActivated);
50 viewWrapperImpl.OnAccessibilityPan = new ViewWrapperImpl.OnAccessibilityPanDelegate(OnAccessibilityPan);
51 viewWrapperImpl.OnAccessibilityTouch = new ViewWrapperImpl.OnAccessibilityTouchDelegate(OnAccessibilityTouch);
52 viewWrapperImpl.OnAccessibilityValueChange = new ViewWrapperImpl.OnAccessibilityValueChangeDelegate(OnAccessibilityValueChange);
53 viewWrapperImpl.OnAccessibilityZoom = new ViewWrapperImpl.OnAccessibilityZoomDelegate(OnAccessibilityZoom);
54 viewWrapperImpl.OnKeyInputFocusGained = new ViewWrapperImpl.OnKeyInputFocusGainedDelegate(OnKeyInputFocusGained);
55 viewWrapperImpl.OnKeyInputFocusLost = new ViewWrapperImpl.OnKeyInputFocusLostDelegate(OnKeyInputFocusLost);
56 viewWrapperImpl.GetNextKeyboardFocusableActor = new ViewWrapperImpl.GetNextKeyboardFocusableActorDelegate(GetNextKeyboardFocusableActor);
57 viewWrapperImpl.OnKeyboardFocusChangeCommitted = new ViewWrapperImpl.OnKeyboardFocusChangeCommittedDelegate(OnKeyboardFocusChangeCommitted);
58 viewWrapperImpl.OnKeyboardEnter = new ViewWrapperImpl.OnKeyboardEnterDelegate(OnKeyboardEnter);
59 viewWrapperImpl.OnPinch = new ViewWrapperImpl.OnPinchDelegate(OnPinch);
60 viewWrapperImpl.OnPan = new ViewWrapperImpl.OnPanDelegate(OnPan);
61 viewWrapperImpl.OnTap = new ViewWrapperImpl.OnTapDelegate(OnTap);
62 viewWrapperImpl.OnLongPress = new ViewWrapperImpl.OnLongPressDelegate(OnLongPress);
64 // By default, we do not want the position to use the anchor point
65 this.PositionUsesAnchorPoint = false;
67 // Make sure CustomView is initialized.
70 // Set the StyleName the name of the View
71 // We have to do this because the StyleManager on Native side can't workout it out
72 // This will also ensure that the style of actors/visuals initialized above are applied by the style manager.
73 SetStyleName( this.GetType().Name );
77 * @brief Set the background with a property map.
79 * @param[in] map The background property map.
81 public void SetBackground(Dali.Property.Map map)
83 viewWrapperImpl.SetBackground(map);
87 * @brief Allows deriving classes to enable any of the gesture detectors that are available.
89 * Gesture detection can be enabled one at a time or in bitwise format as shown:
91 * EnableGestureDetection(Gesture.Type.Pinch | Gesture.Type.Tap | Gesture.Type.Pan));
93 * @param[in] type The gesture type(s) to enable.
95 public void EnableGestureDetection(Gesture.GestureType type)
97 viewWrapperImpl.EnableGestureDetection(type);
101 * @brief Allows deriving classes to disable any of the gesture detectors.
103 * Like EnableGestureDetection, this can also be called using bitwise or.
104 * @param[in] type The gesture type(s) to disable.
105 * @see EnableGetureDetection
107 public void DisableGestureDetection(Gesture.GestureType type)
109 viewWrapperImpl.DisableGestureDetection(type);
113 * @brief Sets whether this control supports two dimensional
114 * keyboard navigation (i.e. whether it knows how to handle the
115 * keyboard focus movement between its child actors).
117 * The control doesn't support it by default.
118 * @param[in] isSupported Whether this control supports two dimensional keyboard navigation.
120 public void SetKeyboardNavigationSupport(bool isSupported)
122 viewWrapperImpl.SetKeyboardNavigationSupport(isSupported);
126 * @brief Gets whether this control supports two dimensional keyboard navigation.
128 * @return true if this control supports two dimensional keyboard navigation.
130 public bool IsKeyboardNavigationSupported()
132 return viewWrapperImpl.IsKeyboardNavigationSupported();
136 * @brief Sets whether this control is a focus group for keyboard navigation.
138 * (i.e. the scope of keyboard focus movement
139 * can be limitied to its child actors). The control is not a focus group by default.
140 * @param[in] isFocusGroup Whether this control is set as a focus group for keyboard navigation.
142 public void SetAsKeyboardFocusGroup(bool isFocusGroup)
144 viewWrapperImpl.SetAsKeyboardFocusGroup(isFocusGroup);
148 * @brief Gets whether this control is a focus group for keyboard navigation.
150 * @return true if this control is set as a focus group for keyboard navigation.
152 public bool IsKeyboardFocusGroup()
154 return viewWrapperImpl.IsKeyboardFocusGroup();
158 * @brief Called by the AccessibilityManager to activate the Control.
161 public void AccessibilityActivate()
163 viewWrapperImpl.AccessibilityActivate();
167 * @brief Called by the KeyboardFocusManager.
169 public void KeyboardEnter()
171 viewWrapperImpl.KeyboardEnter();
175 * @brief Called by the KeyInputFocusManager to emit key event signals.
177 * @param[in] key The key event.
178 * @return True if the event was consumed.
180 public bool EmitKeyEventSignal(Key key)
182 return viewWrapperImpl.EmitKeyEventSignal(key);
186 * @brief Request a relayout, which means performing a size negotiation on this actor, its parent and children (and potentially whole scene).
188 * This method can also be called from a derived class every time it needs a different size.
189 * At the end of event processing, the relayout process starts and
190 * all controls which requested Relayout will have their sizes (re)negotiated.
192 * @note RelayoutRequest() can be called multiple times; the size negotiation is still
193 * only performed once, i.e. there is no need to keep track of this in the calling side.
195 protected void RelayoutRequest()
197 viewWrapperImpl.RelayoutRequest();
201 * @brief Provides the Actor implementation of GetHeightForWidth.
202 * @param width Width to use.
203 * @return The height based on the width.
205 protected float GetHeightForWidthBase(float width)
207 return viewWrapperImpl.GetHeightForWidthBase( width );
211 * @brief Provides the Actor implementation of GetWidthForHeight.
212 * @param height Height to use.
213 * @return The width based on the height.
215 protected float GetWidthForHeightBase(float height)
217 return viewWrapperImpl.GetWidthForHeightBase( height );
221 * @brief Calculate the size for a child using the base actor object.
223 * @param[in] child The child actor to calculate the size for
224 * @param[in] dimension The dimension to calculate the size for. E.g. width or height
225 * @return Return the calculated size for the given dimension. If more than one dimension is requested, just return the first one found.
227 protected float CalculateChildSizeBase(Actor child, DimensionType dimension)
229 return viewWrapperImpl.CalculateChildSizeBase( child, dimension );
233 * @brief Determine if this actor is dependent on it's children for relayout from the base class.
235 * @param dimension The dimension(s) to check for
236 * @return Return if the actor is dependent on it's children.
238 protected bool RelayoutDependentOnChildrenBase(DimensionType dimension)
240 return viewWrapperImpl.RelayoutDependentOnChildrenBase( dimension );
244 * @brief Determine if this actor is dependent on it's children for relayout from the base class.
246 * @param dimension The dimension(s) to check for
247 * @return Return if the actor is dependent on it's children.
249 protected bool RelayoutDependentOnChildrenBase()
251 return viewWrapperImpl.RelayoutDependentOnChildrenBase();
255 * @brief Register a visual by Property Index, linking an Actor to visual when required.
256 * In the case of the visual being an actor or control deeming visual not required then visual should be an empty handle.
257 * No parenting is done during registration, this should be done by derived class.
259 * @param[in] index The Property index of the visual, used to reference visual
260 * @param[in] visual The visual to register
261 * @note Derived class should not call visual.SetOnStage(actor). It is the responsibility of the base class to connect/disconnect registered visual to stage.
262 * Use below API with enabled set to false if derived class wishes to control when visual is staged.
264 protected void RegisterVisual(int index, VisualBase visual)
266 viewWrapperImpl.RegisterVisual( index, visual );
270 * @brief Register a visual by Property Index, linking an Actor to visual when required.
271 * In the case of the visual being an actor or control deeming visual not required then visual should be an empty handle.
272 * If enabled is false then the visual is not set on stage until enabled by the derived class.
275 * @param[in] index The Property index of the visual, used to reference visual
276 * @param[in] visual The visual to register
277 * @param[in] enabled false if derived class wants to control when visual is set on stage.
280 protected void RegisterVisual(int index, VisualBase visual, bool enabled)
282 viewWrapperImpl.RegisterVisual( index, visual, enabled );
286 * @brief Erase the entry matching the given index from the list of registered visuals
287 * @param[in] index The Property index of the visual, used to reference visual
290 protected void UnregisterVisual(int index)
292 viewWrapperImpl.UnregisterVisual( index );
296 * @brief Retrieve the visual associated with the given property index.
298 * @param[in] index The Property index of the visual.
299 * @return The registered visual if exist, otherwise empty handle.
300 * @note For managing object life-cycle, do not store the returned visual as a member which increments its reference count.
302 protected VisualBase GetVisual(int index)
304 return viewWrapperImpl.GetVisual( index );
308 * @brief Sets the given visual to be displayed or not when parent staged.
310 * @param[in] index The Property index of the visual
311 * @param[in] enable flag to set enabled or disabled.
313 protected void EnableVisual(int index, bool enable)
315 viewWrapperImpl.EnableVisual( index, enable );
319 * @brief Queries if the given visual is to be displayed when parent staged.
321 * @param[in] index The Property index of the visual
322 * @return bool whether visual is enabled or not
324 protected bool IsVisualEnabled(int index)
326 return viewWrapperImpl.IsVisualEnabled( index );
330 * @brief Create a transition effect on the control.
332 * @param[in] transitionData The transition data describing the effect to create
333 * @return A handle to an animation defined with the given effect, or an empty
334 * handle if no properties match.
336 protected Animation CreateTransition(TransitionData transitionData)
338 return viewWrapperImpl.CreateTransition( transitionData );
342 * @brief Emits KeyInputFocusGained signal if true else emits KeyInputFocusLost signal
344 * Should be called last by the control after it acts on the Input Focus change.
346 * @param[in] focusGained True if gained, False if lost
348 protected void EmitKeyInputFocusSignal(bool focusGained)
350 viewWrapperImpl.EmitKeyInputFocusSignal( focusGained );
354 * @brief This method is called after the Control has been initialized.
356 * Derived classes should do any second phase initialization by overriding this method.
358 public virtual void OnInitialize()
363 * @brief Called after the actor has been connected to the stage.
365 * When an actor is connected, it will be directly or indirectly parented to the root Actor.
366 * @param[in] depth The depth in the hierarchy for the actor
368 * @note The root Actor is provided automatically by Dali::Stage, and is always considered to be connected.
369 * When the parent of a set of actors is connected to the stage, then all of the children
370 * will received this callback.
371 * For the following actor tree, the callback order will be A, B, D, E, C, and finally F.
382 * @param[in] depth The depth in the hierarchy for the actor
384 public virtual void OnStageConnection(int depth)
389 * @brief Called after the actor has been disconnected from Stage.
391 * If an actor is disconnected it either has no parent, or is parented to a disconnected actor.
393 * @note When the parent of a set of actors is disconnected to the stage, then all of the children
394 * will received this callback, starting with the leaf actors.
395 * For the following actor tree, the callback order will be D, E, B, F, C, and finally A.
407 public virtual void OnStageDisconnection()
412 * @brief Called after a child has been added to the owning actor.
414 * @param[in] child The child which has been added
416 public virtual void OnChildAdd(Actor actor)
421 * @brief Called after the owning actor has attempted to remove a child( regardless of whether it succeeded or not ).
423 * @param[in] child The child being removed
425 public virtual void OnChildRemove(Actor actor)
430 * @brief Called when the owning actor property is set.
432 * @param[in] index The Property index that was set
433 * @param[in] propertyValue The value to set
435 public virtual void OnPropertySet(int index, Dali.Property.Value propertyValue)
440 * @brief Called when the owning actor's size is set e.g. using Actor::SetSize().
442 * @param[in] targetSize The target size. Note that this target size may not match the size returned via Actor.GetTargetSize.
444 public virtual void OnSizeSet(Vector3 targetSize)
449 * @brief Called when the owning actor's size is animated e.g. using Animation::AnimateTo( Property( actor, Actor::Property::SIZE ), ... ).
451 * @param[in] animation The object which is animating the owning actor.
452 * @param[in] targetSize The target size. Note that this target size may not match the size returned via @ref Actor.GetTargetSize.
454 public virtual void OnSizeAnimation(Animation animation, Vector3 targetSize)
459 * @DEPRECATED_1_1.37 Connect to TouchSignal() instead.
461 * @brief Called after a touch-event is received by the owning actor.
463 * @param[in] touch The touch event
464 * @return True if the event should be consumed.
465 * @note CustomViewBehaviour.REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).
467 public virtual bool OnTouch(Touch touch)
469 return false; // Do not consume
473 * @brief Called after a hover-event is received by the owning actor.
475 * @param[in] hover The hover event
476 * @return True if the hover event should be consumed.
477 * @note CustomViewBehaviour.REQUIRES_HOVER_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).
479 public virtual bool OnHover(Hover hover)
481 return false; // Do not consume
485 * @brief Called after a key-event is received by the actor that has had its focus set.
487 * @param[in] key the Key Event
488 * @return True if the event should be consumed.
490 public virtual bool OnKey(Key key)
492 return false; // Do not consume
496 * @brief Called after a wheel-event is received by the owning actor.
498 * @param[in] wheel The wheel event
499 * @return True if the event should be consumed.
500 * @note CustomViewBehaviour.REQUIRES_WHEEL_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).
502 public virtual bool OnWheel(Wheel wheel)
504 return false; // Do not consume
508 * @brief Called after the size negotiation has been finished for this control.
510 * The control is expected to assign this given size to itself/its children.
512 * Should be overridden by derived classes if they need to layout
513 * actors differently after certain operations like add or remove
514 * actors, resize or after changing specific properties.
516 * @param[in] size The allocated size.
517 * @param[in,out] container The control should add actors to this container that it is not able
518 * to allocate a size for.
519 * @note As this function is called from inside the size negotiation algorithm, you cannot
520 * call RequestRelayout (the call would just be ignored).
522 public virtual void OnRelayout(Vector2 size, RelayoutContainer container)
527 * @brief Notification for deriving classes
529 * @param[in] policy The policy being set
530 * @param[in] dimension The dimension the policy is being set for
532 public virtual void OnSetResizePolicy(ResizePolicyType policy, DimensionType dimension)
537 * @brief Return the natural size of the actor.
539 * @return The actor's natural size
541 public virtual Vector3 GetNaturalSize()
543 return new Vector3(0.0f, 0.0f, 0.0f);
547 * @brief Calculate the size for a child.
549 * @param[in] child The child actor to calculate the size for
550 * @param[in] dimension The dimension to calculate the size for. E.g. width or height.
551 * @return Return the calculated size for the given dimension.
553 public virtual float CalculateChildSize(Actor child, DimensionType dimension)
555 return viewWrapperImpl.CalculateChildSizeBase( child, dimension );
559 * @brief This method is called during size negotiation when a height is required for a given width.
561 * Derived classes should override this if they wish to customize the height returned.
563 * @param width Width to use.
564 * @return The height based on the width.
566 public virtual float GetHeightForWidth(float width)
568 return viewWrapperImpl.GetHeightForWidthBase( width );
572 * @brief This method is called during size negotiation when a width is required for a given height.
574 * Derived classes should override this if they wish to customize the width returned.
576 * @param height Height to use.
577 * @return The width based on the width.
579 public virtual float GetWidthForHeight(float height)
581 return viewWrapperImpl.GetWidthForHeightBase( height );
585 * @brief Determine if this actor is dependent on it's children for relayout.
587 * @param dimension The dimension(s) to check for
588 * @return Return if the actor is dependent on it's children.
590 public virtual bool RelayoutDependentOnChildren(DimensionType dimension)
592 return viewWrapperImpl.RelayoutDependentOnChildrenBase( dimension );
596 * @brief Determine if this actor is dependent on it's children for relayout from the base class.
598 * @return Return if the actor is dependent on it's children.
600 public virtual bool RelayoutDependentOnChildren()
602 return viewWrapperImpl.RelayoutDependentOnChildrenBase();
606 * @brief Virtual method to notify deriving classes that relayout dependencies have been
607 * met and the size for this object is about to be calculated for the given dimension
609 * @param dimension The dimension that is about to be calculated
611 public virtual void OnCalculateRelayoutSize(DimensionType dimension)
616 * @brief Virtual method to notify deriving classes that the size for a dimension
617 * has just been negotiated
619 * @param[in] size The new size for the given dimension
620 * @param[in] dimension The dimension that was just negotiated
622 public virtual void OnLayoutNegotiated(float size, DimensionType dimension)
627 * @brief This method should be overridden by deriving classes requiring notifications when the style changes.
629 * @param[in] styleManager The StyleManager object.
630 * @param[in] change Information denoting what has changed.
632 public virtual void OnStyleChange(StyleManager styleManager, StyleChangeType change)
637 * @brief This method is called when the control is accessibility activated.
639 * Derived classes should override this to perform custom accessibility activation.
640 * @return true if this control can perform accessibility activation.
642 public virtual bool OnAccessibilityActivated()
648 * @brief This method should be overridden by deriving classes when they wish to respond the accessibility
651 * @param[in] gesture The pan gesture.
652 * @return true if the pan gesture has been consumed by this control
654 public virtual bool OnAccessibilityPan(PanGesture gestures)
660 * @brief This method should be overridden by deriving classes when they wish to respond the accessibility
663 * @param[in] touch The touch event.
664 * @return true if the touch event has been consumed by this control
666 public virtual bool OnAccessibilityTouch(Touch touch)
672 * @brief This method should be overridden by deriving classes when they wish to respond
673 * the accessibility up and down action (i.e. value change of slider control).
675 * @param[in] isIncrease Whether the value should be increased or decreased
676 * @return true if the value changed action has been consumed by this control
678 public virtual bool OnAccessibilityValueChange(bool isIncrease)
684 * @brief This method should be overridden by deriving classes when they wish to respond
685 * the accessibility zoom action.
687 * @return true if the zoom action has been consumed by this control
689 public virtual bool OnAccessibilityZoom()
695 * @brief This method should be overridden by deriving classes when they wish to respond
696 * the accessibility zoom action.
698 * @return true if the zoom action has been consumed by this control
700 public virtual void OnKeyInputFocusGained()
705 * @brief Called when the control loses key input focus.
707 * Should be overridden by derived classes if they need to customize what happens when focus is lost.
709 public virtual void OnKeyInputFocusLost()
714 * @brief Gets the next keyboard focusable actor in this control towards the given direction.
716 * A control needs to override this function in order to support two dimensional keyboard navigation.
717 * @param[in] currentFocusedActor The current focused actor.
718 * @param[in] direction The direction to move the focus towards.
719 * @param[in] loopEnabled Whether the focus movement should be looped within the control.
720 * @return the next keyboard focusable actor in this control or an empty handle if no actor can be focused.
722 public virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, View.KeyboardFocus.Direction direction, bool loopEnabled)
728 * @brief Informs this control that its chosen focusable actor will be focused.
730 * This allows the application to preform any actions if wishes
731 * before the focus is actually moved to the chosen actor.
733 * @param[in] commitedFocusableActor The commited focusable actor.
735 public virtual void OnKeyboardFocusChangeCommitted(Actor commitedFocusableActor)
740 * @brief This method is called when the control has enter pressed on it.
742 * Derived classes should override this to perform custom actions.
743 * @return true if this control supported this action.
745 public virtual bool OnKeyboardEnter()
751 * @brief Called whenever a pinch gesture is detected on this control.
753 * This can be overridden by deriving classes when pinch detection
754 * is enabled. The default behaviour is to scale the control by the
757 * @param[in] pinch The pinch gesture.
758 * @note If overridden, then the default behaviour will not occur.
759 * @note Pinch detection should be enabled via EnableGestureDetection().
760 * @see EnableGestureDetection
762 public virtual void OnPinch(PinchGesture pinch)
767 * @brief Called whenever a pan gesture is detected on this control.
769 * This should be overridden by deriving classes when pan detection
772 * @param[in] pan The pan gesture.
773 * @note There is no default behaviour with panning.
774 * @note Pan detection should be enabled via EnableGestureDetection().
775 * @see EnableGestureDetection
777 public virtual void OnPan(PanGesture pan)
782 * @brief Called whenever a tap gesture is detected on this control.
784 * This should be overridden by deriving classes when tap detection
787 * @param[in] tap The tap gesture.
788 * @note There is no default behaviour with a tap.
789 * @note Tap detection should be enabled via EnableGestureDetection().
790 * @see EnableGestureDetection
792 public virtual void OnTap(TapGesture tap)
797 * @brief Called whenever a long press gesture is detected on this control.
799 * This should be overridden by deriving classes when long press
800 * detection is enabled.
802 * @param[in] longPress The long press gesture.
803 * @note There is no default behaviour associated with a long press.
804 * @note Long press detection should be enabled via EnableGestureDetection().
805 * @see EnableGestureDetection
807 public virtual void OnLongPress(LongPressGesture longPress)
811 private void OnControlChildAdd(Actor child)
815 private void OnControlChildRemove(Actor child)