2 * Copyright(c) 2022 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.
19 using System.ComponentModel;
20 using global::System.Diagnostics;
22 namespace Tizen.NUI.BaseComponents
25 /// View is the base class for all views.
27 /// <since_tizen> 3 </since_tizen>
28 public partial class View
30 internal string styleName;
32 internal virtual LayoutItem CreateDefaultLayout()
34 return new AbsoluteLayout();
37 internal class ThemeData
40 private enum States : byte
43 ControlStatePropagation = 1 << 0,
44 ThemeChangeSensitive = 1 << 1,
45 ThemeApplied = 1 << 2, // It is true when the view has valid style name or the platform theme has a component style for this view type.
46 // That indicates the view can have different styles by theme.
47 // Hence if the current state has ThemeApplied and ThemeChangeSensitive, the view will change its style by theme changing.
48 ListeningThemeChangeEvent = 1 << 3,
51 private States states = ThemeManager.ApplicationThemeChangeSensitive ? States.ThemeChangeSensitive : States.None;
52 public ViewStyle viewStyle;
53 public ControlState controlStates = ControlState.Normal;
54 public ViewSelectorData selectorData;
56 public bool ControlStatePropagation
58 get => ((states & States.ControlStatePropagation) != 0);
59 set => SetOption(States.ControlStatePropagation, value);
62 public bool ThemeChangeSensitive
64 get => ((states & States.ThemeChangeSensitive) != 0);
65 set => SetOption(States.ThemeChangeSensitive, value);
68 public bool ThemeApplied
70 get => ((states & States.ThemeApplied) != 0);
71 set => SetOption(States.ThemeApplied, value);
74 public bool ListeningThemeChangeEvent
76 get => ((states & States.ListeningThemeChangeEvent) != 0);
77 set => SetOption(States.ListeningThemeChangeEvent, value);
80 private void SetOption(States option, bool value)
82 if (value) states |= option;
83 else states &= ~option;
88 /// The color mode of View.
89 /// This specifies whether the View uses its own color, or inherits its parent color.
90 /// The default is ColorMode.UseOwnMultiplyParentColor.
92 internal ColorMode ColorMode
100 return GetColorMode();
104 internal LayoutLength SuggestedMinimumWidth
108 float result = Interop.Actor.GetSuggestedMinimumWidth(SwigCPtr);
109 if (NDalicPINVOKE.SWIGPendingException.Pending)
110 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111 return new LayoutLength(result);
115 internal LayoutLength SuggestedMinimumHeight
119 float result = Interop.Actor.GetSuggestedMinimumHeight(SwigCPtr);
120 if (NDalicPINVOKE.SWIGPendingException.Pending)
121 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
122 return new LayoutLength(result);
126 internal float WorldPositionX
130 float returnValue = 0.0f;
131 PropertyValue wordPositionX = GetProperty(View.Property.WorldPositionX);
132 wordPositionX?.Get(out returnValue);
133 wordPositionX?.Dispose();
138 internal float WorldPositionY
142 float returnValue = 0.0f;
143 PropertyValue wordPositionY = GetProperty(View.Property.WorldPositionY);
144 wordPositionY?.Get(out returnValue);
145 wordPositionY?.Dispose();
150 internal float WorldPositionZ
154 float returnValue = 0.0f;
155 PropertyValue wordPositionZ = GetProperty(View.Property.WorldPositionZ);
156 wordPositionZ?.Get(out returnValue);
157 wordPositionZ?.Dispose();
162 internal bool FocusState
166 return IsKeyboardFocusable();
170 SetKeyboardFocusable(value);
174 internal void SetLayout(LayoutItem layout)
178 this.layout = layout;
179 this.layout?.AttachToOwner(this);
180 this.layout?.RequestLayout();
183 internal void AttachTransitionsToChildren(LayoutTransition transition)
185 // Iterate children, adding the transition unless a transition
186 // for the same condition and property has already been
188 foreach (View view in Children)
190 LayoutTransitionsHelper.AddTransitionForCondition(view.LayoutTransitions, transition.Condition, transition, false);
194 internal float ParentOriginX
198 float returnValue = 0.0f;
199 PropertyValue parentOriginX = GetProperty(View.Property.ParentOriginX);
200 parentOriginX?.Get(out returnValue);
201 parentOriginX?.Dispose();
206 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
207 SetProperty(View.Property.ParentOriginX, setValue);
209 NotifyPropertyChanged();
213 internal float ParentOriginY
217 float returnValue = 0.0f;
218 PropertyValue parentOriginY = GetProperty(View.Property.ParentOriginY);
219 parentOriginY?.Get(out returnValue);
220 parentOriginY?.Dispose();
225 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
226 SetProperty(View.Property.ParentOriginY, setValue);
228 NotifyPropertyChanged();
232 internal float ParentOriginZ
236 float returnValue = 0.0f;
237 PropertyValue parentOriginZ = GetProperty(View.Property.ParentOriginZ);
238 parentOriginZ?.Get(out returnValue);
239 parentOriginZ?.Dispose();
244 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
245 SetProperty(View.Property.ParentOriginZ, setValue);
247 NotifyPropertyChanged();
251 internal float PivotPointX
255 float returnValue = 0.0f;
256 PropertyValue anchorPointX = GetProperty(View.Property.AnchorPointX);
257 anchorPointX?.Get(out returnValue);
258 anchorPointX?.Dispose();
263 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
264 SetProperty(View.Property.AnchorPointX, setValue);
269 internal float PivotPointY
273 float returnValue = 0.0f;
274 PropertyValue anchorPointY = GetProperty(View.Property.AnchorPointY);
275 anchorPointY?.Get(out returnValue);
276 anchorPointY?.Dispose();
281 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
282 SetProperty(View.Property.AnchorPointY, setValue);
287 internal float PivotPointZ
291 float returnValue = 0.0f;
292 PropertyValue anchorPointZ = GetProperty(View.Property.AnchorPointZ);
293 anchorPointZ?.Get(out returnValue);
294 anchorPointZ?.Dispose();
299 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
300 SetProperty(View.Property.AnchorPointZ, setValue);
305 internal Matrix WorldMatrix
309 Matrix returnValue = new Matrix();
310 PropertyValue wordMatrix = GetProperty(View.Property.WorldMatrix);
311 wordMatrix?.Get(returnValue);
312 wordMatrix?.Dispose();
318 /// The number of layouts including view's layout and children's layouts.
319 /// This can be used to set/unset Process callback to calculate Layout.
321 internal int LayoutCount
330 if (layoutCount == value) return;
332 if (value < 0) throw new global::System.ArgumentOutOfRangeException(nameof(LayoutCount), "LayoutCount(" + LayoutCount + ") should not be less than zero");
334 int diff = value - layoutCount;
337 if (InternalParent != null)
339 var parentView = InternalParent as View;
340 if (parentView != null)
342 parentView.LayoutCount += diff;
346 var parentLayer = InternalParent as Layer;
347 if (parentLayer != null)
349 parentLayer.LayoutCount += diff;
357 /// Indicates that this View should listen Touch event to handle its ControlState.
359 private bool enableControlState = false;
361 private int LeftFocusableViewId
366 PropertyValue leftFocusableViewId = GetProperty(View.Property.LeftFocusableViewId);
367 leftFocusableViewId?.Get(out returnValue);
368 leftFocusableViewId?.Dispose();
373 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
374 SetProperty(View.Property.LeftFocusableViewId, setValue);
379 private int RightFocusableViewId
384 PropertyValue rightFocusableViewId = GetProperty(View.Property.RightFocusableViewId);
385 rightFocusableViewId?.Get(out returnValue);
386 rightFocusableViewId?.Dispose();
391 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
392 SetProperty(View.Property.RightFocusableViewId, setValue);
397 private int UpFocusableViewId
402 PropertyValue upFocusableViewId = GetProperty(View.Property.UpFocusableViewId);
403 upFocusableViewId?.Get(out returnValue);
404 upFocusableViewId?.Dispose();
409 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
410 SetProperty(View.Property.UpFocusableViewId, setValue);
415 private int DownFocusableViewId
420 PropertyValue downFocusableViewId = GetProperty(View.Property.DownFocusableViewId);
421 downFocusableViewId?.Get(out returnValue);
422 downFocusableViewId?.Dispose();
427 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
428 SetProperty(View.Property.DownFocusableViewId, setValue);
433 private int ClockwiseFocusableViewId
437 int returnValue = -1;
438 PropertyValue clockwiseFocusableViewId = GetProperty(View.Property.ClockwiseFocusableViewId);
439 clockwiseFocusableViewId?.Get(out returnValue);
440 clockwiseFocusableViewId?.Dispose();
445 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
446 SetProperty(View.Property.ClockwiseFocusableViewId, setValue);
451 private int CounterClockwiseFocusableViewId
455 int returnValue = -1;
456 PropertyValue counterClockwiseFocusableViewId = GetProperty(View.Property.CounterClockwiseFocusableViewId);
457 counterClockwiseFocusableViewId?.Get(out returnValue);
458 counterClockwiseFocusableViewId?.Dispose();
463 PropertyValue setValue = new Tizen.NUI.PropertyValue(value);
464 SetProperty(View.Property.CounterClockwiseFocusableViewId, setValue);
469 internal string GetName()
471 string ret = Interop.Actor.GetName(SwigCPtr);
472 if (NDalicPINVOKE.SWIGPendingException.Pending)
473 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
477 internal void SetName(string name)
479 Interop.Actor.SetName(SwigCPtr, name);
480 if (NDalicPINVOKE.SWIGPendingException.Pending)
481 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
484 internal uint GetId()
486 uint ret = Interop.Actor.GetId(SwigCPtr);
487 if (NDalicPINVOKE.SWIGPendingException.Pending)
488 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
492 internal bool IsRoot()
494 bool ret = Interop.ActorInternal.IsRoot(SwigCPtr);
495 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
499 internal bool OnWindow()
501 bool ret = Interop.Actor.OnStage(SwigCPtr);
502 if (NDalicPINVOKE.SWIGPendingException.Pending)
503 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
507 internal View FindChildById(uint id)
509 //to fix memory leak issue, match the handle count with native side.
510 IntPtr cPtr = Interop.Actor.FindChildById(SwigCPtr, id);
511 View ret = this.GetInstanceSafely<View>(cPtr);
512 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
516 internal override View FindCurrentChildById(uint id)
518 return FindChildById(id);
521 internal void SetParentOrigin(Vector3 origin)
523 Interop.ActorInternal.SetParentOrigin(SwigCPtr, Vector3.getCPtr(origin));
524 if (NDalicPINVOKE.SWIGPendingException.Pending)
525 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
528 internal Vector3 GetCurrentParentOrigin()
530 Vector3 ret = new Vector3(Interop.ActorInternal.GetCurrentParentOrigin(SwigCPtr), true);
531 if (NDalicPINVOKE.SWIGPendingException.Pending)
532 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
536 internal void SetAnchorPoint(Vector3 anchorPoint)
538 Interop.Actor.SetAnchorPoint(SwigCPtr, Vector3.getCPtr(anchorPoint));
539 if (NDalicPINVOKE.SWIGPendingException.Pending)
540 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
543 internal Vector3 GetCurrentAnchorPoint()
545 Vector3 ret = new Vector3(Interop.ActorInternal.GetCurrentAnchorPoint(SwigCPtr), true);
546 if (NDalicPINVOKE.SWIGPendingException.Pending)
547 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
551 internal void SetSize(float width, float height)
553 Interop.ActorInternal.SetSize(SwigCPtr, width, height);
554 if (NDalicPINVOKE.SWIGPendingException.Pending)
555 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
558 internal void SetSize(float width, float height, float depth)
560 Interop.ActorInternal.SetSize(SwigCPtr, width, height, depth);
561 if (NDalicPINVOKE.SWIGPendingException.Pending)
562 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
565 internal void SetSize(Vector2 size)
567 Interop.ActorInternal.SetSizeVector2(SwigCPtr, Vector2.getCPtr(size));
568 if (NDalicPINVOKE.SWIGPendingException.Pending)
569 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
572 internal void SetSize(Vector3 size)
574 Interop.ActorInternal.SetSizeVector3(SwigCPtr, Vector3.getCPtr(size));
575 if (NDalicPINVOKE.SWIGPendingException.Pending)
576 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
579 internal Vector3 GetTargetSize()
581 Vector3 ret = new Vector3(Interop.ActorInternal.GetTargetSize(SwigCPtr), true);
582 if (NDalicPINVOKE.SWIGPendingException.Pending)
583 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
587 internal Size2D GetCurrentSize()
589 Size ret = new Size(Interop.Actor.GetCurrentSize(SwigCPtr), true);
590 if (NDalicPINVOKE.SWIGPendingException.Pending)
591 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
592 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
597 internal Size2D GetCurrentSizeFloat()
599 Size ret = new Size(Interop.Actor.GetCurrentSize(SwigCPtr), true);
600 if (NDalicPINVOKE.SWIGPendingException.Pending)
601 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
606 /// GetNaturalSize() function behaviour can be changed for each subclass of View.
607 /// So we make GetNaturalSize() function virtual, and make subclass can define it's owned logic
609 internal virtual Vector3 GetNaturalSize()
611 Vector3 ret = new Vector3(Interop.Actor.GetNaturalSize(SwigCPtr), true);
612 if (NDalicPINVOKE.SWIGPendingException.Pending)
613 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
617 internal void SetPosition(float x, float y)
619 Interop.ActorInternal.SetPosition(SwigCPtr, x, y);
620 if (NDalicPINVOKE.SWIGPendingException.Pending)
621 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
624 internal void SetPosition(float x, float y, float z)
626 Interop.ActorInternal.SetPosition(SwigCPtr, x, y, z);
627 if (NDalicPINVOKE.SWIGPendingException.Pending)
628 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
631 internal void SetPosition(Vector3 position)
633 Interop.ActorInternal.SetPosition(SwigCPtr, Vector3.getCPtr(position));
634 if (NDalicPINVOKE.SWIGPendingException.Pending)
635 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
638 internal void SetX(float x)
640 Interop.ActorInternal.SetX(SwigCPtr, x);
641 if (NDalicPINVOKE.SWIGPendingException.Pending)
642 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
645 internal void SetY(float y)
647 Interop.ActorInternal.SetY(SwigCPtr, y);
648 if (NDalicPINVOKE.SWIGPendingException.Pending)
649 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
652 internal void SetZ(float z)
654 Interop.ActorInternal.SetZ(SwigCPtr, z);
655 if (NDalicPINVOKE.SWIGPendingException.Pending)
656 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
659 internal void TranslateBy(Vector3 distance)
661 Interop.ActorInternal.TranslateBy(SwigCPtr, Vector3.getCPtr(distance));
662 if (NDalicPINVOKE.SWIGPendingException.Pending)
663 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
666 internal Position GetCurrentPosition()
668 Position ret = new Position(Interop.Actor.GetCurrentPosition(SwigCPtr), true);
669 if (NDalicPINVOKE.SWIGPendingException.Pending)
670 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
674 internal Vector3 GetCurrentWorldPosition()
676 Vector3 ret = new Vector3(Interop.ActorInternal.GetCurrentWorldPosition(SwigCPtr), true);
677 if (NDalicPINVOKE.SWIGPendingException.Pending)
678 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
682 internal void SetInheritPosition(bool inherit)
684 Interop.ActorInternal.SetInheritPosition(SwigCPtr, inherit);
685 if (NDalicPINVOKE.SWIGPendingException.Pending)
686 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
689 internal bool IsPositionInherited()
691 bool ret = Interop.ActorInternal.IsPositionInherited(SwigCPtr);
692 if (NDalicPINVOKE.SWIGPendingException.Pending)
693 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
697 internal void SetOrientation(Degree angle, Vector3 axis)
699 Interop.ActorInternal.SetOrientationDegree(SwigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
700 if (NDalicPINVOKE.SWIGPendingException.Pending)
701 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
704 internal void SetOrientation(Radian angle, Vector3 axis)
706 Interop.ActorInternal.SetOrientationRadian(SwigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
707 if (NDalicPINVOKE.SWIGPendingException.Pending)
708 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
711 internal void SetOrientation(Rotation orientation)
713 Interop.ActorInternal.SetOrientationQuaternion(SwigCPtr, Rotation.getCPtr(orientation));
714 if (NDalicPINVOKE.SWIGPendingException.Pending)
715 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
718 internal Rotation GetCurrentOrientation()
720 Rotation ret = new Rotation(Interop.ActorInternal.GetCurrentOrientation(SwigCPtr), true);
721 if (NDalicPINVOKE.SWIGPendingException.Pending)
722 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
726 internal void SetInheritOrientation(bool inherit)
728 Interop.ActorInternal.SetInheritOrientation(SwigCPtr, inherit);
729 if (NDalicPINVOKE.SWIGPendingException.Pending)
730 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
733 internal bool IsOrientationInherited()
735 bool ret = Interop.ActorInternal.IsOrientationInherited(SwigCPtr);
736 if (NDalicPINVOKE.SWIGPendingException.Pending)
737 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
741 internal Rotation GetCurrentWorldOrientation()
743 Rotation ret = new Rotation(Interop.ActorInternal.GetCurrentWorldOrientation(SwigCPtr), true);
744 if (NDalicPINVOKE.SWIGPendingException.Pending)
745 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
749 internal void SetScale(float scale)
751 Interop.ActorInternal.SetScale(SwigCPtr, scale);
752 if (NDalicPINVOKE.SWIGPendingException.Pending)
753 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
756 internal void SetScale(float scaleX, float scaleY, float scaleZ)
758 Interop.ActorInternal.SetScale(SwigCPtr, scaleX, scaleY, scaleZ);
759 if (NDalicPINVOKE.SWIGPendingException.Pending)
760 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
763 internal void SetScale(Vector3 scale)
765 Interop.ActorInternal.SetScale(SwigCPtr, Vector3.getCPtr(scale));
766 if (NDalicPINVOKE.SWIGPendingException.Pending)
767 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
770 internal Vector3 GetCurrentScale()
772 Vector3 ret = new Vector3(Interop.ActorInternal.GetCurrentScale(SwigCPtr), true);
773 if (NDalicPINVOKE.SWIGPendingException.Pending)
774 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
778 internal Vector3 GetCurrentWorldScale()
780 Vector3 ret = new Vector3(Interop.ActorInternal.GetCurrentWorldScale(SwigCPtr), true);
781 if (NDalicPINVOKE.SWIGPendingException.Pending)
782 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
786 internal void SetInheritScale(bool inherit)
788 Interop.ActorInternal.SetInheritScale(SwigCPtr, inherit);
789 if (NDalicPINVOKE.SWIGPendingException.Pending)
790 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
793 internal bool IsScaleInherited()
795 bool ret = Interop.ActorInternal.IsScaleInherited(SwigCPtr);
796 if (NDalicPINVOKE.SWIGPendingException.Pending)
797 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
801 internal Matrix GetCurrentWorldMatrix()
803 Matrix ret = new Matrix(Interop.ActorInternal.GetCurrentWorldMatrix(SwigCPtr), true);
804 if (NDalicPINVOKE.SWIGPendingException.Pending)
805 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
809 internal void SetVisible(bool visible)
811 Interop.Actor.SetVisible(SwigCPtr, visible);
812 if (NDalicPINVOKE.SWIGPendingException.Pending)
813 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
816 internal bool IsVisible()
818 bool ret = Interop.ActorInternal.IsVisible(SwigCPtr);
819 if (NDalicPINVOKE.SWIGPendingException.Pending)
820 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
824 internal void SetOpacity(float opacity)
826 Interop.ActorInternal.SetOpacity(SwigCPtr, opacity);
827 if (NDalicPINVOKE.SWIGPendingException.Pending)
828 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
831 internal float GetCurrentOpacity()
833 float ret = Interop.ActorInternal.GetCurrentOpacity(SwigCPtr);
834 if (NDalicPINVOKE.SWIGPendingException.Pending)
835 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
839 internal Vector4 GetCurrentColor()
841 Vector4 ret = new Vector4(Interop.ActorInternal.GetCurrentColor(SwigCPtr), true);
842 if (NDalicPINVOKE.SWIGPendingException.Pending)
843 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
846 internal ColorMode GetColorMode()
848 ColorMode ret = (ColorMode)Interop.ActorInternal.GetColorMode(SwigCPtr);
849 if (NDalicPINVOKE.SWIGPendingException.Pending)
850 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
854 internal Vector4 GetCurrentWorldColor()
856 Vector4 ret = new Vector4(Interop.ActorInternal.GetCurrentWorldColor(SwigCPtr), true);
857 if (NDalicPINVOKE.SWIGPendingException.Pending)
858 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
862 internal void SetDrawMode(DrawModeType drawMode)
864 Interop.ActorInternal.SetDrawMode(SwigCPtr, (int)drawMode);
865 if (NDalicPINVOKE.SWIGPendingException.Pending)
866 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
869 internal DrawModeType GetDrawMode()
871 DrawModeType ret = (DrawModeType)Interop.ActorInternal.GetDrawMode(SwigCPtr);
872 if (NDalicPINVOKE.SWIGPendingException.Pending)
873 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
877 internal void SetKeyboardFocusable(bool focusable)
879 Interop.ActorInternal.SetKeyboardFocusable(SwigCPtr, focusable);
880 if (NDalicPINVOKE.SWIGPendingException.Pending)
881 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
884 internal bool IsKeyboardFocusable()
886 bool ret = Interop.ActorInternal.IsKeyboardFocusable(SwigCPtr);
887 if (NDalicPINVOKE.SWIGPendingException.Pending)
888 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
892 internal void SetKeyboardFocusableChildren(bool focusable)
894 Interop.ActorInternal.SetKeyboardFocusableChildren(SwigCPtr, focusable);
895 if (NDalicPINVOKE.SWIGPendingException.Pending)
896 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
899 internal bool AreChildrenKeyBoardFocusable()
901 bool ret = Interop.ActorInternal.AreChildrenKeyBoardFocusable(SwigCPtr);
902 if (NDalicPINVOKE.SWIGPendingException.Pending)
903 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
907 internal void SetFocusableInTouch(bool enabled)
909 Interop.ActorInternal.SetFocusableInTouch(SwigCPtr, enabled);
910 if (NDalicPINVOKE.SWIGPendingException.Pending)
911 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
914 internal bool IsFocusableInTouch()
916 bool ret = Interop.ActorInternal.IsFocusableInTouch(SwigCPtr);
917 if (NDalicPINVOKE.SWIGPendingException.Pending)
918 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
922 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
924 Interop.Actor.SetResizePolicy(SwigCPtr, (int)policy, (int)dimension);
925 if (NDalicPINVOKE.SWIGPendingException.Pending)
926 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
929 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
931 ResizePolicyType ret = (ResizePolicyType)Interop.Actor.GetResizePolicy(SwigCPtr, (int)dimension);
932 if (NDalicPINVOKE.SWIGPendingException.Pending)
933 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
937 internal Vector3 GetSizeModeFactor()
939 Vector3 ret = new Vector3(Interop.Actor.GetSizeModeFactor(SwigCPtr), true);
940 if (NDalicPINVOKE.SWIGPendingException.Pending)
941 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
945 internal void SetMinimumSize(Vector2 size)
947 Interop.ActorInternal.SetMinimumSize(SwigCPtr, Vector2.getCPtr(size));
948 if (NDalicPINVOKE.SWIGPendingException.Pending)
949 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
952 internal Vector2 GetMinimumSize()
954 Vector2 ret = new Vector2(Interop.ActorInternal.GetMinimumSize(SwigCPtr), true);
955 if (NDalicPINVOKE.SWIGPendingException.Pending)
956 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
960 internal void SetMaximumSize(Vector2 size)
962 Interop.ActorInternal.SetMaximumSize(SwigCPtr, Vector2.getCPtr(size));
963 if (NDalicPINVOKE.SWIGPendingException.Pending)
964 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
967 internal Vector2 GetMaximumSize()
969 Vector2 ret = new Vector2(Interop.ActorInternal.GetMaximumSize(SwigCPtr), true);
970 if (NDalicPINVOKE.SWIGPendingException.Pending)
971 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
975 internal int GetHierarchyDepth()
977 int ret = Interop.Actor.GetHierarchyDepth(SwigCPtr);
978 if (NDalicPINVOKE.SWIGPendingException.Pending)
979 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
983 internal uint GetRendererCount()
985 uint ret = Interop.Actor.GetRendererCount(SwigCPtr);
986 if (NDalicPINVOKE.SWIGPendingException.Pending)
987 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
991 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
993 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
996 internal bool IsTopLevelView()
998 if (GetParent() is Layer)
1005 internal void SetKeyInputFocus()
1007 Interop.ViewInternal.SetKeyInputFocus(SwigCPtr);
1008 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1011 internal void ClearKeyInputFocus()
1013 Interop.ViewInternal.ClearKeyInputFocus(SwigCPtr);
1014 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1017 internal PinchGestureDetector GetPinchGestureDetector()
1019 PinchGestureDetector ret = new PinchGestureDetector(Interop.ViewInternal.GetPinchGestureDetector(SwigCPtr), true);
1020 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1024 internal PanGestureDetector GetPanGestureDetector()
1026 PanGestureDetector ret = new PanGestureDetector(Interop.ViewInternal.GetPanGestureDetector(SwigCPtr), true);
1027 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1031 internal TapGestureDetector GetTapGestureDetector()
1033 TapGestureDetector ret = new TapGestureDetector(Interop.ViewInternal.GetTapGestureDetector(SwigCPtr), true);
1034 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1038 internal LongPressGestureDetector GetLongPressGestureDetector()
1040 LongPressGestureDetector ret = new LongPressGestureDetector(Interop.ViewInternal.GetLongPressGestureDetector(SwigCPtr), true);
1041 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1045 internal IntPtr GetPtrfromView()
1047 return (IntPtr)SwigCPtr;
1050 internal void RemoveChild(View child)
1052 // Do actual child removal
1053 Interop.Actor.Remove(SwigCPtr, View.getCPtr(child));
1054 if (NDalicPINVOKE.SWIGPendingException.Pending)
1055 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1057 Children.Remove(child);
1058 child.InternalParent = null;
1059 LayoutCount -= child.LayoutCount;
1061 OnChildRemoved(child);
1062 if (ChildRemoved != null)
1064 ChildRemovedEventArgs e = new ChildRemovedEventArgs
1068 ChildRemoved(this, e);
1073 /// Removes the layout from this View.
1075 internal void ResetLayout()
1082 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
1084 return (ResourceLoadingStatusType)Interop.View.GetVisualResourceStatus(this.SwigCPtr, Property.BACKGROUND);
1087 /// TODO open as a protected level
1088 internal virtual void ApplyCornerRadius()
1090 if (backgroundExtraData == null) return;
1092 var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
1093 var cornerRadiusPolicyValue = new PropertyValue((int)backgroundExtraData.CornerRadiusPolicy);
1095 // Make current propertyMap
1096 PropertyMap currentPropertyMap = new PropertyMap();
1097 currentPropertyMap[Visual.Property.CornerRadius] = cornerRadiusValue;
1098 currentPropertyMap[Visual.Property.CornerRadiusPolicy] = cornerRadiusPolicyValue;
1099 var temp = new PropertyValue(currentPropertyMap);
1101 // Update corner radius properties to background and shadow by ActionUpdateProperty
1102 DoAction(View.Property.BACKGROUND, ActionUpdateProperty, temp);
1103 DoAction(View.Property.SHADOW, ActionUpdateProperty, temp);
1106 currentPropertyMap.Dispose();
1107 cornerRadiusValue.Dispose();
1108 cornerRadiusPolicyValue.Dispose();
1111 /// TODO open as a protected level
1112 internal virtual void ApplyBorderline()
1114 if (backgroundExtraData == null) return;
1116 // ActionUpdateProperty works well only if BACKGROUND visual setup before.
1117 // If view don't have BACKGROUND visual, we set transparent background color in default.
1118 using (PropertyMap backgroundPropertyMap = new PropertyMap())
1120 using (PropertyValue propertyValue = Object.GetProperty(SwigCPtr, Property.BACKGROUND))
1122 propertyValue?.Get(backgroundPropertyMap);
1123 if (backgroundPropertyMap.Empty())
1125 // BACKGROUND visual doesn't exist.
1126 SetBackgroundColor(Color.Transparent);
1127 // SetBackgroundColor function apply borderline internally.
1128 // So we can just return now.
1134 var borderlineWidthValue = new PropertyValue(backgroundExtraData.BorderlineWidth);
1135 var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
1136 var borderlineOffsetValue = new PropertyValue(backgroundExtraData.BorderlineOffset);
1138 // Make current propertyMap
1139 PropertyMap currentPropertyMap = new PropertyMap();
1140 currentPropertyMap[Visual.Property.BorderlineWidth] = borderlineWidthValue;
1141 currentPropertyMap[Visual.Property.BorderlineColor] = borderlineColorValue;
1142 currentPropertyMap[Visual.Property.BorderlineOffset] = borderlineOffsetValue;
1143 var temp = new PropertyValue(currentPropertyMap);
1145 // Update borderline properties to background by ActionUpdateProperty
1146 DoAction(View.Property.BACKGROUND, ActionUpdateProperty, temp);
1149 currentPropertyMap.Dispose();
1150 borderlineWidthValue.Dispose();
1151 borderlineColorValue.Dispose();
1152 borderlineOffsetValue.Dispose();
1156 /// Get selector value from the triggerable selector or related property.
1158 internal Selector<T> GetSelector<T>(TriggerableSelector<T> triggerableSelector, NUI.Binding.BindableProperty relatedProperty)
1160 var selector = triggerableSelector?.Get();
1161 if (selector != null)
1166 var value = (T)GetValue(relatedProperty);
1167 return value == null ? null : new Selector<T>(value);
1170 internal void SetThemeApplied()
1172 if (themeData == null) themeData = new ThemeData();
1173 themeData.ThemeApplied = true;
1175 if (ThemeChangeSensitive && !themeData.ListeningThemeChangeEvent)
1177 themeData.ListeningThemeChangeEvent = true;
1178 ThemeManager.ThemeChangedInternal.Add(OnThemeChanged);
1183 /// you can override it to clean-up your own resources.
1185 /// <param name="type">DisposeTypes</param>
1186 /// <since_tizen> 3 </since_tizen>
1187 protected override void Dispose(DisposeTypes type)
1194 disposeDebugging(type);
1196 //_mergedStyle = null;
1198 internalMaximumSize?.Dispose();
1199 internalMaximumSize = null;
1200 internalMinimumSize?.Dispose();
1201 internalMinimumSize = null;
1202 internalMargin?.Dispose();
1203 internalMargin = null;
1204 internalPadding?.Dispose();
1205 internalPadding = null;
1206 internalSizeModeFactor?.Dispose();
1207 internalSizeModeFactor = null;
1208 internalCellIndex?.Dispose();
1209 internalCellIndex = null;
1210 internalBackgroundColor?.Dispose();
1211 internalBackgroundColor = null;
1212 internalColor?.Dispose();
1213 internalColor = null;
1214 internalPivotPoint?.Dispose();
1215 internalPivotPoint = null;
1216 internalPosition?.Dispose();
1217 internalPosition = null;
1218 internalPosition2D?.Dispose();
1219 internalPosition2D = null;
1220 internalScale?.Dispose();
1221 internalScale = null;
1222 internalSize?.Dispose();
1223 internalSize = null;
1224 internalSize2D?.Dispose();
1225 internalSize2D = null;
1227 if (type == DisposeTypes.Explicit)
1230 //Release your own managed resources here.
1231 //You should release all of your own disposable objects here.
1232 if (themeData != null)
1234 themeData.selectorData?.Reset(this);
1235 if (themeData.ListeningThemeChangeEvent)
1237 ThemeManager.ThemeChangedInternal.Remove(OnThemeChanged);
1240 if (widthConstraint != null)
1242 widthConstraint.Remove();
1243 widthConstraint.Dispose();
1245 if (heightConstraint != null)
1247 heightConstraint.Remove();
1248 heightConstraint.Dispose();
1252 //Release your own unmanaged resources here.
1253 //You should not access any managed member here except static instance.
1254 //because the execution order of Finalizes is non-deterministic.
1256 DisConnectFromSignals();
1258 foreach (View view in Children)
1260 view.InternalParent = null;
1265 NUILog.Debug($"[Dispose] View.Dispose({type}) END");
1266 NUILog.Debug($"=============================");
1271 /// This will not be public opened.
1272 [EditorBrowsable(EditorBrowsableState.Never)]
1273 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
1275 Interop.View.DeleteView(swigCPtr);
1279 /// The touch event handler for ControlState.
1280 /// Please change ControlState value by touch state if needed.
1282 /// <exception cref="ArgumentNullException"> Thrown when touch is null. </exception>
1283 [EditorBrowsable(EditorBrowsableState.Never)]
1284 protected virtual bool HandleControlStateOnTouch(Touch touch)
1288 throw new global::System.ArgumentNullException(nameof(touch));
1291 switch (touch.GetState(0))
1293 case PointStateType.Down:
1294 ControlState += ControlState.Pressed;
1296 case PointStateType.Interrupted:
1297 case PointStateType.Up:
1298 if (ControlState.Contains(ControlState.Pressed))
1300 ControlState -= ControlState.Pressed;
1310 /// Internal callback of enabled property changes.
1311 /// Inherited view can override this method to implements enabled property changes.
1313 [EditorBrowsable(EditorBrowsableState.Never)]
1314 protected virtual void OnEnabled(bool enabled)
1318 if (State == View.States.Disabled)
1320 State = View.States.Normal;
1322 if (enableControlState)
1324 ControlState -= ControlState.Disabled;
1329 State = View.States.Disabled;
1330 if (enableControlState)
1332 ControlState += ControlState.Disabled;
1338 private void DisConnectFromSignals()
1340 if (HasBody() == false)
1342 NUILog.Debug($"[Dispose] DisConnectFromSignals() No native body! No need to Disconnect Signals!");
1345 NUILog.Debug($"[Dispose] DisConnectFromSignals START");
1346 NUILog.Debug($"[Dispose] View.DisConnectFromSignals() type:{GetType()} copyNativeHandle:{GetBaseHandleCPtrHandleRef.Handle.ToString("X8")}");
1347 NUILog.Debug($"[Dispose] ID:{Interop.Actor.GetId(GetBaseHandleCPtrHandleRef)} Name:{Interop.Actor.GetName(GetBaseHandleCPtrHandleRef)}");
1349 if (onRelayoutEventCallback != null)
1351 NUILog.Debug($"[Dispose] onRelayoutEventCallback");
1353 using ViewSignal signal = new ViewSignal(Interop.ActorSignal.ActorOnRelayoutSignal(GetBaseHandleCPtrHandleRef), false);
1354 signal?.Disconnect(onRelayoutEventCallback);
1355 onRelayoutEventCallback = null;
1358 if (offWindowEventCallback != null)
1360 NUILog.Debug($"[Dispose] offWindowEventCallback");
1362 using ViewSignal signal = new ViewSignal(Interop.ActorSignal.ActorOffSceneSignal(GetBaseHandleCPtrHandleRef), false);
1363 signal?.Disconnect(offWindowEventCallback);
1364 offWindowEventCallback = null;
1367 if (onWindowEventCallback != null)
1369 NUILog.Debug($"[Dispose] onWindowEventCallback");
1371 using ViewSignal signal = new ViewSignal(Interop.ActorSignal.ActorOnSceneSignal(GetBaseHandleCPtrHandleRef), false);
1372 signal?.Disconnect(onWindowEventCallback);
1373 onWindowEventCallback = null;
1376 if (wheelEventCallback != null)
1378 NUILog.Debug($"[Dispose] wheelEventCallback");
1380 using WheelSignal signal = new WheelSignal(Interop.ActorSignal.ActorWheelEventSignal(GetBaseHandleCPtrHandleRef), false);
1381 signal?.Disconnect(wheelEventCallback);
1382 wheelEventCallback = null;
1385 if (hoverEventCallback != null)
1387 NUILog.Debug($"[Dispose] hoverEventCallback");
1389 using HoverSignal signal = new HoverSignal(Interop.ActorSignal.ActorHoveredSignal(GetBaseHandleCPtrHandleRef), false);
1390 signal?.Disconnect(hoverEventCallback);
1391 hoverEventCallback = null;
1394 if (hitTestResultDataCallback != null)
1396 NUILog.Debug($"[Dispose] hitTestResultDataCallback");
1398 using TouchDataSignal signal = new TouchDataSignal(Interop.ActorSignal.ActorHitTestResultSignal(GetBaseHandleCPtrHandleRef), false);
1399 signal?.Disconnect(hitTestResultDataCallback);
1400 hitTestResultDataCallback = null;
1404 if (interceptTouchDataCallback != null)
1406 NUILog.Debug($"[Dispose] interceptTouchDataCallback");
1408 using TouchDataSignal signal = new TouchDataSignal(Interop.ActorSignal.ActorInterceptTouchSignal(GetBaseHandleCPtrHandleRef), false);
1409 signal?.Disconnect(interceptTouchDataCallback);
1410 interceptTouchDataCallback = null;
1413 if (touchDataCallback != null)
1415 NUILog.Debug($"[Dispose] touchDataCallback");
1417 using TouchDataSignal signal = new TouchDataSignal(Interop.ActorSignal.ActorTouchSignal(GetBaseHandleCPtrHandleRef), false);
1418 signal?.Disconnect(touchDataCallback);
1419 touchDataCallback = null;
1422 if (ResourcesLoadedCallback != null)
1424 NUILog.Debug($"[Dispose] ResourcesLoadedCallback");
1426 using ViewSignal signal = new ViewSignal(Interop.View.ResourceReadySignal(GetBaseHandleCPtrHandleRef), false);
1427 signal?.Disconnect(ResourcesLoadedCallback);
1428 ResourcesLoadedCallback = null;
1431 if (keyCallback != null)
1433 NUILog.Debug($"[Dispose] keyCallback");
1435 using ControlKeySignal signal = new ControlKeySignal(Interop.ViewSignal.KeyEventSignal(GetBaseHandleCPtrHandleRef), false);
1436 signal?.Disconnect(keyCallback);
1440 if (keyInputFocusLostCallback != null)
1442 NUILog.Debug($"[Dispose] keyInputFocusLostCallback");
1444 using KeyInputFocusSignal signal = new KeyInputFocusSignal(Interop.ViewSignal.KeyInputFocusLostSignal(GetBaseHandleCPtrHandleRef), false);
1445 signal?.Disconnect(keyInputFocusLostCallback);
1446 keyInputFocusLostCallback = null;
1447 keyInputFocusLostEventHandler = null;
1450 if (keyInputFocusGainedCallback != null)
1452 NUILog.Debug($"[Dispose] keyInputFocusGainedCallback");
1454 using KeyInputFocusSignal signal = new KeyInputFocusSignal(Interop.ViewSignal.KeyInputFocusGainedSignal(GetBaseHandleCPtrHandleRef), false);
1455 signal?.Disconnect(keyInputFocusGainedCallback);
1456 keyInputFocusGainedCallback = null;
1457 keyInputFocusGainedEventHandler = null;
1460 if (backgroundResourceLoadedCallback != null)
1462 NUILog.Debug($"[Dispose] backgroundResourceLoadedCallback");
1464 using ViewSignal signal = new ViewSignal(Interop.View.ResourceReadySignal(GetBaseHandleCPtrHandleRef), false);
1465 signal?.Disconnect(backgroundResourceLoadedCallback);
1466 backgroundResourceLoadedCallback = null;
1469 if (onWindowSendEventCallback != null)
1471 NUILog.Debug($"[Dispose] onWindowSendEventCallback");
1473 using ViewSignal signal = new ViewSignal(Interop.ActorSignal.ActorOnSceneSignal(GetBaseHandleCPtrHandleRef), false);
1474 signal?.Disconnect(onWindowSendEventCallback);
1475 onWindowSendEventCallback = null;
1477 NUILog.Debug($"[Dispose] DisConnectFromSignals END");
1481 /// Apply initial style to the view.
1483 [EditorBrowsable(EditorBrowsableState.Never)]
1484 protected virtual void InitializeStyle(ViewStyle style = null)
1486 var initialStyle = ThemeManager.GetInitialStyleWithoutClone(GetType());
1489 ApplyStyle(initialStyle);
1493 var refinedStyle = style;
1494 if (style.IncludeDefaultStyle)
1496 refinedStyle = initialStyle?.Merge(style);
1498 ApplyStyle(refinedStyle);
1501 // Listen theme change event if needs.
1502 if (ThemeManager.PlatformThemeEnabled && initialStyle != null)
1508 private View ConvertIdToView(uint id)
1510 View view = GetParent()?.FindCurrentChildById(id);
1512 //If we can't find the parent's children, find in the top layer.
1515 Container parent = GetParent();
1516 while ((parent is View) && (parent != null))
1518 parent = parent.GetParent();
1519 if (parent is Layer)
1521 view = parent.FindCurrentChildById(id);
1530 private void OnScaleChanged(float x, float y, float z)
1532 Scale = new Vector3(x, y, z);
1535 private void OnBackgroundColorChanged(float r, float g, float b, float a)
1537 BackgroundColor = new Color(r, g, b, a);
1540 private void OnPaddingChanged(ushort start, ushort end, ushort top, ushort bottom)
1542 Padding = new Extents(start, end, top, bottom);
1545 private void OnMarginChanged(ushort start, ushort end, ushort top, ushort bottom)
1547 Margin = new Extents(start, end, top, bottom);
1550 private void OnAnchorPointChanged(float x, float y, float z)
1552 AnchorPoint = new Position(x, y, z);
1555 private void OnCellIndexChanged(float x, float y)
1557 CellIndex = new Vector2(x, y);
1560 private void OnFlexMarginChanged(float x, float y, float z, float w)
1562 FlexMargin = new Vector4(x, y, z, w);
1565 private void OnPaddingEXChanged(ushort start, ushort end, ushort top, ushort bottom)
1567 PaddingEX = new Extents(start, end, top, bottom);
1570 private void OnSizeModeFactorChanged(float x, float y, float z)
1572 SizeModeFactor = new Vector3(x, y, z);
1575 private bool EmptyOnTouch(object target, TouchEventArgs args)
1580 private ViewSelectorData EnsureSelectorData()
1582 if (themeData == null) themeData = new ThemeData();
1584 return themeData.selectorData ?? (themeData.selectorData = new ViewSelectorData());
1587 [Conditional("NUI_DEBUG_ON")]
1588 private void disposeDebugging(DisposeTypes type)
1590 DebugFileLogging.Instance.WriteLog($"View.Dispose({type}) START");
1591 DebugFileLogging.Instance.WriteLog($"type:{GetType()} copyNativeHandle:{GetBaseHandleCPtrHandleRef.Handle.ToString("X8")}");
1594 DebugFileLogging.Instance.WriteLog($"ID:{Interop.Actor.GetId(GetBaseHandleCPtrHandleRef)} Name:{Interop.Actor.GetName(GetBaseHandleCPtrHandleRef)}");
1598 DebugFileLogging.Instance.WriteLog($"has no native body!");