2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.ComponentModel;
19 using System.Runtime.InteropServices;
20 using Tizen.NUI.Binding;
22 namespace Tizen.NUI.BaseComponents
25 /// The View layout Direction type.
27 /// <since_tizen> 4 </since_tizen>
28 public enum ViewLayoutDirectionType
33 /// <since_tizen> 4 </since_tizen>
38 /// <since_tizen> 4 </since_tizen>
43 /// [Draft] Available policies for layout parameters
45 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
46 [EditorBrowsable(EditorBrowsableState.Never)]
47 public static class LayoutParamPolicies
50 /// Constant which indicates child size should match parent size
52 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
53 [EditorBrowsable(EditorBrowsableState.Never)]
54 public const int MatchParent = -1;
56 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
58 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
59 [EditorBrowsable(EditorBrowsableState.Never)]
60 public const int WrapContent = -2;
64 /// [Draft] Replaced by LayoutParamPolicies, will be removed once occurrences replaced.
66 internal enum ChildLayoutData
69 /// Constant which indicates child size should match parent size
71 MatchParent = LayoutParamPolicies.MatchParent,
73 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
75 WrapContent = LayoutParamPolicies.WrapContent,
78 internal enum ResourceLoadingStatusType
87 /// View is the base class for all views.
89 /// <since_tizen> 3 </since_tizen>
90 public class View : Container, IResourcesProvider
92 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
93 [EditorBrowsable(EditorBrowsableState.Never)]
94 public static readonly BindableProperty StyleNameProperty = BindableProperty.Create("StyleName", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
96 var view = (View)bindable;
99 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue));
102 defaultValueCreator: (bindable) =>
104 var view = (View)bindable;
106 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STYLE_NAME).Get(out temp);
109 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
110 [EditorBrowsable(EditorBrowsableState.Never)]
111 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
113 var view = (View)bindable;
114 if (newValue != null)
116 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((Color)newValue));
119 defaultValueCreator: (bindable) =>
121 var view = (View)bindable;
122 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
124 Tizen.NUI.PropertyMap background = view.Background;
126 background.Find(Visual.Property.Type)?.Get(out visualType);
127 if (visualType == (int)Visual.Type.Color)
129 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
132 return backgroundColor;
134 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
135 [EditorBrowsable(EditorBrowsableState.Never)]
136 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
138 var view = (View)bindable;
139 if (newValue != null)
141 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((string)newValue));
144 defaultValueCreator: (bindable) =>
146 var view = (View)bindable;
147 string backgroundImage = "";
149 Tizen.NUI.PropertyMap background = view.Background;
151 background.Find(Visual.Property.Type)?.Get(out visualType);
152 if (visualType == (int)Visual.Type.Image)
154 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
157 return backgroundImage;
159 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
160 [EditorBrowsable(EditorBrowsableState.Never)]
161 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create("Background", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
163 var view = (View)bindable;
164 if (newValue != null)
166 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
169 defaultValueCreator: (bindable) =>
171 var view = (View)bindable;
172 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
173 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
176 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
177 [EditorBrowsable(EditorBrowsableState.Never)]
178 public static readonly BindableProperty StateProperty = BindableProperty.Create("State", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
180 var view = (View)bindable;
181 if (newValue != null)
183 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
186 defaultValueCreator: (bindable) =>
188 var view = (View)bindable;
190 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
192 NUILog.Error("State get error!");
196 case 0: return States.Normal;
197 case 1: return States.Focused;
198 case 2: return States.Disabled;
199 default: return States.Normal;
202 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
203 [EditorBrowsable(EditorBrowsableState.Never)]
204 public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
206 var view = (View)bindable;
207 string valueToString = "";
208 if (newValue != null)
210 switch ((States)newValue)
212 case States.Normal: { valueToString = "NORMAL"; break; }
213 case States.Focused: { valueToString = "FOCUSED"; break; }
214 case States.Disabled: { valueToString = "DISABLED"; break; }
215 default: { valueToString = "NORMAL"; break; }
217 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
220 defaultValueCreator: (bindable) =>
222 var view = (View)bindable;
224 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
226 NUILog.Error("subState get error!");
230 case "NORMAL": return States.Normal;
231 case "FOCUSED": return States.Focused;
232 case "DISABLED": return States.Disabled;
233 default: return States.Normal;
236 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
237 [EditorBrowsable(EditorBrowsableState.Never)]
238 public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
240 var view = (View)bindable;
241 if (newValue != null)
243 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
246 defaultValueCreator: (bindable) =>
248 var view = (View)bindable;
249 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
250 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
254 /// Only for XAML property binding. This will be changed as Inhouse API by ACR later.
255 public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
257 var view = (View)bindable;
258 if (newValue != null)
260 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
263 defaultValueCreator: (bindable) =>
265 var view = (View)bindable;
267 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
271 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
272 [EditorBrowsable(EditorBrowsableState.Never)]
273 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
275 var view = (View)bindable;
276 if (newValue != null)
278 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
281 defaultValueCreator: (bindable) =>
283 var view = (View)bindable;
285 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
288 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
289 [EditorBrowsable(EditorBrowsableState.Never)]
290 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
292 var view = (View)bindable;
293 if (newValue != null)
295 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
298 defaultValueCreator: (bindable) =>
300 var view = (View)bindable;
301 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
302 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
305 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
306 [EditorBrowsable(EditorBrowsableState.Never)]
307 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
309 var view = (View)bindable;
310 if (newValue != null)
312 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
315 defaultValueCreator: (bindable) =>
317 var view = (View)bindable;
318 Vector2 temp = new Vector2(0.0f, 0.0f);
319 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
322 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
323 [EditorBrowsable(EditorBrowsableState.Never)]
324 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
326 var view = (View)bindable;
327 if (newValue != null)
329 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
332 defaultValueCreator: (bindable) =>
334 var view = (View)bindable;
336 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
339 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
340 [EditorBrowsable(EditorBrowsableState.Never)]
341 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
343 var view = (View)bindable;
344 if (newValue != null)
346 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
349 defaultValueCreator: (bindable) =>
351 var view = (View)bindable;
353 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
356 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
357 [EditorBrowsable(EditorBrowsableState.Never)]
358 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
360 var view = (View)bindable;
361 string valueToString = "";
363 if (newValue != null)
365 switch ((HorizontalAlignmentType)newValue)
367 case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
368 case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
369 case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
370 default: { valueToString = "left"; break; }
372 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
375 defaultValueCreator: (bindable) =>
377 var view = (View)bindable;
379 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
381 NUILog.Error("CellHorizontalAlignment get error!");
386 case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
387 case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
388 case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
389 default: return Tizen.NUI.HorizontalAlignmentType.Left;
392 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
393 [EditorBrowsable(EditorBrowsableState.Never)]
394 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
396 var view = (View)bindable;
397 string valueToString = "";
399 if (newValue != null)
401 switch ((VerticalAlignmentType)newValue)
403 case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
404 case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
405 case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
406 default: { valueToString = "top"; break; }
408 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
411 defaultValueCreator: (bindable) =>
413 var view = (View)bindable;
415 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
417 NUILog.Error("CellVerticalAlignment get error!");
422 case "top": return Tizen.NUI.VerticalAlignmentType.Top;
423 case "center": return Tizen.NUI.VerticalAlignmentType.Center;
424 case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
425 default: return Tizen.NUI.VerticalAlignmentType.Top;
430 /// "Please DO NOT use! This will be deprecated! Please use 'View Weight' instead of BindableProperty"
431 /// This needs to be hidden as inhouse API until all applications using it have been updated. Do not make public.
433 [EditorBrowsable(EditorBrowsableState.Never)]
434 public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
436 var view = (View)bindable;
437 if (newValue != null)
439 view.Weight = (float)newValue;
443 defaultValueCreator: (bindable) =>
445 var view = (View)bindable;
449 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
450 [EditorBrowsable(EditorBrowsableState.Never)]
451 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
453 var view = (View)bindable;
454 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
455 else { view.LeftFocusableViewId = -1; }
457 defaultValueCreator: (bindable) =>
459 var view = (View)bindable;
460 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
463 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
464 [EditorBrowsable(EditorBrowsableState.Never)]
465 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
467 var view = (View)bindable;
468 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
469 else { view.RightFocusableViewId = -1; }
471 defaultValueCreator: (bindable) =>
473 var view = (View)bindable;
474 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
477 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
478 [EditorBrowsable(EditorBrowsableState.Never)]
479 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
481 var view = (View)bindable;
482 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
483 else { view.UpFocusableViewId = -1; }
485 defaultValueCreator: (bindable) =>
487 var view = (View)bindable;
488 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
491 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
492 [EditorBrowsable(EditorBrowsableState.Never)]
493 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
495 var view = (View)bindable;
496 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
497 else { view.DownFocusableViewId = -1; }
499 defaultValueCreator: (bindable) =>
501 var view = (View)bindable;
502 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
505 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
506 [EditorBrowsable(EditorBrowsableState.Never)]
507 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
509 var view = (View)bindable;
510 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
512 defaultValueCreator: (bindable) =>
514 var view = (View)bindable;
515 return view.IsKeyboardFocusable();
517 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
518 [EditorBrowsable(EditorBrowsableState.Never)]
519 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
521 var view = (View)bindable;
522 if (newValue != null)
524 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size((Size2D)newValue)));
527 defaultValueCreator: (bindable) =>
529 var view = (View)bindable;
530 Size temp = new Size(0.0f, 0.0f, 0.0f);
531 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
532 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
535 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
536 [EditorBrowsable(EditorBrowsableState.Never)]
537 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
539 var view = (View)bindable;
540 if (newValue != null)
542 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
545 defaultValueCreator: (bindable) =>
547 var view = (View)bindable;
549 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
552 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
553 [EditorBrowsable(EditorBrowsableState.Never)]
554 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
556 var view = (View)bindable;
557 if (newValue != null)
559 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
562 defaultValueCreator: (bindable) =>
564 var view = (View)bindable;
565 Position temp = new Position(0.0f, 0.0f, 0.0f);
566 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
567 return new Position2D(temp);
569 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
570 [EditorBrowsable(EditorBrowsableState.Never)]
571 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
573 var view = (View)bindable;
574 if (newValue != null)
576 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
579 defaultValueCreator: (bindable) =>
581 var view = (View)bindable;
583 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
586 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
587 [EditorBrowsable(EditorBrowsableState.Never)]
588 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
590 var view = (View)bindable;
592 if (newValue != null)
594 value = (int)newValue;
597 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
600 var siblings = view.GetParent()?.Children;
601 if (siblings != null)
603 int currentOrder = siblings.IndexOf(view);
604 if (value != currentOrder)
606 if (value == 0) { view.LowerToBottom(); }
607 else if (value < siblings.Count - 1)
609 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
610 else { view.LowerBelow(siblings[value]); }
612 else { view.RaiseToTop(); }
617 defaultValueCreator: (bindable) =>
619 var view = (View)bindable;
620 var parentChildren = view.GetParent()?.Children;
621 int currentOrder = 0;
622 if (parentChildren != null)
624 currentOrder = parentChildren.IndexOf(view);
626 if (currentOrder < 0) { return 0; }
627 else if (currentOrder < parentChildren.Count) { return currentOrder; }
632 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
633 [EditorBrowsable(EditorBrowsableState.Never)]
634 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
636 var view = (View)bindable;
637 if (newValue != null)
639 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
642 defaultValueCreator: (bindable) =>
644 var view = (View)bindable;
645 Position temp = new Position(0.0f, 0.0f, 0.0f);
646 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
650 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
651 [EditorBrowsable(EditorBrowsableState.Never)]
652 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
654 var view = (View)bindable;
655 if (newValue != null)
657 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
660 defaultValueCreator: (bindable) =>
662 var view = (View)bindable;
663 Position temp = new Position(0.0f, 0.0f, 0.0f);
664 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
667 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
668 [EditorBrowsable(EditorBrowsableState.Never)]
669 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
671 var view = (View)bindable;
672 if (newValue != null)
674 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
677 defaultValueCreator: (bindable) =>
679 var view = (View)bindable;
681 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
684 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
685 [EditorBrowsable(EditorBrowsableState.Never)]
686 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
688 var view = (View)bindable;
689 if (newValue != null)
691 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
694 defaultValueCreator: (bindable) =>
696 var view = (View)bindable;
698 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
701 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
702 [EditorBrowsable(EditorBrowsableState.Never)]
703 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
705 var view = (View)bindable;
706 if (newValue != null)
708 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
711 defaultValueCreator: (bindable) =>
713 var view = (View)bindable;
714 Position temp = new Position(0.0f, 0.0f, 0.0f);
715 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
718 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
719 [EditorBrowsable(EditorBrowsableState.Never)]
720 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
722 var view = (View)bindable;
723 if (newValue != null)
725 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
728 defaultValueCreator: (bindable) =>
730 var view = (View)bindable;
732 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
735 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
736 [EditorBrowsable(EditorBrowsableState.Never)]
737 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
739 var view = (View)bindable;
740 if (newValue != null)
742 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
745 defaultValueCreator: (bindable) =>
747 var view = (View)bindable;
749 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
752 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
753 [EditorBrowsable(EditorBrowsableState.Never)]
754 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
756 var view = (View)bindable;
757 if (newValue != null)
759 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
762 defaultValueCreator: (bindable) =>
764 var view = (View)bindable;
766 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
769 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
770 [EditorBrowsable(EditorBrowsableState.Never)]
771 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
773 var view = (View)bindable;
774 if (newValue != null)
776 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
779 defaultValueCreator: (bindable) =>
781 var view = (View)bindable;
782 Rotation temp = new Rotation();
783 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
786 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
787 [EditorBrowsable(EditorBrowsableState.Never)]
788 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
790 var view = (View)bindable;
791 if (newValue != null)
793 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
796 defaultValueCreator: (bindable) =>
798 var view = (View)bindable;
799 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
800 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
803 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
804 [EditorBrowsable(EditorBrowsableState.Never)]
805 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
807 var view = (View)bindable;
808 if (newValue != null)
810 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
813 defaultValueCreator: (bindable) =>
815 var view = (View)bindable;
817 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
820 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
821 [EditorBrowsable(EditorBrowsableState.Never)]
822 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
824 var view = (View)bindable;
825 if (newValue != null)
827 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
830 defaultValueCreator: (bindable) =>
832 var view = (View)bindable;
834 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
837 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
838 [EditorBrowsable(EditorBrowsableState.Never)]
839 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
841 var view = (View)bindable;
842 if (newValue != null)
844 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
847 defaultValueCreator: (bindable) =>
849 var view = (View)bindable;
851 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
854 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
855 [EditorBrowsable(EditorBrowsableState.Never)]
856 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
858 var view = (View)bindable;
859 if (newValue != null)
861 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
864 defaultValueCreator: (bindable) =>
866 var view = (View)bindable;
868 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
871 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
872 [EditorBrowsable(EditorBrowsableState.Never)]
873 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
875 var view = (View)bindable;
876 if (newValue != null)
878 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
881 defaultValueCreator: (bindable) =>
883 var view = (View)bindable;
885 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
888 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
889 [EditorBrowsable(EditorBrowsableState.Never)]
890 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
892 var view = (View)bindable;
893 if (newValue != null)
895 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
898 defaultValueCreator: (bindable) =>
900 var view = (View)bindable;
902 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
905 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
906 [EditorBrowsable(EditorBrowsableState.Never)]
907 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
909 var view = (View)bindable;
910 if (newValue != null)
912 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
915 defaultValueCreator: (bindable) =>
917 var view = (View)bindable;
919 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
922 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
923 [EditorBrowsable(EditorBrowsableState.Never)]
924 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
926 var view = (View)bindable;
927 if (newValue != null)
929 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
932 defaultValueCreator: (bindable) =>
934 var view = (View)bindable;
936 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
939 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
940 [EditorBrowsable(EditorBrowsableState.Never)]
941 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
943 var view = (View)bindable;
944 if (newValue != null)
946 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
949 defaultValueCreator: (bindable) =>
951 var view = (View)bindable;
953 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
955 NUILog.Error("DrawMode get error!");
959 case "NORMAL": return DrawModeType.Normal;
960 case "OVERLAY_2D": return DrawModeType.Overlay2D;
961 #pragma warning disable CS0618 // Disable deprecated warning as we do need to use the deprecated API here.
962 case "STENCIL": return DrawModeType.Stencil;
963 #pragma warning restore CS0618
964 default: return DrawModeType.Normal;
967 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
968 [EditorBrowsable(EditorBrowsableState.Never)]
969 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
971 var view = (View)bindable;
972 if (newValue != null)
974 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
977 defaultValueCreator: (bindable) =>
979 var view = (View)bindable;
980 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
981 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
984 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
985 [EditorBrowsable(EditorBrowsableState.Never)]
986 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
988 var view = (View)bindable;
989 if (newValue != null)
991 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
994 defaultValueCreator: (bindable) =>
996 var view = (View)bindable;
998 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
1000 NUILog.Error("WidthResizePolicy get error!");
1004 case "FIXED": return ResizePolicyType.Fixed;
1005 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1006 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1007 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1008 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1009 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1010 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1011 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1012 default: return ResizePolicyType.Fixed;
1015 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1016 [EditorBrowsable(EditorBrowsableState.Never)]
1017 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
1019 var view = (View)bindable;
1020 if (newValue != null)
1022 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
1025 defaultValueCreator: (bindable) =>
1027 var view = (View)bindable;
1029 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
1031 NUILog.Error("HeightResizePolicy get error!");
1035 case "FIXED": return ResizePolicyType.Fixed;
1036 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1037 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1038 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1039 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1040 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1041 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1042 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1043 default: return ResizePolicyType.Fixed;
1046 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1047 [EditorBrowsable(EditorBrowsableState.Never)]
1048 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1050 var view = (View)bindable;
1051 string valueToString = "";
1052 if (newValue != null)
1054 switch ((SizeScalePolicyType)newValue)
1056 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1057 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1058 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1059 default: { valueToString = "USE_SIZE_SET"; break; }
1061 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1064 defaultValueCreator: (bindable) =>
1066 var view = (View)bindable;
1068 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1070 NUILog.Error("SizeScalePolicy get error!");
1074 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1075 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1076 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1077 default: return SizeScalePolicyType.UseSizeSet;
1080 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1081 [EditorBrowsable(EditorBrowsableState.Never)]
1082 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1084 var view = (View)bindable;
1085 if (newValue != null)
1087 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1090 defaultValueCreator: (bindable) =>
1092 var view = (View)bindable;
1094 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1097 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1098 [EditorBrowsable(EditorBrowsableState.Never)]
1099 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1101 var view = (View)bindable;
1102 if (newValue != null)
1104 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1107 defaultValueCreator: (bindable) =>
1109 var view = (View)bindable;
1111 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1114 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1115 [EditorBrowsable(EditorBrowsableState.Never)]
1116 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1118 var view = (View)bindable;
1119 if (newValue != null)
1121 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1124 defaultValueCreator: (bindable) =>
1126 var view = (View)bindable;
1127 Extents temp = new Extents(0, 0, 0, 0);
1128 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1131 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1132 [EditorBrowsable(EditorBrowsableState.Never)]
1133 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1135 var view = (View)bindable;
1136 if (newValue != null)
1138 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1141 defaultValueCreator: (bindable) =>
1143 var view = (View)bindable;
1144 Size temp = new Size(0, 0, 0);
1145 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1148 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1149 [EditorBrowsable(EditorBrowsableState.Never)]
1150 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1152 var view = (View)bindable;
1153 if (newValue != null)
1155 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1158 defaultValueCreator: (bindable) =>
1160 var view = (View)bindable;
1161 Size2D temp = new Size2D(0, 0);
1162 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1165 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1166 [EditorBrowsable(EditorBrowsableState.Never)]
1167 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1169 var view = (View)bindable;
1170 if (newValue != null)
1172 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1175 defaultValueCreator: (bindable) =>
1177 var view = (View)bindable;
1178 Size2D temp = new Size2D(0, 0);
1179 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1182 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1183 [EditorBrowsable(EditorBrowsableState.Never)]
1184 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1186 var view = (View)bindable;
1187 if (newValue != null)
1189 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1192 defaultValueCreator: (bindable) =>
1194 var view = (View)bindable;
1196 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1199 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1200 [EditorBrowsable(EditorBrowsableState.Never)]
1201 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1203 var view = (View)bindable;
1204 if (newValue != null)
1206 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1209 defaultValueCreator: (bindable) =>
1211 var view = (View)bindable;
1213 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1215 NUILog.Error("ClippingMode get error!");
1217 return (ClippingModeType)temp;
1219 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1220 [EditorBrowsable(EditorBrowsableState.Never)]
1221 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1223 var view = (View)bindable;
1224 if (newValue != null)
1226 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1229 defaultValueCreator: (bindable) =>
1231 var view = (View)bindable;
1233 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1236 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1237 [EditorBrowsable(EditorBrowsableState.Never)]
1238 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1240 var view = (View)bindable;
1241 if (newValue != null)
1243 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1246 defaultValueCreator: (bindable) =>
1248 var view = (View)bindable;
1250 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1252 NUILog.Error("LAYOUT_DIRECTION get error!");
1254 return (ViewLayoutDirectionType)temp;
1256 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1257 [EditorBrowsable(EditorBrowsableState.Never)]
1258 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1260 var view = (View)bindable;
1261 if (newValue != null)
1263 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1266 defaultValueCreator: (bindable) =>
1268 var view = (View)bindable;
1269 Extents temp = new Extents(0, 0, 0, 0);
1270 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1273 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1274 [EditorBrowsable(EditorBrowsableState.Never)]
1275 public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style), propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1278 /// Flag to indicate if layout set explicitly via API call or View was automatically given a Layout.
1280 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1281 [EditorBrowsable(EditorBrowsableState.Never)]
1282 public bool layoutSet = false;
1285 /// Flag to allow Layouting to be disabled for Views.
1286 /// Once a View has a Layout set then any children added to Views from then on will receive
1287 /// automatic Layouts.
1289 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1290 [EditorBrowsable(EditorBrowsableState.Never)]
1291 public static bool layoutingDisabled{get; set;} = true;
1293 internal readonly MergedStyle _mergedStyle;
1294 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1295 private LayoutItem _layout; // Exclusive layout assigned to this View.
1296 private int _widthPolicy = LayoutParamPolicies.WrapContent; // Layout width policy
1297 private int _heightPolicy = LayoutParamPolicies.WrapContent; // Layout height policy
1298 private float _weight = 0.0f; // Weighting of child View in a Layout
1299 private MeasureSpecification _measureSpecificationWidth; // Layout width and internal Mode
1300 private MeasureSpecification _measureSpecificationHeight; // Layout height and internal Mode
1301 private bool _backgroundImageSynchronosLoading = false;
1302 private EventHandler _offWindowEventHandler;
1303 private OffWindowEventCallbackType _offWindowEventCallback;
1304 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1305 private WheelEventCallbackType _wheelEventCallback;
1306 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1307 private KeyCallbackType _keyCallback;
1308 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1309 private TouchDataCallbackType _touchDataCallback;
1310 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1311 private HoverEventCallbackType _hoverEventCallback;
1312 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
1313 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
1314 private EventHandler _keyInputFocusGainedEventHandler;
1315 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1316 private EventHandler _keyInputFocusLostEventHandler;
1317 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1318 private EventHandler _onRelayoutEventHandler;
1319 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1320 private EventHandler _onWindowEventHandler;
1321 private OnWindowEventCallbackType _onWindowEventCallback;
1322 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
1323 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
1324 // Resource Ready Signal
1325 private EventHandler _resourcesLoadedEventHandler;
1326 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
1327 private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
1328 private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
1330 private OnWindowEventCallbackType _onWindowSendEventCallback;
1332 private void SendViewAddedEventToWindow(IntPtr data)
1334 Window.Instance?.SendViewAdded(this);
1338 /// Creates a new instance of a view.
1340 /// <since_tizen> 3 </since_tizen>
1341 public View() : this(Interop.View.View_New(), true)
1343 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1345 internal View(View uiControl) : this(Interop.View.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1347 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1350 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.View.View_SWIGUpcast(cPtr), cMemoryOwn)
1352 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1355 PositionUsesPivotPoint = false;
1357 _mergedStyle = new MergedStyle(GetType(), this);
1359 _onWindowSendEventCallback = SendViewAddedEventToWindow;
1360 this.OnWindowSignal().Connect(_onWindowSendEventCallback);
1363 internal View(ViewImpl implementation) : this(Interop.View.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1365 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1368 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1369 private delegate void OffWindowEventCallbackType(IntPtr control);
1370 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1371 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1372 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1373 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1374 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1375 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1376 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1377 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1378 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1379 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
1380 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1381 private delegate void ResourcesLoadedCallbackType(IntPtr control);
1382 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1383 private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
1384 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1385 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1386 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1387 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1388 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1389 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1390 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1391 private delegate void OnWindowEventCallbackType(IntPtr control);
1392 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1393 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
1396 /// Event when a child is removed.
1398 /// <since_tizen> 5 </since_tizen>
1399 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1401 /// Event when a child is added.
1403 /// <since_tizen> 5 </since_tizen>
1404 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1407 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1408 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1410 /// <since_tizen> 3 </since_tizen>
1411 public event EventHandler FocusGained
1415 if (_keyInputFocusGainedEventHandler == null)
1417 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1418 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1421 _keyInputFocusGainedEventHandler += value;
1426 _keyInputFocusGainedEventHandler -= value;
1428 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1430 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1436 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1437 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1439 /// <since_tizen> 3 </since_tizen>
1440 public event EventHandler FocusLost
1444 if (_keyInputFocusLostEventHandler == null)
1446 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1447 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1450 _keyInputFocusLostEventHandler += value;
1455 _keyInputFocusLostEventHandler -= value;
1457 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1459 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1465 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1466 /// The KeyPressed signal is emitted when the key event is received.<br />
1468 /// <since_tizen> 3 </since_tizen>
1469 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1473 if (_keyEventHandler == null)
1475 _keyCallback = OnKeyEvent;
1476 this.KeyEventSignal().Connect(_keyCallback);
1479 _keyEventHandler += value;
1484 _keyEventHandler -= value;
1486 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1488 this.KeyEventSignal().Disconnect(_keyCallback);
1494 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1495 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1497 /// <since_tizen> 3 </since_tizen>
1498 public event EventHandler Relayout
1502 if (_onRelayoutEventHandler == null)
1504 _onRelayoutEventCallback = OnRelayout;
1505 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1508 _onRelayoutEventHandler += value;
1513 _onRelayoutEventHandler -= value;
1515 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1517 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1524 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1525 /// The touched signal is emitted when the touch input is received.<br />
1527 /// <since_tizen> 3 </since_tizen>
1528 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1532 if (_touchDataEventHandler == null)
1534 _touchDataCallback = OnTouch;
1535 this.TouchSignal().Connect(_touchDataCallback);
1538 _touchDataEventHandler += value;
1543 _touchDataEventHandler -= value;
1545 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1547 this.TouchSignal().Disconnect(_touchDataCallback);
1554 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1555 /// The hovered signal is emitted when the hover input is received.<br />
1557 /// <since_tizen> 3 </since_tizen>
1558 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1562 if (_hoverEventHandler == null)
1564 _hoverEventCallback = OnHoverEvent;
1565 this.HoveredSignal().Connect(_hoverEventCallback);
1568 _hoverEventHandler += value;
1573 _hoverEventHandler -= value;
1575 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1577 this.HoveredSignal().Disconnect(_hoverEventCallback);
1584 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1585 /// The WheelMoved signal is emitted when the wheel event is received.<br />
1587 /// <since_tizen> 3 </since_tizen>
1588 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1592 if (_wheelEventHandler == null)
1594 _wheelEventCallback = OnWheelEvent;
1595 this.WheelEventSignal().Connect(_wheelEventCallback);
1598 _wheelEventHandler += value;
1603 _wheelEventHandler -= value;
1605 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
1607 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1614 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
1615 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
1617 /// <since_tizen> 3 </since_tizen>
1618 public event EventHandler AddedToWindow
1622 if (_onWindowEventHandler == null)
1624 _onWindowEventCallback = OnWindow;
1625 this.OnWindowSignal().Connect(_onWindowEventCallback);
1628 _onWindowEventHandler += value;
1633 _onWindowEventHandler -= value;
1635 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
1637 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1643 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
1644 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
1646 /// <since_tizen> 3 </since_tizen>
1647 public event EventHandler RemovedFromWindow
1651 if (_offWindowEventHandler == null)
1653 _offWindowEventCallback = OffWindow;
1654 this.OffWindowSignal().Connect(_offWindowEventCallback);
1657 _offWindowEventHandler += value;
1662 _offWindowEventHandler -= value;
1664 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
1666 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1672 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
1673 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
1675 /// <since_tizen> 3 </since_tizen>
1676 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
1680 if (_visibilityChangedEventHandler == null)
1682 _visibilityChangedEventCallback = OnVisibilityChanged;
1683 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
1686 _visibilityChangedEventHandler += value;
1691 _visibilityChangedEventHandler -= value;
1693 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
1695 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
1701 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
1702 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
1704 /// <since_tizen> 4 </since_tizen>
1705 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
1709 if (_layoutDirectionChangedEventHandler == null)
1711 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
1712 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
1715 _layoutDirectionChangedEventHandler += value;
1720 _layoutDirectionChangedEventHandler -= value;
1722 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
1724 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
1730 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1731 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1733 /// <since_tizen> 3 </since_tizen>
1734 public event EventHandler ResourcesLoaded
1738 if (_resourcesLoadedEventHandler == null)
1740 _ResourcesLoadedCallback = OnResourcesLoaded;
1741 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1744 _resourcesLoadedEventHandler += value;
1749 _resourcesLoadedEventHandler -= value;
1751 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1753 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1758 internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
1762 if (_backgroundResourceLoadedEventHandler == null)
1764 _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
1765 this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
1768 _backgroundResourceLoadedEventHandler += value;
1772 _backgroundResourceLoadedEventHandler -= value;
1774 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1776 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1782 /// Enumeration for describing the states of the view.
1784 /// <since_tizen> 3 </since_tizen>
1788 /// The normal state.
1792 /// The focused state.
1796 /// The disabled state.
1802 /// Describes the direction to move the focus towards.
1804 /// <since_tizen> 3 </since_tizen>
1805 public enum FocusDirection
1808 /// Move keyboard focus towards the left direction.
1810 /// <since_tizen> 3 </since_tizen>
1813 /// Move keyboard focus towards the right direction.
1815 /// <since_tizen> 3 </since_tizen>
1818 /// Move keyboard focus towards the up direction.
1820 /// <since_tizen> 3 </since_tizen>
1823 /// Move keyboard focus towards the down direction.
1825 /// <since_tizen> 3 </since_tizen>
1828 /// Move keyboard focus towards the previous page direction.
1830 /// <since_tizen> 3 </since_tizen>
1833 /// Move keyboard focus towards the next page direction.
1835 /// <since_tizen> 3 </since_tizen>
1839 internal enum PropertyRange
1841 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1842 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1843 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1846 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1847 [EditorBrowsable(EditorBrowsableState.Never)]
1848 public bool IsResourcesCreated
1852 return Application.Current.IsResourcesCreated;
1856 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1857 [EditorBrowsable(EditorBrowsableState.Never)]
1858 public ResourceDictionary XamlResources
1862 return Application.Current.XamlResources;
1866 Application.Current.XamlResources = value;
1871 /// The StyleName, type string.
1873 /// <since_tizen> 3 </since_tizen>
1874 public string StyleName
1878 return (string)GetValue(StyleNameProperty);
1882 SetValue(StyleNameProperty, value);
1883 NotifyPropertyChanged();
1888 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1890 /// <since_tizen> 3 </since_tizen>
1891 public Color BackgroundColor
1895 return (Color)GetValue(BackgroundColorProperty);
1899 SetValue(BackgroundColorProperty, value);
1900 NotifyPropertyChanged();
1905 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1907 /// <since_tizen> 3 </since_tizen>
1908 public string BackgroundImage
1912 return (string)GetValue(BackgroundImageProperty);
1916 SetValue(BackgroundImageProperty, value);
1917 NotifyPropertyChanged();
1922 /// The background of view.
1924 /// <since_tizen> 3 </since_tizen>
1925 public Tizen.NUI.PropertyMap Background
1929 return (PropertyMap)GetValue(BackgroundProperty);
1933 SetValue(BackgroundProperty, value);
1934 NotifyPropertyChanged();
1940 /// The current state of the view.
1942 /// <since_tizen> 3 </since_tizen>
1947 return (States)GetValue(StateProperty);
1951 SetValue(StateProperty, value);
1952 NotifyPropertyChanged();
1957 /// The current sub state of the view.
1959 /// <since_tizen> 3 </since_tizen>
1960 public States SubState
1964 return (States)GetValue(SubStateProperty);
1968 SetValue(SubStateProperty, value);
1969 NotifyPropertyChanged();
1974 /// Displays a tooltip
1976 /// <since_tizen> 3 </since_tizen>
1977 public Tizen.NUI.PropertyMap Tooltip
1981 return (PropertyMap)GetValue(TooltipProperty);
1985 SetValue(TooltipProperty, value);
1986 NotifyPropertyChanged();
1991 /// Displays a tooltip as a text.
1993 /// <since_tizen> 3 </since_tizen>
1994 public string TooltipText
1998 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1999 NotifyPropertyChanged();
2004 /// The Child property of FlexContainer.<br />
2005 /// The proportion of the free space in the container, the flex item will receive.<br />
2006 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
2008 /// <since_tizen> 3 </since_tizen>
2013 return (float)GetValue(FlexProperty);
2017 SetValue(FlexProperty, value);
2018 NotifyPropertyChanged();
2023 /// The Child property of FlexContainer.<br />
2024 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
2026 /// <since_tizen> 3 </since_tizen>
2027 public int AlignSelf
2031 return (int)GetValue(AlignSelfProperty);
2035 SetValue(AlignSelfProperty, value);
2036 NotifyPropertyChanged();
2041 /// The Child property of FlexContainer.<br />
2042 /// The space around the flex item.<br />
2044 /// <since_tizen> 3 </since_tizen>
2045 public Vector4 FlexMargin
2049 return (Vector4)GetValue(FlexMarginProperty);
2053 SetValue(FlexMarginProperty, value);
2054 NotifyPropertyChanged();
2059 /// The top-left cell this child occupies, if not set, the first available cell is used.
2061 /// <since_tizen> 3 </since_tizen>
2062 public Vector2 CellIndex
2066 return (Vector2)GetValue(CellIndexProperty);
2070 SetValue(CellIndexProperty, value);
2071 NotifyPropertyChanged();
2076 /// The number of rows this child occupies, if not set, the default value is 1.
2078 /// <since_tizen> 3 </since_tizen>
2079 public float RowSpan
2083 return (float)GetValue(RowSpanProperty);
2087 SetValue(RowSpanProperty, value);
2088 NotifyPropertyChanged();
2093 /// The number of columns this child occupies, if not set, the default value is 1.
2095 /// <since_tizen> 3 </since_tizen>
2096 public float ColumnSpan
2100 return (float)GetValue(ColumnSpanProperty);
2104 SetValue(ColumnSpanProperty, value);
2105 NotifyPropertyChanged();
2110 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
2112 /// <since_tizen> 3 </since_tizen>
2113 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
2117 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
2121 SetValue(CellHorizontalAlignmentProperty, value);
2122 NotifyPropertyChanged();
2127 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
2129 /// <since_tizen> 3 </since_tizen>
2130 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
2134 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
2138 SetValue(CellVerticalAlignmentProperty, value);
2139 NotifyPropertyChanged();
2144 /// The left focusable view.<br />
2145 /// This will return null if not set.<br />
2146 /// This will also return null if the specified left focusable view is not on a window.<br />
2148 /// <since_tizen> 3 </since_tizen>
2149 public View LeftFocusableView
2151 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2154 return (View)GetValue(LeftFocusableViewProperty);
2158 SetValue(LeftFocusableViewProperty, value);
2159 NotifyPropertyChanged();
2164 /// The right focusable view.<br />
2165 /// This will return null if not set.<br />
2166 /// This will also return null if the specified right focusable view is not on a window.<br />
2168 /// <since_tizen> 3 </since_tizen>
2169 public View RightFocusableView
2171 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2174 return (View)GetValue(RightFocusableViewProperty);
2178 SetValue(RightFocusableViewProperty, value);
2179 NotifyPropertyChanged();
2184 /// The up focusable view.<br />
2185 /// This will return null if not set.<br />
2186 /// This will also return null if the specified up focusable view is not on a window.<br />
2188 /// <since_tizen> 3 </since_tizen>
2189 public View UpFocusableView
2191 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2194 return (View)GetValue(UpFocusableViewProperty);
2198 SetValue(UpFocusableViewProperty, value);
2199 NotifyPropertyChanged();
2204 /// The down focusable view.<br />
2205 /// This will return null if not set.<br />
2206 /// This will also return null if the specified down focusable view is not on a window.<br />
2208 /// <since_tizen> 3 </since_tizen>
2209 public View DownFocusableView
2211 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2214 return (View)GetValue(DownFocusableViewProperty);
2218 SetValue(DownFocusableViewProperty, value);
2219 NotifyPropertyChanged();
2224 /// Whether the view should be focusable by keyboard navigation.
2226 /// <since_tizen> 3 </since_tizen>
2227 public bool Focusable
2231 SetValue(FocusableProperty, value);
2232 NotifyPropertyChanged();
2236 return (bool)GetValue(FocusableProperty);
2241 /// Retrieves the position of the view.<br />
2242 /// The coordinates are relative to the view's parent.<br />
2244 /// <since_tizen> 3 </since_tizen>
2245 public Position CurrentPosition
2249 return GetCurrentPosition();
2254 /// Sets the size of a view for the width and the height.<br />
2255 /// Geometry can be scaled to fit within this area.<br />
2256 /// This does not interfere with the view's scale factor.<br />
2257 /// The views default depth is the minimum of width and height.<br />
2260 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
2261 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
2262 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
2263 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2264 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2265 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2266 /// It may not match the current value in some cases, i.e. when the animation is progressing or the maximum or minimu size is set. <br />
2268 /// <since_tizen> 3 </since_tizen>
2269 public Size2D Size2D
2273 Size2D temp = (Size2D)GetValue(Size2DProperty);
2274 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
2278 SetValue(Size2DProperty, value);
2279 // Set Specification so when layouts measure this View it matches the value set here.
2280 // All Views are currently Layouts.
2281 MeasureSpecificationWidth = new MeasureSpecification(new LayoutLength(value.Width), MeasureSpecification.ModeType.Exactly);
2282 MeasureSpecificationHeight = new MeasureSpecification(new LayoutLength(value.Height), MeasureSpecification.ModeType.Exactly);
2283 NotifyPropertyChanged();
2288 /// Retrieves the size of the view.<br />
2289 /// The coordinates are relative to the view's parent.<br />
2291 /// <since_tizen> 3 </since_tizen>
2292 public Size2D CurrentSize
2296 return GetCurrentSize();
2301 /// Retrieves and sets the view's opacity.<br />
2303 /// <since_tizen> 3 </since_tizen>
2304 public float Opacity
2308 return (float)GetValue(OpacityProperty);
2312 SetValue(OpacityProperty, value);
2313 NotifyPropertyChanged();
2318 /// Sets the position of the view for X and Y.<br />
2319 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2320 /// If the position inheritance is disabled, sets the world position.<br />
2323 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
2324 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
2325 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
2326 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2327 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2328 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2330 /// <since_tizen> 3 </since_tizen>
2331 public Position2D Position2D
2335 Position2D temp = (Position2D)GetValue(Position2DProperty);
2336 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
2340 SetValue(Position2DProperty, value);
2341 NotifyPropertyChanged();
2346 /// Retrieves the screen postion of the view.<br />
2348 /// <since_tizen> 3 </since_tizen>
2349 public Vector2 ScreenPosition
2353 Vector2 temp = new Vector2(0.0f, 0.0f);
2354 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2360 /// Determines whether the pivot point should be used to determine the position of the view.
2361 /// This is true by default.
2363 /// <remarks>If false, then the top-left of the view is used for the position.
2364 /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
2366 /// <since_tizen> 3 </since_tizen>
2367 public bool PositionUsesPivotPoint
2371 return (bool)GetValue(PositionUsesPivotPointProperty);
2375 SetValue(PositionUsesPivotPointProperty, value);
2376 NotifyPropertyChanged();
2381 /// Please do not use! this will be deprecated.
2383 /// Please do not use! this will be deprecated!
2384 /// Instead please use PositionUsesPivotPoint.
2385 /// <since_tizen> 3 </since_tizen>
2386 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2388 "View view = new View(); " +
2389 "view.PivotPoint = PivotPoint.Center; " +
2390 "view.PositionUsesPivotPoint = true;")]
2391 [EditorBrowsable(EditorBrowsableState.Never)]
2392 public bool PositionUsesAnchorPoint
2397 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2402 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2403 NotifyPropertyChanged();
2408 /// Queries whether the view is connected to the stage.<br />
2409 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2411 /// <since_tizen> 3 </since_tizen>
2412 public bool IsOnWindow
2421 /// Gets the depth in the hierarchy for the view.
2423 /// <since_tizen> 3 </since_tizen>
2424 public int HierarchyDepth
2428 return GetHierarchyDepth();
2433 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2436 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
2437 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2438 /// The values set by this property will likely change.
2440 /// <since_tizen> 3 </since_tizen>
2441 public int SiblingOrder
2445 return (int)GetValue(SiblingOrderProperty);
2449 SetValue(SiblingOrderProperty, value);
2450 NotifyPropertyChanged();
2455 /// Returns the natural size of the view.
2458 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2460 /// <since_tizen> 5 </since_tizen>
2461 public Vector3 NaturalSize
2465 Vector3 ret = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
2466 if (NDalicPINVOKE.SWIGPendingException.Pending)
2467 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2473 /// Returns the natural size (Size2D) of the view.
2476 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2478 /// <since_tizen> 4 </since_tizen>
2479 public Size2D NaturalSize2D
2483 Vector3 temp = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
2484 if (NDalicPINVOKE.SWIGPendingException.Pending)
2485 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2487 return new Size2D((int)temp.Width, (int)temp.Height);
2492 /// Gets or sets the origin of a view within its parent's area.<br />
2493 /// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the parent, and (1.0, 1.0, 0.5) is the bottom-right corner.<br />
2494 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
2495 /// A view's position is the distance between this origin and the view's anchor-point.<br />
2497 /// <pre>The view has been initialized.</pre>
2498 /// <since_tizen> 3 </since_tizen>
2499 public Position ParentOrigin
2503 return (Position)GetValue(ParentOriginProperty);
2507 SetValue(ParentOriginProperty, value);
2508 NotifyPropertyChanged();
2513 /// Gets or sets the anchor-point of a view.<br />
2514 /// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the view, and (1.0, 1.0, 0.5) is the bottom-right corner.<br />
2515 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
2516 /// A view position is the distance between its parent-origin and this anchor-point.<br />
2517 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
2518 /// <pre>The view has been initialized.</pre>
2520 /// <since_tizen> 3 </since_tizen>
2521 public Position PivotPoint
2525 return (Position)GetValue(PivotPointProperty);
2529 SetValue(PivotPointProperty, value);
2530 NotifyPropertyChanged();
2535 /// Gets or sets the size width of the view.
2537 /// <since_tizen> 3 </since_tizen>
2538 public float SizeWidth
2542 return (float)GetValue(SizeWidthProperty);
2546 SetValue(SizeWidthProperty, value);
2547 WidthSpecification = (int)Math.Ceiling(value);
2548 NotifyPropertyChanged();
2553 /// Gets or sets the size height of the view.
2555 /// <since_tizen> 3 </since_tizen>
2556 public float SizeHeight
2560 return (float)GetValue(SizeHeightProperty);
2564 SetValue(SizeHeightProperty, value);
2565 HeightSpecification = (int)Math.Ceiling(value);
2566 NotifyPropertyChanged();
2571 /// Gets or sets the position of the view.<br />
2572 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
2573 /// If the position inheritance is disabled, sets the world position.<br />
2575 /// <since_tizen> 3 </since_tizen>
2576 public Position Position
2580 return (Position)GetValue(PositionProperty);
2584 SetValue(PositionProperty, value);
2585 NotifyPropertyChanged();
2590 /// Gets or sets the position X of the view.
2592 /// <since_tizen> 3 </since_tizen>
2593 public float PositionX
2597 return (float)GetValue(PositionXProperty);
2601 SetValue(PositionXProperty, value);
2602 NotifyPropertyChanged();
2607 /// Gets or sets the position Y of the view.
2609 /// <since_tizen> 3 </since_tizen>
2610 public float PositionY
2614 return (float)GetValue(PositionYProperty);
2618 SetValue(PositionYProperty, value);
2619 NotifyPropertyChanged();
2624 /// Gets or sets the position Z of the view.
2626 /// <since_tizen> 3 </since_tizen>
2627 public float PositionZ
2631 return (float)GetValue(PositionZProperty);
2635 SetValue(PositionZProperty, value);
2636 NotifyPropertyChanged();
2641 /// Gets or sets the world position of the view.
2643 /// <since_tizen> 3 </since_tizen>
2644 public Vector3 WorldPosition
2648 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2649 GetProperty(View.Property.WORLD_POSITION).Get(temp);
2655 /// Gets or sets the orientation of the view.<br />
2656 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
2658 /// <remarks>This is an asynchronous method.</remarks>
2659 /// <since_tizen> 3 </since_tizen>
2660 public Rotation Orientation
2664 return (Rotation)GetValue(OrientationProperty);
2668 SetValue(OrientationProperty, value);
2669 NotifyPropertyChanged();
2674 /// Gets or sets the world orientation of the view.<br />
2676 /// <since_tizen> 3 </since_tizen>
2677 public Rotation WorldOrientation
2681 Rotation temp = new Rotation();
2682 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
2688 /// Gets or sets the scale factor applied to the view.<br />
2690 /// <since_tizen> 3 </since_tizen>
2691 public Vector3 Scale
2695 return (Vector3)GetValue(ScaleProperty);
2699 SetValue(ScaleProperty, value);
2700 NotifyPropertyChanged();
2705 /// Gets or sets the scale X factor applied to the view.
2707 /// <since_tizen> 3 </since_tizen>
2712 return (float)GetValue(ScaleXProperty);
2716 SetValue(ScaleXProperty, value);
2717 NotifyPropertyChanged();
2722 /// Gets or sets the scale Y factor applied to the view.
2724 /// <since_tizen> 3 </since_tizen>
2729 return (float)GetValue(ScaleYProperty);
2733 SetValue(ScaleYProperty, value);
2734 NotifyPropertyChanged();
2739 /// Gets or sets the scale Z factor applied to the view.
2741 /// <since_tizen> 3 </since_tizen>
2746 return (float)GetValue(ScaleZProperty);
2750 SetValue(ScaleZProperty, value);
2751 NotifyPropertyChanged();
2756 /// Gets the world scale of the view.
2758 /// <since_tizen> 3 </since_tizen>
2759 public Vector3 WorldScale
2763 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2764 GetProperty(View.Property.WORLD_SCALE).Get(temp);
2770 /// Retrieves the visibility flag of the view.
2773 /// If the view is not visible, then the view and its children will not be rendered.
2774 /// This is regardless of the individual visibility values of the children, i.e., the view will only be rendered if all of its parents have visibility set to true.
2776 /// <since_tizen> 3 </since_tizen>
2777 public bool Visibility
2782 GetProperty(View.Property.VISIBLE).Get(out temp);
2788 /// Gets the view's world color.
2790 /// <since_tizen> 3 </since_tizen>
2791 public Vector4 WorldColor
2795 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2796 GetProperty(View.Property.WORLD_COLOR).Get(temp);
2802 /// Gets or sets the view's name.
2804 /// <since_tizen> 3 </since_tizen>
2809 return (string)GetValue(NameProperty);
2813 SetValue(NameProperty, value);
2814 NotifyPropertyChanged();
2819 /// Get the number of children held by the view.
2821 /// <since_tizen> 3 </since_tizen>
2822 public new uint ChildCount
2826 return GetChildCount();
2831 /// Gets the view's ID.
2834 /// <since_tizen> 3 </since_tizen>
2844 /// Gets or sets the status of whether the view should emit touch or hover signals.
2846 /// <since_tizen> 3 </since_tizen>
2847 public bool Sensitive
2851 return (bool)GetValue(SensitiveProperty);
2855 SetValue(SensitiveProperty, value);
2856 NotifyPropertyChanged();
2861 /// Gets or sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
2863 /// <since_tizen> 3 </since_tizen>
2864 public bool LeaveRequired
2868 return (bool)GetValue(LeaveRequiredProperty);
2872 SetValue(LeaveRequiredProperty, value);
2873 NotifyPropertyChanged();
2878 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2880 /// <since_tizen> 3 </since_tizen>
2881 public bool InheritOrientation
2885 return (bool)GetValue(InheritOrientationProperty);
2889 SetValue(InheritOrientationProperty, value);
2890 NotifyPropertyChanged();
2895 /// Gets or sets the status of whether a child view inherits it's parent's scale.
2897 /// <since_tizen> 3 </since_tizen>
2898 public bool InheritScale
2902 return (bool)GetValue(InheritScaleProperty);
2906 SetValue(InheritScaleProperty, value);
2907 NotifyPropertyChanged();
2912 /// Gets or sets the status of how the view and its children should be drawn.<br />
2913 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2914 /// If an object is in a 3D layer, it will be depth-tested against other objects in the world, i.e., it may be obscured if other objects are in front.<br />
2915 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2916 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2917 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2919 /// <since_tizen> 3 </since_tizen>
2920 public DrawModeType DrawMode
2924 return (DrawModeType)GetValue(DrawModeProperty);
2928 SetValue(DrawModeProperty, value);
2929 NotifyPropertyChanged();
2934 /// Gets or sets the relative to parent size factor of the view.<br />
2935 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2936 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2938 /// <since_tizen> 3 </since_tizen>
2939 public Vector3 SizeModeFactor
2943 return (Vector3)GetValue(SizeModeFactorProperty);
2947 SetValue(SizeModeFactorProperty, value);
2948 NotifyPropertyChanged();
2953 /// Gets or sets the width resize policy to be used.
2955 /// <since_tizen> 3 </since_tizen>
2956 public ResizePolicyType WidthResizePolicy
2960 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2964 SetValue(WidthResizePolicyProperty, value);
2965 // Match ResizePolicy to new Layouting.
2966 // Parent relative policies can not be mapped at this point as parent size unknown.
2969 case ResizePolicyType.UseNaturalSize:
2971 WidthSpecification = LayoutParamPolicies.WrapContent;
2974 case ResizePolicyType.FillToParent:
2976 WidthSpecification = LayoutParamPolicies.MatchParent;
2979 case ResizePolicyType.FitToChildren:
2981 WidthSpecification = LayoutParamPolicies.WrapContent;
2987 NotifyPropertyChanged();
2992 /// Gets or sets the height resize policy to be used.
2994 /// <since_tizen> 3 </since_tizen>
2995 public ResizePolicyType HeightResizePolicy
2999 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
3003 SetValue(HeightResizePolicyProperty, value);
3004 // Match ResizePolicy to new Layouting.
3005 // Parent relative policies can not be mapped at this point as parent size unknown.
3008 case ResizePolicyType.UseNaturalSize:
3010 HeightSpecification = LayoutParamPolicies.WrapContent;
3013 case ResizePolicyType.FillToParent:
3015 HeightSpecification = LayoutParamPolicies.MatchParent;
3018 case ResizePolicyType.FitToChildren:
3020 HeightSpecification = LayoutParamPolicies.WrapContent;
3026 NotifyPropertyChanged();
3031 /// Gets or sets the policy to use when setting size with size negotiation.<br />
3032 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
3034 /// <since_tizen> 3 </since_tizen>
3035 public SizeScalePolicyType SizeScalePolicy
3039 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
3043 SetValue(SizeScalePolicyProperty, value);
3044 NotifyPropertyChanged();
3049 /// Gets or sets the status of whether the width size is dependent on the height size.
3051 /// <since_tizen> 3 </since_tizen>
3052 public bool WidthForHeight
3056 return (bool)GetValue(WidthForHeightProperty);
3060 SetValue(WidthForHeightProperty, value);
3061 NotifyPropertyChanged();
3066 /// Gets or sets the status of whether the height size is dependent on the width size.
3068 /// <since_tizen> 3 </since_tizen>
3069 public bool HeightForWidth
3073 return (bool)GetValue(HeightForWidthProperty);
3077 SetValue(HeightForWidthProperty, value);
3078 NotifyPropertyChanged();
3083 /// Gets or sets the padding for use in layout.
3085 /// <since_tizen> 5 </since_tizen>
3086 public Extents Padding
3090 return (Extents)GetValue(PaddingProperty);
3094 SetValue(PaddingProperty, value);
3095 NotifyPropertyChanged();
3096 _layout?.RequestLayout();
3101 /// Gets or sets the minimum size the view can be assigned in size negotiation.
3103 /// <since_tizen> 3 </since_tizen>
3104 public Size2D MinimumSize
3108 return (Size2D)GetValue(MinimumSizeProperty);
3112 if (_layout != null)
3114 // Note: it only works if minimum size is >= than natural size.
3115 // To force the size it should be done through the width&height spec or Size2D.
3116 _layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
3117 _layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
3118 _layout.RequestLayout();
3120 SetValue(MinimumSizeProperty, value);
3121 NotifyPropertyChanged();
3126 /// Gets or sets the maximum size the view can be assigned in size negotiation.
3128 /// <since_tizen> 3 </since_tizen>
3129 public Size2D MaximumSize
3133 return (Size2D)GetValue(MaximumSizeProperty);
3137 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
3138 // MATCH_PARENT spec + parent container size can be used to limit
3139 if (_layout != null)
3141 // Note: it only works if minimum size is >= than natural size.
3142 // To force the size it should be done through the width&height spec or Size2D.
3143 _layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Width);
3144 _layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Height);
3145 _layout.RequestLayout();
3147 SetValue(MaximumSizeProperty, value);
3148 NotifyPropertyChanged();
3153 /// Gets or sets whether a child view inherits it's parent's position.<br />
3154 /// Default is to inherit.<br />
3155 /// Switching this off means that using position sets the view's world position, i.e., translates from the world origin (0,0,0) to the pivot point of the view.<br />
3157 /// <since_tizen> 3 </since_tizen>
3158 public bool InheritPosition
3162 return (bool)GetValue(InheritPositionProperty);
3166 SetValue(InheritPositionProperty, value);
3167 NotifyPropertyChanged();
3172 /// Gets or sets the clipping behavior (mode) of it's children.
3174 /// <since_tizen> 3 </since_tizen>
3175 public ClippingModeType ClippingMode
3179 return (ClippingModeType)GetValue(ClippingModeProperty);
3183 SetValue(ClippingModeProperty, value);
3184 NotifyPropertyChanged();
3189 /// Gets the number of renderers held by the view.
3191 /// <since_tizen> 3 </since_tizen>
3192 public uint RendererCount
3196 return GetRendererCount();
3201 /// [Obsolete("Please do not use! this will be deprecated")]
3203 /// <since_tizen> 3 </since_tizen>
3204 /// Please do not use! this will be deprecated!
3205 /// Instead please use PivotPoint.
3206 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
3208 "View view = new View(); " +
3209 "view.PivotPoint = PivotPoint.Center; " +
3210 "view.PositionUsesPivotPoint = true;")]
3211 [EditorBrowsable(EditorBrowsableState.Never)]
3212 public Position AnchorPoint
3216 Position temp = new Position(0.0f, 0.0f, 0.0f);
3217 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3222 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3223 NotifyPropertyChanged();
3228 /// Sets the size of a view for the width, the height and the depth.<br />
3229 /// Geometry can be scaled to fit within this area.<br />
3230 /// This does not interfere with the view's scale factor.<br />
3231 /// The views default depth is the minimum of width and height.<br />
3234 /// Please note that multi-cascade setting is not possible for this NUI object. <br />
3235 /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3236 /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
3237 /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
3238 /// It may not match the current value in some cases, i.e. when the animation is progressing or the maximum or minimu size is set. <br />
3240 /// <since_tizen> 5 </since_tizen>
3245 return (Size)GetValue(SizeProperty);
3249 SetValue(SizeProperty, value);
3250 // Set Specification so when layouts measure this View it matches the value set here.
3251 // All Views are currently Layouts.
3252 WidthSpecification = (int)Math.Ceiling(value.Width);
3253 HeightSpecification = (int)Math.Ceiling(value.Height);
3254 NotifyPropertyChanged();
3259 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
3261 /// <since_tizen> 3 </since_tizen>
3262 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
3264 "Container parent = view.GetParent(); " +
3265 "View view = parent as View;")]
3266 [EditorBrowsable(EditorBrowsableState.Never)]
3267 public new View Parent
3272 IntPtr cPtr = Interop.Actor.Actor_GetParent(swigCPtr);
3273 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3274 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3276 if (basehandle is Layer layer)
3278 ret = new View(Layer.getCPtr(layer).Handle, false);
3279 NUILog.Error("This Parent property is deprecated, shoud do not be used");
3283 ret = basehandle as View;
3286 Interop.BaseHandle.delete_BaseHandle(CPtr);
3287 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3289 if (NDalicPINVOKE.SWIGPendingException.Pending)
3290 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3296 /// Gets/Sets whether inherit parent's the layout Direction.
3298 /// <since_tizen> 4 </since_tizen>
3299 public bool InheritLayoutDirection
3303 return (bool)GetValue(InheritLayoutDirectionProperty);
3307 SetValue(InheritLayoutDirectionProperty, value);
3308 NotifyPropertyChanged();
3313 /// Gets/Sets the layout Direction.
3315 /// <since_tizen> 4 </since_tizen>
3316 public ViewLayoutDirectionType LayoutDirection
3320 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
3324 SetValue(LayoutDirectionProperty, value);
3325 NotifyPropertyChanged();
3326 _layout?.RequestLayout();
3331 /// Gets or sets the Margin for use in layout.
3334 /// Margin property is supported by Layout algorithms and containers.
3335 /// Please Set Layout if you want to use Margin property.
3337 /// <since_tizen> 4 </since_tizen>
3338 public Extents Margin
3342 return (Extents)GetValue(MarginProperty);
3346 SetValue(MarginProperty, value);
3347 NotifyPropertyChanged();
3348 _layout?.RequestLayout();
3353 /// The required policy for this dimension, ChildLayoutData enum or exact value.
3355 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3356 [EditorBrowsable(EditorBrowsableState.Never)]
3357 public int WidthSpecification
3361 return _widthPolicy;
3365 _widthPolicy = value;
3366 if (_widthPolicy >= 0)
3368 _measureSpecificationWidth = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
3369 Size2D.Width = _widthPolicy;
3371 _layout?.RequestLayout();
3376 /// The required policy for this dimension, ChildLayoutData enum or exact value.
3378 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3379 [EditorBrowsable(EditorBrowsableState.Never)]
3380 public int HeightSpecification
3384 return _heightPolicy;
3388 _heightPolicy = value;
3389 if (_heightPolicy >= 0)
3391 _measureSpecificationHeight = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
3392 Size2D.Height = _heightPolicy;
3394 _layout?.RequestLayout();
3399 /// [Obsolete("Please do not use! this will be deprecated")]
3401 /// Please do not use! this will be deprecated!
3402 /// Instead please use Padding.
3403 /// <since_tizen> 4 </since_tizen>
3404 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
3405 [EditorBrowsable(EditorBrowsableState.Never)]
3406 public Extents PaddingEX
3410 Extents temp = new Extents(0, 0, 0, 0);
3411 GetProperty(View.Property.PADDING).Get(temp);
3416 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3417 NotifyPropertyChanged();
3418 _layout?.RequestLayout();
3422 internal Style Style
3426 return (Style)GetValue(StyleProperty);
3430 SetValue(StyleProperty, value);
3435 /// Child property to specify desired width
3437 internal int LayoutWidthSpecificationFixed
3441 return _widthPolicy;
3445 _widthPolicy = value;
3446 _measureSpecificationWidth = new MeasureSpecification(new LayoutLength(value), MeasureSpecification.ModeType.Exactly);
3447 Size2D.Width = value;
3448 _layout?.RequestLayout();
3453 /// Child property to specify desired height
3455 internal int LayoutHeightSpecificationFixed
3459 return _heightPolicy;
3463 _heightPolicy = value;
3464 _measureSpecificationHeight = new MeasureSpecification(new LayoutLength(value), MeasureSpecification.ModeType.Exactly);
3465 Size2D.Height = value;
3466 _layout?.RequestLayout();
3471 /// Child property to specify desired width, use MatchParent/WrapContent)
3473 internal ChildLayoutData LayoutWidthSpecification
3477 return (ChildLayoutData)_widthPolicy;
3481 _widthPolicy = (int)value;
3486 /// Child property to specify desired height, use MatchParent/WrapContent)
3488 internal ChildLayoutData LayoutHeightSpecification
3492 return (ChildLayoutData)_heightPolicy;
3496 _heightPolicy = (int)value;
3500 internal float Weight
3509 _layout.RequestLayout();
3513 internal bool BackgroundImageSynchronosLoading
3517 return _backgroundImageSynchronosLoading;
3521 if (value != _backgroundImageSynchronosLoading)
3524 PropertyMap bgMap = this.Background;
3526 bgMap.Find(Visual.Property.Type)?.Get(out visualType);
3527 if (visualType == (int)Visual.Type.Image)
3529 bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
3531 if (bgUrl.Length != 0)
3533 _backgroundImageSynchronosLoading = value;
3534 bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
3535 this.Background = bgMap;
3541 internal float WorldPositionX
3546 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3551 internal float WorldPositionY
3556 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3561 internal float WorldPositionZ
3566 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3571 internal bool FocusState
3575 return IsKeyboardFocusable();
3579 SetKeyboardFocusable(value);
3584 /// Set the layout on this View. Replaces any existing Layout.
3588 internal LayoutItem Layout
3596 // Do nothing if layout provided is already set on this View.
3597 if (value == _layout)
3602 Log.Info("NUI", "Setting Layout on:" + Name + "\n");
3603 layoutingDisabled = false;
3606 // If new layout being set already has a owner then that owner receives a replacement default layout.
3607 // First check if the layout to be set already has a owner.
3608 if ( value.Owner != null )
3610 Log.Info("NUI", "Set layout already in use by another View: " + value.Owner.Name + "will get a LayoutGroup\n");
3611 // Previous owner of the layout gets a default layout as a replacement.
3612 value.Owner.Layout = new LayoutGroup();
3615 // Remove existing layout from it's parent layout group.
3616 _layout?.Unparent();
3618 // Set layout to this view
3623 internal void SetLayout(LayoutItem layout)
3626 _layout.AttachToOwner(this);
3627 _layout.RequestLayout();
3631 /// Stores the calculated width value and its ModeType. Width component.
3633 internal MeasureSpecification MeasureSpecificationWidth
3637 _measureSpecificationWidth = value;
3638 _layout?.RequestLayout();
3642 return _measureSpecificationWidth;
3647 /// Stores the calculated width value and its ModeType. Height component.
3649 internal MeasureSpecification MeasureSpecificationHeight
3653 _measureSpecificationHeight = value;
3654 _layout?.RequestLayout();
3658 return _measureSpecificationHeight;
3662 internal float ParentOriginX
3667 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3672 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3673 NotifyPropertyChanged();
3677 internal float ParentOriginY
3682 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3687 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3688 NotifyPropertyChanged();
3692 internal float ParentOriginZ
3697 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3702 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3703 NotifyPropertyChanged();
3707 internal float PivotPointX
3712 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3717 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3721 internal float PivotPointY
3726 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3731 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3735 internal float PivotPointZ
3740 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3745 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3749 internal Matrix WorldMatrix
3753 Matrix temp = new Matrix();
3754 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3759 private int LeftFocusableViewId
3764 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
3769 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3773 private int RightFocusableViewId
3778 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
3783 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3787 private int UpFocusableViewId
3792 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
3797 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3801 private int DownFocusableViewId
3806 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
3811 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3816 /// Perform an action on a visual registered to this view. <br />
3817 /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
3819 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
3820 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
3821 /// <param name="attributes">Optional attributes for the action.</param>
3822 /// <since_tizen> 5 </since_tizen>
3823 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
3825 Interop.View.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
3826 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3830 /// Creates an animation to animate the background color visual. If there is no
3831 /// background visual, creates one with transparent black as it's mixColor.
3833 /// <since_tizen> 3 </since_tizen>
3834 public Animation AnimateBackgroundColor(object destinationValue,
3837 AlphaFunction.BuiltinFunctions? alphaFunction = null,
3838 object initialValue = null)
3840 Tizen.NUI.PropertyMap background = Background;
3842 if (background.Empty())
3844 // If there is no background yet, ensure there is a transparent
3846 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
3847 background = Background;
3849 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
3853 /// Creates an animation to animate the mixColor of the named visual.
3855 /// <since_tizen> 3 </since_tizen>
3856 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
3858 Animation animation = null;
3860 PropertyMap _animator = new PropertyMap();
3861 if (alphaFunction != null)
3863 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
3866 PropertyMap _timePeriod = new PropertyMap();
3867 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
3868 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
3869 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
3871 PropertyMap _transition = new PropertyMap();
3872 _transition.Add("animator", new PropertyValue(_animator));
3873 _transition.Add("target", new PropertyValue(targetVisual));
3874 _transition.Add("property", new PropertyValue("mixColor"));
3876 if (initialColor != null)
3878 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
3879 _transition.Add("initialValue", initValue);
3882 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
3883 _transition.Add("targetValue", destValue);
3884 TransitionData _transitionData = new TransitionData(_transition);
3886 animation = new Animation(Interop.View.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
3887 if (NDalicPINVOKE.SWIGPendingException.Pending)
3888 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3893 // From Container Base class
3895 /// Adds a child view to this view.
3897 /// <seealso cref="Container.Add" />
3898 /// <since_tizen> 4 </since_tizen>
3899 public override void Add(View child)
3901 bool hasLayout = (_layout != null);
3902 Log.Info("NUI", "Add:" + child.Name + " to View:" + Name + "which has layout[" + hasLayout + "] + \n");
3906 Tizen.Log.Fatal("NUI", "Child is null");
3910 Container oldParent = child.GetParent();
3911 if (oldParent != this)
3913 // If child already has a parent then re-parent child
3914 if (oldParent != null)
3916 oldParent.Remove(child);
3918 child.InternalParent = this;
3920 Interop.Actor.Actor_Add(swigCPtr, View.getCPtr(child));
3922 if (NDalicPINVOKE.SWIGPendingException.Pending)
3923 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3924 Children.Add(child);
3926 if (ChildAdded != null)
3928 ChildAddedEventArgs e = new ChildAddedEventArgs
3932 ChildAdded(this, e);
3938 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
3940 /// <seealso cref="Container.Remove" />
3941 /// <since_tizen> 4 </since_tizen>
3942 public override void Remove(View child)
3944 bool hasLayout = (_layout != null);
3945 Log.Info("NUI","Removing View:" + child.Name + "layout[" + hasLayout.ToString() +"]\n");
3947 Interop.Actor.Actor_Remove(swigCPtr, View.getCPtr(child));
3948 if (NDalicPINVOKE.SWIGPendingException.Pending)
3949 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3951 Children.Remove(child);
3952 child.InternalParent = null;
3954 if (ChildRemoved != null)
3956 ChildRemovedEventArgs e = new ChildRemovedEventArgs
3960 ChildRemoved(this, e);
3965 /// Retrieves a child view by index.
3967 /// <seealso cref="Container.GetChildAt" />
3968 /// <since_tizen> 4 </since_tizen>
3969 public override View GetChildAt(uint index)
3971 if (index < Children.Count)
3973 return Children[Convert.ToInt32(index)];
3982 /// Retrieves the number of children held by the view.
3984 /// <seealso cref="Container.GetChildCount" />
3985 /// <since_tizen> 4 </since_tizen>
3986 public override uint GetChildCount()
3988 return Convert.ToUInt32(Children.Count);
3992 /// Gets the views parent.
3994 /// <seealso cref="Container.GetParent()" />
3995 /// <since_tizen> 4 </since_tizen>
3996 public override Container GetParent()
3998 return this.InternalParent as Container;
4002 /// Queries whether the view has a focus.
4004 /// <returns>True if this view has a focus.</returns>
4005 /// <since_tizen> 3 </since_tizen>
4006 public bool HasFocus()
4008 bool ret = Interop.View.View_HasKeyInputFocus(swigCPtr);
4009 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4014 /// Sets the name of the style to be applied to the view.
4016 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
4017 /// <since_tizen> 3 </since_tizen>
4018 public void SetStyleName(string styleName)
4020 Interop.View.View_SetStyleName(swigCPtr, styleName);
4021 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4025 /// Retrieves the name of the style to be applied to the view (if any).
4027 /// <returns>A string matching a style, or an empty string.</returns>
4028 /// <since_tizen> 3 </since_tizen>
4029 public string GetStyleName()
4031 string ret = Interop.View.View_GetStyleName(swigCPtr);
4032 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4037 /// Clears the background.
4039 /// <since_tizen> 3 </since_tizen>
4040 public void ClearBackground()
4042 Interop.View.View_ClearBackground(swigCPtr);
4043 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4050 /// This is an asynchronous method.
4052 /// <since_tizen> 3 </since_tizen>
4062 /// This is an asynchronous method.
4063 /// If the view is hidden, then the view and its children will not be rendered.
4064 /// This is regardless of the individual visibility of the children, i.e., the view will only be rendered if all of its parents are shown.
4066 /// <since_tizen> 3 </since_tizen>
4073 /// Raises the view above all other views.
4076 /// Sibling order of views within the parent will be updated automatically.
4077 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
4079 /// <since_tizen> 3 </since_tizen>
4080 public void RaiseToTop()
4082 var parentChildren = GetParent()?.Children;
4084 if (parentChildren != null)
4086 parentChildren.Remove(this);
4087 parentChildren.Add(this);
4089 Interop.NDalic.RaiseToTop(swigCPtr);
4090 if (NDalicPINVOKE.SWIGPendingException.Pending)
4091 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4097 /// Lowers the view to the bottom of all views.
4100 /// The sibling order of views within the parent will be updated automatically.
4101 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4103 /// <since_tizen> 3 </since_tizen>
4104 public void LowerToBottom()
4106 var parentChildren = GetParent()?.Children;
4108 if (parentChildren != null)
4110 parentChildren.Remove(this);
4111 parentChildren.Insert(0, this);
4113 Interop.NDalic.LowerToBottom(swigCPtr);
4114 if (NDalicPINVOKE.SWIGPendingException.Pending)
4115 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4120 /// Queries if all resources required by a view are loaded and ready.
4122 /// <remarks>Most resources are only loaded when the control is placed on the stage.
4124 /// <since_tizen> 3 </since_tizen>
4125 public bool IsResourceReady()
4127 bool ret = Interop.View.IsResourceReady(swigCPtr);
4128 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4133 /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
4135 /// <pre>The view has been initialized. </pre>
4136 /// <returns>The parent layer of view </returns>
4137 /// <since_tizen> 5 </since_tizen>
4138 public Layer GetLayer()
4140 //to fix memory leak issue, match the handle count with native side.
4141 IntPtr cPtr = Interop.Actor.Actor_GetLayer(swigCPtr);
4142 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4143 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
4144 Interop.BaseHandle.delete_BaseHandle(CPtr);
4145 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4147 if (NDalicPINVOKE.SWIGPendingException.Pending)
4148 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4153 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
4155 /// <pre>The (child) view has been initialized. </pre>
4156 /// <since_tizen> 4 </since_tizen>
4157 public void Unparent()
4159 GetParent()?.Remove(this);
4163 /// Search through this view's hierarchy for a view with the given name.
4164 /// The view itself is also considered in the search.
4166 /// <pre>The view has been initialized.</pre>
4167 /// <param name="viewName">The name of the view to find.</param>
4168 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
4169 /// <since_tizen> 3 </since_tizen>
4170 public View FindChildByName(string viewName)
4172 //to fix memory leak issue, match the handle count with native side.
4173 IntPtr cPtr = Interop.Actor.Actor_FindChildByName(swigCPtr, viewName);
4174 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4175 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4176 Interop.BaseHandle.delete_BaseHandle(CPtr);
4177 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4179 if (NDalicPINVOKE.SWIGPendingException.Pending)
4180 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4185 /// Converts screen coordinates into the view's coordinate system using the default camera.
4187 /// <pre>The view has been initialized.</pre>
4188 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4189 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4190 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4191 /// <param name="screenX">The screen X-coordinate.</param>
4192 /// <param name="screenY">The screen Y-coordinate.</param>
4193 /// <returns>True if the conversion succeeded.</returns>
4194 /// <since_tizen> 3 </since_tizen>
4195 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4197 bool ret = Interop.Actor.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4198 if (NDalicPINVOKE.SWIGPendingException.Pending)
4199 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4204 /// Sets the relative to parent size factor of the view.<br />
4205 /// This factor is only used when ResizePolicy is set to either:
4206 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4207 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4209 /// <pre>The view has been initialized.</pre>
4210 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4211 /// <since_tizen> 3 </since_tizen>
4212 public void SetSizeModeFactor(Vector3 factor)
4214 Interop.Actor.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4215 if (NDalicPINVOKE.SWIGPendingException.Pending)
4216 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4219 /// Calculates the height of the view given a width.<br />
4220 /// The natural size is used for default calculation.<br />
4221 /// Size 0 is treated as aspect ratio 1:1.<br />
4223 /// <param name="width">The width to use.</param>
4224 /// <returns>The height based on the width.</returns>
4225 /// <since_tizen> 3 </since_tizen>
4226 public float GetHeightForWidth(float width)
4228 float ret = Interop.Actor.Actor_GetHeightForWidth(swigCPtr, width);
4229 if (NDalicPINVOKE.SWIGPendingException.Pending)
4230 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4235 /// Calculates the width of the view given a height.<br />
4236 /// The natural size is used for default calculation.<br />
4237 /// Size 0 is treated as aspect ratio 1:1.<br />
4239 /// <param name="height">The height to use.</param>
4240 /// <returns>The width based on the height.</returns>
4241 /// <since_tizen> 3 </since_tizen>
4242 public float GetWidthForHeight(float height)
4244 float ret = Interop.Actor.Actor_GetWidthForHeight(swigCPtr, height);
4245 if (NDalicPINVOKE.SWIGPendingException.Pending)
4246 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4251 /// Return the amount of size allocated for relayout.
4253 /// <param name="dimension">The dimension to retrieve.</param>
4254 /// <returns>Return the size.</returns>
4255 /// <since_tizen> 3 </since_tizen>
4256 public float GetRelayoutSize(DimensionType dimension)
4258 float ret = Interop.Actor.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4259 if (NDalicPINVOKE.SWIGPendingException.Pending)
4260 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4265 /// Set the padding for the view.
4267 /// <param name="padding">Padding for the view.</param>
4268 /// <since_tizen> 3 </since_tizen>
4269 public void SetPadding(PaddingType padding)
4271 Interop.Actor.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4272 if (NDalicPINVOKE.SWIGPendingException.Pending)
4273 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4277 /// Return the value of padding for the view.
4279 /// <param name="paddingOut">the value of padding for the view</param>
4280 /// <since_tizen> 3 </since_tizen>
4281 public void GetPadding(PaddingType paddingOut)
4283 Interop.Actor.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4284 if (NDalicPINVOKE.SWIGPendingException.Pending)
4285 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4288 /// <since_tizen> 3 </since_tizen>
4289 public uint AddRenderer(Renderer renderer)
4291 uint ret = Interop.Actor.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4292 if (NDalicPINVOKE.SWIGPendingException.Pending)
4293 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4297 /// <since_tizen> 3 </since_tizen>
4298 public Renderer GetRendererAt(uint index)
4300 //to fix memory leak issue, match the handle count with native side.
4301 IntPtr cPtr = Interop.Actor.Actor_GetRendererAt(swigCPtr, index);
4302 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4303 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4304 if (cPtr != null && ret == null)
4306 ret = new Renderer(cPtr, false);
4307 if (NDalicPINVOKE.SWIGPendingException.Pending)
4308 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4311 Interop.BaseHandle.delete_BaseHandle(CPtr);
4312 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4314 if (NDalicPINVOKE.SWIGPendingException.Pending)
4315 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4319 /// <since_tizen> 3 </since_tizen>
4320 public void RemoveRenderer(Renderer renderer)
4322 Interop.Actor.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4323 if (NDalicPINVOKE.SWIGPendingException.Pending)
4324 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4327 /// <since_tizen> 3 </since_tizen>
4328 public void RemoveRenderer(uint index)
4330 Interop.Actor.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4331 if (NDalicPINVOKE.SWIGPendingException.Pending)
4332 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4335 internal void Raise()
4337 var parentChildren = GetParent()?.Children;
4339 if (parentChildren != null)
4341 int currentIndex = parentChildren.IndexOf(this);
4343 // If the view is not already the last item in the list.
4344 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
4346 View temp = parentChildren[currentIndex + 1];
4347 parentChildren[currentIndex + 1] = this;
4348 parentChildren[currentIndex] = temp;
4350 Interop.NDalic.Raise(swigCPtr);
4351 if (NDalicPINVOKE.SWIGPendingException.Pending)
4352 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4357 internal void Lower()
4359 var parentChildren = GetParent()?.Children;
4361 if (parentChildren != null)
4363 int currentIndex = parentChildren.IndexOf(this);
4365 // If the view is not already the first item in the list.
4366 if (currentIndex > 0 && currentIndex < parentChildren.Count)
4368 View temp = parentChildren[currentIndex - 1];
4369 parentChildren[currentIndex - 1] = this;
4370 parentChildren[currentIndex] = temp;
4372 Interop.NDalic.Lower(swigCPtr);
4373 if (NDalicPINVOKE.SWIGPendingException.Pending)
4374 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4380 /// Raises the view to above the target view.
4382 /// <remarks>The sibling order of views within the parent will be updated automatically.
4383 /// Views on the level above the target view will still be shown above this view.
4384 /// Raising this view above views with the same sibling order as each other will raise this view above them.
4385 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4387 /// <param name="target">Will be raised above this view.</param>
4388 internal void RaiseAbove(View target)
4390 var parentChildren = GetParent()?.Children;
4392 if (parentChildren != null)
4394 int currentIndex = parentChildren.IndexOf(this);
4395 int targetIndex = parentChildren.IndexOf(target);
4397 if (currentIndex < 0 || targetIndex < 0 ||
4398 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4400 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4403 // If the currentIndex is less than the target index and the target has the same parent.
4404 if (currentIndex < targetIndex)
4406 parentChildren.Remove(this);
4407 parentChildren.Insert(targetIndex, this);
4409 Interop.NDalic.RaiseAbove(swigCPtr, View.getCPtr(target));
4410 if (NDalicPINVOKE.SWIGPendingException.Pending)
4411 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4418 /// Lowers the view to below the target view.
4420 /// <remarks>The sibling order of views within the parent will be updated automatically.
4421 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
4422 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4424 /// <param name="target">Will be lowered below this view.</param>
4425 internal void LowerBelow(View target)
4427 var parentChildren = GetParent()?.Children;
4429 if (parentChildren != null)
4431 int currentIndex = parentChildren.IndexOf(this);
4432 int targetIndex = parentChildren.IndexOf(target);
4433 if (currentIndex < 0 || targetIndex < 0 ||
4434 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4436 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4440 // If the currentIndex is not already the 0th index and the target has the same parent.
4441 if ((currentIndex != 0) && (targetIndex != -1) &&
4442 (currentIndex > targetIndex))
4444 parentChildren.Remove(this);
4445 parentChildren.Insert(targetIndex, this);
4447 Interop.NDalic.LowerBelow(swigCPtr, View.getCPtr(target));
4448 if (NDalicPINVOKE.SWIGPendingException.Pending)
4449 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4455 internal string GetName()
4457 string ret = Interop.Actor.Actor_GetName(swigCPtr);
4458 if (NDalicPINVOKE.SWIGPendingException.Pending)
4459 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4463 internal void SetName(string name)
4465 Interop.Actor.Actor_SetName(swigCPtr, name);
4466 if (NDalicPINVOKE.SWIGPendingException.Pending)
4467 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4470 internal uint GetId()
4472 uint ret = Interop.Actor.Actor_GetId(swigCPtr);
4473 if (NDalicPINVOKE.SWIGPendingException.Pending)
4474 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4478 internal bool IsRoot()
4480 bool ret = Interop.ActorInternal.Actor_IsRoot(swigCPtr);
4481 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4485 internal bool OnWindow()
4487 bool ret = Interop.Actor.Actor_OnStage(swigCPtr);
4488 if (NDalicPINVOKE.SWIGPendingException.Pending)
4489 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4493 internal View FindChildById(uint id)
4495 //to fix memory leak issue, match the handle count with native side.
4496 IntPtr cPtr = Interop.Actor.Actor_FindChildById(swigCPtr, id);
4497 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4498 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4499 Interop.BaseHandle.delete_BaseHandle(CPtr);
4500 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4502 if (NDalicPINVOKE.SWIGPendingException.Pending)
4503 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4507 internal void SetParentOrigin(Vector3 origin)
4509 Interop.ActorInternal.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
4510 if (NDalicPINVOKE.SWIGPendingException.Pending)
4511 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4514 internal Vector3 GetCurrentParentOrigin()
4516 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentParentOrigin(swigCPtr), true);
4517 if (NDalicPINVOKE.SWIGPendingException.Pending)
4518 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4522 internal void SetAnchorPoint(Vector3 anchorPoint)
4524 Interop.Actor.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
4525 if (NDalicPINVOKE.SWIGPendingException.Pending)
4526 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4529 internal Vector3 GetCurrentAnchorPoint()
4531 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentAnchorPoint(swigCPtr), true);
4532 if (NDalicPINVOKE.SWIGPendingException.Pending)
4533 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4537 internal void SetSize(float width, float height)
4539 Interop.ActorInternal.Actor_SetSize__SWIG_0(swigCPtr, width, height);
4540 if (NDalicPINVOKE.SWIGPendingException.Pending)
4541 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4544 internal void SetSize(float width, float height, float depth)
4546 Interop.ActorInternal.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
4547 if (NDalicPINVOKE.SWIGPendingException.Pending)
4548 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4551 internal void SetSize(Vector2 size)
4553 Interop.ActorInternal.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
4554 if (NDalicPINVOKE.SWIGPendingException.Pending)
4555 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4558 internal void SetSize(Vector3 size)
4560 Interop.ActorInternal.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
4561 if (NDalicPINVOKE.SWIGPendingException.Pending)
4562 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4565 internal Vector3 GetTargetSize()
4567 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetTargetSize(swigCPtr), true);
4568 if (NDalicPINVOKE.SWIGPendingException.Pending)
4569 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4573 internal Size2D GetCurrentSize()
4575 Size ret = new Size(Interop.Actor.Actor_GetCurrentSize(swigCPtr), true);
4576 if (NDalicPINVOKE.SWIGPendingException.Pending)
4577 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4578 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
4582 internal Vector3 GetNaturalSize()
4584 Vector3 ret = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
4585 if (NDalicPINVOKE.SWIGPendingException.Pending)
4586 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4590 internal void SetPosition(float x, float y)
4592 Interop.ActorInternal.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
4593 if (NDalicPINVOKE.SWIGPendingException.Pending)
4594 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4597 internal void SetPosition(float x, float y, float z)
4599 Interop.ActorInternal.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
4600 if (NDalicPINVOKE.SWIGPendingException.Pending)
4601 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4604 internal void SetPosition(Vector3 position)
4606 Interop.ActorInternal.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
4607 if (NDalicPINVOKE.SWIGPendingException.Pending)
4608 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4611 internal void SetX(float x)
4613 Interop.ActorInternal.Actor_SetX(swigCPtr, x);
4614 if (NDalicPINVOKE.SWIGPendingException.Pending)
4615 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4618 internal void SetY(float y)
4620 Interop.ActorInternal.Actor_SetY(swigCPtr, y);
4621 if (NDalicPINVOKE.SWIGPendingException.Pending)
4622 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4625 internal void SetZ(float z)
4627 Interop.ActorInternal.Actor_SetZ(swigCPtr, z);
4628 if (NDalicPINVOKE.SWIGPendingException.Pending)
4629 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4632 internal void TranslateBy(Vector3 distance)
4634 Interop.ActorInternal.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
4635 if (NDalicPINVOKE.SWIGPendingException.Pending)
4636 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4639 internal Position GetCurrentPosition()
4641 Position ret = new Position(Interop.Actor.Actor_GetCurrentPosition(swigCPtr), true);
4642 if (NDalicPINVOKE.SWIGPendingException.Pending)
4643 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4647 internal Vector3 GetCurrentWorldPosition()
4649 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentWorldPosition(swigCPtr), true);
4650 if (NDalicPINVOKE.SWIGPendingException.Pending)
4651 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4655 internal void SetInheritPosition(bool inherit)
4657 Interop.ActorInternal.Actor_SetInheritPosition(swigCPtr, inherit);
4658 if (NDalicPINVOKE.SWIGPendingException.Pending)
4659 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4662 internal bool IsPositionInherited()
4664 bool ret = Interop.ActorInternal.Actor_IsPositionInherited(swigCPtr);
4665 if (NDalicPINVOKE.SWIGPendingException.Pending)
4666 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4670 internal void SetOrientation(Degree angle, Vector3 axis)
4672 Interop.ActorInternal.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4673 if (NDalicPINVOKE.SWIGPendingException.Pending)
4674 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4677 internal void SetOrientation(Radian angle, Vector3 axis)
4679 Interop.ActorInternal.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4680 if (NDalicPINVOKE.SWIGPendingException.Pending)
4681 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4684 internal void SetOrientation(Rotation orientation)
4686 Interop.ActorInternal.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
4687 if (NDalicPINVOKE.SWIGPendingException.Pending)
4688 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4691 internal void RotateBy(Degree angle, Vector3 axis)
4693 Interop.ActorInternal.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4694 if (NDalicPINVOKE.SWIGPendingException.Pending)
4695 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4698 internal void RotateBy(Radian angle, Vector3 axis)
4700 Interop.ActorInternal.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4701 if (NDalicPINVOKE.SWIGPendingException.Pending)
4702 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4705 internal void RotateBy(Rotation relativeRotation)
4707 Interop.ActorInternal.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4708 if (NDalicPINVOKE.SWIGPendingException.Pending)
4709 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4712 internal Rotation GetCurrentOrientation()
4714 Rotation ret = new Rotation(Interop.ActorInternal.Actor_GetCurrentOrientation(swigCPtr), true);
4715 if (NDalicPINVOKE.SWIGPendingException.Pending)
4716 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4720 internal void SetInheritOrientation(bool inherit)
4722 Interop.ActorInternal.Actor_SetInheritOrientation(swigCPtr, inherit);
4723 if (NDalicPINVOKE.SWIGPendingException.Pending)
4724 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4727 internal bool IsOrientationInherited()
4729 bool ret = Interop.ActorInternal.Actor_IsOrientationInherited(swigCPtr);
4730 if (NDalicPINVOKE.SWIGPendingException.Pending)
4731 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4735 internal Rotation GetCurrentWorldOrientation()
4737 Rotation ret = new Rotation(Interop.ActorInternal.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4738 if (NDalicPINVOKE.SWIGPendingException.Pending)
4739 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4743 internal void SetScale(float scale)
4745 Interop.ActorInternal.Actor_SetScale__SWIG_0(swigCPtr, scale);
4746 if (NDalicPINVOKE.SWIGPendingException.Pending)
4747 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4750 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4752 Interop.ActorInternal.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4753 if (NDalicPINVOKE.SWIGPendingException.Pending)
4754 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4757 internal void SetScale(Vector3 scale)
4759 Interop.ActorInternal.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4760 if (NDalicPINVOKE.SWIGPendingException.Pending)
4761 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4764 internal void ScaleBy(Vector3 relativeScale)
4766 Interop.ActorInternal.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4767 if (NDalicPINVOKE.SWIGPendingException.Pending)
4768 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4771 internal Vector3 GetCurrentScale()
4773 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentScale(swigCPtr), true);
4774 if (NDalicPINVOKE.SWIGPendingException.Pending)
4775 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4779 internal Vector3 GetCurrentWorldScale()
4781 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentWorldScale(swigCPtr), true);
4782 if (NDalicPINVOKE.SWIGPendingException.Pending)
4783 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4787 internal void SetInheritScale(bool inherit)
4789 Interop.ActorInternal.Actor_SetInheritScale(swigCPtr, inherit);
4790 if (NDalicPINVOKE.SWIGPendingException.Pending)
4791 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4794 internal bool IsScaleInherited()
4796 bool ret = Interop.ActorInternal.Actor_IsScaleInherited(swigCPtr);
4797 if (NDalicPINVOKE.SWIGPendingException.Pending)
4798 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4802 internal Matrix GetCurrentWorldMatrix()
4804 Matrix ret = new Matrix(Interop.ActorInternal.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4805 if (NDalicPINVOKE.SWIGPendingException.Pending)
4806 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4810 internal void SetVisible(bool visible)
4812 Interop.Actor.Actor_SetVisible(swigCPtr, visible);
4813 if (NDalicPINVOKE.SWIGPendingException.Pending)
4814 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4817 internal bool IsVisible()
4819 bool ret = Interop.ActorInternal.Actor_IsVisible(swigCPtr);
4820 if (NDalicPINVOKE.SWIGPendingException.Pending)
4821 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4825 internal void SetOpacity(float opacity)
4827 Interop.ActorInternal.Actor_SetOpacity(swigCPtr, opacity);
4828 if (NDalicPINVOKE.SWIGPendingException.Pending)
4829 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4832 internal float GetCurrentOpacity()
4834 float ret = Interop.ActorInternal.Actor_GetCurrentOpacity(swigCPtr);
4835 if (NDalicPINVOKE.SWIGPendingException.Pending)
4836 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4840 internal void SetColor(Vector4 color)
4842 Interop.ActorInternal.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4843 if (NDalicPINVOKE.SWIGPendingException.Pending)
4844 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4847 internal Vector4 GetCurrentColor()
4849 Vector4 ret = new Vector4(Interop.ActorInternal.Actor_GetCurrentColor(swigCPtr), true);
4850 if (NDalicPINVOKE.SWIGPendingException.Pending)
4851 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4855 internal void SetColorMode(ColorMode colorMode)
4857 Interop.ActorInternal.Actor_SetColorMode(swigCPtr, (int)colorMode);
4858 if (NDalicPINVOKE.SWIGPendingException.Pending)
4859 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4862 internal ColorMode GetColorMode()
4864 ColorMode ret = (ColorMode)Interop.ActorInternal.Actor_GetColorMode(swigCPtr);
4865 if (NDalicPINVOKE.SWIGPendingException.Pending)
4866 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4870 internal Vector4 GetCurrentWorldColor()
4872 Vector4 ret = new Vector4(Interop.ActorInternal.Actor_GetCurrentWorldColor(swigCPtr), true);
4873 if (NDalicPINVOKE.SWIGPendingException.Pending)
4874 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4878 internal void SetDrawMode(DrawModeType drawMode)
4880 Interop.ActorInternal.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4881 if (NDalicPINVOKE.SWIGPendingException.Pending)
4882 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4885 internal DrawModeType GetDrawMode()
4887 DrawModeType ret = (DrawModeType)Interop.ActorInternal.Actor_GetDrawMode(swigCPtr);
4888 if (NDalicPINVOKE.SWIGPendingException.Pending)
4889 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4893 internal void SetKeyboardFocusable(bool focusable)
4895 Interop.ActorInternal.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4896 if (NDalicPINVOKE.SWIGPendingException.Pending)
4897 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4900 internal bool IsKeyboardFocusable()
4902 bool ret = Interop.ActorInternal.Actor_IsKeyboardFocusable(swigCPtr);
4903 if (NDalicPINVOKE.SWIGPendingException.Pending)
4904 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4908 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4910 Interop.Actor.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4911 if (NDalicPINVOKE.SWIGPendingException.Pending)
4912 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4915 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4917 ResizePolicyType ret = (ResizePolicyType)Interop.Actor.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4918 if (NDalicPINVOKE.SWIGPendingException.Pending)
4919 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4923 internal Vector3 GetSizeModeFactor()
4925 Vector3 ret = new Vector3(Interop.Actor.Actor_GetSizeModeFactor(swigCPtr), true);
4926 if (NDalicPINVOKE.SWIGPendingException.Pending)
4927 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4931 internal void SetMinimumSize(Vector2 size)
4933 Interop.ActorInternal.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4934 if (NDalicPINVOKE.SWIGPendingException.Pending)
4935 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4938 internal Vector2 GetMinimumSize()
4940 Vector2 ret = new Vector2(Interop.ActorInternal.Actor_GetMinimumSize(swigCPtr), true);
4941 if (NDalicPINVOKE.SWIGPendingException.Pending)
4942 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4946 internal void SetMaximumSize(Vector2 size)
4948 Interop.ActorInternal.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4949 if (NDalicPINVOKE.SWIGPendingException.Pending)
4950 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4953 internal Vector2 GetMaximumSize()
4955 Vector2 ret = new Vector2(Interop.ActorInternal.Actor_GetMaximumSize(swigCPtr), true);
4956 if (NDalicPINVOKE.SWIGPendingException.Pending)
4957 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4961 internal int GetHierarchyDepth()
4963 int ret = Interop.Actor.Actor_GetHierarchyDepth(swigCPtr);
4964 if (NDalicPINVOKE.SWIGPendingException.Pending)
4965 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4969 internal uint GetRendererCount()
4971 uint ret = Interop.Actor.Actor_GetRendererCount(swigCPtr);
4972 if (NDalicPINVOKE.SWIGPendingException.Pending)
4973 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4977 internal TouchDataSignal TouchSignal()
4979 TouchDataSignal ret = new TouchDataSignal(Interop.ActorSignal.Actor_TouchSignal(swigCPtr), false);
4980 if (NDalicPINVOKE.SWIGPendingException.Pending)
4981 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4985 internal HoverSignal HoveredSignal()
4987 HoverSignal ret = new HoverSignal(Interop.ActorSignal.Actor_HoveredSignal(swigCPtr), false);
4988 if (NDalicPINVOKE.SWIGPendingException.Pending)
4989 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4993 internal WheelSignal WheelEventSignal()
4995 WheelSignal ret = new WheelSignal(Interop.ActorSignal.Actor_WheelEventSignal(swigCPtr), false);
4996 if (NDalicPINVOKE.SWIGPendingException.Pending)
4997 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5001 internal ViewSignal OnWindowSignal()
5003 ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnStageSignal(swigCPtr), false);
5004 if (NDalicPINVOKE.SWIGPendingException.Pending)
5005 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5009 internal ViewSignal OffWindowSignal()
5011 ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OffStageSignal(swigCPtr), false);
5012 if (NDalicPINVOKE.SWIGPendingException.Pending)
5013 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5017 internal ViewSignal OnRelayoutSignal()
5019 ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnRelayoutSignal(swigCPtr), false);
5020 if (NDalicPINVOKE.SWIGPendingException.Pending)
5021 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5025 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
5027 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(Interop.NDalic.VisibilityChangedSignal(View.getCPtr(view)), false);
5028 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5032 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
5034 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(Interop.Layout.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
5035 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5039 internal ViewSignal ResourcesLoadedSignal()
5041 ViewSignal ret = new ViewSignal(Interop.View.ResourceReadySignal(swigCPtr), false);
5042 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5046 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
5048 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
5051 internal bool IsTopLevelView()
5053 if (GetParent() is Layer)
5060 internal void SetKeyInputFocus()
5062 Interop.ViewInternal.View_SetKeyInputFocus(swigCPtr);
5063 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5066 internal void ClearKeyInputFocus()
5068 Interop.ViewInternal.View_ClearKeyInputFocus(swigCPtr);
5069 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5072 internal PinchGestureDetector GetPinchGestureDetector()
5074 PinchGestureDetector ret = new PinchGestureDetector(Interop.ViewInternal.View_GetPinchGestureDetector(swigCPtr), true);
5075 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5079 internal PanGestureDetector GetPanGestureDetector()
5081 PanGestureDetector ret = new PanGestureDetector(Interop.ViewInternal.View_GetPanGestureDetector(swigCPtr), true);
5082 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5086 internal TapGestureDetector GetTapGestureDetector()
5088 TapGestureDetector ret = new TapGestureDetector(Interop.ViewInternal.View_GetTapGestureDetector(swigCPtr), true);
5089 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5093 internal LongPressGestureDetector GetLongPressGestureDetector()
5095 LongPressGestureDetector ret = new LongPressGestureDetector(Interop.ViewInternal.View_GetLongPressGestureDetector(swigCPtr), true);
5096 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5100 internal void SetBackgroundColor(Vector4 color)
5102 Interop.ViewInternal.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
5103 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5106 internal Vector4 GetBackgroundColor()
5108 Vector4 ret = new Vector4(Interop.ViewInternal.View_GetBackgroundColor(swigCPtr), true);
5109 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5113 internal void SetBackgroundImage(Image image)
5115 Interop.ViewInternal.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
5116 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5119 internal ControlKeySignal KeyEventSignal()
5121 ControlKeySignal ret = new ControlKeySignal(Interop.ViewSignal.View_KeyEventSignal(swigCPtr), false);
5122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5126 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
5128 KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusGainedSignal(swigCPtr), false);
5129 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5133 internal KeyInputFocusSignal KeyInputFocusLostSignal()
5135 KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusLostSignal(swigCPtr), false);
5136 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5140 internal IntPtr GetPtrfromView()
5142 return (IntPtr)swigCPtr;
5146 /// Removes the layout from this View.
5148 internal void ResetLayout()
5153 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5155 return (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5159 /// you can override it to clean-up your own resources.
5161 /// <param name="type">DisposeTypes</param>
5162 /// <since_tizen> 3 </since_tizen>
5163 protected override void Dispose(DisposeTypes type)
5170 if (type == DisposeTypes.Explicit)
5173 //Release your own managed resources here.
5174 //You should release all of your own disposable objects here.
5177 //Release your own unmanaged resources here.
5178 //You should not access any managed member here except static instance.
5179 //because the execution order of Finalizes is non-deterministic.
5182 DisConnectFromSignals();
5185 if (swigCPtr.Handle != global::System.IntPtr.Zero)
5189 swigCMemOwn = false;
5190 Interop.View.delete_View(swigCPtr);
5192 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5195 foreach (View view in Children)
5197 view.InternalParent = null;
5204 private void OnSize2DChanged(int width, int height)
5206 Size2D = new Size2D(width, height);
5209 private void OnPosition2DChanged(int x, int y)
5211 Position2D = new Position2D(x, y);
5214 private void DisConnectFromSignals()
5216 // Save current CPtr.
5217 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
5219 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
5220 swigCPtr = GetBaseHandleCPtrHandleRef;
5222 if (_onRelayoutEventCallback != null)
5224 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5227 if (_offWindowEventCallback != null)
5229 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5232 if (_onWindowEventCallback != null)
5234 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5237 if (_wheelEventCallback != null)
5239 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5242 if (_hoverEventCallback != null)
5244 this.HoveredSignal().Disconnect(_hoverEventCallback);
5247 if (_touchDataCallback != null)
5249 this.TouchSignal().Disconnect(_touchDataCallback);
5252 if (_ResourcesLoadedCallback != null)
5254 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
5257 if (_offWindowEventCallback != null)
5259 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5262 if (_onWindowEventCallback != null)
5264 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5267 if (_wheelEventCallback != null)
5269 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5272 if (_hoverEventCallback != null)
5274 this.HoveredSignal().Disconnect(_hoverEventCallback);
5277 if (_touchDataCallback != null)
5279 this.TouchSignal().Disconnect(_touchDataCallback);
5282 if (_onRelayoutEventCallback != null)
5284 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5287 if (_keyCallback != null)
5289 this.KeyEventSignal().Disconnect(_keyCallback);
5292 if (_keyInputFocusLostCallback != null)
5294 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
5297 if (_keyInputFocusGainedCallback != null)
5299 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
5302 if (_backgroundResourceLoadedCallback != null)
5304 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5307 if (_onWindowSendEventCallback != null)
5309 this.OnWindowSignal().Disconnect(_onWindowSendEventCallback);
5312 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
5313 // Restore current CPtr.
5314 swigCPtr = currentCPtr;
5317 private void OnKeyInputFocusGained(IntPtr view)
5319 if (_keyInputFocusGainedEventHandler != null)
5321 _keyInputFocusGainedEventHandler(this, null);
5325 private void OnKeyInputFocusLost(IntPtr view)
5327 if (_keyInputFocusLostEventHandler != null)
5329 _keyInputFocusLostEventHandler(this, null);
5333 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
5335 if (keyEvent == global::System.IntPtr.Zero)
5337 NUILog.Error("keyEvent should not be null!");
5341 KeyEventArgs e = new KeyEventArgs();
5343 bool result = false;
5345 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
5347 if (_keyEventHandler != null)
5349 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
5351 // Oring the result of each callback.
5352 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
5354 result |= del(this, e);
5361 // Callback for View OnRelayout signal
5362 private void OnRelayout(IntPtr data)
5364 if (_onRelayoutEventHandler != null)
5366 _onRelayoutEventHandler(this, null);
5370 // Callback for View TouchSignal
5371 private bool OnTouch(IntPtr view, IntPtr touchData)
5373 if (touchData == global::System.IntPtr.Zero)
5375 NUILog.Error("touchData should not be null!");
5379 TouchEventArgs e = new TouchEventArgs();
5381 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
5383 if (_touchDataEventHandler != null)
5385 return _touchDataEventHandler(this, e);
5390 // Callback for View Hover signal
5391 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
5393 if (hoverEvent == global::System.IntPtr.Zero)
5395 NUILog.Error("hoverEvent should not be null!");
5399 HoverEventArgs e = new HoverEventArgs();
5401 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
5403 if (_hoverEventHandler != null)
5405 return _hoverEventHandler(this, e);
5410 // Callback for View Wheel signal
5411 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
5413 if (wheelEvent == global::System.IntPtr.Zero)
5415 NUILog.Error("wheelEvent should not be null!");
5419 WheelEventArgs e = new WheelEventArgs();
5421 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
5423 if (_wheelEventHandler != null)
5425 return _wheelEventHandler(this, e);
5430 // Callback for View OnWindow signal
5431 private void OnWindow(IntPtr data)
5433 if (_onWindowEventHandler != null)
5435 _onWindowEventHandler(this, null);
5439 // Callback for View OffWindow signal
5440 private void OffWindow(IntPtr data)
5442 if (_offWindowEventHandler != null)
5444 _offWindowEventHandler(this, null);
5448 // Callback for View visibility change signal
5449 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
5451 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
5454 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5456 e.Visibility = visibility;
5459 if (_visibilityChangedEventHandler != null)
5461 _visibilityChangedEventHandler(this, e);
5465 // Callback for View layout direction change signal
5466 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
5468 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
5471 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5475 if (_layoutDirectionChangedEventHandler != null)
5477 _layoutDirectionChangedEventHandler(this, e);
5481 private void OnResourcesLoaded(IntPtr view)
5483 if (_resourcesLoadedEventHandler != null)
5485 _resourcesLoadedEventHandler(this, null);
5489 private View ConvertIdToView(uint id)
5492 if (GetParent() is View)
5494 View parentView = GetParent() as View;
5495 view = parentView.FindChildById(id);
5500 view = Window.Instance.GetRootLayer().FindChildById(id);
5506 private void OnBackgroundResourceLoaded(IntPtr view)
5508 BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5509 e.Status = (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5511 if (_backgroundResourceLoadedEventHandler != null)
5513 _backgroundResourceLoadedEventHandler(this, e);
5518 /// Event argument passed through the ChildAdded event.
5520 /// <since_tizen> 5 </since_tizen>
5521 public class ChildAddedEventArgs : EventArgs
5524 /// Added child view at moment.
5526 /// <since_tizen> 5 </since_tizen>
5527 public View Added { get; set; }
5531 /// Event argument passed through the ChildRemoved event.
5533 /// <since_tizen> 5 </since_tizen>
5534 public class ChildRemovedEventArgs : EventArgs
5537 /// Removed child view at moment.
5539 /// <since_tizen> 5 </since_tizen>
5540 public View Removed { get; set; }
5544 /// Event arguments that passed via the KeyEvent signal.
5546 /// <since_tizen> 3 </since_tizen>
5547 public class KeyEventArgs : EventArgs
5552 /// Key - is the key sent to the view.
5554 /// <since_tizen> 3 </since_tizen>
5569 /// Event arguments that passed via the touch signal.
5571 /// <since_tizen> 3 </since_tizen>
5572 public class TouchEventArgs : EventArgs
5574 private Touch _touch;
5577 /// Touch - contains the information of touch points.
5579 /// <since_tizen> 3 </since_tizen>
5594 /// Event arguments that passed via the hover signal.
5596 /// <since_tizen> 3 </since_tizen>
5597 public class HoverEventArgs : EventArgs
5599 private Hover _hover;
5602 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
5604 /// <since_tizen> 3 </since_tizen>
5619 /// Event arguments that passed via the wheel signal.
5621 /// <since_tizen> 3 </since_tizen>
5622 public class WheelEventArgs : EventArgs
5624 private Wheel _wheel;
5627 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
5629 /// <since_tizen> 3 </since_tizen>
5644 /// Event arguments of visibility changed.
5646 /// <since_tizen> 3 </since_tizen>
5647 public class VisibilityChangedEventArgs : EventArgs
5650 private bool _visibility;
5651 private VisibilityChangeType _type;
5654 /// The view, or child of view, whose visibility has changed.
5656 /// <since_tizen> 3 </since_tizen>
5670 /// Whether the view is now visible or not.
5672 /// <since_tizen> 3 </since_tizen>
5673 public bool Visibility
5681 _visibility = value;
5686 /// Whether the view's visible property has changed or a parent's.
5688 /// <since_tizen> 3 </since_tizen>
5689 public VisibilityChangeType Type
5703 /// Event arguments of layout direction changed.
5705 /// <since_tizen> 4 </since_tizen>
5706 public class LayoutDirectionChangedEventArgs : EventArgs
5709 private ViewLayoutDirectionType _type;
5712 /// The view, or child of view, whose layout direction has changed.
5714 /// <since_tizen> 4 </since_tizen>
5728 /// Whether the view's layout direction property has changed or a parent's.
5730 /// <since_tizen> 4 </since_tizen>
5731 public ViewLayoutDirectionType Type
5744 internal class BackgroundResourceLoadedEventArgs : EventArgs
5746 private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5747 public ResourceLoadingStatusType Status
5760 internal class Property
5762 internal static readonly int TOOLTIP = Interop.ViewProperty.View_Property_TOOLTIP_get();
5763 internal static readonly int STATE = Interop.ViewProperty.View_Property_STATE_get();
5764 internal static readonly int SUB_STATE = Interop.ViewProperty.View_Property_SUB_STATE_get();
5765 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
5766 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
5767 internal static readonly int UP_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
5768 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
5769 internal static readonly int STYLE_NAME = Interop.ViewProperty.View_Property_STYLE_NAME_get();
5770 internal static readonly int BACKGROUND = Interop.ViewProperty.View_Property_BACKGROUND_get();
5771 internal static readonly int SIBLING_ORDER = Interop.ActorProperty.Actor_Property_SIBLING_ORDER_get();
5772 internal static readonly int OPACITY = Interop.ActorProperty.Actor_Property_OPACITY_get();
5773 internal static readonly int SCREEN_POSITION = Interop.ActorProperty.Actor_Property_SCREEN_POSITION_get();
5774 internal static readonly int POSITION_USES_ANCHOR_POINT = Interop.ActorProperty.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
5775 internal static readonly int PARENT_ORIGIN = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_get();
5776 internal static readonly int PARENT_ORIGIN_X = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_X_get();
5777 internal static readonly int PARENT_ORIGIN_Y = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_Y_get();
5778 internal static readonly int PARENT_ORIGIN_Z = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_Z_get();
5779 internal static readonly int ANCHOR_POINT = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_get();
5780 internal static readonly int ANCHOR_POINT_X = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_X_get();
5781 internal static readonly int ANCHOR_POINT_Y = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_Y_get();
5782 internal static readonly int ANCHOR_POINT_Z = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_Z_get();
5783 internal static readonly int SIZE = Interop.ActorProperty.Actor_Property_SIZE_get();
5784 internal static readonly int SIZE_WIDTH = Interop.ActorProperty.Actor_Property_SIZE_WIDTH_get();
5785 internal static readonly int SIZE_HEIGHT = Interop.ActorProperty.Actor_Property_SIZE_HEIGHT_get();
5786 internal static readonly int SIZE_DEPTH = Interop.ActorProperty.Actor_Property_SIZE_DEPTH_get();
5787 internal static readonly int POSITION = Interop.ActorProperty.Actor_Property_POSITION_get();
5788 internal static readonly int POSITION_X = Interop.ActorProperty.Actor_Property_POSITION_X_get();
5789 internal static readonly int POSITION_Y = Interop.ActorProperty.Actor_Property_POSITION_Y_get();
5790 internal static readonly int POSITION_Z = Interop.ActorProperty.Actor_Property_POSITION_Z_get();
5791 internal static readonly int WORLD_POSITION = Interop.ActorProperty.Actor_Property_WORLD_POSITION_get();
5792 internal static readonly int WORLD_POSITION_X = Interop.ActorProperty.Actor_Property_WORLD_POSITION_X_get();
5793 internal static readonly int WORLD_POSITION_Y = Interop.ActorProperty.Actor_Property_WORLD_POSITION_Y_get();
5794 internal static readonly int WORLD_POSITION_Z = Interop.ActorProperty.Actor_Property_WORLD_POSITION_Z_get();
5795 internal static readonly int ORIENTATION = Interop.ActorProperty.Actor_Property_ORIENTATION_get();
5796 internal static readonly int WORLD_ORIENTATION = Interop.ActorProperty.Actor_Property_WORLD_ORIENTATION_get();
5797 internal static readonly int SCALE = Interop.ActorProperty.Actor_Property_SCALE_get();
5798 internal static readonly int SCALE_X = Interop.ActorProperty.Actor_Property_SCALE_X_get();
5799 internal static readonly int SCALE_Y = Interop.ActorProperty.Actor_Property_SCALE_Y_get();
5800 internal static readonly int SCALE_Z = Interop.ActorProperty.Actor_Property_SCALE_Z_get();
5801 internal static readonly int WORLD_SCALE = Interop.ActorProperty.Actor_Property_WORLD_SCALE_get();
5802 internal static readonly int VISIBLE = Interop.ActorProperty.Actor_Property_VISIBLE_get();
5803 internal static readonly int WORLD_COLOR = Interop.ActorProperty.Actor_Property_WORLD_COLOR_get();
5804 internal static readonly int WORLD_MATRIX = Interop.ActorProperty.Actor_Property_WORLD_MATRIX_get();
5805 internal static readonly int NAME = Interop.ActorProperty.Actor_Property_NAME_get();
5806 internal static readonly int SENSITIVE = Interop.ActorProperty.Actor_Property_SENSITIVE_get();
5807 internal static readonly int LEAVE_REQUIRED = Interop.ActorProperty.Actor_Property_LEAVE_REQUIRED_get();
5808 internal static readonly int INHERIT_ORIENTATION = Interop.ActorProperty.Actor_Property_INHERIT_ORIENTATION_get();
5809 internal static readonly int INHERIT_SCALE = Interop.ActorProperty.Actor_Property_INHERIT_SCALE_get();
5810 internal static readonly int DRAW_MODE = Interop.ActorProperty.Actor_Property_DRAW_MODE_get();
5811 internal static readonly int SIZE_MODE_FACTOR = Interop.ActorProperty.Actor_Property_SIZE_MODE_FACTOR_get();
5812 internal static readonly int WIDTH_RESIZE_POLICY = Interop.ActorProperty.Actor_Property_WIDTH_RESIZE_POLICY_get();
5813 internal static readonly int HEIGHT_RESIZE_POLICY = Interop.ActorProperty.Actor_Property_HEIGHT_RESIZE_POLICY_get();
5814 internal static readonly int SIZE_SCALE_POLICY = Interop.ActorProperty.Actor_Property_SIZE_SCALE_POLICY_get();
5815 internal static readonly int WIDTH_FOR_HEIGHT = Interop.ActorProperty.Actor_Property_WIDTH_FOR_HEIGHT_get();
5816 internal static readonly int HEIGHT_FOR_WIDTH = Interop.ActorProperty.Actor_Property_HEIGHT_FOR_WIDTH_get();
5817 internal static readonly int MINIMUM_SIZE = Interop.ActorProperty.Actor_Property_MINIMUM_SIZE_get();
5818 internal static readonly int MAXIMUM_SIZE = Interop.ActorProperty.Actor_Property_MAXIMUM_SIZE_get();
5819 internal static readonly int INHERIT_POSITION = Interop.ActorProperty.Actor_Property_INHERIT_POSITION_get();
5820 internal static readonly int CLIPPING_MODE = Interop.ActorProperty.Actor_Property_CLIPPING_MODE_get();
5821 internal static readonly int INHERIT_LAYOUT_DIRECTION = Interop.ActorProperty.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
5822 internal static readonly int LAYOUT_DIRECTION = Interop.ActorProperty.Actor_Property_LAYOUT_DIRECTION_get();
5823 internal static readonly int MARGIN = Interop.ViewProperty.View_Property_MARGIN_get();
5824 internal static readonly int PADDING = Interop.ViewProperty.View_Property_PADDING_get();