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 SetX(float x)
619 Interop.ActorInternal.SetX(SwigCPtr, x);
620 if (NDalicPINVOKE.SWIGPendingException.Pending)
621 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
624 internal void SetY(float y)
626 Interop.ActorInternal.SetY(SwigCPtr, y);
627 if (NDalicPINVOKE.SWIGPendingException.Pending)
628 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
631 internal void SetZ(float z)
633 Interop.ActorInternal.SetZ(SwigCPtr, z);
634 if (NDalicPINVOKE.SWIGPendingException.Pending)
635 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
638 internal void TranslateBy(Vector3 distance)
640 Interop.ActorInternal.TranslateBy(SwigCPtr, Vector3.getCPtr(distance));
641 if (NDalicPINVOKE.SWIGPendingException.Pending)
642 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
645 internal Position GetCurrentPosition()
647 Position ret = new Position(Interop.Actor.GetCurrentPosition(SwigCPtr), true);
648 if (NDalicPINVOKE.SWIGPendingException.Pending)
649 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
653 internal Vector3 GetCurrentWorldPosition()
655 Vector3 ret = new Vector3(Interop.ActorInternal.GetCurrentWorldPosition(SwigCPtr), true);
656 if (NDalicPINVOKE.SWIGPendingException.Pending)
657 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
661 internal void SetInheritPosition(bool inherit)
663 Interop.ActorInternal.SetInheritPosition(SwigCPtr, inherit);
664 if (NDalicPINVOKE.SWIGPendingException.Pending)
665 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
668 internal bool IsPositionInherited()
670 bool ret = Interop.ActorInternal.IsPositionInherited(SwigCPtr);
671 if (NDalicPINVOKE.SWIGPendingException.Pending)
672 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
676 internal void SetOrientation(Degree angle, Vector3 axis)
678 Interop.ActorInternal.SetOrientationDegree(SwigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
679 if (NDalicPINVOKE.SWIGPendingException.Pending)
680 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
683 internal void SetOrientation(Radian angle, Vector3 axis)
685 Interop.ActorInternal.SetOrientationRadian(SwigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
686 if (NDalicPINVOKE.SWIGPendingException.Pending)
687 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
690 internal void SetOrientation(Rotation orientation)
692 Interop.ActorInternal.SetOrientationQuaternion(SwigCPtr, Rotation.getCPtr(orientation));
693 if (NDalicPINVOKE.SWIGPendingException.Pending)
694 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
697 internal Rotation GetCurrentOrientation()
699 Rotation ret = new Rotation(Interop.ActorInternal.GetCurrentOrientation(SwigCPtr), true);
700 if (NDalicPINVOKE.SWIGPendingException.Pending)
701 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
705 internal void SetInheritOrientation(bool inherit)
707 Interop.ActorInternal.SetInheritOrientation(SwigCPtr, inherit);
708 if (NDalicPINVOKE.SWIGPendingException.Pending)
709 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
712 internal bool IsOrientationInherited()
714 bool ret = Interop.ActorInternal.IsOrientationInherited(SwigCPtr);
715 if (NDalicPINVOKE.SWIGPendingException.Pending)
716 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
720 internal Rotation GetCurrentWorldOrientation()
722 Rotation ret = new Rotation(Interop.ActorInternal.GetCurrentWorldOrientation(SwigCPtr), true);
723 if (NDalicPINVOKE.SWIGPendingException.Pending)
724 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
728 internal void SetScale(float scale)
730 Interop.ActorInternal.SetScale(SwigCPtr, scale);
731 if (NDalicPINVOKE.SWIGPendingException.Pending)
732 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
735 internal void SetScale(float scaleX, float scaleY, float scaleZ)
737 Interop.ActorInternal.SetScale(SwigCPtr, scaleX, scaleY, scaleZ);
738 if (NDalicPINVOKE.SWIGPendingException.Pending)
739 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
742 internal void SetScale(Vector3 scale)
744 Interop.ActorInternal.SetScale(SwigCPtr, Vector3.getCPtr(scale));
745 if (NDalicPINVOKE.SWIGPendingException.Pending)
746 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
749 internal Vector3 GetCurrentScale()
751 Vector3 ret = new Vector3(Interop.ActorInternal.GetCurrentScale(SwigCPtr), true);
752 if (NDalicPINVOKE.SWIGPendingException.Pending)
753 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
757 internal Vector3 GetCurrentWorldScale()
759 Vector3 ret = new Vector3(Interop.ActorInternal.GetCurrentWorldScale(SwigCPtr), true);
760 if (NDalicPINVOKE.SWIGPendingException.Pending)
761 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
765 internal void SetInheritScale(bool inherit)
767 Interop.ActorInternal.SetInheritScale(SwigCPtr, inherit);
768 if (NDalicPINVOKE.SWIGPendingException.Pending)
769 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
772 internal bool IsScaleInherited()
774 bool ret = Interop.ActorInternal.IsScaleInherited(SwigCPtr);
775 if (NDalicPINVOKE.SWIGPendingException.Pending)
776 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
780 internal Matrix GetCurrentWorldMatrix()
782 Matrix ret = new Matrix(Interop.ActorInternal.GetCurrentWorldMatrix(SwigCPtr), true);
783 if (NDalicPINVOKE.SWIGPendingException.Pending)
784 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
788 internal void SetVisible(bool visible)
790 Interop.Actor.SetVisible(SwigCPtr, visible);
791 if (NDalicPINVOKE.SWIGPendingException.Pending)
792 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
795 internal bool IsVisible()
797 bool ret = Interop.ActorInternal.IsVisible(SwigCPtr);
798 if (NDalicPINVOKE.SWIGPendingException.Pending)
799 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
803 internal void SetOpacity(float opacity)
805 Interop.ActorInternal.SetOpacity(SwigCPtr, opacity);
806 if (NDalicPINVOKE.SWIGPendingException.Pending)
807 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
810 internal float GetCurrentOpacity()
812 float ret = Interop.ActorInternal.GetCurrentOpacity(SwigCPtr);
813 if (NDalicPINVOKE.SWIGPendingException.Pending)
814 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
818 internal Vector4 GetCurrentColor()
820 Vector4 ret = new Vector4(Interop.ActorInternal.GetCurrentColor(SwigCPtr), true);
821 if (NDalicPINVOKE.SWIGPendingException.Pending)
822 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
825 internal ColorMode GetColorMode()
827 ColorMode ret = (ColorMode)Interop.ActorInternal.GetColorMode(SwigCPtr);
828 if (NDalicPINVOKE.SWIGPendingException.Pending)
829 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
833 internal Vector4 GetCurrentWorldColor()
835 Vector4 ret = new Vector4(Interop.ActorInternal.GetCurrentWorldColor(SwigCPtr), true);
836 if (NDalicPINVOKE.SWIGPendingException.Pending)
837 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
841 internal void SetDrawMode(DrawModeType drawMode)
843 Interop.ActorInternal.SetDrawMode(SwigCPtr, (int)drawMode);
844 if (NDalicPINVOKE.SWIGPendingException.Pending)
845 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
848 internal DrawModeType GetDrawMode()
850 DrawModeType ret = (DrawModeType)Interop.ActorInternal.GetDrawMode(SwigCPtr);
851 if (NDalicPINVOKE.SWIGPendingException.Pending)
852 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
856 internal void SetKeyboardFocusable(bool focusable)
858 Interop.ActorInternal.SetKeyboardFocusable(SwigCPtr, focusable);
859 if (NDalicPINVOKE.SWIGPendingException.Pending)
860 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
863 internal bool IsKeyboardFocusable()
865 bool ret = Interop.ActorInternal.IsKeyboardFocusable(SwigCPtr);
866 if (NDalicPINVOKE.SWIGPendingException.Pending)
867 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
871 internal void SetKeyboardFocusableChildren(bool focusable)
873 Interop.ActorInternal.SetKeyboardFocusableChildren(SwigCPtr, focusable);
874 if (NDalicPINVOKE.SWIGPendingException.Pending)
875 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
878 internal bool AreChildrenKeyBoardFocusable()
880 bool ret = Interop.ActorInternal.AreChildrenKeyBoardFocusable(SwigCPtr);
881 if (NDalicPINVOKE.SWIGPendingException.Pending)
882 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
886 internal void SetFocusableInTouch(bool enabled)
888 Interop.ActorInternal.SetFocusableInTouch(SwigCPtr, enabled);
889 if (NDalicPINVOKE.SWIGPendingException.Pending)
890 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
893 internal bool IsFocusableInTouch()
895 bool ret = Interop.ActorInternal.IsFocusableInTouch(SwigCPtr);
896 if (NDalicPINVOKE.SWIGPendingException.Pending)
897 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
901 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
903 Interop.Actor.SetResizePolicy(SwigCPtr, (int)policy, (int)dimension);
904 if (NDalicPINVOKE.SWIGPendingException.Pending)
905 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
908 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
910 ResizePolicyType ret = (ResizePolicyType)Interop.Actor.GetResizePolicy(SwigCPtr, (int)dimension);
911 if (NDalicPINVOKE.SWIGPendingException.Pending)
912 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
916 internal Vector3 GetSizeModeFactor()
918 Vector3 ret = new Vector3(Interop.Actor.GetSizeModeFactor(SwigCPtr), true);
919 if (NDalicPINVOKE.SWIGPendingException.Pending)
920 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
924 internal void SetMinimumSize(Vector2 size)
926 Interop.ActorInternal.SetMinimumSize(SwigCPtr, Vector2.getCPtr(size));
927 if (NDalicPINVOKE.SWIGPendingException.Pending)
928 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
931 internal Vector2 GetMinimumSize()
933 Vector2 ret = new Vector2(Interop.ActorInternal.GetMinimumSize(SwigCPtr), true);
934 if (NDalicPINVOKE.SWIGPendingException.Pending)
935 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
939 internal void SetMaximumSize(Vector2 size)
941 Interop.ActorInternal.SetMaximumSize(SwigCPtr, Vector2.getCPtr(size));
942 if (NDalicPINVOKE.SWIGPendingException.Pending)
943 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
946 internal Vector2 GetMaximumSize()
948 Vector2 ret = new Vector2(Interop.ActorInternal.GetMaximumSize(SwigCPtr), true);
949 if (NDalicPINVOKE.SWIGPendingException.Pending)
950 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
954 internal int GetHierarchyDepth()
956 int ret = Interop.Actor.GetHierarchyDepth(SwigCPtr);
957 if (NDalicPINVOKE.SWIGPendingException.Pending)
958 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
962 internal uint GetRendererCount()
964 uint ret = Interop.Actor.GetRendererCount(SwigCPtr);
965 if (NDalicPINVOKE.SWIGPendingException.Pending)
966 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
970 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
972 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
975 internal bool IsTopLevelView()
977 if (GetParent() is Layer)
984 internal void SetKeyInputFocus()
986 Interop.ViewInternal.SetKeyInputFocus(SwigCPtr);
987 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
990 internal void ClearKeyInputFocus()
992 Interop.ViewInternal.ClearKeyInputFocus(SwigCPtr);
993 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
996 internal PinchGestureDetector GetPinchGestureDetector()
998 PinchGestureDetector ret = new PinchGestureDetector(Interop.ViewInternal.GetPinchGestureDetector(SwigCPtr), true);
999 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1003 internal PanGestureDetector GetPanGestureDetector()
1005 PanGestureDetector ret = new PanGestureDetector(Interop.ViewInternal.GetPanGestureDetector(SwigCPtr), true);
1006 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1010 internal TapGestureDetector GetTapGestureDetector()
1012 TapGestureDetector ret = new TapGestureDetector(Interop.ViewInternal.GetTapGestureDetector(SwigCPtr), true);
1013 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1017 internal LongPressGestureDetector GetLongPressGestureDetector()
1019 LongPressGestureDetector ret = new LongPressGestureDetector(Interop.ViewInternal.GetLongPressGestureDetector(SwigCPtr), true);
1020 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1024 internal IntPtr GetPtrfromView()
1026 return (IntPtr)SwigCPtr;
1029 internal void RemoveChild(View child)
1031 // Do actual child removal
1032 Interop.Actor.Remove(SwigCPtr, View.getCPtr(child));
1033 if (NDalicPINVOKE.SWIGPendingException.Pending)
1034 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1036 Children.Remove(child);
1037 child.InternalParent = null;
1038 LayoutCount -= child.LayoutCount;
1040 OnChildRemoved(child);
1041 if (ChildRemoved != null)
1043 ChildRemovedEventArgs e = new ChildRemovedEventArgs
1047 ChildRemoved(this, e);
1052 /// Removes the layout from this View.
1054 internal void ResetLayout()
1061 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
1063 return (ResourceLoadingStatusType)Interop.View.GetVisualResourceStatus(this.SwigCPtr, Property.BACKGROUND);
1066 /// TODO open as a protected level
1067 internal virtual void ApplyCornerRadius()
1069 if (backgroundExtraData == null) return;
1071 var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
1072 var cornerRadiusPolicyValue = new PropertyValue((int)backgroundExtraData.CornerRadiusPolicy);
1074 // Make current propertyMap
1075 PropertyMap currentPropertyMap = new PropertyMap();
1076 currentPropertyMap[Visual.Property.CornerRadius] = cornerRadiusValue;
1077 currentPropertyMap[Visual.Property.CornerRadiusPolicy] = cornerRadiusPolicyValue;
1078 var temp = new PropertyValue(currentPropertyMap);
1080 // Update corner radius properties to background and shadow by ActionUpdateProperty
1081 DoAction(View.Property.BACKGROUND, ActionUpdateProperty, temp);
1082 DoAction(View.Property.SHADOW, ActionUpdateProperty, temp);
1085 currentPropertyMap.Dispose();
1086 cornerRadiusValue.Dispose();
1087 cornerRadiusPolicyValue.Dispose();
1090 /// TODO open as a protected level
1091 internal virtual void ApplyBorderline()
1093 if (backgroundExtraData == null) return;
1095 // ActionUpdateProperty works well only if BACKGROUND visual setup before.
1096 // If view don't have BACKGROUND visual, we set transparent background color in default.
1097 using (PropertyMap backgroundPropertyMap = new PropertyMap())
1099 using (PropertyValue propertyValue = Object.GetProperty(SwigCPtr, Property.BACKGROUND))
1101 propertyValue?.Get(backgroundPropertyMap);
1102 if (backgroundPropertyMap.Empty())
1104 // BACKGROUND visual doesn't exist.
1105 SetBackgroundColor(Color.Transparent);
1106 // SetBackgroundColor function apply borderline internally.
1107 // So we can just return now.
1113 var borderlineWidthValue = new PropertyValue(backgroundExtraData.BorderlineWidth);
1114 var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
1115 var borderlineOffsetValue = new PropertyValue(backgroundExtraData.BorderlineOffset);
1117 // Make current propertyMap
1118 PropertyMap currentPropertyMap = new PropertyMap();
1119 currentPropertyMap[Visual.Property.BorderlineWidth] = borderlineWidthValue;
1120 currentPropertyMap[Visual.Property.BorderlineColor] = borderlineColorValue;
1121 currentPropertyMap[Visual.Property.BorderlineOffset] = borderlineOffsetValue;
1122 var temp = new PropertyValue(currentPropertyMap);
1124 // Update borderline properties to background by ActionUpdateProperty
1125 DoAction(View.Property.BACKGROUND, ActionUpdateProperty, temp);
1128 currentPropertyMap.Dispose();
1129 borderlineWidthValue.Dispose();
1130 borderlineColorValue.Dispose();
1131 borderlineOffsetValue.Dispose();
1135 /// Get selector value from the triggerable selector or related property.
1137 internal Selector<T> GetSelector<T>(TriggerableSelector<T> triggerableSelector, NUI.Binding.BindableProperty relatedProperty)
1139 var selector = triggerableSelector?.Get();
1140 if (selector != null)
1145 var value = (T)GetValue(relatedProperty);
1146 return value == null ? null : new Selector<T>(value);
1149 internal void SetThemeApplied()
1151 if (themeData == null) themeData = new ThemeData();
1152 themeData.ThemeApplied = true;
1154 if (ThemeChangeSensitive && !themeData.ListeningThemeChangeEvent)
1156 themeData.ListeningThemeChangeEvent = true;
1157 ThemeManager.ThemeChangedInternal.Add(OnThemeChanged);
1162 /// you can override it to clean-up your own resources.
1164 /// <param name="type">DisposeTypes</param>
1165 /// <since_tizen> 3 </since_tizen>
1166 protected override void Dispose(DisposeTypes type)
1173 disposeDebugging(type);
1175 //_mergedStyle = null;
1177 internalMaximumSize?.Dispose();
1178 internalMaximumSize = null;
1179 internalMinimumSize?.Dispose();
1180 internalMinimumSize = null;
1181 internalMargin?.Dispose();
1182 internalMargin = null;
1183 internalPadding?.Dispose();
1184 internalPadding = null;
1185 internalSizeModeFactor?.Dispose();
1186 internalSizeModeFactor = null;
1187 internalCellIndex?.Dispose();
1188 internalCellIndex = null;
1189 internalBackgroundColor?.Dispose();
1190 internalBackgroundColor = null;
1191 internalColor?.Dispose();
1192 internalColor = null;
1193 internalPivotPoint?.Dispose();
1194 internalPivotPoint = null;
1195 internalPosition?.Dispose();
1196 internalPosition = null;
1197 internalPosition2D?.Dispose();
1198 internalPosition2D = null;
1199 internalScale?.Dispose();
1200 internalScale = null;
1201 internalSize?.Dispose();
1202 internalSize = null;
1203 internalSize2D?.Dispose();
1204 internalSize2D = null;
1206 if (type == DisposeTypes.Explicit)
1209 //Release your own managed resources here.
1210 //You should release all of your own disposable objects here.
1211 if (themeData != null)
1213 themeData.selectorData?.Reset(this);
1214 if (themeData.ListeningThemeChangeEvent)
1216 ThemeManager.ThemeChangedInternal.Remove(OnThemeChanged);
1219 if (widthConstraint != null)
1221 widthConstraint.Remove();
1222 widthConstraint.Dispose();
1224 if (heightConstraint != null)
1226 heightConstraint.Remove();
1227 heightConstraint.Dispose();
1231 //Release your own unmanaged resources here.
1232 //You should not access any managed member here except static instance.
1233 //because the execution order of Finalizes is non-deterministic.
1235 DisConnectFromSignals();
1237 foreach (View view in Children)
1239 view.InternalParent = null;
1244 NUILog.Debug($"[Dispose] View.Dispose({type}) END");
1245 NUILog.Debug($"=============================");
1250 /// This will not be public opened.
1251 [EditorBrowsable(EditorBrowsableState.Never)]
1252 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
1254 Interop.View.DeleteView(swigCPtr);
1258 /// The touch event handler for ControlState.
1259 /// Please change ControlState value by touch state if needed.
1261 /// <exception cref="ArgumentNullException"> Thrown when touch is null. </exception>
1262 [EditorBrowsable(EditorBrowsableState.Never)]
1263 protected virtual bool HandleControlStateOnTouch(Touch touch)
1267 throw new global::System.ArgumentNullException(nameof(touch));
1270 switch (touch.GetState(0))
1272 case PointStateType.Down:
1273 ControlState += ControlState.Pressed;
1275 case PointStateType.Interrupted:
1276 case PointStateType.Up:
1277 if (ControlState.Contains(ControlState.Pressed))
1279 ControlState -= ControlState.Pressed;
1289 /// Internal callback of enabled property changes.
1290 /// Inherited view can override this method to implements enabled property changes.
1292 [EditorBrowsable(EditorBrowsableState.Never)]
1293 protected virtual void OnEnabled(bool enabled)
1297 if (State == View.States.Disabled)
1299 State = View.States.Normal;
1301 if (enableControlState)
1303 ControlState -= ControlState.Disabled;
1308 State = View.States.Disabled;
1309 if (enableControlState)
1311 ControlState += ControlState.Disabled;
1317 private void DisConnectFromSignals()
1319 if (HasBody() == false)
1321 NUILog.Debug($"[Dispose] DisConnectFromSignals() No native body! No need to Disconnect Signals!");
1324 NUILog.Debug($"[Dispose] DisConnectFromSignals START");
1325 NUILog.Debug($"[Dispose] View.DisConnectFromSignals() type:{GetType()} copyNativeHandle:{GetBaseHandleCPtrHandleRef.Handle.ToString("X8")}");
1326 NUILog.Debug($"[Dispose] ID:{Interop.Actor.GetId(GetBaseHandleCPtrHandleRef)} Name:{Interop.Actor.GetName(GetBaseHandleCPtrHandleRef)}");
1328 if (onRelayoutEventCallback != null)
1330 NUILog.Debug($"[Dispose] onRelayoutEventCallback");
1332 using ViewSignal signal = new ViewSignal(Interop.ActorSignal.ActorOnRelayoutSignal(GetBaseHandleCPtrHandleRef), false);
1333 signal?.Disconnect(onRelayoutEventCallback);
1334 onRelayoutEventCallback = null;
1337 if (offWindowEventCallback != null)
1339 NUILog.Debug($"[Dispose] offWindowEventCallback");
1341 using ViewSignal signal = new ViewSignal(Interop.ActorSignal.ActorOffSceneSignal(GetBaseHandleCPtrHandleRef), false);
1342 signal?.Disconnect(offWindowEventCallback);
1343 offWindowEventCallback = null;
1346 if (onWindowEventCallback != null)
1348 NUILog.Debug($"[Dispose] onWindowEventCallback");
1350 using ViewSignal signal = new ViewSignal(Interop.ActorSignal.ActorOnSceneSignal(GetBaseHandleCPtrHandleRef), false);
1351 signal?.Disconnect(onWindowEventCallback);
1352 onWindowEventCallback = null;
1355 if (wheelEventCallback != null)
1357 NUILog.Debug($"[Dispose] wheelEventCallback");
1359 using WheelSignal signal = new WheelSignal(Interop.ActorSignal.ActorWheelEventSignal(GetBaseHandleCPtrHandleRef), false);
1360 signal?.Disconnect(wheelEventCallback);
1361 wheelEventCallback = null;
1364 if (hoverEventCallback != null)
1366 NUILog.Debug($"[Dispose] hoverEventCallback");
1368 using HoverSignal signal = new HoverSignal(Interop.ActorSignal.ActorHoveredSignal(GetBaseHandleCPtrHandleRef), false);
1369 signal?.Disconnect(hoverEventCallback);
1370 hoverEventCallback = null;
1373 if (hitTestResultDataCallback != null)
1375 NUILog.Debug($"[Dispose] hitTestResultDataCallback");
1377 using TouchDataSignal signal = new TouchDataSignal(Interop.ActorSignal.ActorHitTestResultSignal(GetBaseHandleCPtrHandleRef), false);
1378 signal?.Disconnect(hitTestResultDataCallback);
1379 hitTestResultDataCallback = null;
1383 if (interceptTouchDataCallback != null)
1385 NUILog.Debug($"[Dispose] interceptTouchDataCallback");
1387 using TouchDataSignal signal = new TouchDataSignal(Interop.ActorSignal.ActorInterceptTouchSignal(GetBaseHandleCPtrHandleRef), false);
1388 signal?.Disconnect(interceptTouchDataCallback);
1389 interceptTouchDataCallback = null;
1392 if (touchDataCallback != null)
1394 NUILog.Debug($"[Dispose] touchDataCallback");
1396 using TouchDataSignal signal = new TouchDataSignal(Interop.ActorSignal.ActorTouchSignal(GetBaseHandleCPtrHandleRef), false);
1397 signal?.Disconnect(touchDataCallback);
1398 touchDataCallback = null;
1401 if (ResourcesLoadedCallback != null)
1403 NUILog.Debug($"[Dispose] ResourcesLoadedCallback");
1405 using ViewSignal signal = new ViewSignal(Interop.View.ResourceReadySignal(GetBaseHandleCPtrHandleRef), false);
1406 signal?.Disconnect(ResourcesLoadedCallback);
1407 ResourcesLoadedCallback = null;
1410 if (keyCallback != null)
1412 NUILog.Debug($"[Dispose] keyCallback");
1414 using ControlKeySignal signal = new ControlKeySignal(Interop.ViewSignal.KeyEventSignal(GetBaseHandleCPtrHandleRef), false);
1415 signal?.Disconnect(keyCallback);
1419 if (keyInputFocusLostCallback != null)
1421 NUILog.Debug($"[Dispose] keyInputFocusLostCallback");
1423 using KeyInputFocusSignal signal = new KeyInputFocusSignal(Interop.ViewSignal.KeyInputFocusLostSignal(GetBaseHandleCPtrHandleRef), false);
1424 signal?.Disconnect(keyInputFocusLostCallback);
1425 keyInputFocusLostCallback = null;
1426 keyInputFocusLostEventHandler = null;
1429 if (keyInputFocusGainedCallback != null)
1431 NUILog.Debug($"[Dispose] keyInputFocusGainedCallback");
1433 using KeyInputFocusSignal signal = new KeyInputFocusSignal(Interop.ViewSignal.KeyInputFocusGainedSignal(GetBaseHandleCPtrHandleRef), false);
1434 signal?.Disconnect(keyInputFocusGainedCallback);
1435 keyInputFocusGainedCallback = null;
1436 keyInputFocusGainedEventHandler = null;
1439 if (backgroundResourceLoadedCallback != null)
1441 NUILog.Debug($"[Dispose] backgroundResourceLoadedCallback");
1443 using ViewSignal signal = new ViewSignal(Interop.View.ResourceReadySignal(GetBaseHandleCPtrHandleRef), false);
1444 signal?.Disconnect(backgroundResourceLoadedCallback);
1445 backgroundResourceLoadedCallback = null;
1448 if (onWindowSendEventCallback != null)
1450 NUILog.Debug($"[Dispose] onWindowSendEventCallback");
1452 using ViewSignal signal = new ViewSignal(Interop.ActorSignal.ActorOnSceneSignal(GetBaseHandleCPtrHandleRef), false);
1453 signal?.Disconnect(onWindowSendEventCallback);
1454 onWindowSendEventCallback = null;
1456 NUILog.Debug($"[Dispose] DisConnectFromSignals END");
1460 /// Apply initial style to the view.
1462 [EditorBrowsable(EditorBrowsableState.Never)]
1463 protected virtual void InitializeStyle(ViewStyle style = null)
1465 var initialStyle = ThemeManager.GetInitialStyleWithoutClone(GetType());
1468 ApplyStyle(initialStyle);
1472 var refinedStyle = style;
1473 if (style.IncludeDefaultStyle)
1475 refinedStyle = initialStyle?.Merge(style);
1477 ApplyStyle(refinedStyle);
1480 // Listen theme change event if needs.
1481 if (ThemeManager.PlatformThemeEnabled && initialStyle != null)
1487 private View ConvertIdToView(uint id)
1489 View view = GetParent()?.FindCurrentChildById(id);
1491 //If we can't find the parent's children, find in the top layer.
1494 Container parent = GetParent();
1495 while ((parent is View) && (parent != null))
1497 parent = parent.GetParent();
1498 if (parent is Layer)
1500 view = parent.FindCurrentChildById(id);
1509 private void OnScaleChanged(float x, float y, float z)
1511 Scale = new Vector3(x, y, z);
1514 private void OnBackgroundColorChanged(float r, float g, float b, float a)
1516 BackgroundColor = new Color(r, g, b, a);
1519 private void OnPaddingChanged(ushort start, ushort end, ushort top, ushort bottom)
1521 Padding = new Extents(start, end, top, bottom);
1524 private void OnMarginChanged(ushort start, ushort end, ushort top, ushort bottom)
1526 Margin = new Extents(start, end, top, bottom);
1529 private void OnAnchorPointChanged(float x, float y, float z)
1531 AnchorPoint = new Position(x, y, z);
1534 private void OnCellIndexChanged(float x, float y)
1536 CellIndex = new Vector2(x, y);
1539 private void OnFlexMarginChanged(float x, float y, float z, float w)
1541 FlexMargin = new Vector4(x, y, z, w);
1544 private void OnPaddingEXChanged(ushort start, ushort end, ushort top, ushort bottom)
1546 PaddingEX = new Extents(start, end, top, bottom);
1549 private void OnSizeModeFactorChanged(float x, float y, float z)
1551 SizeModeFactor = new Vector3(x, y, z);
1554 private bool EmptyOnTouch(object target, TouchEventArgs args)
1559 [EditorBrowsable(EditorBrowsableState.Never)]
1560 protected virtual bool CheckResourceReady()
1565 private ViewSelectorData EnsureSelectorData()
1567 if (themeData == null) themeData = new ThemeData();
1569 return themeData.selectorData ?? (themeData.selectorData = new ViewSelectorData());
1572 [Conditional("NUI_DEBUG_ON")]
1573 private void disposeDebugging(DisposeTypes type)
1575 DebugFileLogging.Instance.WriteLog($"View.Dispose({type}) START");
1576 DebugFileLogging.Instance.WriteLog($"type:{GetType()} copyNativeHandle:{GetBaseHandleCPtrHandleRef.Handle.ToString("X8")}");
1579 DebugFileLogging.Instance.WriteLog($"ID:{Interop.Actor.GetId(GetBaseHandleCPtrHandleRef)} Name:{Interop.Actor.GetName(GetBaseHandleCPtrHandleRef)}");
1583 DebugFileLogging.Instance.WriteLog($"has no native body!");