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.
18 namespace Tizen.NUI.BaseComponents
21 /// CustomView provides some common functionality required by all views.
23 public class CustomView : ViewWrapper
25 public CustomView(string typeName, CustomViewBehaviour behaviour) : base(typeName, new ViewWrapperImpl(behaviour))
27 // Registering CustomView virtual functions to viewWrapperImpl delegates.
28 viewWrapperImpl.OnStageConnection = new ViewWrapperImpl.OnStageConnectionDelegate(OnStageConnection);
29 viewWrapperImpl.OnStageDisconnection = new ViewWrapperImpl.OnStageDisconnectionDelegate(OnStageDisconnection);
30 viewWrapperImpl.OnChildAdd = new ViewWrapperImpl.OnChildAddDelegate(OnChildAdd);
31 viewWrapperImpl.OnChildRemove = new ViewWrapperImpl.OnChildRemoveDelegate(OnChildRemove);
32 viewWrapperImpl.OnPropertySet = new ViewWrapperImpl.OnPropertySetDelegate(OnPropertySet);
33 viewWrapperImpl.OnSizeSet = new ViewWrapperImpl.OnSizeSetDelegate(OnSizeSet);
34 viewWrapperImpl.OnSizeAnimation = new ViewWrapperImpl.OnSizeAnimationDelegate(OnSizeAnimation);
35 viewWrapperImpl.OnTouch = new ViewWrapperImpl.OnTouchDelegate(OnTouch);
36 viewWrapperImpl.OnHover = new ViewWrapperImpl.OnHoverDelegate(OnHover);
37 viewWrapperImpl.OnKey = new ViewWrapperImpl.OnKeyDelegate(OnKey);
38 viewWrapperImpl.OnWheel = new ViewWrapperImpl.OnWheelDelegate(OnWheel);
39 viewWrapperImpl.OnRelayout = new ViewWrapperImpl.OnRelayoutDelegate(OnRelayout);
40 viewWrapperImpl.OnSetResizePolicy = new ViewWrapperImpl.OnSetResizePolicyDelegate(OnSetResizePolicy);
41 viewWrapperImpl.GetNaturalSize = new ViewWrapperImpl.GetNaturalSizeDelegate(GetNaturalSize);
42 viewWrapperImpl.CalculateChildSize = new ViewWrapperImpl.CalculateChildSizeDelegate(CalculateChildSize);
43 viewWrapperImpl.GetHeightForWidth = new ViewWrapperImpl.GetHeightForWidthDelegate(GetHeightForWidth);
44 viewWrapperImpl.GetWidthForHeight = new ViewWrapperImpl.GetWidthForHeightDelegate(GetWidthForHeight);
45 viewWrapperImpl.RelayoutDependentOnChildrenDimension = new ViewWrapperImpl.RelayoutDependentOnChildrenDimensionDelegate(RelayoutDependentOnChildren);
46 viewWrapperImpl.RelayoutDependentOnChildren = new ViewWrapperImpl.RelayoutDependentOnChildrenDelegate(RelayoutDependentOnChildren);
47 viewWrapperImpl.OnCalculateRelayoutSize = new ViewWrapperImpl.OnCalculateRelayoutSizeDelegate(OnCalculateRelayoutSize);
48 viewWrapperImpl.OnLayoutNegotiated = new ViewWrapperImpl.OnLayoutNegotiatedDelegate(OnLayoutNegotiated);
49 viewWrapperImpl.OnControlChildAdd = new ViewWrapperImpl.OnControlChildAddDelegate(OnControlChildAdd);
50 viewWrapperImpl.OnControlChildRemove = new ViewWrapperImpl.OnControlChildRemoveDelegate(OnControlChildRemove);
51 viewWrapperImpl.OnStyleChange = new ViewWrapperImpl.OnStyleChangeDelegate(OnStyleChange);
52 viewWrapperImpl.OnAccessibilityActivated = new ViewWrapperImpl.OnAccessibilityActivatedDelegate(OnAccessibilityActivated);
53 viewWrapperImpl.OnAccessibilityPan = new ViewWrapperImpl.OnAccessibilityPanDelegate(OnAccessibilityPan);
54 viewWrapperImpl.OnAccessibilityTouch = new ViewWrapperImpl.OnAccessibilityTouchDelegate(OnAccessibilityTouch);
55 viewWrapperImpl.OnAccessibilityValueChange = new ViewWrapperImpl.OnAccessibilityValueChangeDelegate(OnAccessibilityValueChange);
56 viewWrapperImpl.OnAccessibilityZoom = new ViewWrapperImpl.OnAccessibilityZoomDelegate(OnAccessibilityZoom);
57 viewWrapperImpl.OnFocusGained = new ViewWrapperImpl.OnFocusGainedDelegate(OnFocusGained);
58 viewWrapperImpl.OnFocusLost = new ViewWrapperImpl.OnFocusLostDelegate(OnFocusLost);
59 viewWrapperImpl.GetNextFocusableView = new ViewWrapperImpl.GetNextFocusableViewDelegate(GetNextFocusableView);
60 viewWrapperImpl.OnFocusChangeCommitted = new ViewWrapperImpl.OnFocusChangeCommittedDelegate(OnFocusChangeCommitted);
61 viewWrapperImpl.OnKeyboardEnter = new ViewWrapperImpl.OnKeyboardEnterDelegate(OnKeyboardEnter);
62 viewWrapperImpl.OnPinch = new ViewWrapperImpl.OnPinchDelegate(OnPinch);
63 viewWrapperImpl.OnPan = new ViewWrapperImpl.OnPanDelegate(OnPan);
64 viewWrapperImpl.OnTap = new ViewWrapperImpl.OnTapDelegate(OnTap);
65 viewWrapperImpl.OnLongPress = new ViewWrapperImpl.OnLongPressDelegate(OnLongPress);
67 // By default, we do not want the position to use the anchor point
68 this.PositionUsesAnchorPoint = false;
70 // Make sure CustomView is initialized.
73 // Set the StyleName the name of the View
74 // We have to do this because the StyleManager on Native side can't workout it out
75 // This will also ensure that the style of actors/visuals initialized above are applied by the style manager.
76 SetStyleName(this.GetType().Name);
80 /// Set the background with a property map.
82 /// <param name="map">The background property map</param>
83 public void SetBackground(Tizen.NUI.PropertyMap map)
85 viewWrapperImpl.SetBackground(map);
89 /// Allows deriving classes to enable any of the gesture detectors that are available.<br>
90 /// Gesture detection can be enabled one at a time or in bitwise format.<br>
92 /// <param name="type">The gesture type(s) to enable</param>
93 public void EnableGestureDetection(Gesture.GestureType type)
95 viewWrapperImpl.EnableGestureDetection(type);
99 /// Allows deriving classes to disable any of the gesture detectors.<br>
100 /// Like EnableGestureDetection, this can also be called using bitwise or one at a time.<br>
102 /// <param name="type">The gesture type(s) to disable</param>
103 internal void DisableGestureDetection(Gesture.GestureType type)
105 viewWrapperImpl.DisableGestureDetection(type);
109 /// Sets whether this control supports two dimensional keyboard navigation
110 /// (i.e. whether it knows how to handle the keyboard focus movement between its child actors).<br>
111 /// The control doesn't support it by default.<br>
113 /// <param name="isSupported">Whether this control supports two dimensional keyboard navigation.</param>
114 public bool FocusNavigationSupport
118 return IsKeyboardNavigationSupported();
122 SetKeyboardNavigationSupport(value);
126 internal void SetKeyboardNavigationSupport(bool isSupported)
128 viewWrapperImpl.SetKeyboardNavigationSupport(isSupported);
132 /// Gets whether this control supports two dimensional keyboard navigation.
134 /// <returns>true if this control supports two dimensional keyboard navigation</returns>
135 internal bool IsKeyboardNavigationSupported()
137 return viewWrapperImpl.IsKeyboardNavigationSupported();
142 /// Sets or Gets whether this control is a focus group for keyboard navigation.
144 /// <returns>true if this control is set as a focus group for keyboard navigation</returns>
145 public bool FocusGroup
149 return IsKeyboardFocusGroup();
153 SetAsKeyboardFocusGroup(value);
158 /// Sets whether this control is a focus group for keyboard navigation.
159 /// (i.e. the scope of keyboard focus movement can be limitied to its child actors). The control is not a focus group by default.
161 /// <param name="isFocusGroup">Whether this control is set as a focus group for keyboard navigation</param>
162 internal void SetAsKeyboardFocusGroup(bool isFocusGroup)
164 viewWrapperImpl.SetAsFocusGroup(isFocusGroup);
168 /// Gets whether this control is a focus group for keyboard navigation.
170 internal bool IsKeyboardFocusGroup()
172 return viewWrapperImpl.IsFocusGroup();
176 /// Called by the AccessibilityManager to activate the Control.
178 internal void AccessibilityActivate()
180 viewWrapperImpl.AccessibilityActivate();
184 /// Called by the KeyboardFocusManager.
186 internal void KeyboardEnter()
188 viewWrapperImpl.KeyboardEnter();
192 /// Called by the KeyInputFocusManager to emit key event signals.
194 /// <param name="key">The key event</param>
195 /// <returns>True if the event was consumed</returns>
196 internal bool EmitKeyEventSignal(Key key)
198 return viewWrapperImpl.EmitKeyEventSignal(key);
202 /// Request a relayout, which means performing a size negotiation on this actor, its parent and children (and potentially whole scene).<br>
203 /// This method can also be called from a derived class every time it needs a different size.<br>
204 /// At the end of event processing, the relayout process starts and all controls which requested Relayout will have their sizes (re)negotiated.<br>
205 /// It can be called multiple times; the size negotiation is still only performed once, i.e. there is no need to keep track of this in the calling side.<br>
207 protected void RelayoutRequest()
209 viewWrapperImpl.RelayoutRequest();
213 /// Provides the Actor implementation of GetHeightForWidth.
215 /// <param name="width">Width to use</param>
216 /// <returns>The height based on the width</returns>
217 protected float GetHeightForWidthBase(float width)
219 return viewWrapperImpl.GetHeightForWidthBase(width);
223 /// Provides the Actor implementation of GetWidthForHeight.
225 /// <param name="height">Height to use</param>
226 /// <returns>The width based on the height</returns>
227 protected float GetWidthForHeightBase(float height)
229 return viewWrapperImpl.GetWidthForHeightBase(height);
233 /// Calculate the size for a child using the base actor object.
235 /// <param name="child">The child actor to calculate the size for</param>
236 /// <param name="dimension">The dimension to calculate the size for. E.g. width or height</param>
237 /// <returns>Return the calculated size for the given dimension. If more than one dimension is requested, just return the first one found</returns>
238 protected float CalculateChildSizeBase(Actor child, DimensionType dimension)
240 return viewWrapperImpl.CalculateChildSizeBase(child, dimension);
244 /// Determine if this actor is dependent on it's children for relayout from the base class.
246 /// <param name="dimension">The dimension(s) to check for</param>
247 /// <returns>Return if the actor is dependent on it's children</returns>
248 protected bool RelayoutDependentOnChildrenBase(DimensionType dimension)
250 return viewWrapperImpl.RelayoutDependentOnChildrenBase(dimension);
254 /// Determine if this actor is dependent on it's children for relayout from the base class.
256 /// <returns>Return if the actor is dependent on it's children</returns>
257 protected bool RelayoutDependentOnChildrenBase()
259 return viewWrapperImpl.RelayoutDependentOnChildrenBase();
263 /// Register a visual by Property Index, linking an Actor to visual when required.<br>
264 /// In the case of the visual being an actor or control deeming visual not required then visual should be an empty handle.<br>
265 /// No parenting is done during registration, this should be done by derived class.<br>
267 /// <param name="index">The Property index of the visual, used to reference visual</param>
268 /// <param name="visual">The visual to register</param>
269 protected void RegisterVisual(int index, VisualBase visual)
271 viewWrapperImpl.RegisterVisual(index, visual);
275 /// Register a visual by Property Index, linking an Actor to visual when required.<br>
276 /// In the case of the visual being an actor or control deeming visual not required then visual should be an empty handle.<br>
277 /// If enabled is false then the visual is not set on stage until enabled by the derived class.<br>
279 /// <param name="index">The Property index of the visual, used to reference visual</param>
280 /// <param name="visual">The visual to register</param>
281 /// <param name="enabled">false if derived class wants to control when visual is set on stage</param>
282 protected void RegisterVisual(int index, VisualBase visual, bool enabled)
284 viewWrapperImpl.RegisterVisual(index, visual, enabled);
288 /// Erase the entry matching the given index from the list of registered visuals.
290 /// <param name="index">The Property index of the visual, used to reference visual</param>
291 protected void UnregisterVisual(int index)
293 viewWrapperImpl.UnregisterVisual(index);
297 /// Retrieve the visual associated with the given property index.<br>
298 /// For managing object life-cycle, do not store the returned visual as a member which increments its reference count.<br>
300 /// <param name="index">The Property index of the visual, used to reference visual</param>
301 /// <returns>The registered visual if exist, otherwise empty handle</returns>
302 protected VisualBase GetVisual(int index)
304 return viewWrapperImpl.GetVisual(index);
308 /// Sets the given visual to be displayed or not when parent staged.<br>
309 /// For managing object life-cycle, do not store the returned visual as a member which increments its reference count.<br>
311 /// <param name="index">The Property index of the visual, used to reference visual</param>
312 /// <param name="enable">flag to set enabled or disabled</param>
313 protected void EnableVisual(int index, bool enable)
315 viewWrapperImpl.EnableVisual(index, enable);
319 /// Queries if the given visual is to be displayed when parent staged.<br>
320 /// For managing object life-cycle, do not store the returned visual as a member which increments its reference count.<br>
322 /// <param name="index">The Property index of the visual</param>
323 /// <returns>Whether visual is enabled or not</returns>
324 protected bool IsVisualEnabled(int index)
326 return viewWrapperImpl.IsVisualEnabled(index);
330 /// Create a transition effect on the control.
332 /// <param name="transitionData">transitionData The transition data describing the effect to create</param>
333 /// <returns>A handle to an animation defined with the given effect, or an empty handle if no properties match </returns>
334 protected Animation CreateTransition(TransitionData transitionData)
336 return viewWrapperImpl.CreateTransition(transitionData);
340 /// Emits KeyInputFocusGained signal if true else emits KeyInputFocusLost signal.<br>
341 /// Should be called last by the control after it acts on the Input Focus change.<br>
343 /// <param name="focusGained">focusGained True if gained, False if lost</param>
344 protected void EmitFocusSignal(bool focusGained)
346 viewWrapperImpl.EmitFocusSignal(focusGained);
350 /// This method is called after the Control has been initialized.<br>
351 /// Derived classes should do any second phase initialization by overriding this method.<br>
353 public virtual void OnInitialize()
358 /// Called after the actor has been connected to the stage.<br>
359 /// When an actor is connected, it will be directly or indirectly parented to the root Actor.<br>
360 /// The root Actor is provided automatically by Tizen.NUI.Stage, and is always considered to be connected.<br>
361 /// When the parent of a set of actors is connected to the stage, then all of the children will received this callback.<br>
363 /// <param name="depth">The depth in the hierarchy for the actor</param>
364 public virtual void OnStageConnection(int depth)
369 /// Called after the actor has been disconnected from Stage.<br>
370 /// If an actor is disconnected it either has no parent, or is parented to a disconnected actor.<br>
371 /// When the parent of a set of actors is disconnected to the stage, then all of the children will received this callback, starting with the leaf actors.<br>
373 public virtual void OnStageDisconnection()
378 /// Called after a child has been added to the owning actor.
380 /// <param name="actor">The child which has been added</param>
381 public virtual void OnChildAdd(Actor actor)
386 /// Called after the owning actor has attempted to remove a child( regardless of whether it succeeded or not ).
388 /// <param name="actor">The child being removed</param>
389 public virtual void OnChildRemove(Actor actor)
394 /// Called when the owning actor property is set.
396 /// <param name="index">The Property index that was set</param>
397 /// <param name="propertyValue">The value to set</param>
398 public virtual void OnPropertySet(int index, Tizen.NUI.PropertyValue propertyValue)
403 /// Called when the owning actor's size is set e.g. using Actor.SetSize().
405 /// <param name="targetSize">The target size. Note that this target size may not match the size returned via Actor.GetTargetSize</param>
406 public virtual void OnSizeSet(Vector3 targetSize)
411 /// Called when the owning actor's size is animated e.g. using Animation::AnimateTo( Property( actor, Actor::Property::SIZE ), ... ).
413 /// <param name="animation">The object which is animating the owning actor</param>
414 /// <param name="targetSize">The target size. Note that this target size may not match the size returned via @ref Actor.GetTargetSize</param>
415 public virtual void OnSizeAnimation(Animation animation, Vector3 targetSize)
420 /// Called after a touch-event is received by the owning actor.<br>
421 /// CustomViewBehaviour.REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).<br>
423 /// <param name="touch">The touch event</param>
424 /// <returns>True if the event should be consumed</returns>
425 public virtual bool OnTouch(Touch touch)
427 return false; // Do not consume
431 /// Called after a hover-event is received by the owning actor.<br>
432 /// CustomViewBehaviour.REQUIRES_HOVER_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).<br>
434 /// <param name="hover">The hover event</param>
435 /// <returns>True if the hover event should be consumed</returns>
436 public virtual bool OnHover(Hover hover)
438 return false; // Do not consume
442 /// Called after a key-event is received by the actor that has had its focus set.
444 /// <param name="key">The key event</param>
445 /// <returns>True if the key event should be consumed</returns>
446 public virtual bool OnKey(Key key)
448 return false; // Do not consume
452 /// Called after a wheel-event is received by the owning actor.<br>
453 /// CustomViewBehaviour.REQUIRES_WHEEL_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).<br>
455 /// <param name="wheel">The wheel event</param>
456 /// <returns>True if the wheel event should be consumed</returns>
457 public virtual bool OnWheel(Wheel wheel)
459 return false; // Do not consume
463 /// Called after the size negotiation has been finished for this control.<br>
464 /// The control is expected to assign this given size to itself/its children.<br>
465 /// Should be overridden by derived classes if they need to layout actors differently after certain operations like add or remove actors, resize or after changing specific properties.<br>
466 /// As this function is called from inside the size negotiation algorithm, you cannot call RequestRelayout (the call would just be ignored).<br>
468 /// <param name="size">The allocated size</param>
469 /// <param name="container">The control should add actors to this container that it is not able to allocate a size for</param>
470 public virtual void OnRelayout(Vector2 size, RelayoutContainer container)
475 /// Notification for deriving classes.
477 /// <param name="policy">policy The policy being set</param>
478 /// <param name="dimension">dimension The dimension the policy is being set for</param>
479 public virtual void OnSetResizePolicy(ResizePolicyType policy, DimensionType dimension)
484 /// Return the natural size of the actor.
486 /// <returns>The actor's natural size</returns>
487 public virtual Size GetNaturalSize()
489 return new Size(0.0f, 0.0f, 0.0f);
493 /// Calculate the size for a child.
495 /// <param name="child">The child actor to calculate the size for</param>
496 /// <param name="dimension">The dimension to calculate the size for. E.g. width or height</param>
497 /// <returns>Return the calculated size for the given dimension. If more than one dimension is requested, just return the first one found.</returns>
498 public virtual float CalculateChildSize(Actor child, DimensionType dimension)
500 return viewWrapperImpl.CalculateChildSizeBase(child, dimension);
504 /// This method is called during size negotiation when a height is required for a given width.<br>
505 /// Derived classes should override this if they wish to customize the height returned.<br>
507 /// <param name="width">Width to use</param>
508 /// <returns>The height based on the width</returns>
509 public virtual float GetHeightForWidth(float width)
511 return viewWrapperImpl.GetHeightForWidthBase(width);
515 /// This method is called during size negotiation when a width is required for a given height.<br>
516 /// Derived classes should override this if they wish to customize the width returned.<br>
518 /// <param name="height">Height to use</param>
519 /// <returns>The width based on the width</returns>
520 public virtual float GetWidthForHeight(float height)
522 return viewWrapperImpl.GetWidthForHeightBase(height);
526 /// Determine if this actor is dependent on it's children for relayout.
528 /// <param name="dimension">The dimension(s) to check for</param>
529 /// <returns>Return if the actor is dependent on it's children</returns>
530 public virtual bool RelayoutDependentOnChildren(DimensionType dimension)
532 return viewWrapperImpl.RelayoutDependentOnChildrenBase(dimension);
536 /// Determine if this actor is dependent on it's children for relayout from the base class.
538 /// <returns>Return true if the actor is dependent on it's children</returns>
539 public virtual bool RelayoutDependentOnChildren()
541 return viewWrapperImpl.RelayoutDependentOnChildrenBase();
545 /// Virtual method to notify deriving classes that relayout dependencies have been
546 /// met and the size for this object is about to be calculated for the given dimension.
548 /// <param name="dimension">The dimension that is about to be calculated</param>
549 public virtual void OnCalculateRelayoutSize(DimensionType dimension)
554 /// Virtual method to notify deriving classes that the size for a dimension has just been negotiated.
556 /// <param name="size">The new size for the given dimension</param>
557 /// <param name="dimension">The dimension that was just negotiated</param>
558 public virtual void OnLayoutNegotiated(float size, DimensionType dimension)
563 /// This method should be overridden by deriving classes requiring notifications when the style changes.
565 /// <param name="styleManager">The StyleManager object</param>
566 /// <param name="change">Information denoting what has changed</param>
567 public virtual void OnStyleChange(StyleManager styleManager, StyleChangeType change)
572 /// This method is called when the control is accessibility activated.<br>
573 /// Derived classes should override this to perform custom accessibility activation.<br>
575 /// <returns>true if this control can perform accessibility activation</returns>
576 internal virtual bool OnAccessibilityActivated()
582 /// This method should be overridden by deriving classes when they wish to respond the accessibility.
584 /// <param name="gestures">The pan gesture</param>
585 /// <returns>true if the pan gesture has been consumed by this control</returns>
586 internal virtual bool OnAccessibilityPan(PanGesture gestures)
592 /// This method should be overridden by deriving classes when they wish to respond the accessibility
594 /// <param name="touch">The touch gesture</param>
595 /// <returns>true if the touch event has been consumed by this control</returns>
596 internal virtual bool OnAccessibilityTouch(Touch touch)
602 /// This method should be overridden by deriving classes when they wish to respond the accessibility up and down action (i.e. value change of slider control).
604 /// <param name="isIncrease">isIncrease Whether the value should be increased or decreased</param>
605 /// <returns>true if the value changed action has been consumed by this control</returns>
606 internal virtual bool OnAccessibilityValueChange(bool isIncrease)
612 /// This method should be overridden by deriving classes when they wish to respond the accessibility zoom action.
614 /// <returns>true if the zoom action has been consumed by this control</returns>
615 internal virtual bool OnAccessibilityZoom()
621 /// Called when the control gain key input focus. Should be overridden by derived classes if they need to customize what happens when focus is gained.
623 public virtual void OnFocusGained()
628 /// Called when the control loses key input focus. Should be overridden by derived classes if they need to customize what happens when focus is lost.
630 public virtual void OnFocusLost()
635 /// Gets the next keyboard focusable actor in this control towards the given direction.<br>
636 /// A control needs to override this function in order to support two dimensional keyboard navigation.<br>
638 /// <param name="currentFocusedView">The current focused actor</param>
639 /// <param name="direction">The direction to move the focus towards</param>
640 /// <param name="loopEnabled">Whether the focus movement should be looped within the control</param>
641 /// <returns>the next keyboard focusable actor in this control or an empty handle if no actor can be focused</returns>
642 public virtual View GetNextFocusableView(View currentFocusedView, View.FocusDirection direction, bool loopEnabled)
648 /// Informs this control that its chosen focusable actor will be focused.<br>
649 /// This allows the application to preform any actions if wishes before the focus is actually moved to the chosen actor.<br>
651 /// <param name="commitedFocusableView">The commited focused actor</param>
652 public virtual void OnFocusChangeCommitted(View commitedFocusableView)
657 /// This method is called when the control has enter pressed on it.<br>
658 /// Derived classes should override this to perform custom actions.<br>
660 /// <returns>true if this control supported this action</returns>
661 public virtual bool OnKeyboardEnter()
667 /// Called whenever a pinch gesture is detected on this control.<br>
668 /// This can be overridden by deriving classes when pinch detection is enabled. The default behaviour is to scale the control by the pinch scale.<br>
669 /// If overridden, then the default behaviour will not occur.<br>
670 /// Pinch detection should be enabled via EnableGestureDetection().<br>
672 /// <param name="pinch">pinch tap gesture</param>
673 internal virtual void OnPinch(PinchGesture pinch)
678 /// Called whenever a pan gesture is detected on this control.<br>
679 /// This should be overridden by deriving classes when pan detection is enabled.<br>
680 /// There is no default behaviour with panning.<br>
681 /// Pan detection should be enabled via EnableGestureDetection().<br>
683 /// <param name="pan">The pan gesture</param>
684 public virtual void OnPan(PanGesture pan)
689 /// Called whenever a tap gesture is detected on this control.<br>
690 /// This should be overridden by deriving classes when tap detection is enabled.<br>
691 /// There is no default behaviour with a tap.<br>
692 /// Tap detection should be enabled via EnableGestureDetection().<br>
694 /// <param name="tap">The tap gesture</param>
695 public virtual void OnTap(TapGesture tap)
700 /// Called whenever a long press gesture is detected on this control.<br>
701 /// This should be overridden by deriving classes when long press detection is enabled.<br>
702 /// There is no default behaviour associated with a long press.<br>
703 /// Long press detection should be enabled via EnableGestureDetection().<br>
705 /// <param name="longPress">The long press gesture</param>
706 internal virtual void OnLongPress(LongPressGesture longPress)
710 private void OnControlChildAdd(Actor child)
714 private void OnControlChildRemove(Actor child)