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>
42 internal enum ChildLayoutData
45 /// Constant which indicates child size should match parent size
49 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
54 internal enum ResourceLoadingStatusType
63 /// View is the base class for all views.
65 /// <since_tizen> 3 </since_tizen>
66 public class View : Container, IResourcesProvider
68 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
69 [EditorBrowsable(EditorBrowsableState.Never)]
70 public static readonly BindableProperty StyleNameProperty = BindableProperty.Create("StyleName", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
72 var view = (View)bindable;
75 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue));
78 defaultValueCreator: (bindable) =>
80 var view = (View)bindable;
82 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STYLE_NAME).Get(out temp);
85 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
86 [EditorBrowsable(EditorBrowsableState.Never)]
87 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
89 var view = (View)bindable;
92 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((Color)newValue));
95 defaultValueCreator: (bindable) =>
97 var view = (View)bindable;
98 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
100 Tizen.NUI.PropertyMap background = view.Background;
102 background.Find(Visual.Property.Type)?.Get(out visualType);
103 if (visualType == (int)Visual.Type.Color)
105 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
108 return backgroundColor;
110 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
111 [EditorBrowsable(EditorBrowsableState.Never)]
112 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
114 var view = (View)bindable;
115 if (newValue != null)
117 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((string)newValue));
120 defaultValueCreator: (bindable) =>
122 var view = (View)bindable;
123 string backgroundImage = "";
125 Tizen.NUI.PropertyMap background = view.Background;
127 background.Find(Visual.Property.Type)?.Get(out visualType);
128 if (visualType == (int)Visual.Type.Image)
130 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
133 return backgroundImage;
135 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
136 [EditorBrowsable(EditorBrowsableState.Never)]
137 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create("Background", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
139 var view = (View)bindable;
140 if (newValue != null)
142 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
145 defaultValueCreator: (bindable) =>
147 var view = (View)bindable;
148 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
149 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
152 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
153 [EditorBrowsable(EditorBrowsableState.Never)]
154 public static readonly BindableProperty StateProperty = BindableProperty.Create("State", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
156 var view = (View)bindable;
157 if (newValue != null)
159 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
162 defaultValueCreator: (bindable) =>
164 var view = (View)bindable;
166 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
168 NUILog.Error("State get error!");
172 case 0: return States.Normal;
173 case 1: return States.Focused;
174 case 2: return States.Disabled;
175 default: return States.Normal;
178 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
179 [EditorBrowsable(EditorBrowsableState.Never)]
180 public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
182 var view = (View)bindable;
183 string valueToString = "";
184 if (newValue != null)
186 switch ((States)newValue)
188 case States.Normal: { valueToString = "NORMAL"; break; }
189 case States.Focused: { valueToString = "FOCUSED"; break; }
190 case States.Disabled: { valueToString = "DISABLED"; break; }
191 default: { valueToString = "NORMAL"; break; }
193 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
196 defaultValueCreator: (bindable) =>
198 var view = (View)bindable;
200 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
202 NUILog.Error("subState get error!");
206 case "NORMAL": return States.Normal;
207 case "FOCUSED": return States.Focused;
208 case "DISABLED": return States.Disabled;
209 default: return States.Normal;
212 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
213 [EditorBrowsable(EditorBrowsableState.Never)]
214 public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
216 var view = (View)bindable;
217 if (newValue != null)
219 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
222 defaultValueCreator: (bindable) =>
224 var view = (View)bindable;
225 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
226 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
230 public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
232 var view = (View)bindable;
233 if (newValue != null)
235 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
238 defaultValueCreator: (bindable) =>
240 var view = (View)bindable;
242 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
246 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
247 [EditorBrowsable(EditorBrowsableState.Never)]
248 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
250 var view = (View)bindable;
251 if (newValue != null)
253 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
256 defaultValueCreator: (bindable) =>
258 var view = (View)bindable;
260 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
263 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
264 [EditorBrowsable(EditorBrowsableState.Never)]
265 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
267 var view = (View)bindable;
268 if (newValue != null)
270 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
273 defaultValueCreator: (bindable) =>
275 var view = (View)bindable;
276 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
277 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
280 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
281 [EditorBrowsable(EditorBrowsableState.Never)]
282 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
284 var view = (View)bindable;
285 if (newValue != null)
287 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
290 defaultValueCreator: (bindable) =>
292 var view = (View)bindable;
293 Vector2 temp = new Vector2(0.0f, 0.0f);
294 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
297 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
298 [EditorBrowsable(EditorBrowsableState.Never)]
299 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
301 var view = (View)bindable;
302 if (newValue != null)
304 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
307 defaultValueCreator: (bindable) =>
309 var view = (View)bindable;
311 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
314 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
315 [EditorBrowsable(EditorBrowsableState.Never)]
316 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
318 var view = (View)bindable;
319 if (newValue != null)
321 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
324 defaultValueCreator: (bindable) =>
326 var view = (View)bindable;
328 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
331 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
332 [EditorBrowsable(EditorBrowsableState.Never)]
333 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
335 var view = (View)bindable;
336 string valueToString = "";
338 if (newValue != null)
340 switch ((HorizontalAlignmentType)newValue)
342 case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
343 case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
344 case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
345 default: { valueToString = "left"; break; }
347 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
350 defaultValueCreator: (bindable) =>
352 var view = (View)bindable;
354 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
356 NUILog.Error("CellHorizontalAlignment get error!");
361 case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
362 case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
363 case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
364 default: return Tizen.NUI.HorizontalAlignmentType.Left;
367 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
368 [EditorBrowsable(EditorBrowsableState.Never)]
369 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
371 var view = (View)bindable;
372 string valueToString = "";
374 if (newValue != null)
376 switch ((VerticalAlignmentType)newValue)
378 case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
379 case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
380 case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
381 default: { valueToString = "top"; break; }
383 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
386 defaultValueCreator: (bindable) =>
388 var view = (View)bindable;
390 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
392 NUILog.Error("CellVerticalAlignment get error!");
397 case "top": return Tizen.NUI.VerticalAlignmentType.Top;
398 case "center": return Tizen.NUI.VerticalAlignmentType.Center;
399 case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
400 default: return Tizen.NUI.VerticalAlignmentType.Top;
403 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
404 [EditorBrowsable(EditorBrowsableState.Never)]
405 public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
407 var view = (View)bindable;
408 if (newValue != null)
410 Tizen.NUI.Object.SetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
413 defaultValueCreator: (bindable) =>
415 var view = (View)bindable;
417 Tizen.NUI.Object.GetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT).Get(out temp);
420 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
421 [EditorBrowsable(EditorBrowsableState.Never)]
422 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
424 var view = (View)bindable;
425 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
426 else { view.LeftFocusableViewId = -1; }
428 defaultValueCreator: (bindable) =>
430 var view = (View)bindable;
431 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
434 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
435 [EditorBrowsable(EditorBrowsableState.Never)]
436 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
438 var view = (View)bindable;
439 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
440 else { view.RightFocusableViewId = -1; }
442 defaultValueCreator: (bindable) =>
444 var view = (View)bindable;
445 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
448 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
449 [EditorBrowsable(EditorBrowsableState.Never)]
450 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
452 var view = (View)bindable;
453 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
454 else { view.UpFocusableViewId = -1; }
456 defaultValueCreator: (bindable) =>
458 var view = (View)bindable;
459 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
462 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
463 [EditorBrowsable(EditorBrowsableState.Never)]
464 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
466 var view = (View)bindable;
467 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
468 else { view.DownFocusableViewId = -1; }
470 defaultValueCreator: (bindable) =>
472 var view = (View)bindable;
473 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
476 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
477 [EditorBrowsable(EditorBrowsableState.Never)]
478 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
480 var view = (View)bindable;
481 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
483 defaultValueCreator: (bindable) =>
485 var view = (View)bindable;
486 return view.IsKeyboardFocusable();
488 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
489 [EditorBrowsable(EditorBrowsableState.Never)]
490 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
492 var view = (View)bindable;
493 if (newValue != null)
495 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size((Size2D)newValue)));
498 defaultValueCreator: (bindable) =>
500 var view = (View)bindable;
501 Size temp = new Size(0.0f, 0.0f, 0.0f);
502 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
503 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
506 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
507 [EditorBrowsable(EditorBrowsableState.Never)]
508 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
510 var view = (View)bindable;
511 if (newValue != null)
513 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
516 defaultValueCreator: (bindable) =>
518 var view = (View)bindable;
520 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
523 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
524 [EditorBrowsable(EditorBrowsableState.Never)]
525 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
527 var view = (View)bindable;
528 if (newValue != null)
530 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
533 defaultValueCreator: (bindable) =>
535 var view = (View)bindable;
536 Position temp = new Position(0.0f, 0.0f, 0.0f);
537 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
538 return new Position2D(temp);
540 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
541 [EditorBrowsable(EditorBrowsableState.Never)]
542 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
544 var view = (View)bindable;
545 if (newValue != null)
547 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
550 defaultValueCreator: (bindable) =>
552 var view = (View)bindable;
554 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
557 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
558 [EditorBrowsable(EditorBrowsableState.Never)]
559 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
561 var view = (View)bindable;
563 if (newValue != null)
565 value = (int)newValue;
568 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
571 var siblings = view.GetParent()?.Children;
572 if (siblings != null)
574 int currentOrder = siblings.IndexOf(view);
575 if (value != currentOrder)
577 if (value == 0) { view.LowerToBottom(); }
578 else if (value < siblings.Count - 1)
580 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
581 else { view.LowerBelow(siblings[value]); }
583 else { view.RaiseToTop(); }
588 defaultValueCreator: (bindable) =>
590 var view = (View)bindable;
591 var parentChildren = view.GetParent()?.Children;
592 int currentOrder = 0;
593 if (parentChildren != null)
595 currentOrder = parentChildren.IndexOf(view);
597 if (currentOrder < 0) { return 0; }
598 else if (currentOrder < parentChildren.Count) { return currentOrder; }
603 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
604 [EditorBrowsable(EditorBrowsableState.Never)]
605 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
607 var view = (View)bindable;
608 if (newValue != null)
610 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
613 defaultValueCreator: (bindable) =>
615 var view = (View)bindable;
616 Position temp = new Position(0.0f, 0.0f, 0.0f);
617 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
621 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
622 [EditorBrowsable(EditorBrowsableState.Never)]
623 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
625 var view = (View)bindable;
626 if (newValue != null)
628 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
631 defaultValueCreator: (bindable) =>
633 var view = (View)bindable;
634 Position temp = new Position(0.0f, 0.0f, 0.0f);
635 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
638 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
639 [EditorBrowsable(EditorBrowsableState.Never)]
640 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
642 var view = (View)bindable;
643 if (newValue != null)
645 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
648 defaultValueCreator: (bindable) =>
650 var view = (View)bindable;
652 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
655 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
656 [EditorBrowsable(EditorBrowsableState.Never)]
657 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
659 var view = (View)bindable;
660 if (newValue != null)
662 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
665 defaultValueCreator: (bindable) =>
667 var view = (View)bindable;
669 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
672 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
673 [EditorBrowsable(EditorBrowsableState.Never)]
674 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
676 var view = (View)bindable;
677 if (newValue != null)
679 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
682 defaultValueCreator: (bindable) =>
684 var view = (View)bindable;
685 Position temp = new Position(0.0f, 0.0f, 0.0f);
686 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
689 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
690 [EditorBrowsable(EditorBrowsableState.Never)]
691 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
693 var view = (View)bindable;
694 if (newValue != null)
696 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
699 defaultValueCreator: (bindable) =>
701 var view = (View)bindable;
703 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
706 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
707 [EditorBrowsable(EditorBrowsableState.Never)]
708 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
710 var view = (View)bindable;
711 if (newValue != null)
713 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
716 defaultValueCreator: (bindable) =>
718 var view = (View)bindable;
720 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
723 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
724 [EditorBrowsable(EditorBrowsableState.Never)]
725 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
727 var view = (View)bindable;
728 if (newValue != null)
730 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
733 defaultValueCreator: (bindable) =>
735 var view = (View)bindable;
737 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
740 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
741 [EditorBrowsable(EditorBrowsableState.Never)]
742 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
744 var view = (View)bindable;
745 if (newValue != null)
747 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
750 defaultValueCreator: (bindable) =>
752 var view = (View)bindable;
753 Rotation temp = new Rotation();
754 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
757 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
758 [EditorBrowsable(EditorBrowsableState.Never)]
759 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
761 var view = (View)bindable;
762 if (newValue != null)
764 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
767 defaultValueCreator: (bindable) =>
769 var view = (View)bindable;
770 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
771 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
774 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
775 [EditorBrowsable(EditorBrowsableState.Never)]
776 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
778 var view = (View)bindable;
779 if (newValue != null)
781 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
784 defaultValueCreator: (bindable) =>
786 var view = (View)bindable;
788 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
791 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
792 [EditorBrowsable(EditorBrowsableState.Never)]
793 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
795 var view = (View)bindable;
796 if (newValue != null)
798 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
801 defaultValueCreator: (bindable) =>
803 var view = (View)bindable;
805 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
808 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
809 [EditorBrowsable(EditorBrowsableState.Never)]
810 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
812 var view = (View)bindable;
813 if (newValue != null)
815 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
818 defaultValueCreator: (bindable) =>
820 var view = (View)bindable;
822 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
825 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
826 [EditorBrowsable(EditorBrowsableState.Never)]
827 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
829 var view = (View)bindable;
830 if (newValue != null)
832 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
835 defaultValueCreator: (bindable) =>
837 var view = (View)bindable;
839 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
842 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
843 [EditorBrowsable(EditorBrowsableState.Never)]
844 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
846 var view = (View)bindable;
847 if (newValue != null)
849 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
852 defaultValueCreator: (bindable) =>
854 var view = (View)bindable;
856 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
859 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
860 [EditorBrowsable(EditorBrowsableState.Never)]
861 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
863 var view = (View)bindable;
864 if (newValue != null)
866 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
869 defaultValueCreator: (bindable) =>
871 var view = (View)bindable;
873 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
876 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
877 [EditorBrowsable(EditorBrowsableState.Never)]
878 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
880 var view = (View)bindable;
881 if (newValue != null)
883 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
886 defaultValueCreator: (bindable) =>
888 var view = (View)bindable;
890 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
893 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
894 [EditorBrowsable(EditorBrowsableState.Never)]
895 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
897 var view = (View)bindable;
898 if (newValue != null)
900 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
903 defaultValueCreator: (bindable) =>
905 var view = (View)bindable;
907 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
910 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
911 [EditorBrowsable(EditorBrowsableState.Never)]
912 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
914 var view = (View)bindable;
915 if (newValue != null)
917 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
920 defaultValueCreator: (bindable) =>
922 var view = (View)bindable;
924 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
926 NUILog.Error("DrawMode get error!");
930 case "NORMAL": return DrawModeType.Normal;
931 case "OVERLAY_2D": return DrawModeType.Overlay2D;
932 #pragma warning disable CS0618 // Disable deprecated warning as we do need to use the deprecated API here.
933 case "STENCIL": return DrawModeType.Stencil;
934 #pragma warning restore CS0618
935 default: return DrawModeType.Normal;
938 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
939 [EditorBrowsable(EditorBrowsableState.Never)]
940 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
942 var view = (View)bindable;
943 if (newValue != null)
945 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
948 defaultValueCreator: (bindable) =>
950 var view = (View)bindable;
951 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
952 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
955 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
956 [EditorBrowsable(EditorBrowsableState.Never)]
957 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
959 var view = (View)bindable;
960 if (newValue != null)
962 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
965 defaultValueCreator: (bindable) =>
967 var view = (View)bindable;
969 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
971 NUILog.Error("WidthResizePolicy get error!");
975 case "FIXED": return ResizePolicyType.Fixed;
976 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
977 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
978 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
979 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
980 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
981 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
982 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
983 default: return ResizePolicyType.Fixed;
986 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
987 [EditorBrowsable(EditorBrowsableState.Never)]
988 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
990 var view = (View)bindable;
991 if (newValue != null)
993 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
996 defaultValueCreator: (bindable) =>
998 var view = (View)bindable;
1000 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
1002 NUILog.Error("HeightResizePolicy get error!");
1006 case "FIXED": return ResizePolicyType.Fixed;
1007 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1008 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1009 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1010 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1011 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1012 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1013 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1014 default: return ResizePolicyType.Fixed;
1017 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1018 [EditorBrowsable(EditorBrowsableState.Never)]
1019 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1021 var view = (View)bindable;
1022 string valueToString = "";
1023 if (newValue != null)
1025 switch ((SizeScalePolicyType)newValue)
1027 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1028 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1029 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1030 default: { valueToString = "USE_SIZE_SET"; break; }
1032 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1035 defaultValueCreator: (bindable) =>
1037 var view = (View)bindable;
1039 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1041 NUILog.Error("SizeScalePolicy get error!");
1045 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1046 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1047 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1048 default: return SizeScalePolicyType.UseSizeSet;
1051 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1052 [EditorBrowsable(EditorBrowsableState.Never)]
1053 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1055 var view = (View)bindable;
1056 if (newValue != null)
1058 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1061 defaultValueCreator: (bindable) =>
1063 var view = (View)bindable;
1065 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1068 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1069 [EditorBrowsable(EditorBrowsableState.Never)]
1070 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1072 var view = (View)bindable;
1073 if (newValue != null)
1075 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1078 defaultValueCreator: (bindable) =>
1080 var view = (View)bindable;
1082 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1085 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1086 [EditorBrowsable(EditorBrowsableState.Never)]
1087 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1089 var view = (View)bindable;
1090 if (newValue != null)
1092 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1095 defaultValueCreator: (bindable) =>
1097 var view = (View)bindable;
1098 Extents temp = new Extents(0, 0, 0, 0);
1099 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1102 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1103 [EditorBrowsable(EditorBrowsableState.Never)]
1104 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1106 var view = (View)bindable;
1107 if (newValue != null)
1109 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1112 defaultValueCreator: (bindable) =>
1114 var view = (View)bindable;
1115 Size temp = new Size(0, 0, 0);
1116 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1119 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1120 [EditorBrowsable(EditorBrowsableState.Never)]
1121 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1123 var view = (View)bindable;
1124 if (newValue != null)
1126 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1129 defaultValueCreator: (bindable) =>
1131 var view = (View)bindable;
1132 Size2D temp = new Size2D(0, 0);
1133 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1136 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1137 [EditorBrowsable(EditorBrowsableState.Never)]
1138 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1140 var view = (View)bindable;
1141 if (newValue != null)
1143 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1146 defaultValueCreator: (bindable) =>
1148 var view = (View)bindable;
1149 Size2D temp = new Size2D(0, 0);
1150 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1153 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1154 [EditorBrowsable(EditorBrowsableState.Never)]
1155 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1157 var view = (View)bindable;
1158 if (newValue != null)
1160 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1163 defaultValueCreator: (bindable) =>
1165 var view = (View)bindable;
1167 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1170 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1171 [EditorBrowsable(EditorBrowsableState.Never)]
1172 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1174 var view = (View)bindable;
1175 if (newValue != null)
1177 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1180 defaultValueCreator: (bindable) =>
1182 var view = (View)bindable;
1184 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1186 NUILog.Error("ClippingMode get error!");
1188 return (ClippingModeType)temp;
1190 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1191 [EditorBrowsable(EditorBrowsableState.Never)]
1192 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1194 var view = (View)bindable;
1195 if (newValue != null)
1197 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1200 defaultValueCreator: (bindable) =>
1202 var view = (View)bindable;
1204 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1207 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1208 [EditorBrowsable(EditorBrowsableState.Never)]
1209 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1211 var view = (View)bindable;
1212 if (newValue != null)
1214 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1217 defaultValueCreator: (bindable) =>
1219 var view = (View)bindable;
1221 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1223 NUILog.Error("LAYOUT_DIRECTION get error!");
1225 return (ViewLayoutDirectionType)temp;
1227 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1228 [EditorBrowsable(EditorBrowsableState.Never)]
1229 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1231 var view = (View)bindable;
1232 if (newValue != null)
1234 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1237 defaultValueCreator: (bindable) =>
1239 var view = (View)bindable;
1240 Extents temp = new Extents(0, 0, 0, 0);
1241 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1244 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1245 [EditorBrowsable(EditorBrowsableState.Never)]
1246 public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style), propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1248 internal readonly MergedStyle _mergedStyle;
1250 /// Flag to allow Layouting to be disabled for Views.
1251 /// Once a View has a Layout set then any children added to Views from then on will receive
1252 /// automatic Layouts.
1254 private static bool layoutingDisabled = true;
1255 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1257 private bool layoutSet = false; // Flag to indicate if SetLayout was called or View was automatically given a Layout
1258 private bool _backgroundImageSynchronosLoading = false;
1259 private EventHandler _offWindowEventHandler;
1260 private OffWindowEventCallbackType _offWindowEventCallback;
1261 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1262 private WheelEventCallbackType _wheelEventCallback;
1263 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1264 private KeyCallbackType _keyCallback;
1265 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1266 private TouchDataCallbackType _touchDataCallback;
1267 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1268 private HoverEventCallbackType _hoverEventCallback;
1269 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
1270 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
1271 private EventHandler _keyInputFocusGainedEventHandler;
1272 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1273 private EventHandler _keyInputFocusLostEventHandler;
1274 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1275 private EventHandler _onRelayoutEventHandler;
1276 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1277 private EventHandler _onWindowEventHandler;
1278 private OnWindowEventCallbackType _onWindowEventCallback;
1279 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
1280 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
1281 // Resource Ready Signal
1282 private EventHandler _resourcesLoadedEventHandler;
1283 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
1284 private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
1285 private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
1287 private OnWindowEventCallbackType _onWindowSendEventCallback;
1289 private void SendViewAddedEventToWindow(IntPtr data)
1291 Window.Instance.SendViewAdded(this);
1295 /// Creates a new instance of a view.
1297 /// <since_tizen> 3 </since_tizen>
1298 public View() : this(NDalicPINVOKE.View_New(), true)
1300 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1302 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1304 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1307 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
1309 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1312 PositionUsesPivotPoint = false;
1314 _mergedStyle = new MergedStyle(GetType(), this);
1316 _onWindowSendEventCallback = SendViewAddedEventToWindow;
1317 this.OnWindowSignal().Connect(_onWindowSendEventCallback);
1320 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1322 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1325 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1326 private delegate void OffWindowEventCallbackType(IntPtr control);
1327 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1328 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1329 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1330 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1331 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1332 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1333 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1334 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1335 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1336 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
1337 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1338 private delegate void ResourcesLoadedCallbackType(IntPtr control);
1339 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1340 private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
1341 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1342 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1343 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1344 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1345 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1346 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1347 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1348 private delegate void OnWindowEventCallbackType(IntPtr control);
1349 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1350 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
1353 /// Event when a child is removed.
1355 /// <since_tizen> 5 </since_tizen>
1356 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1358 /// Event when a child is added.
1360 /// <since_tizen> 5 </since_tizen>
1361 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1364 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1365 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1367 /// <since_tizen> 3 </since_tizen>
1368 public event EventHandler FocusGained
1372 if (_keyInputFocusGainedEventHandler == null)
1374 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1375 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1378 _keyInputFocusGainedEventHandler += value;
1383 _keyInputFocusGainedEventHandler -= value;
1385 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1387 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1393 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1394 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1396 /// <since_tizen> 3 </since_tizen>
1397 public event EventHandler FocusLost
1401 if (_keyInputFocusLostEventHandler == null)
1403 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1404 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1407 _keyInputFocusLostEventHandler += value;
1412 _keyInputFocusLostEventHandler -= value;
1414 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1416 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1422 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1423 /// The KeyPressed signal is emitted when the key event is received.<br />
1425 /// <since_tizen> 3 </since_tizen>
1426 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1430 if (_keyEventHandler == null)
1432 _keyCallback = OnKeyEvent;
1433 this.KeyEventSignal().Connect(_keyCallback);
1436 _keyEventHandler += value;
1441 _keyEventHandler -= value;
1443 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1445 this.KeyEventSignal().Disconnect(_keyCallback);
1451 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1452 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1454 /// <since_tizen> 3 </since_tizen>
1455 public event EventHandler Relayout
1459 if (_onRelayoutEventHandler == null)
1461 _onRelayoutEventCallback = OnRelayout;
1462 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1465 _onRelayoutEventHandler += value;
1470 _onRelayoutEventHandler -= value;
1472 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1474 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1481 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1482 /// The touched signal is emitted when the touch input is received.<br />
1484 /// <since_tizen> 3 </since_tizen>
1485 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1489 if (_touchDataEventHandler == null)
1491 _touchDataCallback = OnTouch;
1492 this.TouchSignal().Connect(_touchDataCallback);
1495 _touchDataEventHandler += value;
1500 _touchDataEventHandler -= value;
1502 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1504 this.TouchSignal().Disconnect(_touchDataCallback);
1511 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1512 /// The hovered signal is emitted when the hover input is received.<br />
1514 /// <since_tizen> 3 </since_tizen>
1515 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1519 if (_hoverEventHandler == null)
1521 _hoverEventCallback = OnHoverEvent;
1522 this.HoveredSignal().Connect(_hoverEventCallback);
1525 _hoverEventHandler += value;
1530 _hoverEventHandler -= value;
1532 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1534 this.HoveredSignal().Disconnect(_hoverEventCallback);
1541 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1542 /// The WheelMoved signal is emitted when the wheel event is received.<br />
1544 /// <since_tizen> 3 </since_tizen>
1545 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1549 if (_wheelEventHandler == null)
1551 _wheelEventCallback = OnWheelEvent;
1552 this.WheelEventSignal().Connect(_wheelEventCallback);
1555 _wheelEventHandler += value;
1560 _wheelEventHandler -= value;
1562 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
1564 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1571 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
1572 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
1574 /// <since_tizen> 3 </since_tizen>
1575 public event EventHandler AddedToWindow
1579 if (_onWindowEventHandler == null)
1581 _onWindowEventCallback = OnWindow;
1582 this.OnWindowSignal().Connect(_onWindowEventCallback);
1585 _onWindowEventHandler += value;
1590 _onWindowEventHandler -= value;
1592 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
1594 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1600 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
1601 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
1603 /// <since_tizen> 3 </since_tizen>
1604 public event EventHandler RemovedFromWindow
1608 if (_offWindowEventHandler == null)
1610 _offWindowEventCallback = OffWindow;
1611 this.OffWindowSignal().Connect(_offWindowEventCallback);
1614 _offWindowEventHandler += value;
1619 _offWindowEventHandler -= value;
1621 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
1623 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1629 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
1630 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
1632 /// <since_tizen> 3 </since_tizen>
1633 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
1637 if (_visibilityChangedEventHandler == null)
1639 _visibilityChangedEventCallback = OnVisibilityChanged;
1640 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
1643 _visibilityChangedEventHandler += value;
1648 _visibilityChangedEventHandler -= value;
1650 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
1652 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
1658 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
1659 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
1661 /// <since_tizen> 4 </since_tizen>
1662 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
1666 if (_layoutDirectionChangedEventHandler == null)
1668 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
1669 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
1672 _layoutDirectionChangedEventHandler += value;
1677 _layoutDirectionChangedEventHandler -= value;
1679 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
1681 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
1687 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1688 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1690 /// <since_tizen> 3 </since_tizen>
1691 public event EventHandler ResourcesLoaded
1695 if (_resourcesLoadedEventHandler == null)
1697 _ResourcesLoadedCallback = OnResourcesLoaded;
1698 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1701 _resourcesLoadedEventHandler += value;
1706 _resourcesLoadedEventHandler -= value;
1708 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1710 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1715 internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
1719 if (_backgroundResourceLoadedEventHandler == null)
1721 _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
1722 this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
1725 _backgroundResourceLoadedEventHandler += value;
1729 _backgroundResourceLoadedEventHandler -= value;
1731 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1733 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1739 /// Enumeration for describing the states of the view.
1741 /// <since_tizen> 3 </since_tizen>
1745 /// The normal state.
1749 /// The focused state.
1753 /// The disabled state.
1759 /// Describes the direction to move the focus towards.
1761 /// <since_tizen> 3 </since_tizen>
1762 public enum FocusDirection
1765 /// Move keyboard focus towards the left direction.
1767 /// <since_tizen> 3 </since_tizen>
1770 /// Move keyboard focus towards the right direction.
1772 /// <since_tizen> 3 </since_tizen>
1775 /// Move keyboard focus towards the up direction.
1777 /// <since_tizen> 3 </since_tizen>
1780 /// Move keyboard focus towards the down direction.
1782 /// <since_tizen> 3 </since_tizen>
1785 /// Move keyboard focus towards the previous page direction.
1787 /// <since_tizen> 3 </since_tizen>
1790 /// Move keyboard focus towards the next page direction.
1792 /// <since_tizen> 3 </since_tizen>
1796 internal enum PropertyRange
1798 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1799 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1800 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1803 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1804 [EditorBrowsable(EditorBrowsableState.Never)]
1805 public bool IsResourcesCreated
1809 return Application.Current.IsResourcesCreated;
1813 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1814 [EditorBrowsable(EditorBrowsableState.Never)]
1815 public ResourceDictionary XamlResources
1819 return Application.Current.XamlResources;
1823 Application.Current.XamlResources = value;
1828 /// The StyleName, type string.
1830 /// <since_tizen> 3 </since_tizen>
1831 public string StyleName
1835 return (string)GetValue(StyleNameProperty);
1839 SetValue(StyleNameProperty, value);
1840 NotifyPropertyChanged();
1845 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1847 /// <since_tizen> 3 </since_tizen>
1848 public Color BackgroundColor
1852 return (Color)GetValue(BackgroundColorProperty);
1856 SetValue(BackgroundColorProperty, value);
1857 NotifyPropertyChanged();
1862 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1864 /// <since_tizen> 3 </since_tizen>
1865 public string BackgroundImage
1869 return (string)GetValue(BackgroundImageProperty);
1873 SetValue(BackgroundImageProperty, value);
1874 NotifyPropertyChanged();
1879 /// The background of view.
1881 /// <since_tizen> 3 </since_tizen>
1882 public Tizen.NUI.PropertyMap Background
1886 return (PropertyMap)GetValue(BackgroundProperty);
1890 SetValue(BackgroundProperty, value);
1891 NotifyPropertyChanged();
1897 /// The current state of the view.
1899 /// <since_tizen> 3 </since_tizen>
1904 return (States)GetValue(StateProperty);
1908 SetValue(StateProperty, value);
1909 NotifyPropertyChanged();
1914 /// The current sub state of the view.
1916 /// <since_tizen> 3 </since_tizen>
1917 public States SubState
1921 return (States)GetValue(SubStateProperty);
1925 SetValue(SubStateProperty, value);
1926 NotifyPropertyChanged();
1931 /// Displays a tooltip
1933 /// <since_tizen> 3 </since_tizen>
1934 public Tizen.NUI.PropertyMap Tooltip
1938 return (PropertyMap)GetValue(TooltipProperty);
1942 SetValue(TooltipProperty, value);
1943 NotifyPropertyChanged();
1948 /// Displays a tooltip as a text.
1950 /// <since_tizen> 3 </since_tizen>
1951 public string TooltipText
1955 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1956 NotifyPropertyChanged();
1961 /// The Child property of FlexContainer.<br />
1962 /// The proportion of the free space in the container, the flex item will receive.<br />
1963 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1965 /// <since_tizen> 3 </since_tizen>
1970 return (float)GetValue(FlexProperty);
1974 SetValue(FlexProperty, value);
1975 NotifyPropertyChanged();
1980 /// The Child property of FlexContainer.<br />
1981 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
1983 /// <since_tizen> 3 </since_tizen>
1984 public int AlignSelf
1988 return (int)GetValue(AlignSelfProperty);
1992 SetValue(AlignSelfProperty, value);
1993 NotifyPropertyChanged();
1998 /// The Child property of FlexContainer.<br />
1999 /// The space around the flex item.<br />
2001 /// <since_tizen> 3 </since_tizen>
2002 public Vector4 FlexMargin
2006 return (Vector4)GetValue(FlexMarginProperty);
2010 SetValue(FlexMarginProperty, value);
2011 NotifyPropertyChanged();
2016 /// The top-left cell this child occupies, if not set, the first available cell is used.
2018 /// <since_tizen> 3 </since_tizen>
2019 public Vector2 CellIndex
2023 return (Vector2)GetValue(CellIndexProperty);
2027 SetValue(CellIndexProperty, value);
2028 NotifyPropertyChanged();
2033 /// The number of rows this child occupies, if not set, the default value is 1.
2035 /// <since_tizen> 3 </since_tizen>
2036 public float RowSpan
2040 return (float)GetValue(RowSpanProperty);
2044 SetValue(RowSpanProperty, value);
2045 NotifyPropertyChanged();
2050 /// The number of columns this child occupies, if not set, the default value is 1.
2052 /// <since_tizen> 3 </since_tizen>
2053 public float ColumnSpan
2057 return (float)GetValue(ColumnSpanProperty);
2061 SetValue(ColumnSpanProperty, value);
2062 NotifyPropertyChanged();
2067 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
2069 /// <since_tizen> 3 </since_tizen>
2070 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
2074 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
2078 SetValue(CellHorizontalAlignmentProperty, value);
2079 NotifyPropertyChanged();
2084 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
2086 /// <since_tizen> 3 </since_tizen>
2087 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
2091 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
2095 SetValue(CellVerticalAlignmentProperty, value);
2096 NotifyPropertyChanged();
2101 /// The left focusable view.<br />
2102 /// This will return null if not set.<br />
2103 /// This will also return null if the specified left focusable view is not on a window.<br />
2105 /// <since_tizen> 3 </since_tizen>
2106 public View LeftFocusableView
2108 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2111 return (View)GetValue(LeftFocusableViewProperty);
2115 SetValue(LeftFocusableViewProperty, value);
2116 NotifyPropertyChanged();
2121 /// The right focusable view.<br />
2122 /// This will return null if not set.<br />
2123 /// This will also return null if the specified right focusable view is not on a window.<br />
2125 /// <since_tizen> 3 </since_tizen>
2126 public View RightFocusableView
2128 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2131 return (View)GetValue(RightFocusableViewProperty);
2135 SetValue(RightFocusableViewProperty, value);
2136 NotifyPropertyChanged();
2141 /// The up focusable view.<br />
2142 /// This will return null if not set.<br />
2143 /// This will also return null if the specified up focusable view is not on a window.<br />
2145 /// <since_tizen> 3 </since_tizen>
2146 public View UpFocusableView
2148 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2151 return (View)GetValue(UpFocusableViewProperty);
2155 SetValue(UpFocusableViewProperty, value);
2156 NotifyPropertyChanged();
2161 /// The down focusable view.<br />
2162 /// This will return null if not set.<br />
2163 /// This will also return null if the specified down focusable view is not on a window.<br />
2165 /// <since_tizen> 3 </since_tizen>
2166 public View DownFocusableView
2168 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2171 return (View)GetValue(DownFocusableViewProperty);
2175 SetValue(DownFocusableViewProperty, value);
2176 NotifyPropertyChanged();
2181 /// Whether the view should be focusable by keyboard navigation.
2183 /// <since_tizen> 3 </since_tizen>
2184 public bool Focusable
2188 SetValue(FocusableProperty, value);
2189 NotifyPropertyChanged();
2193 return (bool)GetValue(FocusableProperty);
2198 /// Retrieves the position of the view.<br />
2199 /// The coordinates are relative to the view's parent.<br />
2201 /// <since_tizen> 3 </since_tizen>
2202 public Position CurrentPosition
2206 return GetCurrentPosition();
2211 /// Sets the size of a view for the width and the height.<br />
2212 /// Geometry can be scaled to fit within this area.<br />
2213 /// This does not interfere with the view's scale factor.<br />
2214 /// The views default depth is the minimum of width and height.<br />
2217 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
2218 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
2219 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
2220 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2221 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2222 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2223 /// 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 />
2225 /// <since_tizen> 3 </since_tizen>
2226 public Size2D Size2D
2230 Size2D temp = (Size2D)GetValue(Size2DProperty);
2231 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
2235 SetValue(Size2DProperty, value);
2236 // Set Specification so when layouts measure this View it matches the value set here.
2237 // All Views are currently Layouts.
2238 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
2239 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
2240 NotifyPropertyChanged();
2245 /// Retrieves the size of the view.<br />
2246 /// The coordinates are relative to the view's parent.<br />
2248 /// <since_tizen> 3 </since_tizen>
2249 public Size2D CurrentSize
2253 return GetCurrentSize();
2258 /// Retrieves and sets the view's opacity.<br />
2260 /// <since_tizen> 3 </since_tizen>
2261 public float Opacity
2265 return (float)GetValue(OpacityProperty);
2269 SetValue(OpacityProperty, value);
2270 NotifyPropertyChanged();
2275 /// Sets the position of the view for X and Y.<br />
2276 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2277 /// If the position inheritance is disabled, sets the world position.<br />
2280 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
2281 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
2282 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
2283 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2284 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2285 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2287 /// <since_tizen> 3 </since_tizen>
2288 public Position2D Position2D
2292 Position2D temp = (Position2D)GetValue(Position2DProperty);
2293 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
2297 SetValue(Position2DProperty, value);
2298 NotifyPropertyChanged();
2303 /// Retrieves the screen postion of the view.<br />
2305 /// <since_tizen> 3 </since_tizen>
2306 public Vector2 ScreenPosition
2310 Vector2 temp = new Vector2(0.0f, 0.0f);
2311 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2317 /// Determines whether the pivot point should be used to determine the position of the view.
2318 /// This is true by default.
2320 /// <remarks>If false, then the top-left of the view is used for the position.
2321 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
2323 /// <since_tizen> 3 </since_tizen>
2324 public bool PositionUsesPivotPoint
2328 return (bool)GetValue(PositionUsesPivotPointProperty);
2332 SetValue(PositionUsesPivotPointProperty, value);
2333 NotifyPropertyChanged();
2338 /// Please do not use! this will be deprecated.
2340 /// Please do not use! this will be deprecated!
2341 /// Instead please use PositionUsesPivotPoint.
2342 /// <since_tizen> 3 </since_tizen>
2343 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2345 "View view = new View(); " +
2346 "view.PivotPoint = PivotPoint.Center; " +
2347 "view.PositionUsesPivotPoint = true;")]
2348 [EditorBrowsable(EditorBrowsableState.Never)]
2349 public bool PositionUsesAnchorPoint
2354 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2359 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2360 NotifyPropertyChanged();
2365 /// Queries whether the view is connected to the stage.<br />
2366 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2368 /// <since_tizen> 3 </since_tizen>
2369 public bool IsOnWindow
2378 /// Gets the depth in the hierarchy for the view.
2380 /// <since_tizen> 3 </since_tizen>
2381 public int HierarchyDepth
2385 return GetHierarchyDepth();
2390 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2393 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
2394 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2395 /// The values set by this property will likely change.
2397 /// <since_tizen> 3 </since_tizen>
2398 public int SiblingOrder
2402 return (int)GetValue(SiblingOrderProperty);
2406 SetValue(SiblingOrderProperty, value);
2407 NotifyPropertyChanged();
2412 /// Returns the natural size of the view.
2415 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2417 /// <since_tizen> 5 </since_tizen>
2418 public Vector3 NaturalSize
2422 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2423 if (NDalicPINVOKE.SWIGPendingException.Pending)
2424 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2430 /// Returns the natural size (Size2D) of the view.
2433 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2435 /// <since_tizen> 4 </since_tizen>
2436 public Size2D NaturalSize2D
2440 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2441 if (NDalicPINVOKE.SWIGPendingException.Pending)
2442 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2444 return new Size2D((int)temp.Width, (int)temp.Height);
2449 /// Gets or sets the origin of a view within its parent's area.<br />
2450 /// 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 />
2451 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
2452 /// A view's position is the distance between this origin and the view's anchor-point.<br />
2454 /// <pre>The view has been initialized.</pre>
2455 /// <since_tizen> 3 </since_tizen>
2456 public Position ParentOrigin
2460 return (Position)GetValue(ParentOriginProperty);
2464 SetValue(ParentOriginProperty, value);
2465 NotifyPropertyChanged();
2470 /// Gets or sets the anchor-point of a view.<br />
2471 /// 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 />
2472 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
2473 /// A view position is the distance between its parent-origin and this anchor-point.<br />
2474 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
2475 /// <pre>The view has been initialized.</pre>
2477 /// <since_tizen> 3 </since_tizen>
2478 public Position PivotPoint
2482 return (Position)GetValue(PivotPointProperty);
2486 SetValue(PivotPointProperty, value);
2487 NotifyPropertyChanged();
2492 /// Gets or sets the size width of the view.
2494 /// <since_tizen> 3 </since_tizen>
2495 public float SizeWidth
2499 return (float)GetValue(SizeWidthProperty);
2503 SetValue(SizeWidthProperty, value);
2504 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
2505 NotifyPropertyChanged();
2510 /// Gets or sets the size height of the view.
2512 /// <since_tizen> 3 </since_tizen>
2513 public float SizeHeight
2517 return (float)GetValue(SizeHeightProperty);
2521 SetValue(SizeHeightProperty, value);
2522 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
2523 NotifyPropertyChanged();
2528 /// Gets or sets the position of the view.<br />
2529 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
2530 /// If the position inheritance is disabled, sets the world position.<br />
2532 /// <since_tizen> 3 </since_tizen>
2533 public Position Position
2537 return (Position)GetValue(PositionProperty);
2541 SetValue(PositionProperty, value);
2542 NotifyPropertyChanged();
2547 /// Gets or sets the position X of the view.
2549 /// <since_tizen> 3 </since_tizen>
2550 public float PositionX
2554 return (float)GetValue(PositionXProperty);
2558 SetValue(PositionXProperty, value);
2559 NotifyPropertyChanged();
2564 /// Gets or sets the position Y of the view.
2566 /// <since_tizen> 3 </since_tizen>
2567 public float PositionY
2571 return (float)GetValue(PositionYProperty);
2575 SetValue(PositionYProperty, value);
2576 NotifyPropertyChanged();
2581 /// Gets or sets the position Z of the view.
2583 /// <since_tizen> 3 </since_tizen>
2584 public float PositionZ
2588 return (float)GetValue(PositionZProperty);
2592 SetValue(PositionZProperty, value);
2593 NotifyPropertyChanged();
2598 /// Gets or sets the world position of the view.
2600 /// <since_tizen> 3 </since_tizen>
2601 public Vector3 WorldPosition
2605 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2606 GetProperty(View.Property.WORLD_POSITION).Get(temp);
2612 /// Gets or sets the orientation of the view.<br />
2613 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
2615 /// <remarks>This is an asynchronous method.</remarks>
2616 /// <since_tizen> 3 </since_tizen>
2617 public Rotation Orientation
2621 return (Rotation)GetValue(OrientationProperty);
2625 SetValue(OrientationProperty, value);
2626 NotifyPropertyChanged();
2631 /// Gets or sets the world orientation of the view.<br />
2633 /// <since_tizen> 3 </since_tizen>
2634 public Rotation WorldOrientation
2638 Rotation temp = new Rotation();
2639 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
2645 /// Gets or sets the scale factor applied to the view.<br />
2647 /// <since_tizen> 3 </since_tizen>
2648 public Vector3 Scale
2652 return (Vector3)GetValue(ScaleProperty);
2656 SetValue(ScaleProperty, value);
2657 NotifyPropertyChanged();
2662 /// Gets or sets the scale X factor applied to the view.
2664 /// <since_tizen> 3 </since_tizen>
2669 return (float)GetValue(ScaleXProperty);
2673 SetValue(ScaleXProperty, value);
2674 NotifyPropertyChanged();
2679 /// Gets or sets the scale Y factor applied to the view.
2681 /// <since_tizen> 3 </since_tizen>
2686 return (float)GetValue(ScaleYProperty);
2690 SetValue(ScaleYProperty, value);
2691 NotifyPropertyChanged();
2696 /// Gets or sets the scale Z factor applied to the view.
2698 /// <since_tizen> 3 </since_tizen>
2703 return (float)GetValue(ScaleZProperty);
2707 SetValue(ScaleZProperty, value);
2708 NotifyPropertyChanged();
2713 /// Gets the world scale of the view.
2715 /// <since_tizen> 3 </since_tizen>
2716 public Vector3 WorldScale
2720 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2721 GetProperty(View.Property.WORLD_SCALE).Get(temp);
2727 /// Retrieves the visibility flag of the view.
2730 /// If the view is not visible, then the view and its children will not be rendered.
2731 /// 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.
2733 /// <since_tizen> 3 </since_tizen>
2734 public bool Visibility
2739 GetProperty(View.Property.VISIBLE).Get(out temp);
2745 /// Gets the view's world color.
2747 /// <since_tizen> 3 </since_tizen>
2748 public Vector4 WorldColor
2752 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2753 GetProperty(View.Property.WORLD_COLOR).Get(temp);
2759 /// Gets or sets the view's name.
2761 /// <since_tizen> 3 </since_tizen>
2766 return (string)GetValue(NameProperty);
2770 SetValue(NameProperty, value);
2771 NotifyPropertyChanged();
2776 /// Get the number of children held by the view.
2778 /// <since_tizen> 3 </since_tizen>
2779 public new uint ChildCount
2783 return GetChildCount();
2788 /// Gets the view's ID.
2791 /// <since_tizen> 3 </since_tizen>
2801 /// Gets or sets the status of whether the view should emit touch or hover signals.
2803 /// <since_tizen> 3 </since_tizen>
2804 public bool Sensitive
2808 return (bool)GetValue(SensitiveProperty);
2812 SetValue(SensitiveProperty, value);
2813 NotifyPropertyChanged();
2818 /// 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.
2820 /// <since_tizen> 3 </since_tizen>
2821 public bool LeaveRequired
2825 return (bool)GetValue(LeaveRequiredProperty);
2829 SetValue(LeaveRequiredProperty, value);
2830 NotifyPropertyChanged();
2835 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2837 /// <since_tizen> 3 </since_tizen>
2838 public bool InheritOrientation
2842 return (bool)GetValue(InheritOrientationProperty);
2846 SetValue(InheritOrientationProperty, value);
2847 NotifyPropertyChanged();
2852 /// Gets or sets the status of whether a child view inherits it's parent's scale.
2854 /// <since_tizen> 3 </since_tizen>
2855 public bool InheritScale
2859 return (bool)GetValue(InheritScaleProperty);
2863 SetValue(InheritScaleProperty, value);
2864 NotifyPropertyChanged();
2869 /// Gets or sets the status of how the view and its children should be drawn.<br />
2870 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2871 /// 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 />
2872 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2873 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2874 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2876 /// <since_tizen> 3 </since_tizen>
2877 public DrawModeType DrawMode
2881 return (DrawModeType)GetValue(DrawModeProperty);
2885 SetValue(DrawModeProperty, value);
2886 NotifyPropertyChanged();
2891 /// Gets or sets the relative to parent size factor of the view.<br />
2892 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2893 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2895 /// <since_tizen> 3 </since_tizen>
2896 public Vector3 SizeModeFactor
2900 return (Vector3)GetValue(SizeModeFactorProperty);
2904 SetValue(SizeModeFactorProperty, value);
2905 NotifyPropertyChanged();
2910 /// Gets or sets the width resize policy to be used.
2912 /// <since_tizen> 3 </since_tizen>
2913 public ResizePolicyType WidthResizePolicy
2917 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2921 SetValue(WidthResizePolicyProperty, value);
2922 // Match ResizePolicy to new Layouting.
2923 // Parent relative policies can not be mapped at this point as parent size unknown.
2926 case ResizePolicyType.UseNaturalSize:
2928 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
2931 case ResizePolicyType.FillToParent:
2933 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.MatchParent));
2936 case ResizePolicyType.FitToChildren:
2938 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.WrapContent));
2944 NotifyPropertyChanged();
2949 /// Gets or sets the height resize policy to be used.
2951 /// <since_tizen> 3 </since_tizen>
2952 public ResizePolicyType HeightResizePolicy
2956 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
2960 SetValue(HeightResizePolicyProperty, value);
2961 // Match ResizePolicy to new Layouting.
2962 // Parent relative policies can not be mapped at this point as parent size unknown.
2965 case ResizePolicyType.UseNaturalSize:
2967 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
2970 case ResizePolicyType.FillToParent:
2972 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.MatchParent));
2975 case ResizePolicyType.FitToChildren:
2977 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.WrapContent));
2983 NotifyPropertyChanged();
2988 /// Gets or sets the policy to use when setting size with size negotiation.<br />
2989 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
2991 /// <since_tizen> 3 </since_tizen>
2992 public SizeScalePolicyType SizeScalePolicy
2996 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
3000 SetValue(SizeScalePolicyProperty, value);
3001 NotifyPropertyChanged();
3006 /// Gets or sets the status of whether the width size is dependent on the height size.
3008 /// <since_tizen> 3 </since_tizen>
3009 public bool WidthForHeight
3013 return (bool)GetValue(WidthForHeightProperty);
3017 SetValue(WidthForHeightProperty, value);
3018 NotifyPropertyChanged();
3023 /// Gets or sets the status of whether the height size is dependent on the width size.
3025 /// <since_tizen> 3 </since_tizen>
3026 public bool HeightForWidth
3030 return (bool)GetValue(HeightForWidthProperty);
3034 SetValue(HeightForWidthProperty, value);
3035 NotifyPropertyChanged();
3040 /// Gets or sets the padding for use in layout.
3042 /// <since_tizen> 5 </since_tizen>
3043 public Extents Padding
3047 return (Extents)GetValue(PaddingProperty);
3051 SetValue(PaddingProperty, value);
3052 NotifyPropertyChanged();
3057 /// Gets or sets the minimum size the view can be assigned in size negotiation.
3059 /// <since_tizen> 3 </since_tizen>
3060 public Size2D MinimumSize
3064 return (Size2D)GetValue(MinimumSizeProperty);
3070 // Note: it only works if minimum size is >= than natural size.
3071 // To force the size it should be done through the width&height spec or Size2D.
3072 Layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
3073 Layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
3075 SetValue(MinimumSizeProperty, value);
3076 NotifyPropertyChanged();
3081 /// Gets or sets the maximum size the view can be assigned in size negotiation.
3083 /// <since_tizen> 3 </since_tizen>
3084 public Size2D MaximumSize
3088 return (Size2D)GetValue(MaximumSizeProperty);
3092 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
3093 // MATCH_PARENT spec + parent container size can be used to limit
3094 SetValue(MaximumSizeProperty, value);
3095 NotifyPropertyChanged();
3100 /// Gets or sets whether a child view inherits it's parent's position.<br />
3101 /// Default is to inherit.<br />
3102 /// 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 />
3104 /// <since_tizen> 3 </since_tizen>
3105 public bool InheritPosition
3109 return (bool)GetValue(InheritPositionProperty);
3113 SetValue(InheritPositionProperty, value);
3114 NotifyPropertyChanged();
3119 /// Gets or sets the clipping behavior (mode) of it's children.
3121 /// <since_tizen> 3 </since_tizen>
3122 public ClippingModeType ClippingMode
3126 return (ClippingModeType)GetValue(ClippingModeProperty);
3130 SetValue(ClippingModeProperty, value);
3131 NotifyPropertyChanged();
3136 /// Gets the number of renderers held by the view.
3138 /// <since_tizen> 3 </since_tizen>
3139 public uint RendererCount
3143 return GetRendererCount();
3148 /// [Obsolete("Please do not use! this will be deprecated")]
3150 /// <since_tizen> 3 </since_tizen>
3151 /// Please do not use! this will be deprecated!
3152 /// Instead please use PivotPoint.
3153 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
3155 "View view = new View(); " +
3156 "view.PivotPoint = PivotPoint.Center; " +
3157 "view.PositionUsesPivotPoint = true;")]
3158 [EditorBrowsable(EditorBrowsableState.Never)]
3159 public Position AnchorPoint
3163 Position temp = new Position(0.0f, 0.0f, 0.0f);
3164 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3169 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3170 NotifyPropertyChanged();
3175 /// Sets the size of a view for the width, the height and the depth.<br />
3176 /// Geometry can be scaled to fit within this area.<br />
3177 /// This does not interfere with the view's scale factor.<br />
3178 /// The views default depth is the minimum of width and height.<br />
3181 /// Please note that multi-cascade setting is not possible for this NUI object. <br />
3182 /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3183 /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
3184 /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
3185 /// 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 />
3187 /// <since_tizen> 5 </since_tizen>
3192 return (Size)GetValue(SizeProperty);
3196 SetValue(SizeProperty, value);
3197 // Set Specification so when layouts measure this View it matches the value set here.
3198 // All Views are currently Layouts.
3199 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
3200 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
3201 NotifyPropertyChanged();
3206 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
3208 /// <since_tizen> 3 </since_tizen>
3209 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
3211 "Container parent = view.GetParent(); " +
3212 "View view = parent as View;")]
3213 [EditorBrowsable(EditorBrowsableState.Never)]
3214 public new View Parent
3219 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
3220 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3221 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3223 if (basehandle is Layer layer)
3225 ret = new View(Layer.getCPtr(layer).Handle, false);
3226 NUILog.Error("This Parent property is deprecated, shoud do not be used");
3230 ret = basehandle as View;
3233 NDalicPINVOKE.delete_BaseHandle(CPtr);
3234 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3236 if (NDalicPINVOKE.SWIGPendingException.Pending)
3237 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3243 /// Gets/Sets whether inherit parent's the layout Direction.
3245 /// <since_tizen> 4 </since_tizen>
3246 public bool InheritLayoutDirection
3250 return (bool)GetValue(InheritLayoutDirectionProperty);
3254 SetValue(InheritLayoutDirectionProperty, value);
3255 NotifyPropertyChanged();
3260 /// Gets/Sets the layout Direction.
3262 /// <since_tizen> 4 </since_tizen>
3263 public ViewLayoutDirectionType LayoutDirection
3267 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
3271 SetValue(LayoutDirectionProperty, value);
3272 NotifyPropertyChanged();
3277 /// Gets or sets the Margin for use in layout.
3280 /// Margin property is supported by Layout algorithms and containers.
3281 /// Please Set Layout if you want to use Margin property.
3283 /// <since_tizen> 4 </since_tizen>
3284 public Extents Margin
3288 return (Extents)GetValue(MarginProperty);
3292 SetValue(MarginProperty, value);
3293 NotifyPropertyChanged();
3298 /// [Obsolete("Please do not use! this will be deprecated")]
3300 /// Please do not use! this will be deprecated!
3301 /// Instead please use Padding.
3302 /// <since_tizen> 4 </since_tizen>
3303 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
3304 [EditorBrowsable(EditorBrowsableState.Never)]
3305 public Extents PaddingEX
3309 Extents temp = new Extents(0, 0, 0, 0);
3310 GetProperty(View.Property.PADDING).Get(temp);
3315 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3316 NotifyPropertyChanged();
3320 internal Style Style
3324 return (Style)GetValue(StyleProperty);
3328 SetValue(StyleProperty, value);
3333 /// Child property to specify desired width
3335 internal int LayoutWidthSpecificationFixed
3340 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
3342 NUILog.Error("WidthSpecificationFixed get error!");
3348 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
3353 /// Child property to specify desired height
3355 internal int LayoutHeightSpecificationFixed
3360 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
3362 NUILog.Error("HeightSpecificationFixed get error!");
3368 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
3373 /// Child property to specify desired width, use MatchParent/WrapContent)
3375 internal ChildLayoutData LayoutWidthSpecification
3380 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
3382 NUILog.Error("WidthSpecificationFixed get error!");
3384 return (ChildLayoutData)tmp;
3388 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
3393 /// Child property to specify desired height, use MatchParent/WrapContent)
3395 internal ChildLayoutData LayoutHeightSpecification
3400 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
3402 NUILog.Error("HeightSpecificationFixed get error!");
3404 return (ChildLayoutData)tmp;
3408 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
3412 internal float Weight
3416 return (float)GetValue(WeightProperty);
3420 SetValue(WeightProperty, value);
3421 NotifyPropertyChanged();
3425 internal bool BackgroundImageSynchronosLoading
3429 return _backgroundImageSynchronosLoading;
3433 if (value != _backgroundImageSynchronosLoading)
3436 PropertyMap bgMap = this.Background;
3438 bgMap.Find(Visual.Property.Type)?.Get(out visualType);
3439 if (visualType == (int)Visual.Type.Image)
3441 bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
3443 if (bgUrl.Length != 0)
3445 _backgroundImageSynchronosLoading = value;
3446 bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
3447 this.Background = bgMap;
3453 internal float WorldPositionX
3458 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3463 internal float WorldPositionY
3468 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3473 internal float WorldPositionZ
3478 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3483 internal bool FocusState
3487 return IsKeyboardFocusable();
3491 SetKeyboardFocusable(value);
3496 /// Set the layout on this control.
3500 internal LayoutItem Layout
3504 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
3506 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3507 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3508 NDalicPINVOKE.delete_BaseHandle(CPtr);
3509 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3511 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3513 return basehandle as LayoutItem;
3517 Log.Info("NUI", "Set Layout on:" + Name + "\n");
3518 layoutingDisabled = false;
3525 /// Set that layouting is required on this View. It will automatically receive a Layout.
3529 internal bool LayoutingRequired
3533 bool result = Tizen.NUI.NDalicManualPINVOKE.View_IsLayoutingRequired(View.getCPtr(this));
3534 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3539 Tizen.NUI.NDalicManualPINVOKE.View_SetLayoutingRequired(View.getCPtr(this), value);
3543 internal float ParentOriginX
3548 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3553 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3554 NotifyPropertyChanged();
3558 internal float ParentOriginY
3563 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3568 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3569 NotifyPropertyChanged();
3573 internal float ParentOriginZ
3578 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3583 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3584 NotifyPropertyChanged();
3588 internal float PivotPointX
3593 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3598 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3602 internal float PivotPointY
3607 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3612 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3616 internal float PivotPointZ
3621 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3626 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3630 internal Matrix WorldMatrix
3634 Matrix temp = new Matrix();
3635 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3640 private int LeftFocusableViewId
3645 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
3650 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3654 private int RightFocusableViewId
3659 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
3664 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3668 private int UpFocusableViewId
3673 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
3678 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3682 private int DownFocusableViewId
3687 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
3692 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3697 /// Perform an action on a visual registered to this view. <br />
3698 /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
3700 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
3701 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
3702 /// <param name="attributes">Optional attributes for the action.</param>
3703 /// <since_tizen> 5 </since_tizen>
3704 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
3706 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
3707 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3711 /// Creates an animation to animate the background color visual. If there is no
3712 /// background visual, creates one with transparent black as it's mixColor.
3714 /// <since_tizen> 3 </since_tizen>
3715 public Animation AnimateBackgroundColor(object destinationValue,
3718 AlphaFunction.BuiltinFunctions? alphaFunction = null,
3719 object initialValue = null)
3721 Tizen.NUI.PropertyMap background = Background;
3723 if (background.Empty())
3725 // If there is no background yet, ensure there is a transparent
3727 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
3728 background = Background;
3730 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
3734 /// Creates an animation to animate the mixColor of the named visual.
3736 /// <since_tizen> 3 </since_tizen>
3737 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
3739 Animation animation = null;
3741 PropertyMap _animator = new PropertyMap();
3742 if (alphaFunction != null)
3744 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
3747 PropertyMap _timePeriod = new PropertyMap();
3748 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
3749 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
3750 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
3752 PropertyMap _transition = new PropertyMap();
3753 _transition.Add("animator", new PropertyValue(_animator));
3754 _transition.Add("target", new PropertyValue(targetVisual));
3755 _transition.Add("property", new PropertyValue("mixColor"));
3757 if (initialColor != null)
3759 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
3760 _transition.Add("initialValue", initValue);
3763 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
3764 _transition.Add("targetValue", destValue);
3765 TransitionData _transitionData = new TransitionData(_transition);
3767 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
3768 if (NDalicPINVOKE.SWIGPendingException.Pending)
3769 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3774 // From Container Base class
3776 /// Adds a child view to this view.
3778 /// <seealso cref="Container.Add" />
3779 /// <since_tizen> 4 </since_tizen>
3780 public override void Add(View child)
3784 Tizen.Log.Fatal("NUI", "Child is null");
3788 Log.Info("NUI", "Adding Child:" + child.Name + " to " + Name + "\n");
3790 Container oldParent = child.GetParent();
3791 if (oldParent != this)
3793 if (oldParent != null)
3795 oldParent.Remove(child);
3797 child.InternalParent = this;
3799 // Only give children a layout if their parent is an explicit container or a pure View.
3800 // Pure View meaning not derived from a View, e.g a Legacy container.
3801 // layoutSet flag is true when the View became a layout using the set Layout API opposed to automatically due to it's parent.
3802 // First time the set Layout API is used by any View the Window no longer has layoutingDisabled.
3803 if ((true == layoutSet || GetType() == typeof(View)) && null == child.Layout && false == layoutingDisabled)
3805 Log.Info("NUI", "Parent[" + Name + "] Layout set[" + layoutSet.ToString() + "] Pure View[" + (!layoutSet).ToString() + "]\n");
3806 // If child is a View or explicitly set to require layouting then set child as a LayoutGroup.
3807 // If the child is derived from a View then it may be a legacy or existing container hence will do layouting itself.
3808 if (child.GetType() == typeof(View) || true == child.LayoutingRequired)
3810 Log.Info("NUI", "Creating LayoutGroup for " + child.Name + " LayoutingRequired[" + child.LayoutingRequired.ToString() + "]\n");
3811 child.SetLayout(new LayoutGroup());
3815 // Adding child as a leaf, layouting will not propagate past this child.
3816 // Legacy containers will be a LayoutItems too and layout their children how they wish.
3817 Log.Info("NUI", "Creating LayoutItem for " + child.Name + "\n");
3818 child.SetLayout(new LayoutItem());
3824 Layout.LayoutChildren.Add(child.Layout);
3827 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
3828 if (NDalicPINVOKE.SWIGPendingException.Pending)
3829 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3830 Children.Add(child);
3832 if (ChildAdded != null)
3834 ChildAddedEventArgs e = new ChildAddedEventArgs
3838 ChildAdded(this, e);
3844 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
3846 /// <seealso cref="Container.Remove" />
3847 /// <since_tizen> 4 </since_tizen>
3848 public override void Remove(View child)
3850 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
3851 if (NDalicPINVOKE.SWIGPendingException.Pending)
3852 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3854 Children.Remove(child);
3855 child.InternalParent = null;
3861 Layout.LayoutChildren.Remove(child.Layout);
3865 if (ChildRemoved != null)
3867 ChildRemovedEventArgs e = new ChildRemovedEventArgs
3871 ChildRemoved(this, e);
3876 /// Retrieves a child view by index.
3878 /// <seealso cref="Container.GetChildAt" />
3879 /// <since_tizen> 4 </since_tizen>
3880 public override View GetChildAt(uint index)
3882 if (index < Children.Count)
3884 return Children[Convert.ToInt32(index)];
3893 /// Retrieves the number of children held by the view.
3895 /// <seealso cref="Container.GetChildCount" />
3896 /// <since_tizen> 4 </since_tizen>
3897 public override uint GetChildCount()
3899 return Convert.ToUInt32(Children.Count);
3903 /// Gets the views parent.
3905 /// <seealso cref="Container.GetParent()" />
3906 /// <since_tizen> 4 </since_tizen>
3907 public override Container GetParent()
3909 return this.InternalParent as Container;
3913 /// Queries whether the view has a focus.
3915 /// <returns>True if this view has a focus.</returns>
3916 /// <since_tizen> 3 </since_tizen>
3917 public bool HasFocus()
3919 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
3920 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3925 /// Sets the name of the style to be applied to the view.
3927 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
3928 /// <since_tizen> 3 </since_tizen>
3929 public void SetStyleName(string styleName)
3931 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
3932 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3936 /// Retrieves the name of the style to be applied to the view (if any).
3938 /// <returns>A string matching a style, or an empty string.</returns>
3939 /// <since_tizen> 3 </since_tizen>
3940 public string GetStyleName()
3942 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
3943 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3948 /// Clears the background.
3950 /// <since_tizen> 3 </since_tizen>
3951 public void ClearBackground()
3953 NDalicPINVOKE.View_ClearBackground(swigCPtr);
3954 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3961 /// This is an asynchronous method.
3963 /// <since_tizen> 3 </since_tizen>
3973 /// This is an asynchronous method.
3974 /// If the view is hidden, then the view and its children will not be rendered.
3975 /// 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.
3977 /// <since_tizen> 3 </since_tizen>
3984 /// Raises the view above all other views.
3987 /// Sibling order of views within the parent will be updated automatically.
3988 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
3990 /// <since_tizen> 3 </since_tizen>
3991 public void RaiseToTop()
3993 var parentChildren = GetParent()?.Children;
3995 if (parentChildren != null)
3997 parentChildren.Remove(this);
3998 parentChildren.Add(this);
4000 NDalicPINVOKE.RaiseToTop(swigCPtr);
4001 if (NDalicPINVOKE.SWIGPendingException.Pending)
4002 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4008 /// Lowers the view to the bottom of all views.
4011 /// The sibling order of views within the parent will be updated automatically.
4012 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4014 /// <since_tizen> 3 </since_tizen>
4015 public void LowerToBottom()
4017 var parentChildren = GetParent()?.Children;
4019 if (parentChildren != null)
4021 parentChildren.Remove(this);
4022 parentChildren.Insert(0, this);
4024 NDalicPINVOKE.LowerToBottom(swigCPtr);
4025 if (NDalicPINVOKE.SWIGPendingException.Pending)
4026 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4031 /// Queries if all resources required by a view are loaded and ready.
4033 /// <remarks>Most resources are only loaded when the control is placed on the stage.
4035 /// <since_tizen> 3 </since_tizen>
4036 public bool IsResourceReady()
4038 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
4039 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4044 /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
4046 /// <pre>The view has been initialized. </pre>
4047 /// <returns>The parent layer of view </returns>
4048 /// <since_tizen> 5 </since_tizen>
4049 public Layer GetLayer()
4051 //to fix memory leak issue, match the handle count with native side.
4052 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
4053 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4054 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
4055 NDalicPINVOKE.delete_BaseHandle(CPtr);
4056 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4058 if (NDalicPINVOKE.SWIGPendingException.Pending)
4059 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4064 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
4066 /// <pre>The (child) view has been initialized. </pre>
4067 /// <since_tizen> 4 </since_tizen>
4068 public void Unparent()
4070 GetParent()?.Remove(this);
4074 /// Search through this view's hierarchy for a view with the given name.
4075 /// The view itself is also considered in the search.
4077 /// <pre>The view has been initialized.</pre>
4078 /// <param name="viewName">The name of the view to find.</param>
4079 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
4080 /// <since_tizen> 3 </since_tizen>
4081 public View FindChildByName(string viewName)
4083 //to fix memory leak issue, match the handle count with native side.
4084 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
4085 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4086 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4087 NDalicPINVOKE.delete_BaseHandle(CPtr);
4088 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4090 if (NDalicPINVOKE.SWIGPendingException.Pending)
4091 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4096 /// Converts screen coordinates into the view's coordinate system using the default camera.
4098 /// <pre>The view has been initialized.</pre>
4099 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4100 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4101 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4102 /// <param name="screenX">The screen X-coordinate.</param>
4103 /// <param name="screenY">The screen Y-coordinate.</param>
4104 /// <returns>True if the conversion succeeded.</returns>
4105 /// <since_tizen> 3 </since_tizen>
4106 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4108 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4109 if (NDalicPINVOKE.SWIGPendingException.Pending)
4110 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4115 /// Sets the relative to parent size factor of the view.<br />
4116 /// This factor is only used when ResizePolicy is set to either:
4117 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4118 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4120 /// <pre>The view has been initialized.</pre>
4121 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4122 /// <since_tizen> 3 </since_tizen>
4123 public void SetSizeModeFactor(Vector3 factor)
4125 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4126 if (NDalicPINVOKE.SWIGPendingException.Pending)
4127 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4130 /// Calculates the height of the view given a width.<br />
4131 /// The natural size is used for default calculation.<br />
4132 /// Size 0 is treated as aspect ratio 1:1.<br />
4134 /// <param name="width">The width to use.</param>
4135 /// <returns>The height based on the width.</returns>
4136 /// <since_tizen> 3 </since_tizen>
4137 public float GetHeightForWidth(float width)
4139 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
4140 if (NDalicPINVOKE.SWIGPendingException.Pending)
4141 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4146 /// Calculates the width of the view given a height.<br />
4147 /// The natural size is used for default calculation.<br />
4148 /// Size 0 is treated as aspect ratio 1:1.<br />
4150 /// <param name="height">The height to use.</param>
4151 /// <returns>The width based on the height.</returns>
4152 /// <since_tizen> 3 </since_tizen>
4153 public float GetWidthForHeight(float height)
4155 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
4156 if (NDalicPINVOKE.SWIGPendingException.Pending)
4157 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4162 /// Return the amount of size allocated for relayout.
4164 /// <param name="dimension">The dimension to retrieve.</param>
4165 /// <returns>Return the size.</returns>
4166 /// <since_tizen> 3 </since_tizen>
4167 public float GetRelayoutSize(DimensionType dimension)
4169 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4170 if (NDalicPINVOKE.SWIGPendingException.Pending)
4171 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4176 /// Set the padding for the view.
4178 /// <param name="padding">Padding for the view.</param>
4179 /// <since_tizen> 3 </since_tizen>
4180 public void SetPadding(PaddingType padding)
4182 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4183 if (NDalicPINVOKE.SWIGPendingException.Pending)
4184 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4188 /// Return the value of padding for the view.
4190 /// <param name="paddingOut">the value of padding for the view</param>
4191 /// <since_tizen> 3 </since_tizen>
4192 public void GetPadding(PaddingType paddingOut)
4194 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4195 if (NDalicPINVOKE.SWIGPendingException.Pending)
4196 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4199 /// <since_tizen> 3 </since_tizen>
4200 public uint AddRenderer(Renderer renderer)
4202 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4203 if (NDalicPINVOKE.SWIGPendingException.Pending)
4204 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4208 /// <since_tizen> 3 </since_tizen>
4209 public Renderer GetRendererAt(uint index)
4211 //to fix memory leak issue, match the handle count with native side.
4212 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
4213 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4214 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4215 NDalicPINVOKE.delete_BaseHandle(CPtr);
4216 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4218 if (NDalicPINVOKE.SWIGPendingException.Pending)
4219 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4223 /// <since_tizen> 3 </since_tizen>
4224 public void RemoveRenderer(Renderer renderer)
4226 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4227 if (NDalicPINVOKE.SWIGPendingException.Pending)
4228 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4231 /// <since_tizen> 3 </since_tizen>
4232 public void RemoveRenderer(uint index)
4234 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4235 if (NDalicPINVOKE.SWIGPendingException.Pending)
4236 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4239 internal void Raise()
4241 var parentChildren = GetParent()?.Children;
4243 if (parentChildren != null)
4245 int currentIndex = parentChildren.IndexOf(this);
4247 // If the view is not already the last item in the list.
4248 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
4250 View temp = parentChildren[currentIndex + 1];
4251 parentChildren[currentIndex + 1] = this;
4252 parentChildren[currentIndex] = temp;
4254 NDalicPINVOKE.Raise(swigCPtr);
4255 if (NDalicPINVOKE.SWIGPendingException.Pending)
4256 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4261 internal void Lower()
4263 var parentChildren = GetParent()?.Children;
4265 if (parentChildren != null)
4267 int currentIndex = parentChildren.IndexOf(this);
4269 // If the view is not already the first item in the list.
4270 if (currentIndex > 0 && currentIndex < parentChildren.Count)
4272 View temp = parentChildren[currentIndex - 1];
4273 parentChildren[currentIndex - 1] = this;
4274 parentChildren[currentIndex] = temp;
4276 NDalicPINVOKE.Lower(swigCPtr);
4277 if (NDalicPINVOKE.SWIGPendingException.Pending)
4278 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4284 /// Raises the view to above the target view.
4286 /// <remarks>The sibling order of views within the parent will be updated automatically.
4287 /// Views on the level above the target view will still be shown above this view.
4288 /// Raising this view above views with the same sibling order as each other will raise this view above them.
4289 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4291 /// <param name="target">Will be raised above this view.</param>
4292 internal void RaiseAbove(View target)
4294 var parentChildren = GetParent()?.Children;
4296 if (parentChildren != null)
4298 int currentIndex = parentChildren.IndexOf(this);
4299 int targetIndex = parentChildren.IndexOf(target);
4301 if (currentIndex < 0 || targetIndex < 0 ||
4302 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4304 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4307 // If the currentIndex is less than the target index and the target has the same parent.
4308 if (currentIndex < targetIndex)
4310 parentChildren.Remove(this);
4311 parentChildren.Insert(targetIndex, this);
4313 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
4314 if (NDalicPINVOKE.SWIGPendingException.Pending)
4315 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4322 /// Lowers the view to below the target view.
4324 /// <remarks>The sibling order of views within the parent will be updated automatically.
4325 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
4326 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4328 /// <param name="target">Will be lowered below this view.</param>
4329 internal void LowerBelow(View target)
4331 var parentChildren = GetParent()?.Children;
4333 if (parentChildren != null)
4335 int currentIndex = parentChildren.IndexOf(this);
4336 int targetIndex = parentChildren.IndexOf(target);
4337 if (currentIndex < 0 || targetIndex < 0 ||
4338 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4340 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4344 // If the currentIndex is not already the 0th index and the target has the same parent.
4345 if ((currentIndex != 0) && (targetIndex != -1) &&
4346 (currentIndex > targetIndex))
4348 parentChildren.Remove(this);
4349 parentChildren.Insert(targetIndex, this);
4351 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
4352 if (NDalicPINVOKE.SWIGPendingException.Pending)
4353 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4359 internal string GetName()
4361 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
4362 if (NDalicPINVOKE.SWIGPendingException.Pending)
4363 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4367 internal void SetName(string name)
4369 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
4370 if (NDalicPINVOKE.SWIGPendingException.Pending)
4371 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4374 internal uint GetId()
4376 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
4377 if (NDalicPINVOKE.SWIGPendingException.Pending)
4378 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4382 internal bool IsRoot()
4384 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
4385 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4389 internal bool OnWindow()
4391 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
4392 if (NDalicPINVOKE.SWIGPendingException.Pending)
4393 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4397 internal View FindChildById(uint id)
4399 //to fix memory leak issue, match the handle count with native side.
4400 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
4401 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4402 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4403 NDalicPINVOKE.delete_BaseHandle(CPtr);
4404 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4406 if (NDalicPINVOKE.SWIGPendingException.Pending)
4407 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4411 internal void SetParentOrigin(Vector3 origin)
4413 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
4414 if (NDalicPINVOKE.SWIGPendingException.Pending)
4415 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4418 internal Vector3 GetCurrentParentOrigin()
4420 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
4421 if (NDalicPINVOKE.SWIGPendingException.Pending)
4422 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4426 internal void SetAnchorPoint(Vector3 anchorPoint)
4428 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
4429 if (NDalicPINVOKE.SWIGPendingException.Pending)
4430 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4433 internal Vector3 GetCurrentAnchorPoint()
4435 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
4436 if (NDalicPINVOKE.SWIGPendingException.Pending)
4437 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4441 internal void SetSize(float width, float height)
4443 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
4444 if (NDalicPINVOKE.SWIGPendingException.Pending)
4445 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4448 internal void SetSize(float width, float height, float depth)
4450 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
4451 if (NDalicPINVOKE.SWIGPendingException.Pending)
4452 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4455 internal void SetSize(Vector2 size)
4457 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
4458 if (NDalicPINVOKE.SWIGPendingException.Pending)
4459 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4462 internal void SetSize(Vector3 size)
4464 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
4465 if (NDalicPINVOKE.SWIGPendingException.Pending)
4466 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4469 internal Vector3 GetTargetSize()
4471 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
4472 if (NDalicPINVOKE.SWIGPendingException.Pending)
4473 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4477 internal Size2D GetCurrentSize()
4479 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
4480 if (NDalicPINVOKE.SWIGPendingException.Pending)
4481 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4482 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
4486 internal Vector3 GetNaturalSize()
4488 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
4489 if (NDalicPINVOKE.SWIGPendingException.Pending)
4490 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4494 internal void SetPosition(float x, float y)
4496 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
4497 if (NDalicPINVOKE.SWIGPendingException.Pending)
4498 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4501 internal void SetPosition(float x, float y, float z)
4503 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
4504 if (NDalicPINVOKE.SWIGPendingException.Pending)
4505 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4508 internal void SetPosition(Vector3 position)
4510 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
4511 if (NDalicPINVOKE.SWIGPendingException.Pending)
4512 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4515 internal void SetX(float x)
4517 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
4518 if (NDalicPINVOKE.SWIGPendingException.Pending)
4519 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4522 internal void SetY(float y)
4524 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
4525 if (NDalicPINVOKE.SWIGPendingException.Pending)
4526 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4529 internal void SetZ(float z)
4531 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
4532 if (NDalicPINVOKE.SWIGPendingException.Pending)
4533 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4536 internal void TranslateBy(Vector3 distance)
4538 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
4539 if (NDalicPINVOKE.SWIGPendingException.Pending)
4540 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4543 internal Position GetCurrentPosition()
4545 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
4546 if (NDalicPINVOKE.SWIGPendingException.Pending)
4547 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4551 internal Vector3 GetCurrentWorldPosition()
4553 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
4554 if (NDalicPINVOKE.SWIGPendingException.Pending)
4555 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4559 internal void SetInheritPosition(bool inherit)
4561 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
4562 if (NDalicPINVOKE.SWIGPendingException.Pending)
4563 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4566 internal bool IsPositionInherited()
4568 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
4569 if (NDalicPINVOKE.SWIGPendingException.Pending)
4570 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4574 internal void SetOrientation(Degree angle, Vector3 axis)
4576 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4577 if (NDalicPINVOKE.SWIGPendingException.Pending)
4578 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4581 internal void SetOrientation(Radian angle, Vector3 axis)
4583 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4584 if (NDalicPINVOKE.SWIGPendingException.Pending)
4585 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4588 internal void SetOrientation(Rotation orientation)
4590 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
4591 if (NDalicPINVOKE.SWIGPendingException.Pending)
4592 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4595 internal void RotateBy(Degree angle, Vector3 axis)
4597 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4598 if (NDalicPINVOKE.SWIGPendingException.Pending)
4599 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4602 internal void RotateBy(Radian angle, Vector3 axis)
4604 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4605 if (NDalicPINVOKE.SWIGPendingException.Pending)
4606 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4609 internal void RotateBy(Rotation relativeRotation)
4611 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4612 if (NDalicPINVOKE.SWIGPendingException.Pending)
4613 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4616 internal Rotation GetCurrentOrientation()
4618 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
4619 if (NDalicPINVOKE.SWIGPendingException.Pending)
4620 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4624 internal void SetInheritOrientation(bool inherit)
4626 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
4627 if (NDalicPINVOKE.SWIGPendingException.Pending)
4628 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4631 internal bool IsOrientationInherited()
4633 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
4634 if (NDalicPINVOKE.SWIGPendingException.Pending)
4635 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4639 internal Rotation GetCurrentWorldOrientation()
4641 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4642 if (NDalicPINVOKE.SWIGPendingException.Pending)
4643 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4647 internal void SetScale(float scale)
4649 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
4650 if (NDalicPINVOKE.SWIGPendingException.Pending)
4651 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4654 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4656 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4657 if (NDalicPINVOKE.SWIGPendingException.Pending)
4658 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4661 internal void SetScale(Vector3 scale)
4663 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4664 if (NDalicPINVOKE.SWIGPendingException.Pending)
4665 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4668 internal void ScaleBy(Vector3 relativeScale)
4670 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4671 if (NDalicPINVOKE.SWIGPendingException.Pending)
4672 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4675 internal Vector3 GetCurrentScale()
4677 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
4678 if (NDalicPINVOKE.SWIGPendingException.Pending)
4679 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4683 internal Vector3 GetCurrentWorldScale()
4685 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
4686 if (NDalicPINVOKE.SWIGPendingException.Pending)
4687 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4691 internal void SetInheritScale(bool inherit)
4693 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
4694 if (NDalicPINVOKE.SWIGPendingException.Pending)
4695 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4698 internal bool IsScaleInherited()
4700 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
4701 if (NDalicPINVOKE.SWIGPendingException.Pending)
4702 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4706 internal Matrix GetCurrentWorldMatrix()
4708 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4709 if (NDalicPINVOKE.SWIGPendingException.Pending)
4710 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4714 internal void SetVisible(bool visible)
4716 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
4717 if (NDalicPINVOKE.SWIGPendingException.Pending)
4718 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4721 internal bool IsVisible()
4723 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
4724 if (NDalicPINVOKE.SWIGPendingException.Pending)
4725 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4729 internal void SetOpacity(float opacity)
4731 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
4732 if (NDalicPINVOKE.SWIGPendingException.Pending)
4733 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4736 internal float GetCurrentOpacity()
4738 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
4739 if (NDalicPINVOKE.SWIGPendingException.Pending)
4740 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4744 internal void SetColor(Vector4 color)
4746 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4747 if (NDalicPINVOKE.SWIGPendingException.Pending)
4748 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4751 internal Vector4 GetCurrentColor()
4753 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
4754 if (NDalicPINVOKE.SWIGPendingException.Pending)
4755 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4759 internal void SetColorMode(ColorMode colorMode)
4761 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
4762 if (NDalicPINVOKE.SWIGPendingException.Pending)
4763 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4766 internal ColorMode GetColorMode()
4768 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
4769 if (NDalicPINVOKE.SWIGPendingException.Pending)
4770 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4774 internal Vector4 GetCurrentWorldColor()
4776 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
4777 if (NDalicPINVOKE.SWIGPendingException.Pending)
4778 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4782 internal void SetDrawMode(DrawModeType drawMode)
4784 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4785 if (NDalicPINVOKE.SWIGPendingException.Pending)
4786 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4789 internal DrawModeType GetDrawMode()
4791 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
4792 if (NDalicPINVOKE.SWIGPendingException.Pending)
4793 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4797 internal void SetKeyboardFocusable(bool focusable)
4799 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4800 if (NDalicPINVOKE.SWIGPendingException.Pending)
4801 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4804 internal bool IsKeyboardFocusable()
4806 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
4807 if (NDalicPINVOKE.SWIGPendingException.Pending)
4808 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4812 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4814 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4815 if (NDalicPINVOKE.SWIGPendingException.Pending)
4816 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4819 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4821 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4822 if (NDalicPINVOKE.SWIGPendingException.Pending)
4823 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4827 internal Vector3 GetSizeModeFactor()
4829 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
4830 if (NDalicPINVOKE.SWIGPendingException.Pending)
4831 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4835 internal void SetMinimumSize(Vector2 size)
4837 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4838 if (NDalicPINVOKE.SWIGPendingException.Pending)
4839 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4842 internal Vector2 GetMinimumSize()
4844 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
4845 if (NDalicPINVOKE.SWIGPendingException.Pending)
4846 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4850 internal void SetMaximumSize(Vector2 size)
4852 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4853 if (NDalicPINVOKE.SWIGPendingException.Pending)
4854 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4857 internal Vector2 GetMaximumSize()
4859 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
4860 if (NDalicPINVOKE.SWIGPendingException.Pending)
4861 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4865 internal int GetHierarchyDepth()
4867 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
4868 if (NDalicPINVOKE.SWIGPendingException.Pending)
4869 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4873 internal uint GetRendererCount()
4875 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
4876 if (NDalicPINVOKE.SWIGPendingException.Pending)
4877 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4881 internal TouchDataSignal TouchSignal()
4883 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
4884 if (NDalicPINVOKE.SWIGPendingException.Pending)
4885 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4889 internal HoverSignal HoveredSignal()
4891 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
4892 if (NDalicPINVOKE.SWIGPendingException.Pending)
4893 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4897 internal WheelSignal WheelEventSignal()
4899 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
4900 if (NDalicPINVOKE.SWIGPendingException.Pending)
4901 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4905 internal ViewSignal OnWindowSignal()
4907 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
4908 if (NDalicPINVOKE.SWIGPendingException.Pending)
4909 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4913 internal ViewSignal OffWindowSignal()
4915 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
4916 if (NDalicPINVOKE.SWIGPendingException.Pending)
4917 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4921 internal ViewSignal OnRelayoutSignal()
4923 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
4924 if (NDalicPINVOKE.SWIGPendingException.Pending)
4925 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4929 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
4931 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
4932 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4936 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
4938 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
4939 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4943 internal ViewSignal ResourcesLoadedSignal()
4945 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
4946 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4950 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
4952 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
4955 internal bool IsTopLevelView()
4957 if (GetParent() is Layer)
4964 internal void SetKeyInputFocus()
4966 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
4967 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4970 internal void ClearKeyInputFocus()
4972 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
4973 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4976 internal PinchGestureDetector GetPinchGestureDetector()
4978 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
4979 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4983 internal PanGestureDetector GetPanGestureDetector()
4985 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
4986 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4990 internal TapGestureDetector GetTapGestureDetector()
4992 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
4993 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4997 internal LongPressGestureDetector GetLongPressGestureDetector()
4999 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
5000 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5004 internal void SetBackgroundColor(Vector4 color)
5006 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
5007 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5010 internal Vector4 GetBackgroundColor()
5012 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
5013 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5017 internal void SetBackgroundImage(Image image)
5019 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
5020 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5023 internal ControlKeySignal KeyEventSignal()
5025 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
5026 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5030 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
5032 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
5033 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5037 internal KeyInputFocusSignal KeyInputFocusLostSignal()
5039 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
5040 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5044 internal IntPtr GetPtrfromView()
5046 return (IntPtr)swigCPtr;
5049 internal void SetLayout(LayoutItem layout)
5051 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(layout));
5052 layout.LayoutChildren.Clear();
5053 foreach (View view in Children)
5055 layout.LayoutChildren.Add(view.Layout);
5059 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5061 return (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5065 /// you can override it to clean-up your own resources.
5067 /// <param name="type">DisposeTypes</param>
5068 /// <since_tizen> 3 </since_tizen>
5069 protected override void Dispose(DisposeTypes type)
5076 if (type == DisposeTypes.Explicit)
5079 //Release your own managed resources here.
5080 //You should release all of your own disposable objects here.
5083 //Release your own unmanaged resources here.
5084 //You should not access any managed member here except static instance.
5085 //because the execution order of Finalizes is non-deterministic.
5088 DisConnectFromSignals();
5091 if (swigCPtr.Handle != global::System.IntPtr.Zero)
5095 swigCMemOwn = false;
5096 NDalicPINVOKE.delete_View(swigCPtr);
5098 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5101 foreach (View view in Children)
5103 view.InternalParent = null;
5110 private void OnSize2DChanged(int width, int height)
5112 Size2D = new Size2D(width, height);
5115 private void OnPosition2DChanged(int x, int y)
5117 Position2D = new Position2D(x, y);
5120 private void DisConnectFromSignals()
5122 // Save current CPtr.
5123 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
5125 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
5126 swigCPtr = GetBaseHandleCPtrHandleRef;
5128 if (_onRelayoutEventCallback != null)
5130 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5133 if (_offWindowEventCallback != null)
5135 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5138 if (_onWindowEventCallback != null)
5140 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5143 if (_wheelEventCallback != null)
5145 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5148 if (_hoverEventCallback != null)
5150 this.HoveredSignal().Disconnect(_hoverEventCallback);
5153 if (_touchDataCallback != null)
5155 this.TouchSignal().Disconnect(_touchDataCallback);
5158 if (_ResourcesLoadedCallback != null)
5160 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
5163 if (_offWindowEventCallback != null)
5165 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5168 if (_onWindowEventCallback != null)
5170 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5173 if (_wheelEventCallback != null)
5175 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5178 if (_hoverEventCallback != null)
5180 this.HoveredSignal().Disconnect(_hoverEventCallback);
5183 if (_touchDataCallback != null)
5185 this.TouchSignal().Disconnect(_touchDataCallback);
5188 if (_onRelayoutEventCallback != null)
5190 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5193 if (_keyCallback != null)
5195 this.KeyEventSignal().Disconnect(_keyCallback);
5198 if (_keyInputFocusLostCallback != null)
5200 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
5203 if (_keyInputFocusGainedCallback != null)
5205 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
5208 if (_backgroundResourceLoadedCallback != null)
5210 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5213 if (_onWindowSendEventCallback != null)
5215 this.OnWindowSignal().Disconnect(_onWindowSendEventCallback);
5218 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
5219 // Restore current CPtr.
5220 swigCPtr = currentCPtr;
5223 private void OnKeyInputFocusGained(IntPtr view)
5225 if (_keyInputFocusGainedEventHandler != null)
5227 _keyInputFocusGainedEventHandler(this, null);
5231 private void OnKeyInputFocusLost(IntPtr view)
5233 if (_keyInputFocusLostEventHandler != null)
5235 _keyInputFocusLostEventHandler(this, null);
5239 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
5241 if (keyEvent == global::System.IntPtr.Zero)
5243 NUILog.Error("keyEvent should not be null!");
5247 KeyEventArgs e = new KeyEventArgs();
5249 bool result = false;
5251 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
5253 if (_keyEventHandler != null)
5255 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
5257 // Oring the result of each callback.
5258 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
5260 result |= del(this, e);
5267 // Callback for View OnRelayout signal
5268 private void OnRelayout(IntPtr data)
5270 if (_onRelayoutEventHandler != null)
5272 _onRelayoutEventHandler(this, null);
5276 // Callback for View TouchSignal
5277 private bool OnTouch(IntPtr view, IntPtr touchData)
5279 if (touchData == global::System.IntPtr.Zero)
5281 NUILog.Error("touchData should not be null!");
5285 TouchEventArgs e = new TouchEventArgs();
5287 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
5289 if (_touchDataEventHandler != null)
5291 return _touchDataEventHandler(this, e);
5296 // Callback for View Hover signal
5297 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
5299 if (hoverEvent == global::System.IntPtr.Zero)
5301 NUILog.Error("hoverEvent should not be null!");
5305 HoverEventArgs e = new HoverEventArgs();
5307 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
5309 if (_hoverEventHandler != null)
5311 return _hoverEventHandler(this, e);
5316 // Callback for View Wheel signal
5317 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
5319 if (wheelEvent == global::System.IntPtr.Zero)
5321 NUILog.Error("wheelEvent should not be null!");
5325 WheelEventArgs e = new WheelEventArgs();
5327 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
5329 if (_wheelEventHandler != null)
5331 return _wheelEventHandler(this, e);
5336 // Callback for View OnWindow signal
5337 private void OnWindow(IntPtr data)
5339 if (_onWindowEventHandler != null)
5341 _onWindowEventHandler(this, null);
5345 // Callback for View OffWindow signal
5346 private void OffWindow(IntPtr data)
5348 if (_offWindowEventHandler != null)
5350 _offWindowEventHandler(this, null);
5354 // Callback for View visibility change signal
5355 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
5357 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
5360 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5362 e.Visibility = visibility;
5365 if (_visibilityChangedEventHandler != null)
5367 _visibilityChangedEventHandler(this, e);
5371 // Callback for View layout direction change signal
5372 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
5374 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
5377 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5381 if (_layoutDirectionChangedEventHandler != null)
5383 _layoutDirectionChangedEventHandler(this, e);
5387 private void OnResourcesLoaded(IntPtr view)
5389 if (_resourcesLoadedEventHandler != null)
5391 _resourcesLoadedEventHandler(this, null);
5395 private View ConvertIdToView(uint id)
5398 if (GetParent() is View)
5400 View parentView = GetParent() as View;
5401 view = parentView.FindChildById(id);
5406 view = Window.Instance.GetRootLayer().FindChildById(id);
5412 private void OnBackgroundResourceLoaded(IntPtr view)
5414 BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5415 e.Status = (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5417 if (_backgroundResourceLoadedEventHandler != null)
5419 _backgroundResourceLoadedEventHandler(this, e);
5424 /// Event argument passed through the ChildAdded event.
5426 /// <since_tizen> 5 </since_tizen>
5427 public class ChildAddedEventArgs : EventArgs
5430 /// Added child view at moment.
5432 /// <since_tizen> 5 </since_tizen>
5433 public View Added { get; set; }
5437 /// Event argument passed through the ChildRemoved event.
5439 /// <since_tizen> 5 </since_tizen>
5440 public class ChildRemovedEventArgs : EventArgs
5443 /// Removed child view at moment.
5445 /// <since_tizen> 5 </since_tizen>
5446 public View Removed { get; set; }
5450 /// Event arguments that passed via the KeyEvent signal.
5452 /// <since_tizen> 3 </since_tizen>
5453 public class KeyEventArgs : EventArgs
5458 /// Key - is the key sent to the view.
5460 /// <since_tizen> 3 </since_tizen>
5475 /// Event arguments that passed via the touch signal.
5477 /// <since_tizen> 3 </since_tizen>
5478 public class TouchEventArgs : EventArgs
5480 private Touch _touch;
5483 /// Touch - contains the information of touch points.
5485 /// <since_tizen> 3 </since_tizen>
5500 /// Event arguments that passed via the hover signal.
5502 /// <since_tizen> 3 </since_tizen>
5503 public class HoverEventArgs : EventArgs
5505 private Hover _hover;
5508 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
5510 /// <since_tizen> 3 </since_tizen>
5525 /// Event arguments that passed via the wheel signal.
5527 /// <since_tizen> 3 </since_tizen>
5528 public class WheelEventArgs : EventArgs
5530 private Wheel _wheel;
5533 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
5535 /// <since_tizen> 3 </since_tizen>
5550 /// Event arguments of visibility changed.
5552 /// <since_tizen> 3 </since_tizen>
5553 public class VisibilityChangedEventArgs : EventArgs
5556 private bool _visibility;
5557 private VisibilityChangeType _type;
5560 /// The view, or child of view, whose visibility has changed.
5562 /// <since_tizen> 3 </since_tizen>
5576 /// Whether the view is now visible or not.
5578 /// <since_tizen> 3 </since_tizen>
5579 public bool Visibility
5587 _visibility = value;
5592 /// Whether the view's visible property has changed or a parent's.
5594 /// <since_tizen> 3 </since_tizen>
5595 public VisibilityChangeType Type
5609 /// Event arguments of layout direction changed.
5611 /// <since_tizen> 4 </since_tizen>
5612 public class LayoutDirectionChangedEventArgs : EventArgs
5615 private ViewLayoutDirectionType _type;
5618 /// The view, or child of view, whose layout direction has changed.
5620 /// <since_tizen> 4 </since_tizen>
5634 /// Whether the view's layout direction property has changed or a parent's.
5636 /// <since_tizen> 4 </since_tizen>
5637 public ViewLayoutDirectionType Type
5650 internal class BackgroundResourceLoadedEventArgs : EventArgs
5652 private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5653 public ResourceLoadingStatusType Status
5666 internal class Property
5668 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
5669 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
5670 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
5671 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
5672 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
5673 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
5674 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
5675 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
5676 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
5677 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
5678 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
5679 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
5680 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
5681 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
5682 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
5683 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
5684 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
5685 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
5686 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
5687 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
5688 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
5689 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
5690 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
5691 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
5692 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
5693 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
5694 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
5695 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
5696 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
5697 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
5698 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
5699 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
5700 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
5701 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
5702 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
5703 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
5704 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
5705 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
5706 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
5707 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
5708 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
5709 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
5710 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
5711 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
5712 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
5713 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
5714 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
5715 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
5716 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
5717 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
5718 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
5719 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
5720 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
5721 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
5722 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
5723 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
5724 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
5725 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
5726 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
5727 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
5728 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
5729 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
5730 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();