2 * Copyright (c) 2017 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.
17 using System.ComponentModel;
19 using Tizen.NUI.XamlBinding;
21 namespace Tizen.NUI.Xaml.Forms.BaseComponents
23 internal class InternalCustomeView : Tizen.NUI.BaseComponents.CustomView
25 public InternalCustomeView(string typeName, CustomViewBehaviour behaviour) : base(typeName, behaviour)
30 /// Requests a relayout, which means performing a size negotiation on this view, its parent, and children (and potentially whole scene).<br />
31 /// This method can also be called from a derived class every time it needs a different size.<br />
32 /// At the end of event processing, the relayout process starts and all controls which requested relayout will have their sizes (re)negotiated.<br />
33 /// 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 />
35 /// <since_tizen> 6 </since_tizen>
36 public new void RelayoutRequest()
38 base.RelayoutRequest();
42 /// Provides the view implementation of GetHeightForWidth.
44 /// <param name="width">The width to use.</param>
45 /// <returns>The height based on the width.</returns>
46 /// <since_tizen> 6 </since_tizen>
47 public new float GetHeightForWidthBase(float width)
49 return base.GetHeightForWidthBase(width);
53 /// Provides the view implementation of GetWidthForHeight.
55 /// <param name="height">The height to use.</param>
56 /// <returns>The width based on the height.</returns>
57 /// <since_tizen> 6 </since_tizen>
58 public new float GetWidthForHeightBase(float height)
60 return base.GetWidthForHeightBase(height);
64 /// Calculates the size for a child using the base view object.
66 /// <param name="child">The child view to calculate the size for.</param>
67 /// <param name="dimension">The dimension to calculate the size, for example, the width or the height.</param>
68 /// <returns>Return the calculated size for the given dimension. If more than one dimension is requested, just return the first one found.</returns>
69 /// <since_tizen> 6 </since_tizen>
70 public float CalculateChildSizeBase(View child, DimensionType dimension)
72 return base.CalculateChildSizeBase(child.ViewInstance, dimension);
76 /// Determines if this view is dependent on it's children for relayout from the base class.
78 /// <param name="dimension">The dimension(s) to check for.</param>
79 /// <returns>Return if the view is dependent on it's children.</returns>
80 /// <since_tizen> 6 </since_tizen>
81 public new bool RelayoutDependentOnChildrenBase(DimensionType dimension)
83 return base.RelayoutDependentOnChildrenBase(dimension);
87 /// Determines if this view is dependent on it's children for relayout from the base class.
89 /// <returns>Return if the view is dependent on it's children.</returns>
90 /// <since_tizen> 6 </since_tizen>
91 public new bool RelayoutDependentOnChildrenBase()
93 return base.RelayoutDependentOnChildrenBase();
97 /// Registers a visual by property index, linking a view to visual when required.<br />
98 /// In the case of the visual being a view or control deeming visual not required, then the visual should be an empty handle.<br />
99 /// No parenting is done during registration, this should be done by a derived class.<br />
101 /// <param name="index">The property index of the visual used to reference visual.</param>
102 /// <param name="visual">The visual to register.</param>
103 /// <since_tizen> 6 </since_tizen>
104 public new void RegisterVisual(int index, VisualBase visual)
106 base.RegisterVisual(index, visual);
110 /// Registers a visual by the property index, linking a view to visual when required.<br />
111 /// In the case of the visual being a view or control deeming visual not required, then the visual should be an empty handle.<br />
112 /// If enabled is false, then the visual is not set on the stage until enabled by the derived class.<br />
114 /// <param name="index">The property index of the visual used to reference visual.</param>
115 /// <param name="visual">The visual to register.</param>
116 /// <param name="enabled">False if derived class wants to control when the visual is set on the stage.</param>
117 /// <since_tizen> 6 </since_tizen>
118 public new void RegisterVisual(int index, VisualBase visual, bool enabled)
120 base.RegisterVisual(index, visual, enabled);
124 /// Erases the entry matching the given index from the list of registered visuals.
126 /// <param name="index">The property index of the visual used to reference visual.</param>
127 /// <since_tizen> 6 </since_tizen>
128 public new void UnregisterVisual(int index)
130 base.UnregisterVisual(index);
134 /// Retrieves the visual associated with the given property index.<br />
135 /// For managing the object lifecycle, do not store the returned visual as a member which increments its reference count.<br />
137 /// <param name="index">The property index of the visual used to reference visual.</param>
138 /// <returns>The registered visual if exists, otherwise an empty handle.</returns>
139 /// <since_tizen> 6 </since_tizen>
140 public new VisualBase GetVisual(int index)
142 return base.GetVisual(index);
146 /// Sets the given visual to be displayed or not when parent staged.<br />
147 /// For managing the object lifecycle, do not store the returned visual as a member which increments its reference count.<br />
149 /// <param name="index">The property index of the visual, used to reference visual.</param>
150 /// <param name="enable">Flag set to enabled or disabled.</param>
151 /// <since_tizen> 6 </since_tizen>
152 public new void EnableVisual(int index, bool enable)
154 base.EnableVisual(index, enable);
158 /// Queries if the given visual is to be displayed when parent staged.<br />
159 /// For managing the object lifecycle, do not store the returned visual as a member which increments its reference count.<br />
161 /// <param name="index">The property index of the visual.</param>
162 /// <returns>Whether visual is enabled or not.</returns>
163 /// <since_tizen> 6 </since_tizen>
164 public new bool IsVisualEnabled(int index)
166 return base.IsVisualEnabled(index);
170 /// Creates a transition effect on the control.
172 /// <param name="transitionData">The transition data describing the effect to create.</param>
173 /// <returns>A handle to an animation defined with the given effect, or an empty handle if no properties match.</returns>
174 /// <since_tizen> 6 </since_tizen>
175 public new Animation CreateTransition(TransitionData transitionData)
177 return base.CreateTransition(transitionData);
181 /// Emits the KeyInputFocusGained signal if true, else, emits the KeyInputFocusLost signal.<br />
182 /// Should be called last by the control after it acts on the input focus change.<br />
184 /// <param name="focusGained">True if gained, false if lost.</param>
185 /// <since_tizen> 6 </since_tizen>
186 public new void EmitFocusSignal(bool focusGained)
188 base.EmitFocusSignal(focusGained);
193 /// CustomView provides some common functionality required by all views.
195 /// <since_tizen> 6 </since_tizen>
196 [EditorBrowsable(EditorBrowsableState.Never)]
197 public class CustomView : View
199 private InternalCustomeView _customView;
200 internal InternalCustomeView customView
204 if (null == _customView)
206 _customView = handleInstance as InternalCustomeView;
214 /// Creates a new instance of a Xaml CustomView.
216 /// <since_tizen> 6 </since_tizen>
217 [EditorBrowsable(EditorBrowsableState.Never)]
218 public CustomView(string typeName, CustomViewBehaviour behaviour) : this(new Tizen.NUI.BaseComponents.CustomView(typeName, behaviour))
222 internal CustomView(Tizen.NUI.BaseComponents.CustomView nuiInstance) : base(nuiInstance)
224 SetNUIInstance(nuiInstance);
227 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
228 [EditorBrowsable(EditorBrowsableState.Never)]
229 public static readonly BindableProperty FocusNavigationSupportProperty = BindableProperty.Create("FocusNavigationSupport", typeof(bool), typeof(CustomView), false, propertyChanged: (bindable, oldValue, newValue) =>
231 var customView = ((CustomView)bindable).customView;
232 customView.FocusNavigationSupport = (bool)newValue;
234 defaultValueCreator:(bindable) =>
236 var customView = ((CustomView)bindable).customView;
237 return customView.FocusNavigationSupport;
239 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
240 [EditorBrowsable(EditorBrowsableState.Never)]
241 public static readonly BindableProperty FocusGroupProperty = BindableProperty.Create("FocusGroup", typeof(bool), typeof(CustomView), false, propertyChanged: (bindable, oldValue, newValue) =>
243 var customView = ((CustomView)bindable).customView;
244 customView.FocusGroup = (bool)newValue;
246 defaultValueCreator:(bindable) =>
248 var customView = ((CustomView)bindable).customView;
249 return customView.FocusGroup;
253 /// Sets the background with a property map.
255 /// <param name="map">The background property map.</param>
256 /// <since_tizen> 6 </since_tizen>
257 [EditorBrowsable(EditorBrowsableState.Never)]
258 public void SetBackground(PropertyMap map)
260 customView.SetBackground(map);
264 /// Allows deriving classes to enable any of the gesture detectors that are available.<br />
265 /// Gesture detection can be enabled one at a time or in a bitwise format.<br />
267 /// <param name="type">The gesture type(s) to enable.</param>
268 /// <since_tizen> 6 </since_tizen>
269 [EditorBrowsable(EditorBrowsableState.Never)]
270 public void EnableGestureDetection(Gesture.GestureType type)
272 customView.EnableGestureDetection(type);
276 /// Sets whether this control supports two dimensional keyboard navigation
277 /// (i.e., whether it knows how to handle the keyboard focus movement between its child views).<br />
278 /// The control doesn't support it by default.<br />
280 /// <since_tizen> 6 </since_tizen>
281 [EditorBrowsable(EditorBrowsableState.Never)]
282 public bool FocusNavigationSupport
286 return (bool)GetValue(FocusNavigationSupportProperty);
290 SetValue(FocusNavigationSupportProperty, value);
295 /// Sets or gets whether this control is a focus group for keyboard navigation.
297 /// <returns>True if this control is set as a focus group for keyboard navigation.</returns>
298 /// <since_tizen> 6 </since_tizen>
299 [EditorBrowsable(EditorBrowsableState.Never)]
300 public bool FocusGroup
304 return (bool)GetValue(FocusGroupProperty);
308 SetValue(FocusGroupProperty, value);
313 /// This method is called after the control has been initialized.<br />
314 /// Derived classes should do any second phase initialization by overriding this method.<br />
316 /// <since_tizen> 6 </since_tizen>
317 [EditorBrowsable(EditorBrowsableState.Never)]
318 public virtual void OnInitialize()
323 /// Called after the view has been connected to the stage.<br />
324 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
325 /// The root view is provided automatically by Tizen.NUI.Stage, and is always considered to be connected.<br />
326 /// When the parent of a set of views is connected to the stage, then all of the children will receive this callback.<br />
328 /// <param name="depth">The depth in the hierarchy for the view.</param>
329 /// <since_tizen> 6 </since_tizen>
330 [EditorBrowsable(EditorBrowsableState.Never)]
331 public virtual void OnStageConnection(int depth)
336 /// Called after the view has been disconnected from the stage.<br />
337 /// If a view is disconnected, it either has no parent, or is parented to a disconnected view.<br />
338 /// When the parent of a set of views is disconnected to the stage, then all of the children will receive this callback, starting with the leaf views.<br />
340 /// <since_tizen> 6 </since_tizen>
341 [EditorBrowsable(EditorBrowsableState.Never)]
342 public virtual void OnStageDisconnection()
347 /// Called after a child has been added to the owning view.
349 /// <param name="view">The child which has been added.</param>
350 /// <since_tizen> 6 </since_tizen>
351 [EditorBrowsable(EditorBrowsableState.Never)]
352 public virtual void OnChildAdd(View view)
357 /// Called after the owning view has attempted to remove a child( regardless of whether it succeeded or not ).
359 /// <param name="view">The child being removed.</param>
360 /// <since_tizen> 6 </since_tizen>
361 [EditorBrowsable(EditorBrowsableState.Never)]
362 public virtual void OnChildRemove(View view)
367 /// Called when the owning view property is set.
369 /// <param name="index">The property index that was set.</param>
370 /// <param name="propertyValue">The value to set.</param>
371 /// <since_tizen> 6 </since_tizen>
372 [EditorBrowsable(EditorBrowsableState.Never)]
373 public virtual void OnPropertySet(int index, PropertyValue propertyValue)
378 /// Called when the owning view's size is set, for example, using View.SetSize().
380 /// <param name="targetSize">The target size.</param>
381 /// <since_tizen> 6 </since_tizen>
382 [EditorBrowsable(EditorBrowsableState.Never)]
383 public virtual void OnSizeSet(Vector3 targetSize)
388 /// Called when the owning view's size is animated, for example, using Animation::AnimateTo( Property ( view, View::Property::SIZE ), ... ).
390 /// <param name="animation">The object which is animating the owning view.</param>
391 /// <param name="targetSize">The target size.</param>
392 /// <since_tizen> 6 </since_tizen>
393 [EditorBrowsable(EditorBrowsableState.Never)]
394 public virtual void OnSizeAnimation(Animation animation, Vector3 targetSize)
399 /// Called after a touch event is received by the owning view.<br />
400 /// CustomViewBehaviour.REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).<br />
402 /// <param name="touch">The touch event.</param>
403 /// <returns>True if the event should be consumed.</returns>
404 /// <since_tizen> 6 </since_tizen>
405 [EditorBrowsable(EditorBrowsableState.Never)]
406 public virtual bool OnTouch(Touch touch)
408 return false; // Do not consume
412 /// Called after a hover event is received by the owning view.<br />
413 /// CustomViewBehaviour.REQUIRES_HOVER_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).<br />
415 /// <param name="hover">The hover event.</param>
416 /// <returns>True if the hover event should be consumed.</returns>
417 /// <since_tizen> 6 </since_tizen>
418 [EditorBrowsable(EditorBrowsableState.Never)]
419 public virtual bool OnHover(Hover hover)
421 return false; // Do not consume
425 /// Called after a key event is received by the view that has had its focus set.
427 /// <param name="key">The key event.</param>
428 /// <returns>True if the key event should be consumed.</returns>
429 /// <since_tizen> 6 </since_tizen>
430 [EditorBrowsable(EditorBrowsableState.Never)]
431 public virtual bool OnKey(Key key)
433 return false; // Do not consume
437 /// Called after a wheel event is received by the owning view.<br />
438 /// CustomViewBehaviour.REQUIRES_WHEEL_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).<br />
440 /// <param name="wheel">The wheel event.</param>
441 /// <returns>True if the wheel event should be consumed.</returns>
442 /// <since_tizen> 6 </since_tizen>
443 [EditorBrowsable(EditorBrowsableState.Never)]
444 public virtual bool OnWheel(Wheel wheel)
446 return false; // Do not consume
450 /// Called after the size negotiation has been finished for this control.<br />
451 /// The control is expected to assign this given size to itself or its children.<br />
452 /// Should be overridden by derived classes if they need to layout views differently after certain operations like add or remove views, resize, or after changing specific properties.<br />
453 /// As this function is called from inside the size negotiation algorithm, you cannot call RequestRelayout (the call would just be ignored).<br />
455 /// <param name="size">The allocated size.</param>
456 /// <param name="container">The control should add views to this container that it is not able to allocate a size for.</param>
457 /// <since_tizen> 6 </since_tizen>
458 [EditorBrowsable(EditorBrowsableState.Never)]
459 public virtual void OnRelayout(Vector2 size, RelayoutContainer container)
464 /// Notification for deriving classes.
466 /// <param name="policy">The policy being set.</param>
467 /// <param name="dimension">The policy is being set for.</param>
468 /// <since_tizen> 6 </since_tizen>
469 [EditorBrowsable(EditorBrowsableState.Never)]
470 public virtual void OnSetResizePolicy(ResizePolicyType policy, DimensionType dimension)
475 /// Returns the natural size of the view.
477 /// <returns>The view's natural size</returns>
478 /// <since_tizen> 6 </since_tizen>
479 [EditorBrowsable(EditorBrowsableState.Never)]
480 public virtual Size2D GetNaturalSize()
482 return new Size2D(0, 0);
486 /// Calculates the size for a child.
488 /// <param name="child">The child view to calculate the size for.</param>
489 /// <param name="dimension">The dimension to calculate the size, for example, the width or the height.</param>
490 /// <returns>Return the calculated size for the given dimension. If more than one dimension is requested, just return the first one found.</returns>
491 /// <since_tizen> 6 </since_tizen>
492 [EditorBrowsable(EditorBrowsableState.Never)]
493 public virtual float CalculateChildSize(View child, DimensionType dimension)
495 return customView.CalculateChildSize(child.view, dimension);
499 /// This method is called during size negotiation when a height is required for a given width.<br />
500 /// Derived classes should override this if they wish to customize the height returned.<br />
502 /// <param name="width">Width to use</param>
503 /// <returns>The height based on the width</returns>
504 /// <since_tizen> 6 </since_tizen>
505 [EditorBrowsable(EditorBrowsableState.Never)]
506 public new virtual float GetHeightForWidth(float width)
508 return customView.GetHeightForWidth(width);
512 /// This method is called during size negotiation when a width is required for a given height.<br />
513 /// Derived classes should override this if they wish to customize the width returned.<br />
515 /// <param name="height">Height to use</param>
516 /// <returns>The width based on the width</returns>
517 /// <since_tizen> 6 </since_tizen>
518 [EditorBrowsable(EditorBrowsableState.Never)]
519 public new virtual float GetWidthForHeight(float height)
521 return customView.GetWidthForHeight(height);
525 /// Determines if this view is dependent on it's children for relayout.
527 /// <param name="dimension">The dimension(s) to check for.</param>
528 /// <returns>Return if the view is dependent on it's children.</returns>
529 /// <since_tizen> 6 </since_tizen>
530 [EditorBrowsable(EditorBrowsableState.Never)]
531 public virtual bool RelayoutDependentOnChildren(DimensionType dimension)
533 return customView.RelayoutDependentOnChildren(dimension);
537 /// Determines if this view is dependent on it's children for relayout from the base class.
539 /// <returns>Return true if the view is dependent on it's children.</returns>
540 /// <since_tizen> 6 </since_tizen>
541 [EditorBrowsable(EditorBrowsableState.Never)]
542 public virtual bool RelayoutDependentOnChildren()
544 return customView.RelayoutDependentOnChildren();
548 /// The virtual method to notify deriving classes that relayout dependencies have been
549 /// met and the size for this object is about to be calculated for the given dimension.
551 /// <param name="dimension">The dimension that is about to be calculated.</param>
552 /// <since_tizen> 6 </since_tizen>
553 [EditorBrowsable(EditorBrowsableState.Never)]
554 public virtual void OnCalculateRelayoutSize(DimensionType dimension)
559 /// The virtual method to notify deriving classes that the size for a dimension has just been negotiated.
561 /// <param name="size">The new size for the given dimension.</param>
562 /// <param name="dimension">The dimension that was just negotiated.</param>
563 /// <since_tizen> 6 </since_tizen>
564 [EditorBrowsable(EditorBrowsableState.Never)]
565 public virtual void OnLayoutNegotiated(float size, DimensionType dimension)
570 /// This method should be overridden by deriving classes requiring notifications when the style changes.
572 /// <param name="styleManager">The StyleManager object.</param>
573 /// <param name="change">Information denoting what has changed.</param>
574 /// <since_tizen> 6 </since_tizen>
575 [EditorBrowsable(EditorBrowsableState.Never)]
576 public virtual void OnStyleChange(StyleManager styleManager, StyleChangeType change)
581 /// Called when the control gain key input focus. Should be overridden by derived classes if they need to customize what happens when the focus is gained.
583 /// <since_tizen> 6 </since_tizen>
584 [EditorBrowsable(EditorBrowsableState.Never)]
585 public virtual void OnFocusGained()
590 /// Called when the control loses key input focus. Should be overridden by derived classes if they need to customize what happens when the focus is lost.
592 /// <since_tizen> 6 </since_tizen>
593 [EditorBrowsable(EditorBrowsableState.Never)]
594 public virtual void OnFocusLost()
599 /// Gets the next keyboard focusable view in this control towards the given direction.<br />
600 /// A control needs to override this function in order to support two dimensional keyboard navigation.<br />
602 /// <param name="currentFocusedView">The current focused view.</param>
603 /// <param name="direction">The direction to move the focus towards.</param>
604 /// <param name="loopEnabled">Whether the focus movement should be looped within the control.</param>
605 /// <returns>The next keyboard focusable view in this control or an empty handle if no view can be focused.</returns>
606 /// <since_tizen> 6 </since_tizen>
607 [EditorBrowsable(EditorBrowsableState.Never)]
608 public virtual View GetNextFocusableView(View currentFocusedView, Tizen.NUI.BaseComponents.View.FocusDirection direction, bool loopEnabled)
614 /// Informs this control that its chosen focusable view will be focused.<br />
615 /// This allows the application to preform any actions it wishes before the focus is actually moved to the chosen view.<br />
617 /// <param name="commitedFocusableView">The commited focused view.</param>
618 /// <since_tizen> 6 </since_tizen>
619 [EditorBrowsable(EditorBrowsableState.Never)]
620 public virtual void OnFocusChangeCommitted(View commitedFocusableView)
625 /// This method is called when the control has enter pressed on it.<br />
626 /// Derived classes should override this to perform custom actions.<br />
628 /// <returns>True if this control supported this action.</returns>
629 /// <since_tizen> 6 </since_tizen>
630 [EditorBrowsable(EditorBrowsableState.Never)]
631 public virtual bool OnKeyboardEnter()
637 /// Called whenever a pan gesture is detected on this control.<br />
638 /// This should be overridden by deriving classes when pan detection is enabled.<br />
639 /// There is no default behavior with panning.<br />
640 /// Pan detection should be enabled via EnableGestureDetection().<br />
642 /// <param name="pan">The pan gesture.</param>
643 /// <since_tizen> 6 </since_tizen>
644 [EditorBrowsable(EditorBrowsableState.Never)]
645 public virtual void OnPan(PanGesture pan)
650 /// Called whenever a tap gesture is detected on this control.<br />
651 /// This should be overridden by deriving classes when tap detection is enabled.<br />
652 /// There is no default behavior with a tap.<br />
653 /// Tap detection should be enabled via EnableGestureDetection().<br />
655 /// <param name="tap">The tap gesture.</param>
656 /// <since_tizen> 6 </since_tizen>
657 [EditorBrowsable(EditorBrowsableState.Never)]
658 public virtual void OnTap(TapGesture tap)
663 /// Requests a relayout, which means performing a size negotiation on this view, its parent, and children (and potentially whole scene).<br />
664 /// This method can also be called from a derived class every time it needs a different size.<br />
665 /// At the end of event processing, the relayout process starts and all controls which requested relayout will have their sizes (re)negotiated.<br />
666 /// 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 />
668 /// <since_tizen> 6 </since_tizen>
669 [EditorBrowsable(EditorBrowsableState.Never)]
670 protected void RelayoutRequest()
672 customView.RelayoutRequest();
676 /// Provides the view implementation of GetHeightForWidth.
678 /// <param name="width">The width to use.</param>
679 /// <returns>The height based on the width.</returns>
680 /// <since_tizen> 6 </since_tizen>
681 [EditorBrowsable(EditorBrowsableState.Never)]
682 protected float GetHeightForWidthBase(float width)
684 return customView.GetHeightForWidthBase(width);
688 /// Provides the view implementation of GetWidthForHeight.
690 /// <param name="height">The height to use.</param>
691 /// <returns>The width based on the height.</returns>
692 /// <since_tizen> 6 </since_tizen>
693 [EditorBrowsable(EditorBrowsableState.Never)]
694 protected float GetWidthForHeightBase(float height)
696 return customView.GetWidthForHeightBase(height);
700 /// Calculates the size for a child using the base view object.
702 /// <param name="child">The child view to calculate the size for.</param>
703 /// <param name="dimension">The dimension to calculate the size, for example, the width or the height.</param>
704 /// <returns>Return the calculated size for the given dimension. If more than one dimension is requested, just return the first one found.</returns>
705 /// <since_tizen> 6 </since_tizen>
706 [EditorBrowsable(EditorBrowsableState.Never)]
707 protected float CalculateChildSizeBase(View child, DimensionType dimension)
709 return customView.CalculateChildSizeBase(child, dimension);
713 /// Determines if this view is dependent on it's children for relayout from the base class.
715 /// <param name="dimension">The dimension(s) to check for.</param>
716 /// <returns>Return if the view is dependent on it's children.</returns>
717 /// <since_tizen> 6 </since_tizen>
718 [EditorBrowsable(EditorBrowsableState.Never)]
719 protected bool RelayoutDependentOnChildrenBase(DimensionType dimension)
721 return customView.RelayoutDependentOnChildrenBase(dimension);
725 /// Determines if this view is dependent on it's children for relayout from the base class.
727 /// <returns>Return if the view is dependent on it's children.</returns>
728 /// <since_tizen> 6 </since_tizen>
729 [EditorBrowsable(EditorBrowsableState.Never)]
730 protected bool RelayoutDependentOnChildrenBase()
732 return customView.RelayoutDependentOnChildrenBase();
736 /// Registers a visual by property index, linking a view to visual when required.<br />
737 /// In the case of the visual being a view or control deeming visual not required, then the visual should be an empty handle.<br />
738 /// No parenting is done during registration, this should be done by a derived class.<br />
740 /// <param name="index">The property index of the visual used to reference visual.</param>
741 /// <param name="visual">The visual to register.</param>
742 /// <since_tizen> 6 </since_tizen>
743 [EditorBrowsable(EditorBrowsableState.Never)]
744 protected void RegisterVisual(int index, VisualBase visual)
746 customView.RegisterVisual(index, visual);
750 /// Registers a visual by the property index, linking a view to visual when required.<br />
751 /// In the case of the visual being a view or control deeming visual not required, then the visual should be an empty handle.<br />
752 /// If enabled is false, then the visual is not set on the stage until enabled by the derived class.<br />
754 /// <param name="index">The property index of the visual used to reference visual.</param>
755 /// <param name="visual">The visual to register.</param>
756 /// <param name="enabled">False if derived class wants to control when the visual is set on the stage.</param>
757 /// <since_tizen> 6 </since_tizen>
758 [EditorBrowsable(EditorBrowsableState.Never)]
759 protected void RegisterVisual(int index, VisualBase visual, bool enabled)
761 customView.RegisterVisual(index, visual, enabled);
765 /// Erases the entry matching the given index from the list of registered visuals.
767 /// <param name="index">The property index of the visual used to reference visual.</param>
768 /// <since_tizen> 6 </since_tizen>
769 [EditorBrowsable(EditorBrowsableState.Never)]
770 protected void UnregisterVisual(int index)
772 customView.UnregisterVisual(index);
776 /// Retrieves the visual associated with the given property index.<br />
777 /// For managing the object lifecycle, do not store the returned visual as a member which increments its reference count.<br />
779 /// <param name="index">The property index of the visual used to reference visual.</param>
780 /// <returns>The registered visual if exists, otherwise an empty handle.</returns>
781 /// <since_tizen> 6 </since_tizen>
782 [EditorBrowsable(EditorBrowsableState.Never)]
783 protected VisualBase GetVisual(int index)
785 return customView.GetVisual(index);
789 /// Sets the given visual to be displayed or not when parent staged.<br />
790 /// For managing the object lifecycle, do not store the returned visual as a member which increments its reference count.<br />
792 /// <param name="index">The property index of the visual, used to reference visual.</param>
793 /// <param name="enable">Flag set to enabled or disabled.</param>
794 /// <since_tizen> 6 </since_tizen>
795 [EditorBrowsable(EditorBrowsableState.Never)]
796 protected void EnableVisual(int index, bool enable)
798 customView.EnableVisual(index, enable);
802 /// Queries if the given visual is to be displayed when parent staged.<br />
803 /// For managing the object lifecycle, do not store the returned visual as a member which increments its reference count.<br />
805 /// <param name="index">The property index of the visual.</param>
806 /// <returns>Whether visual is enabled or not.</returns>
807 /// <since_tizen> 6 </since_tizen>
808 [EditorBrowsable(EditorBrowsableState.Never)]
809 protected bool IsVisualEnabled(int index)
811 return customView.IsVisualEnabled(index);
815 /// Creates a transition effect on the control.
817 /// <param name="transitionData">The transition data describing the effect to create.</param>
818 /// <returns>A handle to an animation defined with the given effect, or an empty handle if no properties match.</returns>
819 /// <since_tizen> 6 </since_tizen>
820 [EditorBrowsable(EditorBrowsableState.Never)]
821 protected Animation CreateTransition(TransitionData transitionData)
823 return customView.CreateTransition(transitionData);
827 /// Emits the KeyInputFocusGained signal if true, else, emits the KeyInputFocusLost signal.<br />
828 /// Should be called last by the control after it acts on the input focus change.<br />
830 /// <param name="focusGained">True if gained, false if lost.</param>
831 /// <since_tizen> 6 </since_tizen>
832 [EditorBrowsable(EditorBrowsableState.Never)]
833 protected void EmitFocusSignal(bool focusGained)
835 customView.EmitFocusSignal(focusGained);