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;
1288 /// Creates a new instance of a view.
1290 /// <since_tizen> 3 </since_tizen>
1291 public View() : this(NDalicPINVOKE.View_New(), true)
1293 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1295 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1297 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1300 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
1302 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1305 PositionUsesPivotPoint = false;
1307 _mergedStyle = new MergedStyle(GetType(), this);
1310 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1312 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1315 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1316 private delegate void OffWindowEventCallbackType(IntPtr control);
1317 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1318 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1319 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1320 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1321 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1322 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1323 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1324 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1325 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1326 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
1327 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1328 private delegate void ResourcesLoadedCallbackType(IntPtr control);
1329 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1330 private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
1331 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1332 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1333 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1334 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1335 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1336 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1337 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1338 private delegate void OnWindowEventCallbackType(IntPtr control);
1339 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1340 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
1343 /// Event when a child is removed.
1345 /// <since_tizen> 5 </since_tizen>
1346 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1348 /// Event when a child is added.
1350 /// <since_tizen> 5 </since_tizen>
1351 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1354 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1355 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1357 /// <since_tizen> 3 </since_tizen>
1358 public event EventHandler FocusGained
1362 if (_keyInputFocusGainedEventHandler == null)
1364 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1365 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1368 _keyInputFocusGainedEventHandler += value;
1373 _keyInputFocusGainedEventHandler -= value;
1375 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1377 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1383 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1384 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1386 /// <since_tizen> 3 </since_tizen>
1387 public event EventHandler FocusLost
1391 if (_keyInputFocusLostEventHandler == null)
1393 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1394 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1397 _keyInputFocusLostEventHandler += value;
1402 _keyInputFocusLostEventHandler -= value;
1404 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1406 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1412 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1413 /// The KeyPressed signal is emitted when the key event is received.<br />
1415 /// <since_tizen> 3 </since_tizen>
1416 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1420 if (_keyEventHandler == null)
1422 _keyCallback = OnKeyEvent;
1423 this.KeyEventSignal().Connect(_keyCallback);
1426 _keyEventHandler += value;
1431 _keyEventHandler -= value;
1433 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1435 this.KeyEventSignal().Disconnect(_keyCallback);
1441 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1442 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1444 /// <since_tizen> 3 </since_tizen>
1445 public event EventHandler Relayout
1449 if (_onRelayoutEventHandler == null)
1451 _onRelayoutEventCallback = OnRelayout;
1452 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1455 _onRelayoutEventHandler += value;
1460 _onRelayoutEventHandler -= value;
1462 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1464 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1471 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1472 /// The touched signal is emitted when the touch input is received.<br />
1474 /// <since_tizen> 3 </since_tizen>
1475 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1479 if (_touchDataEventHandler == null)
1481 _touchDataCallback = OnTouch;
1482 this.TouchSignal().Connect(_touchDataCallback);
1485 _touchDataEventHandler += value;
1490 _touchDataEventHandler -= value;
1492 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1494 this.TouchSignal().Disconnect(_touchDataCallback);
1501 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1502 /// The hovered signal is emitted when the hover input is received.<br />
1504 /// <since_tizen> 3 </since_tizen>
1505 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1509 if (_hoverEventHandler == null)
1511 _hoverEventCallback = OnHoverEvent;
1512 this.HoveredSignal().Connect(_hoverEventCallback);
1515 _hoverEventHandler += value;
1520 _hoverEventHandler -= value;
1522 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1524 this.HoveredSignal().Disconnect(_hoverEventCallback);
1531 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1532 /// The WheelMoved signal is emitted when the wheel event is received.<br />
1534 /// <since_tizen> 3 </since_tizen>
1535 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1539 if (_wheelEventHandler == null)
1541 _wheelEventCallback = OnWheelEvent;
1542 this.WheelEventSignal().Connect(_wheelEventCallback);
1545 _wheelEventHandler += value;
1550 _wheelEventHandler -= value;
1552 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
1554 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1561 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
1562 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
1564 /// <since_tizen> 3 </since_tizen>
1565 public event EventHandler AddedToWindow
1569 if (_onWindowEventHandler == null)
1571 _onWindowEventCallback = OnWindow;
1572 this.OnWindowSignal().Connect(_onWindowEventCallback);
1575 _onWindowEventHandler += value;
1580 _onWindowEventHandler -= value;
1582 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
1584 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1590 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
1591 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
1593 /// <since_tizen> 3 </since_tizen>
1594 public event EventHandler RemovedFromWindow
1598 if (_offWindowEventHandler == null)
1600 _offWindowEventCallback = OffWindow;
1601 this.OffWindowSignal().Connect(_offWindowEventCallback);
1604 _offWindowEventHandler += value;
1609 _offWindowEventHandler -= value;
1611 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
1613 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1619 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
1620 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
1622 /// <since_tizen> 3 </since_tizen>
1623 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
1627 if (_visibilityChangedEventHandler == null)
1629 _visibilityChangedEventCallback = OnVisibilityChanged;
1630 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
1633 _visibilityChangedEventHandler += value;
1638 _visibilityChangedEventHandler -= value;
1640 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
1642 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
1648 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
1649 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
1651 /// <since_tizen> 4 </since_tizen>
1652 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
1656 if (_layoutDirectionChangedEventHandler == null)
1658 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
1659 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
1662 _layoutDirectionChangedEventHandler += value;
1667 _layoutDirectionChangedEventHandler -= value;
1669 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
1671 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
1677 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1678 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1680 /// <since_tizen> 3 </since_tizen>
1681 public event EventHandler ResourcesLoaded
1685 if (_resourcesLoadedEventHandler == null)
1687 _ResourcesLoadedCallback = OnResourcesLoaded;
1688 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1691 _resourcesLoadedEventHandler += value;
1696 _resourcesLoadedEventHandler -= value;
1698 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1700 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1705 internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
1709 if (_backgroundResourceLoadedEventHandler == null)
1711 _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
1712 this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
1715 _backgroundResourceLoadedEventHandler += value;
1719 _backgroundResourceLoadedEventHandler -= value;
1721 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1723 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1729 /// Enumeration for describing the states of the view.
1731 /// <since_tizen> 3 </since_tizen>
1735 /// The normal state.
1739 /// The focused state.
1743 /// The disabled state.
1749 /// Describes the direction to move the focus towards.
1751 /// <since_tizen> 3 </since_tizen>
1752 public enum FocusDirection
1755 /// Move keyboard focus towards the left direction.
1757 /// <since_tizen> 3 </since_tizen>
1760 /// Move keyboard focus towards the right direction.
1762 /// <since_tizen> 3 </since_tizen>
1765 /// Move keyboard focus towards the up direction.
1767 /// <since_tizen> 3 </since_tizen>
1770 /// Move keyboard focus towards the down direction.
1772 /// <since_tizen> 3 </since_tizen>
1775 /// Move keyboard focus towards the previous page direction.
1777 /// <since_tizen> 3 </since_tizen>
1780 /// Move keyboard focus towards the next page direction.
1782 /// <since_tizen> 3 </since_tizen>
1786 internal enum PropertyRange
1788 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1789 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1790 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1793 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1794 [EditorBrowsable(EditorBrowsableState.Never)]
1795 public bool IsResourcesCreated
1799 return Application.Current.IsResourcesCreated;
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 ResourceDictionary XamlResources
1809 return Application.Current.XamlResources;
1813 Application.Current.XamlResources = value;
1818 /// The StyleName, type string.
1820 /// <since_tizen> 3 </since_tizen>
1821 public string StyleName
1825 return (string)GetValue(StyleNameProperty);
1829 SetValue(StyleNameProperty, value);
1830 NotifyPropertyChanged();
1835 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1837 /// <since_tizen> 3 </since_tizen>
1838 public Color BackgroundColor
1842 return (Color)GetValue(BackgroundColorProperty);
1846 SetValue(BackgroundColorProperty, value);
1847 NotifyPropertyChanged();
1852 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1854 /// <since_tizen> 3 </since_tizen>
1855 public string BackgroundImage
1859 return (string)GetValue(BackgroundImageProperty);
1863 SetValue(BackgroundImageProperty, value);
1864 NotifyPropertyChanged();
1869 /// The background of view.
1871 /// <since_tizen> 3 </since_tizen>
1872 public Tizen.NUI.PropertyMap Background
1876 return (PropertyMap)GetValue(BackgroundProperty);
1880 SetValue(BackgroundProperty, value);
1881 NotifyPropertyChanged();
1887 /// The current state of the view.
1889 /// <since_tizen> 3 </since_tizen>
1894 return (States)GetValue(StateProperty);
1898 SetValue(StateProperty, value);
1899 NotifyPropertyChanged();
1904 /// The current sub state of the view.
1906 /// <since_tizen> 3 </since_tizen>
1907 public States SubState
1911 return (States)GetValue(SubStateProperty);
1915 SetValue(SubStateProperty, value);
1916 NotifyPropertyChanged();
1921 /// Displays a tooltip
1923 /// <since_tizen> 3 </since_tizen>
1924 public Tizen.NUI.PropertyMap Tooltip
1928 return (PropertyMap)GetValue(TooltipProperty);
1932 SetValue(TooltipProperty, value);
1933 NotifyPropertyChanged();
1938 /// Displays a tooltip as a text.
1940 /// <since_tizen> 3 </since_tizen>
1941 public string TooltipText
1945 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1946 NotifyPropertyChanged();
1951 /// The Child property of FlexContainer.<br />
1952 /// The proportion of the free space in the container, the flex item will receive.<br />
1953 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1955 /// <since_tizen> 3 </since_tizen>
1960 return (float)GetValue(FlexProperty);
1964 SetValue(FlexProperty, value);
1965 NotifyPropertyChanged();
1970 /// The Child property of FlexContainer.<br />
1971 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
1973 /// <since_tizen> 3 </since_tizen>
1974 public int AlignSelf
1978 return (int)GetValue(AlignSelfProperty);
1982 SetValue(AlignSelfProperty, value);
1983 NotifyPropertyChanged();
1988 /// The Child property of FlexContainer.<br />
1989 /// The space around the flex item.<br />
1991 /// <since_tizen> 3 </since_tizen>
1992 public Vector4 FlexMargin
1996 return (Vector4)GetValue(FlexMarginProperty);
2000 SetValue(FlexMarginProperty, value);
2001 NotifyPropertyChanged();
2006 /// The top-left cell this child occupies, if not set, the first available cell is used.
2008 /// <since_tizen> 3 </since_tizen>
2009 public Vector2 CellIndex
2013 return (Vector2)GetValue(CellIndexProperty);
2017 SetValue(CellIndexProperty, value);
2018 NotifyPropertyChanged();
2023 /// The number of rows this child occupies, if not set, the default value is 1.
2025 /// <since_tizen> 3 </since_tizen>
2026 public float RowSpan
2030 return (float)GetValue(RowSpanProperty);
2034 SetValue(RowSpanProperty, value);
2035 NotifyPropertyChanged();
2040 /// The number of columns this child occupies, if not set, the default value is 1.
2042 /// <since_tizen> 3 </since_tizen>
2043 public float ColumnSpan
2047 return (float)GetValue(ColumnSpanProperty);
2051 SetValue(ColumnSpanProperty, value);
2052 NotifyPropertyChanged();
2057 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
2059 /// <since_tizen> 3 </since_tizen>
2060 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
2064 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
2068 SetValue(CellHorizontalAlignmentProperty, value);
2069 NotifyPropertyChanged();
2074 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
2076 /// <since_tizen> 3 </since_tizen>
2077 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
2081 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
2085 SetValue(CellVerticalAlignmentProperty, value);
2086 NotifyPropertyChanged();
2091 /// The left focusable view.<br />
2092 /// This will return null if not set.<br />
2093 /// This will also return null if the specified left focusable view is not on a window.<br />
2095 /// <since_tizen> 3 </since_tizen>
2096 public View LeftFocusableView
2098 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2101 return (View)GetValue(LeftFocusableViewProperty);
2105 SetValue(LeftFocusableViewProperty, value);
2106 NotifyPropertyChanged();
2111 /// The right focusable view.<br />
2112 /// This will return null if not set.<br />
2113 /// This will also return null if the specified right focusable view is not on a window.<br />
2115 /// <since_tizen> 3 </since_tizen>
2116 public View RightFocusableView
2118 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2121 return (View)GetValue(RightFocusableViewProperty);
2125 SetValue(RightFocusableViewProperty, value);
2126 NotifyPropertyChanged();
2131 /// The up focusable view.<br />
2132 /// This will return null if not set.<br />
2133 /// This will also return null if the specified up focusable view is not on a window.<br />
2135 /// <since_tizen> 3 </since_tizen>
2136 public View UpFocusableView
2138 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2141 return (View)GetValue(UpFocusableViewProperty);
2145 SetValue(UpFocusableViewProperty, value);
2146 NotifyPropertyChanged();
2151 /// The down focusable view.<br />
2152 /// This will return null if not set.<br />
2153 /// This will also return null if the specified down focusable view is not on a window.<br />
2155 /// <since_tizen> 3 </since_tizen>
2156 public View DownFocusableView
2158 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2161 return (View)GetValue(DownFocusableViewProperty);
2165 SetValue(DownFocusableViewProperty, value);
2166 NotifyPropertyChanged();
2171 /// Whether the view should be focusable by keyboard navigation.
2173 /// <since_tizen> 3 </since_tizen>
2174 public bool Focusable
2178 SetValue(FocusableProperty, value);
2179 NotifyPropertyChanged();
2183 return (bool)GetValue(FocusableProperty);
2188 /// Retrieves the position of the view.<br />
2189 /// The coordinates are relative to the view's parent.<br />
2191 /// <since_tizen> 3 </since_tizen>
2192 public Position CurrentPosition
2196 return GetCurrentPosition();
2201 /// Sets the size of a view for the width and the height.<br />
2202 /// Geometry can be scaled to fit within this area.<br />
2203 /// This does not interfere with the view's scale factor.<br />
2204 /// The views default depth is the minimum of width and height.<br />
2207 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
2208 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
2209 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
2210 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2211 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2212 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2213 /// 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 />
2215 /// <since_tizen> 3 </since_tizen>
2216 public Size2D Size2D
2220 Size2D temp = (Size2D)GetValue(Size2DProperty);
2221 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
2225 SetValue(Size2DProperty, value);
2226 // Set Specification so when layouts measure this View it matches the value set here.
2227 // All Views are currently Layouts.
2228 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
2229 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
2230 NotifyPropertyChanged();
2235 /// Retrieves the size of the view.<br />
2236 /// The coordinates are relative to the view's parent.<br />
2238 /// <since_tizen> 3 </since_tizen>
2239 public Size2D CurrentSize
2243 return GetCurrentSize();
2248 /// Retrieves and sets the view's opacity.<br />
2250 /// <since_tizen> 3 </since_tizen>
2251 public float Opacity
2255 return (float)GetValue(OpacityProperty);
2259 SetValue(OpacityProperty, value);
2260 NotifyPropertyChanged();
2265 /// Sets the position of the view for X and Y.<br />
2266 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2267 /// If the position inheritance is disabled, sets the world position.<br />
2270 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
2271 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
2272 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
2273 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2274 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2275 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2277 /// <since_tizen> 3 </since_tizen>
2278 public Position2D Position2D
2282 Position2D temp = (Position2D)GetValue(Position2DProperty);
2283 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
2287 SetValue(Position2DProperty, value);
2288 NotifyPropertyChanged();
2293 /// Retrieves the screen postion of the view.<br />
2295 /// <since_tizen> 3 </since_tizen>
2296 public Vector2 ScreenPosition
2300 Vector2 temp = new Vector2(0.0f, 0.0f);
2301 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2307 /// Determines whether the pivot point should be used to determine the position of the view.
2308 /// This is true by default.
2310 /// <remarks>If false, then the top-left of the view is used for the position.
2311 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
2313 /// <since_tizen> 3 </since_tizen>
2314 public bool PositionUsesPivotPoint
2318 return (bool)GetValue(PositionUsesPivotPointProperty);
2322 SetValue(PositionUsesPivotPointProperty, value);
2323 NotifyPropertyChanged();
2328 /// Please do not use! this will be deprecated.
2330 /// Please do not use! this will be deprecated!
2331 /// Instead please use PositionUsesPivotPoint.
2332 /// <since_tizen> 3 </since_tizen>
2333 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2335 "View view = new View(); " +
2336 "view.PivotPoint = PivotPoint.Center; " +
2337 "view.PositionUsesPivotPoint = true;")]
2338 [EditorBrowsable(EditorBrowsableState.Never)]
2339 public bool PositionUsesAnchorPoint
2344 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2349 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2350 NotifyPropertyChanged();
2355 /// Queries whether the view is connected to the stage.<br />
2356 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2358 /// <since_tizen> 3 </since_tizen>
2359 public bool IsOnWindow
2368 /// Gets the depth in the hierarchy for the view.
2370 /// <since_tizen> 3 </since_tizen>
2371 public int HierarchyDepth
2375 return GetHierarchyDepth();
2380 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2383 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
2384 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2385 /// The values set by this property will likely change.
2387 /// <since_tizen> 3 </since_tizen>
2388 public int SiblingOrder
2392 return (int)GetValue(SiblingOrderProperty);
2396 SetValue(SiblingOrderProperty, value);
2397 NotifyPropertyChanged();
2402 /// Returns the natural size of the view.
2405 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2407 /// <since_tizen> 5 </since_tizen>
2408 public Vector3 NaturalSize
2412 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2413 if (NDalicPINVOKE.SWIGPendingException.Pending)
2414 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2420 /// Returns the natural size (Size2D) of the view.
2423 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2425 /// <since_tizen> 4 </since_tizen>
2426 public Size2D NaturalSize2D
2430 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2431 if (NDalicPINVOKE.SWIGPendingException.Pending)
2432 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2434 return new Size2D((int)temp.Width, (int)temp.Height);
2439 /// Gets or sets the origin of a view within its parent's area.<br />
2440 /// 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 />
2441 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
2442 /// A view's position is the distance between this origin and the view's anchor-point.<br />
2444 /// <pre>The view has been initialized.</pre>
2445 /// <since_tizen> 3 </since_tizen>
2446 public Position ParentOrigin
2450 return (Position)GetValue(ParentOriginProperty);
2454 SetValue(ParentOriginProperty, value);
2455 NotifyPropertyChanged();
2460 /// Gets or sets the anchor-point of a view.<br />
2461 /// 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 />
2462 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
2463 /// A view position is the distance between its parent-origin and this anchor-point.<br />
2464 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
2465 /// <pre>The view has been initialized.</pre>
2467 /// <since_tizen> 3 </since_tizen>
2468 public Position PivotPoint
2472 return (Position)GetValue(PivotPointProperty);
2476 SetValue(PivotPointProperty, value);
2477 NotifyPropertyChanged();
2482 /// Gets or sets the size width of the view.
2484 /// <since_tizen> 3 </since_tizen>
2485 public float SizeWidth
2489 return (float)GetValue(SizeWidthProperty);
2493 SetValue(SizeWidthProperty, value);
2494 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
2495 NotifyPropertyChanged();
2500 /// Gets or sets the size height of the view.
2502 /// <since_tizen> 3 </since_tizen>
2503 public float SizeHeight
2507 return (float)GetValue(SizeHeightProperty);
2511 SetValue(SizeHeightProperty, value);
2512 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
2513 NotifyPropertyChanged();
2518 /// Gets or sets the position of the view.<br />
2519 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
2520 /// If the position inheritance is disabled, sets the world position.<br />
2522 /// <since_tizen> 3 </since_tizen>
2523 public Position Position
2527 return (Position)GetValue(PositionProperty);
2531 SetValue(PositionProperty, value);
2532 NotifyPropertyChanged();
2537 /// Gets or sets the position X of the view.
2539 /// <since_tizen> 3 </since_tizen>
2540 public float PositionX
2544 return (float)GetValue(PositionXProperty);
2548 SetValue(PositionXProperty, value);
2549 NotifyPropertyChanged();
2554 /// Gets or sets the position Y of the view.
2556 /// <since_tizen> 3 </since_tizen>
2557 public float PositionY
2561 return (float)GetValue(PositionYProperty);
2565 SetValue(PositionYProperty, value);
2566 NotifyPropertyChanged();
2571 /// Gets or sets the position Z of the view.
2573 /// <since_tizen> 3 </since_tizen>
2574 public float PositionZ
2578 return (float)GetValue(PositionZProperty);
2582 SetValue(PositionZProperty, value);
2583 NotifyPropertyChanged();
2588 /// Gets or sets the world position of the view.
2590 /// <since_tizen> 3 </since_tizen>
2591 public Vector3 WorldPosition
2595 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2596 GetProperty(View.Property.WORLD_POSITION).Get(temp);
2602 /// Gets or sets the orientation of the view.<br />
2603 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
2605 /// <remarks>This is an asynchronous method.</remarks>
2606 /// <since_tizen> 3 </since_tizen>
2607 public Rotation Orientation
2611 return (Rotation)GetValue(OrientationProperty);
2615 SetValue(OrientationProperty, value);
2616 NotifyPropertyChanged();
2621 /// Gets or sets the world orientation of the view.<br />
2623 /// <since_tizen> 3 </since_tizen>
2624 public Rotation WorldOrientation
2628 Rotation temp = new Rotation();
2629 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
2635 /// Gets or sets the scale factor applied to the view.<br />
2637 /// <since_tizen> 3 </since_tizen>
2638 public Vector3 Scale
2642 return (Vector3)GetValue(ScaleProperty);
2646 SetValue(ScaleProperty, value);
2647 NotifyPropertyChanged();
2652 /// Gets or sets the scale X factor applied to the view.
2654 /// <since_tizen> 3 </since_tizen>
2659 return (float)GetValue(ScaleXProperty);
2663 SetValue(ScaleXProperty, value);
2664 NotifyPropertyChanged();
2669 /// Gets or sets the scale Y factor applied to the view.
2671 /// <since_tizen> 3 </since_tizen>
2676 return (float)GetValue(ScaleYProperty);
2680 SetValue(ScaleYProperty, value);
2681 NotifyPropertyChanged();
2686 /// Gets or sets the scale Z factor applied to the view.
2688 /// <since_tizen> 3 </since_tizen>
2693 return (float)GetValue(ScaleZProperty);
2697 SetValue(ScaleZProperty, value);
2698 NotifyPropertyChanged();
2703 /// Gets the world scale of the view.
2705 /// <since_tizen> 3 </since_tizen>
2706 public Vector3 WorldScale
2710 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2711 GetProperty(View.Property.WORLD_SCALE).Get(temp);
2717 /// Retrieves the visibility flag of the view.
2720 /// If the view is not visible, then the view and its children will not be rendered.
2721 /// 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.
2723 /// <since_tizen> 3 </since_tizen>
2724 public bool Visibility
2729 GetProperty(View.Property.VISIBLE).Get(out temp);
2735 /// Gets the view's world color.
2737 /// <since_tizen> 3 </since_tizen>
2738 public Vector4 WorldColor
2742 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2743 GetProperty(View.Property.WORLD_COLOR).Get(temp);
2749 /// Gets or sets the view's name.
2751 /// <since_tizen> 3 </since_tizen>
2756 return (string)GetValue(NameProperty);
2760 SetValue(NameProperty, value);
2761 NotifyPropertyChanged();
2766 /// Get the number of children held by the view.
2768 /// <since_tizen> 3 </since_tizen>
2769 public new uint ChildCount
2773 return GetChildCount();
2778 /// Gets the view's ID.
2781 /// <since_tizen> 3 </since_tizen>
2791 /// Gets or sets the status of whether the view should emit touch or hover signals.
2793 /// <since_tizen> 3 </since_tizen>
2794 public bool Sensitive
2798 return (bool)GetValue(SensitiveProperty);
2802 SetValue(SensitiveProperty, value);
2803 NotifyPropertyChanged();
2808 /// 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.
2810 /// <since_tizen> 3 </since_tizen>
2811 public bool LeaveRequired
2815 return (bool)GetValue(LeaveRequiredProperty);
2819 SetValue(LeaveRequiredProperty, value);
2820 NotifyPropertyChanged();
2825 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2827 /// <since_tizen> 3 </since_tizen>
2828 public bool InheritOrientation
2832 return (bool)GetValue(InheritOrientationProperty);
2836 SetValue(InheritOrientationProperty, value);
2837 NotifyPropertyChanged();
2842 /// Gets or sets the status of whether a child view inherits it's parent's scale.
2844 /// <since_tizen> 3 </since_tizen>
2845 public bool InheritScale
2849 return (bool)GetValue(InheritScaleProperty);
2853 SetValue(InheritScaleProperty, value);
2854 NotifyPropertyChanged();
2859 /// Gets or sets the status of how the view and its children should be drawn.<br />
2860 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2861 /// 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 />
2862 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2863 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2864 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2866 /// <since_tizen> 3 </since_tizen>
2867 public DrawModeType DrawMode
2871 return (DrawModeType)GetValue(DrawModeProperty);
2875 SetValue(DrawModeProperty, value);
2876 NotifyPropertyChanged();
2881 /// Gets or sets the relative to parent size factor of the view.<br />
2882 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2883 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2885 /// <since_tizen> 3 </since_tizen>
2886 public Vector3 SizeModeFactor
2890 return (Vector3)GetValue(SizeModeFactorProperty);
2894 SetValue(SizeModeFactorProperty, value);
2895 NotifyPropertyChanged();
2900 /// Gets or sets the width resize policy to be used.
2902 /// <since_tizen> 3 </since_tizen>
2903 public ResizePolicyType WidthResizePolicy
2907 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2911 SetValue(WidthResizePolicyProperty, value);
2912 // Match ResizePolicy to new Layouting.
2913 // Parent relative policies can not be mapped at this point as parent size unknown.
2916 case ResizePolicyType.UseNaturalSize:
2918 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
2921 case ResizePolicyType.FillToParent:
2923 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.MatchParent));
2926 case ResizePolicyType.FitToChildren:
2928 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.WrapContent));
2934 NotifyPropertyChanged();
2939 /// Gets or sets the height resize policy to be used.
2941 /// <since_tizen> 3 </since_tizen>
2942 public ResizePolicyType HeightResizePolicy
2946 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
2950 SetValue(HeightResizePolicyProperty, value);
2951 // Match ResizePolicy to new Layouting.
2952 // Parent relative policies can not be mapped at this point as parent size unknown.
2955 case ResizePolicyType.UseNaturalSize:
2957 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
2960 case ResizePolicyType.FillToParent:
2962 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.MatchParent));
2965 case ResizePolicyType.FitToChildren:
2967 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.WrapContent));
2973 NotifyPropertyChanged();
2978 /// Gets or sets the policy to use when setting size with size negotiation.<br />
2979 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
2981 /// <since_tizen> 3 </since_tizen>
2982 public SizeScalePolicyType SizeScalePolicy
2986 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
2990 SetValue(SizeScalePolicyProperty, value);
2991 NotifyPropertyChanged();
2996 /// Gets or sets the status of whether the width size is dependent on the height size.
2998 /// <since_tizen> 3 </since_tizen>
2999 public bool WidthForHeight
3003 return (bool)GetValue(WidthForHeightProperty);
3007 SetValue(WidthForHeightProperty, value);
3008 NotifyPropertyChanged();
3013 /// Gets or sets the status of whether the height size is dependent on the width size.
3015 /// <since_tizen> 3 </since_tizen>
3016 public bool HeightForWidth
3020 return (bool)GetValue(HeightForWidthProperty);
3024 SetValue(HeightForWidthProperty, value);
3025 NotifyPropertyChanged();
3030 /// Gets or sets the padding for use in layout.
3032 /// <since_tizen> 5 </since_tizen>
3033 public Extents Padding
3037 return (Extents)GetValue(PaddingProperty);
3041 SetValue(PaddingProperty, value);
3042 NotifyPropertyChanged();
3047 /// Gets or sets the minimum size the view can be assigned in size negotiation.
3049 /// <since_tizen> 3 </since_tizen>
3050 public Size2D MinimumSize
3054 return (Size2D)GetValue(MinimumSizeProperty);
3060 // Note: it only works if minimum size is >= than natural size.
3061 // To force the size it should be done through the width&height spec or Size2D.
3062 Layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
3063 Layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
3065 SetValue(MinimumSizeProperty, value);
3066 NotifyPropertyChanged();
3071 /// Gets or sets the maximum size the view can be assigned in size negotiation.
3073 /// <since_tizen> 3 </since_tizen>
3074 public Size2D MaximumSize
3078 return (Size2D)GetValue(MaximumSizeProperty);
3082 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
3083 // MATCH_PARENT spec + parent container size can be used to limit
3084 SetValue(MaximumSizeProperty, value);
3085 NotifyPropertyChanged();
3090 /// Gets or sets whether a child view inherits it's parent's position.<br />
3091 /// Default is to inherit.<br />
3092 /// 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 />
3094 /// <since_tizen> 3 </since_tizen>
3095 public bool InheritPosition
3099 return (bool)GetValue(InheritPositionProperty);
3103 SetValue(InheritPositionProperty, value);
3104 NotifyPropertyChanged();
3109 /// Gets or sets the clipping behavior (mode) of it's children.
3111 /// <since_tizen> 3 </since_tizen>
3112 public ClippingModeType ClippingMode
3116 return (ClippingModeType)GetValue(ClippingModeProperty);
3120 SetValue(ClippingModeProperty, value);
3121 NotifyPropertyChanged();
3126 /// Gets the number of renderers held by the view.
3128 /// <since_tizen> 3 </since_tizen>
3129 public uint RendererCount
3133 return GetRendererCount();
3138 /// [Obsolete("Please do not use! this will be deprecated")]
3140 /// <since_tizen> 3 </since_tizen>
3141 /// Please do not use! this will be deprecated!
3142 /// Instead please use PivotPoint.
3143 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
3145 "View view = new View(); " +
3146 "view.PivotPoint = PivotPoint.Center; " +
3147 "view.PositionUsesPivotPoint = true;")]
3148 [EditorBrowsable(EditorBrowsableState.Never)]
3149 public Position AnchorPoint
3153 Position temp = new Position(0.0f, 0.0f, 0.0f);
3154 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3159 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3160 NotifyPropertyChanged();
3165 /// Sets the size of a view for the width, the height and the depth.<br />
3166 /// Geometry can be scaled to fit within this area.<br />
3167 /// This does not interfere with the view's scale factor.<br />
3168 /// The views default depth is the minimum of width and height.<br />
3171 /// Please note that multi-cascade setting is not possible for this NUI object. <br />
3172 /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3173 /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
3174 /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
3175 /// 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 />
3177 /// <since_tizen> 5 </since_tizen>
3182 return (Size)GetValue(SizeProperty);
3186 SetValue(SizeProperty, value);
3187 // Set Specification so when layouts measure this View it matches the value set here.
3188 // All Views are currently Layouts.
3189 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
3190 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
3191 NotifyPropertyChanged();
3196 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
3198 /// <since_tizen> 3 </since_tizen>
3199 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
3201 "Container parent = view.GetParent(); " +
3202 "View view = parent as View;")]
3203 [EditorBrowsable(EditorBrowsableState.Never)]
3204 public new View Parent
3209 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
3210 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3211 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3213 if (basehandle is Layer layer)
3215 ret = new View(Layer.getCPtr(layer).Handle, false);
3216 NUILog.Error("This Parent property is deprecated, shoud do not be used");
3220 ret = basehandle as View;
3223 NDalicPINVOKE.delete_BaseHandle(CPtr);
3224 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3226 if (NDalicPINVOKE.SWIGPendingException.Pending)
3227 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3233 /// Gets/Sets whether inherit parent's the layout Direction.
3235 /// <since_tizen> 4 </since_tizen>
3236 public bool InheritLayoutDirection
3240 return (bool)GetValue(InheritLayoutDirectionProperty);
3244 SetValue(InheritLayoutDirectionProperty, value);
3245 NotifyPropertyChanged();
3250 /// Gets/Sets the layout Direction.
3252 /// <since_tizen> 4 </since_tizen>
3253 public ViewLayoutDirectionType LayoutDirection
3257 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
3261 SetValue(LayoutDirectionProperty, value);
3262 NotifyPropertyChanged();
3267 /// Gets or sets the Margin for use in layout.
3270 /// Margin property is supported by Layout algorithms and containers.
3271 /// Please Set Layout if you want to use Margin property.
3273 /// <since_tizen> 4 </since_tizen>
3274 public Extents Margin
3278 return (Extents)GetValue(MarginProperty);
3282 SetValue(MarginProperty, value);
3283 NotifyPropertyChanged();
3288 /// [Obsolete("Please do not use! this will be deprecated")]
3290 /// Please do not use! this will be deprecated!
3291 /// Instead please use Padding.
3292 /// <since_tizen> 4 </since_tizen>
3293 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
3294 [EditorBrowsable(EditorBrowsableState.Never)]
3295 public Extents PaddingEX
3299 Extents temp = new Extents(0, 0, 0, 0);
3300 GetProperty(View.Property.PADDING).Get(temp);
3305 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3306 NotifyPropertyChanged();
3310 internal Style Style
3314 return (Style)GetValue(StyleProperty);
3318 SetValue(StyleProperty, value);
3323 /// Child property to specify desired width
3325 internal int LayoutWidthSpecificationFixed
3330 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
3332 NUILog.Error("WidthSpecificationFixed get error!");
3338 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
3343 /// Child property to specify desired height
3345 internal int LayoutHeightSpecificationFixed
3350 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
3352 NUILog.Error("HeightSpecificationFixed get error!");
3358 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
3363 /// Child property to specify desired width, use MatchParent/WrapContent)
3365 internal ChildLayoutData LayoutWidthSpecification
3370 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
3372 NUILog.Error("WidthSpecificationFixed get error!");
3374 return (ChildLayoutData)tmp;
3378 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
3383 /// Child property to specify desired height, use MatchParent/WrapContent)
3385 internal ChildLayoutData LayoutHeightSpecification
3390 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
3392 NUILog.Error("HeightSpecificationFixed get error!");
3394 return (ChildLayoutData)tmp;
3398 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
3402 internal float Weight
3406 return (float)GetValue(WeightProperty);
3410 SetValue(WeightProperty, value);
3411 NotifyPropertyChanged();
3415 internal bool BackgroundImageSynchronosLoading
3419 return _backgroundImageSynchronosLoading;
3423 if (value != _backgroundImageSynchronosLoading)
3426 PropertyMap bgMap = this.Background;
3428 bgMap.Find(Visual.Property.Type)?.Get(out visualType);
3429 if (visualType == (int)Visual.Type.Image)
3431 bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
3433 if (bgUrl.Length != 0)
3435 _backgroundImageSynchronosLoading = value;
3436 bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
3437 this.Background = bgMap;
3443 internal float WorldPositionX
3448 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3453 internal float WorldPositionY
3458 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3463 internal float WorldPositionZ
3468 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3473 internal bool FocusState
3477 return IsKeyboardFocusable();
3481 SetKeyboardFocusable(value);
3486 /// Set the layout on this control.
3490 internal LayoutItem Layout
3494 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
3496 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3497 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3498 NDalicPINVOKE.delete_BaseHandle(CPtr);
3499 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3501 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3503 return basehandle as LayoutItem;
3507 Log.Info("NUI", "Set Layout on:" + Name + "\n");
3508 layoutingDisabled = false;
3515 /// Set that layouting is required on this View. It will automatically receive a Layout.
3519 internal bool LayoutingRequired
3523 bool result = Tizen.NUI.NDalicManualPINVOKE.View_IsLayoutingRequired(View.getCPtr(this));
3524 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3529 Tizen.NUI.NDalicManualPINVOKE.View_SetLayoutingRequired(View.getCPtr(this), value);
3533 internal float ParentOriginX
3538 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3543 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3544 NotifyPropertyChanged();
3548 internal float ParentOriginY
3553 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3558 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3559 NotifyPropertyChanged();
3563 internal float ParentOriginZ
3568 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3573 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3574 NotifyPropertyChanged();
3578 internal float PivotPointX
3583 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3588 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3592 internal float PivotPointY
3597 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3602 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3606 internal float PivotPointZ
3611 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3616 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3620 internal Matrix WorldMatrix
3624 Matrix temp = new Matrix();
3625 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3630 private int LeftFocusableViewId
3635 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
3640 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3644 private int RightFocusableViewId
3649 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
3654 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3658 private int UpFocusableViewId
3663 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
3668 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3672 private int DownFocusableViewId
3677 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
3682 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3687 /// Perform an action on a visual registered to this view. <br />
3688 /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
3690 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
3691 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
3692 /// <param name="attributes">Optional attributes for the action.</param>
3693 /// <since_tizen> 5 </since_tizen>
3694 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
3696 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
3697 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3701 /// Creates an animation to animate the background color visual. If there is no
3702 /// background visual, creates one with transparent black as it's mixColor.
3704 /// <since_tizen> 3 </since_tizen>
3705 public Animation AnimateBackgroundColor(object destinationValue,
3708 AlphaFunction.BuiltinFunctions? alphaFunction = null,
3709 object initialValue = null)
3711 Tizen.NUI.PropertyMap background = Background;
3713 if (background.Empty())
3715 // If there is no background yet, ensure there is a transparent
3717 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
3718 background = Background;
3720 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
3724 /// Creates an animation to animate the mixColor of the named visual.
3726 /// <since_tizen> 3 </since_tizen>
3727 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
3729 Animation animation = null;
3731 PropertyMap _animator = new PropertyMap();
3732 if (alphaFunction != null)
3734 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
3737 PropertyMap _timePeriod = new PropertyMap();
3738 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
3739 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
3740 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
3742 PropertyMap _transition = new PropertyMap();
3743 _transition.Add("animator", new PropertyValue(_animator));
3744 _transition.Add("target", new PropertyValue(targetVisual));
3745 _transition.Add("property", new PropertyValue("mixColor"));
3747 if (initialColor != null)
3749 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
3750 _transition.Add("initialValue", initValue);
3753 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
3754 _transition.Add("targetValue", destValue);
3755 TransitionData _transitionData = new TransitionData(_transition);
3757 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
3758 if (NDalicPINVOKE.SWIGPendingException.Pending)
3759 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3764 // From Container Base class
3766 /// Adds a child view to this view.
3768 /// <seealso cref="Container.Add" />
3769 /// <since_tizen> 4 </since_tizen>
3770 public override void Add(View child)
3774 Tizen.Log.Fatal("NUI", "Child is null");
3778 Log.Info("NUI", "Adding Child:" + child.Name + " to " + Name + "\n");
3780 Container oldParent = child.GetParent();
3781 if (oldParent != this)
3783 if (oldParent != null)
3785 oldParent.Remove(child);
3787 child.InternalParent = this;
3789 // Only give children a layout if their parent is an explicit container or a pure View.
3790 // Pure View meaning not derived from a View, e.g a Legacy container.
3791 // layoutSet flag is true when the View became a layout using the set Layout API opposed to automatically due to it's parent.
3792 // First time the set Layout API is used by any View the Window no longer has layoutingDisabled.
3793 if ((true == layoutSet || GetType() == typeof(View)) && null == child.Layout && false == layoutingDisabled)
3795 Log.Info("NUI", "Parent[" + Name + "] Layout set[" + layoutSet.ToString() + "] Pure View[" + (!layoutSet).ToString() + "]\n");
3796 // If child is a View or explicitly set to require layouting then set child as a LayoutGroup.
3797 // If the child is derived from a View then it may be a legacy or existing container hence will do layouting itself.
3798 if (child.GetType() == typeof(View) || true == child.LayoutingRequired)
3800 Log.Info("NUI", "Creating LayoutGroup for " + child.Name + " LayoutingRequired[" + child.LayoutingRequired.ToString() + "]\n");
3801 child.SetLayout(new LayoutGroup());
3805 // Adding child as a leaf, layouting will not propagate past this child.
3806 // Legacy containers will be a LayoutItems too and layout their children how they wish.
3807 Log.Info("NUI", "Creating LayoutItem for " + child.Name + "\n");
3808 child.SetLayout(new LayoutItem());
3814 Layout.LayoutChildren.Add(child.Layout);
3817 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
3818 if (NDalicPINVOKE.SWIGPendingException.Pending)
3819 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3820 Children.Add(child);
3822 if (ChildAdded != null)
3824 ChildAddedEventArgs e = new ChildAddedEventArgs
3828 ChildAdded(this, e);
3834 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
3836 /// <seealso cref="Container.Remove" />
3837 /// <since_tizen> 4 </since_tizen>
3838 public override void Remove(View child)
3840 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
3841 if (NDalicPINVOKE.SWIGPendingException.Pending)
3842 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3844 Children.Remove(child);
3845 child.InternalParent = null;
3851 Layout.LayoutChildren.Remove(child.Layout);
3855 if (ChildRemoved != null)
3857 ChildRemovedEventArgs e = new ChildRemovedEventArgs
3861 ChildRemoved(this, e);
3866 /// Retrieves a child view by index.
3868 /// <seealso cref="Container.GetChildAt" />
3869 /// <since_tizen> 4 </since_tizen>
3870 public override View GetChildAt(uint index)
3872 if (index < Children.Count)
3874 return Children[Convert.ToInt32(index)];
3883 /// Retrieves the number of children held by the view.
3885 /// <seealso cref="Container.GetChildCount" />
3886 /// <since_tizen> 4 </since_tizen>
3887 public override uint GetChildCount()
3889 return Convert.ToUInt32(Children.Count);
3893 /// Gets the views parent.
3895 /// <seealso cref="Container.GetParent()" />
3896 /// <since_tizen> 4 </since_tizen>
3897 public override Container GetParent()
3899 return this.InternalParent as Container;
3903 /// Queries whether the view has a focus.
3905 /// <returns>True if this view has a focus.</returns>
3906 /// <since_tizen> 3 </since_tizen>
3907 public bool HasFocus()
3909 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
3910 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3915 /// Sets the name of the style to be applied to the view.
3917 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
3918 /// <since_tizen> 3 </since_tizen>
3919 public void SetStyleName(string styleName)
3921 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
3922 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3926 /// Retrieves the name of the style to be applied to the view (if any).
3928 /// <returns>A string matching a style, or an empty string.</returns>
3929 /// <since_tizen> 3 </since_tizen>
3930 public string GetStyleName()
3932 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
3933 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3938 /// Clears the background.
3940 /// <since_tizen> 3 </since_tizen>
3941 public void ClearBackground()
3943 NDalicPINVOKE.View_ClearBackground(swigCPtr);
3944 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3951 /// This is an asynchronous method.
3953 /// <since_tizen> 3 </since_tizen>
3963 /// This is an asynchronous method.
3964 /// If the view is hidden, then the view and its children will not be rendered.
3965 /// 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.
3967 /// <since_tizen> 3 </since_tizen>
3974 /// Raises the view above all other views.
3977 /// Sibling order of views within the parent will be updated automatically.
3978 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
3980 /// <since_tizen> 3 </since_tizen>
3981 public void RaiseToTop()
3983 var parentChildren = GetParent()?.Children;
3985 if (parentChildren != null)
3987 parentChildren.Remove(this);
3988 parentChildren.Add(this);
3990 NDalicPINVOKE.RaiseToTop(swigCPtr);
3991 if (NDalicPINVOKE.SWIGPendingException.Pending)
3992 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3998 /// Lowers the view to the bottom of all views.
4001 /// The sibling order of views within the parent will be updated automatically.
4002 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4004 /// <since_tizen> 3 </since_tizen>
4005 public void LowerToBottom()
4007 var parentChildren = GetParent()?.Children;
4009 if (parentChildren != null)
4011 parentChildren.Remove(this);
4012 parentChildren.Insert(0, this);
4014 NDalicPINVOKE.LowerToBottom(swigCPtr);
4015 if (NDalicPINVOKE.SWIGPendingException.Pending)
4016 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4021 /// Queries if all resources required by a view are loaded and ready.
4023 /// <remarks>Most resources are only loaded when the control is placed on the stage.
4025 /// <since_tizen> 3 </since_tizen>
4026 public bool IsResourceReady()
4028 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
4029 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4034 /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
4036 /// <pre>The view has been initialized. </pre>
4037 /// <returns>The parent layer of view </returns>
4038 /// <since_tizen> 5 </since_tizen>
4039 public Layer GetLayer()
4041 //to fix memory leak issue, match the handle count with native side.
4042 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
4043 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4044 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
4045 NDalicPINVOKE.delete_BaseHandle(CPtr);
4046 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4048 if (NDalicPINVOKE.SWIGPendingException.Pending)
4049 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4054 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
4056 /// <pre>The (child) view has been initialized. </pre>
4057 /// <since_tizen> 4 </since_tizen>
4058 public void Unparent()
4060 GetParent()?.Remove(this);
4064 /// Search through this view's hierarchy for a view with the given name.
4065 /// The view itself is also considered in the search.
4067 /// <pre>The view has been initialized.</pre>
4068 /// <param name="viewName">The name of the view to find.</param>
4069 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
4070 /// <since_tizen> 3 </since_tizen>
4071 public View FindChildByName(string viewName)
4073 //to fix memory leak issue, match the handle count with native side.
4074 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
4075 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4076 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4077 NDalicPINVOKE.delete_BaseHandle(CPtr);
4078 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4080 if (NDalicPINVOKE.SWIGPendingException.Pending)
4081 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4086 /// Converts screen coordinates into the view's coordinate system using the default camera.
4088 /// <pre>The view has been initialized.</pre>
4089 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4090 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4091 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4092 /// <param name="screenX">The screen X-coordinate.</param>
4093 /// <param name="screenY">The screen Y-coordinate.</param>
4094 /// <returns>True if the conversion succeeded.</returns>
4095 /// <since_tizen> 3 </since_tizen>
4096 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4098 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4099 if (NDalicPINVOKE.SWIGPendingException.Pending)
4100 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4105 /// Sets the relative to parent size factor of the view.<br />
4106 /// This factor is only used when ResizePolicy is set to either:
4107 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4108 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4110 /// <pre>The view has been initialized.</pre>
4111 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4112 /// <since_tizen> 3 </since_tizen>
4113 public void SetSizeModeFactor(Vector3 factor)
4115 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4116 if (NDalicPINVOKE.SWIGPendingException.Pending)
4117 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4120 /// Calculates the height of the view given a width.<br />
4121 /// The natural size is used for default calculation.<br />
4122 /// Size 0 is treated as aspect ratio 1:1.<br />
4124 /// <param name="width">The width to use.</param>
4125 /// <returns>The height based on the width.</returns>
4126 /// <since_tizen> 3 </since_tizen>
4127 public float GetHeightForWidth(float width)
4129 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
4130 if (NDalicPINVOKE.SWIGPendingException.Pending)
4131 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4136 /// Calculates the width of the view given a height.<br />
4137 /// The natural size is used for default calculation.<br />
4138 /// Size 0 is treated as aspect ratio 1:1.<br />
4140 /// <param name="height">The height to use.</param>
4141 /// <returns>The width based on the height.</returns>
4142 /// <since_tizen> 3 </since_tizen>
4143 public float GetWidthForHeight(float height)
4145 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
4146 if (NDalicPINVOKE.SWIGPendingException.Pending)
4147 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4152 /// Return the amount of size allocated for relayout.
4154 /// <param name="dimension">The dimension to retrieve.</param>
4155 /// <returns>Return the size.</returns>
4156 /// <since_tizen> 3 </since_tizen>
4157 public float GetRelayoutSize(DimensionType dimension)
4159 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4160 if (NDalicPINVOKE.SWIGPendingException.Pending)
4161 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4166 /// Set the padding for the view.
4168 /// <param name="padding">Padding for the view.</param>
4169 /// <since_tizen> 3 </since_tizen>
4170 public void SetPadding(PaddingType padding)
4172 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4173 if (NDalicPINVOKE.SWIGPendingException.Pending)
4174 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4178 /// Return the value of padding for the view.
4180 /// <param name="paddingOut">the value of padding for the view</param>
4181 /// <since_tizen> 3 </since_tizen>
4182 public void GetPadding(PaddingType paddingOut)
4184 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4185 if (NDalicPINVOKE.SWIGPendingException.Pending)
4186 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4189 /// <since_tizen> 3 </since_tizen>
4190 public uint AddRenderer(Renderer renderer)
4192 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4193 if (NDalicPINVOKE.SWIGPendingException.Pending)
4194 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4198 /// <since_tizen> 3 </since_tizen>
4199 public Renderer GetRendererAt(uint index)
4201 //to fix memory leak issue, match the handle count with native side.
4202 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
4203 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4204 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4205 NDalicPINVOKE.delete_BaseHandle(CPtr);
4206 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4208 if (NDalicPINVOKE.SWIGPendingException.Pending)
4209 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4213 /// <since_tizen> 3 </since_tizen>
4214 public void RemoveRenderer(Renderer renderer)
4216 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4217 if (NDalicPINVOKE.SWIGPendingException.Pending)
4218 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4221 /// <since_tizen> 3 </since_tizen>
4222 public void RemoveRenderer(uint index)
4224 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4225 if (NDalicPINVOKE.SWIGPendingException.Pending)
4226 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4229 internal void Raise()
4231 var parentChildren = GetParent()?.Children;
4233 if (parentChildren != null)
4235 int currentIndex = parentChildren.IndexOf(this);
4237 // If the view is not already the last item in the list.
4238 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
4240 View temp = parentChildren[currentIndex + 1];
4241 parentChildren[currentIndex + 1] = this;
4242 parentChildren[currentIndex] = temp;
4244 NDalicPINVOKE.Raise(swigCPtr);
4245 if (NDalicPINVOKE.SWIGPendingException.Pending)
4246 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4251 internal void Lower()
4253 var parentChildren = GetParent()?.Children;
4255 if (parentChildren != null)
4257 int currentIndex = parentChildren.IndexOf(this);
4259 // If the view is not already the first item in the list.
4260 if (currentIndex > 0 && currentIndex < parentChildren.Count)
4262 View temp = parentChildren[currentIndex - 1];
4263 parentChildren[currentIndex - 1] = this;
4264 parentChildren[currentIndex] = temp;
4266 NDalicPINVOKE.Lower(swigCPtr);
4267 if (NDalicPINVOKE.SWIGPendingException.Pending)
4268 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4274 /// Raises the view to above the target view.
4276 /// <remarks>The sibling order of views within the parent will be updated automatically.
4277 /// Views on the level above the target view will still be shown above this view.
4278 /// Raising this view above views with the same sibling order as each other will raise this view above them.
4279 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4281 /// <param name="target">Will be raised above this view.</param>
4282 internal void RaiseAbove(View target)
4284 var parentChildren = GetParent()?.Children;
4286 if (parentChildren != null)
4288 int currentIndex = parentChildren.IndexOf(this);
4289 int targetIndex = parentChildren.IndexOf(target);
4291 if (currentIndex < 0 || targetIndex < 0 ||
4292 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4294 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4297 // If the currentIndex is less than the target index and the target has the same parent.
4298 if (currentIndex < targetIndex)
4300 parentChildren.Remove(this);
4301 parentChildren.Insert(targetIndex, this);
4303 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
4304 if (NDalicPINVOKE.SWIGPendingException.Pending)
4305 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4312 /// Lowers the view to below the target view.
4314 /// <remarks>The sibling order of views within the parent will be updated automatically.
4315 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
4316 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4318 /// <param name="target">Will be lowered below this view.</param>
4319 internal void LowerBelow(View target)
4321 var parentChildren = GetParent()?.Children;
4323 if (parentChildren != null)
4325 int currentIndex = parentChildren.IndexOf(this);
4326 int targetIndex = parentChildren.IndexOf(target);
4327 if (currentIndex < 0 || targetIndex < 0 ||
4328 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4330 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4334 // If the currentIndex is not already the 0th index and the target has the same parent.
4335 if ((currentIndex != 0) && (targetIndex != -1) &&
4336 (currentIndex > targetIndex))
4338 parentChildren.Remove(this);
4339 parentChildren.Insert(targetIndex, this);
4341 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
4342 if (NDalicPINVOKE.SWIGPendingException.Pending)
4343 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4349 internal string GetName()
4351 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
4352 if (NDalicPINVOKE.SWIGPendingException.Pending)
4353 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4357 internal void SetName(string name)
4359 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
4360 if (NDalicPINVOKE.SWIGPendingException.Pending)
4361 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4364 internal uint GetId()
4366 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
4367 if (NDalicPINVOKE.SWIGPendingException.Pending)
4368 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4372 internal bool IsRoot()
4374 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
4375 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4379 internal bool OnWindow()
4381 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
4382 if (NDalicPINVOKE.SWIGPendingException.Pending)
4383 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4387 internal View FindChildById(uint id)
4389 //to fix memory leak issue, match the handle count with native side.
4390 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
4391 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4392 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4393 NDalicPINVOKE.delete_BaseHandle(CPtr);
4394 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4396 if (NDalicPINVOKE.SWIGPendingException.Pending)
4397 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4401 internal void SetParentOrigin(Vector3 origin)
4403 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
4404 if (NDalicPINVOKE.SWIGPendingException.Pending)
4405 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4408 internal Vector3 GetCurrentParentOrigin()
4410 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
4411 if (NDalicPINVOKE.SWIGPendingException.Pending)
4412 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4416 internal void SetAnchorPoint(Vector3 anchorPoint)
4418 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
4419 if (NDalicPINVOKE.SWIGPendingException.Pending)
4420 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4423 internal Vector3 GetCurrentAnchorPoint()
4425 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
4426 if (NDalicPINVOKE.SWIGPendingException.Pending)
4427 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4431 internal void SetSize(float width, float height)
4433 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
4434 if (NDalicPINVOKE.SWIGPendingException.Pending)
4435 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4438 internal void SetSize(float width, float height, float depth)
4440 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
4441 if (NDalicPINVOKE.SWIGPendingException.Pending)
4442 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4445 internal void SetSize(Vector2 size)
4447 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
4448 if (NDalicPINVOKE.SWIGPendingException.Pending)
4449 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4452 internal void SetSize(Vector3 size)
4454 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
4455 if (NDalicPINVOKE.SWIGPendingException.Pending)
4456 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4459 internal Vector3 GetTargetSize()
4461 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
4462 if (NDalicPINVOKE.SWIGPendingException.Pending)
4463 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4467 internal Size2D GetCurrentSize()
4469 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
4470 if (NDalicPINVOKE.SWIGPendingException.Pending)
4471 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4472 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
4476 internal Vector3 GetNaturalSize()
4478 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
4479 if (NDalicPINVOKE.SWIGPendingException.Pending)
4480 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4484 internal void SetPosition(float x, float y)
4486 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
4487 if (NDalicPINVOKE.SWIGPendingException.Pending)
4488 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4491 internal void SetPosition(float x, float y, float z)
4493 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
4494 if (NDalicPINVOKE.SWIGPendingException.Pending)
4495 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4498 internal void SetPosition(Vector3 position)
4500 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
4501 if (NDalicPINVOKE.SWIGPendingException.Pending)
4502 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4505 internal void SetX(float x)
4507 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
4508 if (NDalicPINVOKE.SWIGPendingException.Pending)
4509 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4512 internal void SetY(float y)
4514 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
4515 if (NDalicPINVOKE.SWIGPendingException.Pending)
4516 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4519 internal void SetZ(float z)
4521 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
4522 if (NDalicPINVOKE.SWIGPendingException.Pending)
4523 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4526 internal void TranslateBy(Vector3 distance)
4528 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
4529 if (NDalicPINVOKE.SWIGPendingException.Pending)
4530 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4533 internal Position GetCurrentPosition()
4535 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
4536 if (NDalicPINVOKE.SWIGPendingException.Pending)
4537 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4541 internal Vector3 GetCurrentWorldPosition()
4543 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
4544 if (NDalicPINVOKE.SWIGPendingException.Pending)
4545 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4549 internal void SetInheritPosition(bool inherit)
4551 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
4552 if (NDalicPINVOKE.SWIGPendingException.Pending)
4553 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4556 internal bool IsPositionInherited()
4558 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
4559 if (NDalicPINVOKE.SWIGPendingException.Pending)
4560 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4564 internal void SetOrientation(Degree angle, Vector3 axis)
4566 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4567 if (NDalicPINVOKE.SWIGPendingException.Pending)
4568 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4571 internal void SetOrientation(Radian angle, Vector3 axis)
4573 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4574 if (NDalicPINVOKE.SWIGPendingException.Pending)
4575 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4578 internal void SetOrientation(Rotation orientation)
4580 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
4581 if (NDalicPINVOKE.SWIGPendingException.Pending)
4582 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4585 internal void RotateBy(Degree angle, Vector3 axis)
4587 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4588 if (NDalicPINVOKE.SWIGPendingException.Pending)
4589 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4592 internal void RotateBy(Radian angle, Vector3 axis)
4594 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4595 if (NDalicPINVOKE.SWIGPendingException.Pending)
4596 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4599 internal void RotateBy(Rotation relativeRotation)
4601 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4602 if (NDalicPINVOKE.SWIGPendingException.Pending)
4603 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4606 internal Rotation GetCurrentOrientation()
4608 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
4609 if (NDalicPINVOKE.SWIGPendingException.Pending)
4610 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4614 internal void SetInheritOrientation(bool inherit)
4616 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
4617 if (NDalicPINVOKE.SWIGPendingException.Pending)
4618 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4621 internal bool IsOrientationInherited()
4623 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
4624 if (NDalicPINVOKE.SWIGPendingException.Pending)
4625 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4629 internal Rotation GetCurrentWorldOrientation()
4631 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4632 if (NDalicPINVOKE.SWIGPendingException.Pending)
4633 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4637 internal void SetScale(float scale)
4639 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
4640 if (NDalicPINVOKE.SWIGPendingException.Pending)
4641 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4644 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4646 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4647 if (NDalicPINVOKE.SWIGPendingException.Pending)
4648 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4651 internal void SetScale(Vector3 scale)
4653 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4654 if (NDalicPINVOKE.SWIGPendingException.Pending)
4655 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4658 internal void ScaleBy(Vector3 relativeScale)
4660 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4661 if (NDalicPINVOKE.SWIGPendingException.Pending)
4662 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4665 internal Vector3 GetCurrentScale()
4667 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
4668 if (NDalicPINVOKE.SWIGPendingException.Pending)
4669 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4673 internal Vector3 GetCurrentWorldScale()
4675 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
4676 if (NDalicPINVOKE.SWIGPendingException.Pending)
4677 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4681 internal void SetInheritScale(bool inherit)
4683 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
4684 if (NDalicPINVOKE.SWIGPendingException.Pending)
4685 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4688 internal bool IsScaleInherited()
4690 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
4691 if (NDalicPINVOKE.SWIGPendingException.Pending)
4692 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4696 internal Matrix GetCurrentWorldMatrix()
4698 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4699 if (NDalicPINVOKE.SWIGPendingException.Pending)
4700 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4704 internal void SetVisible(bool visible)
4706 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
4707 if (NDalicPINVOKE.SWIGPendingException.Pending)
4708 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4711 internal bool IsVisible()
4713 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
4714 if (NDalicPINVOKE.SWIGPendingException.Pending)
4715 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4719 internal void SetOpacity(float opacity)
4721 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
4722 if (NDalicPINVOKE.SWIGPendingException.Pending)
4723 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4726 internal float GetCurrentOpacity()
4728 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
4729 if (NDalicPINVOKE.SWIGPendingException.Pending)
4730 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4734 internal void SetColor(Vector4 color)
4736 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4737 if (NDalicPINVOKE.SWIGPendingException.Pending)
4738 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4741 internal Vector4 GetCurrentColor()
4743 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
4744 if (NDalicPINVOKE.SWIGPendingException.Pending)
4745 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4749 internal void SetColorMode(ColorMode colorMode)
4751 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
4752 if (NDalicPINVOKE.SWIGPendingException.Pending)
4753 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4756 internal ColorMode GetColorMode()
4758 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
4759 if (NDalicPINVOKE.SWIGPendingException.Pending)
4760 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4764 internal Vector4 GetCurrentWorldColor()
4766 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
4767 if (NDalicPINVOKE.SWIGPendingException.Pending)
4768 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4772 internal void SetDrawMode(DrawModeType drawMode)
4774 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4775 if (NDalicPINVOKE.SWIGPendingException.Pending)
4776 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4779 internal DrawModeType GetDrawMode()
4781 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
4782 if (NDalicPINVOKE.SWIGPendingException.Pending)
4783 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4787 internal void SetKeyboardFocusable(bool focusable)
4789 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4790 if (NDalicPINVOKE.SWIGPendingException.Pending)
4791 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4794 internal bool IsKeyboardFocusable()
4796 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
4797 if (NDalicPINVOKE.SWIGPendingException.Pending)
4798 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4802 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4804 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4805 if (NDalicPINVOKE.SWIGPendingException.Pending)
4806 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4809 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4811 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4812 if (NDalicPINVOKE.SWIGPendingException.Pending)
4813 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4817 internal Vector3 GetSizeModeFactor()
4819 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
4820 if (NDalicPINVOKE.SWIGPendingException.Pending)
4821 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4825 internal void SetMinimumSize(Vector2 size)
4827 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4828 if (NDalicPINVOKE.SWIGPendingException.Pending)
4829 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4832 internal Vector2 GetMinimumSize()
4834 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
4835 if (NDalicPINVOKE.SWIGPendingException.Pending)
4836 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4840 internal void SetMaximumSize(Vector2 size)
4842 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4843 if (NDalicPINVOKE.SWIGPendingException.Pending)
4844 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4847 internal Vector2 GetMaximumSize()
4849 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
4850 if (NDalicPINVOKE.SWIGPendingException.Pending)
4851 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4855 internal int GetHierarchyDepth()
4857 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
4858 if (NDalicPINVOKE.SWIGPendingException.Pending)
4859 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4863 internal uint GetRendererCount()
4865 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
4866 if (NDalicPINVOKE.SWIGPendingException.Pending)
4867 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4871 internal TouchDataSignal TouchSignal()
4873 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
4874 if (NDalicPINVOKE.SWIGPendingException.Pending)
4875 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4879 internal HoverSignal HoveredSignal()
4881 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
4882 if (NDalicPINVOKE.SWIGPendingException.Pending)
4883 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4887 internal WheelSignal WheelEventSignal()
4889 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
4890 if (NDalicPINVOKE.SWIGPendingException.Pending)
4891 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4895 internal ViewSignal OnWindowSignal()
4897 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
4898 if (NDalicPINVOKE.SWIGPendingException.Pending)
4899 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4903 internal ViewSignal OffWindowSignal()
4905 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
4906 if (NDalicPINVOKE.SWIGPendingException.Pending)
4907 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4911 internal ViewSignal OnRelayoutSignal()
4913 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
4914 if (NDalicPINVOKE.SWIGPendingException.Pending)
4915 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4919 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
4921 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
4922 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4926 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
4928 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
4929 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4933 internal ViewSignal ResourcesLoadedSignal()
4935 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
4936 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4940 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
4942 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
4945 internal bool IsTopLevelView()
4947 if (GetParent() is Layer)
4954 internal void SetKeyInputFocus()
4956 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
4957 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4960 internal void ClearKeyInputFocus()
4962 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
4963 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4966 internal PinchGestureDetector GetPinchGestureDetector()
4968 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
4969 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4973 internal PanGestureDetector GetPanGestureDetector()
4975 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
4976 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4980 internal TapGestureDetector GetTapGestureDetector()
4982 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
4983 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4987 internal LongPressGestureDetector GetLongPressGestureDetector()
4989 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
4990 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4994 internal void SetBackgroundColor(Vector4 color)
4996 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
4997 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5000 internal Vector4 GetBackgroundColor()
5002 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
5003 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5007 internal void SetBackgroundImage(Image image)
5009 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
5010 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5013 internal ControlKeySignal KeyEventSignal()
5015 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
5016 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5020 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
5022 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
5023 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5027 internal KeyInputFocusSignal KeyInputFocusLostSignal()
5029 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
5030 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5034 internal IntPtr GetPtrfromView()
5036 return (IntPtr)swigCPtr;
5039 internal void SetLayout(LayoutItem layout)
5041 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(layout));
5042 layout.LayoutChildren.Clear();
5043 foreach (View view in Children)
5045 layout.LayoutChildren.Add(view.Layout);
5049 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5051 return (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5055 /// you can override it to clean-up your own resources.
5057 /// <param name="type">DisposeTypes</param>
5058 /// <since_tizen> 3 </since_tizen>
5059 protected override void Dispose(DisposeTypes type)
5066 if (type == DisposeTypes.Explicit)
5069 //Release your own managed resources here.
5070 //You should release all of your own disposable objects here.
5073 //Release your own unmanaged resources here.
5074 //You should not access any managed member here except static instance.
5075 //because the execution order of Finalizes is non-deterministic.
5078 DisConnectFromSignals();
5081 if (swigCPtr.Handle != global::System.IntPtr.Zero)
5085 swigCMemOwn = false;
5086 NDalicPINVOKE.delete_View(swigCPtr);
5088 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5091 foreach (View view in Children)
5093 view.InternalParent = null;
5100 private void OnSize2DChanged(int width, int height)
5102 Size2D = new Size2D(width, height);
5105 private void OnPosition2DChanged(int x, int y)
5107 Position2D = new Position2D(x, y);
5110 private void DisConnectFromSignals()
5112 // Save current CPtr.
5113 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
5115 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
5116 swigCPtr = GetBaseHandleCPtrHandleRef;
5118 if (_onRelayoutEventCallback != null)
5120 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5123 if (_offWindowEventCallback != null)
5125 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5128 if (_onWindowEventCallback != null)
5130 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5133 if (_wheelEventCallback != null)
5135 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5138 if (_hoverEventCallback != null)
5140 this.HoveredSignal().Disconnect(_hoverEventCallback);
5143 if (_touchDataCallback != null)
5145 this.TouchSignal().Disconnect(_touchDataCallback);
5148 if (_ResourcesLoadedCallback != null)
5150 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
5153 if (_offWindowEventCallback != null)
5155 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5158 if (_onWindowEventCallback != null)
5160 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5163 if (_wheelEventCallback != null)
5165 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5168 if (_hoverEventCallback != null)
5170 this.HoveredSignal().Disconnect(_hoverEventCallback);
5173 if (_touchDataCallback != null)
5175 this.TouchSignal().Disconnect(_touchDataCallback);
5178 if (_onRelayoutEventCallback != null)
5180 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5183 if (_keyCallback != null)
5185 this.KeyEventSignal().Disconnect(_keyCallback);
5188 if (_keyInputFocusLostCallback != null)
5190 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
5193 if (_keyInputFocusGainedCallback != null)
5195 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
5198 if (_backgroundResourceLoadedCallback != null)
5200 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5203 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
5204 // Restore current CPtr.
5205 swigCPtr = currentCPtr;
5208 private void OnKeyInputFocusGained(IntPtr view)
5210 if (_keyInputFocusGainedEventHandler != null)
5212 _keyInputFocusGainedEventHandler(this, null);
5216 private void OnKeyInputFocusLost(IntPtr view)
5218 if (_keyInputFocusLostEventHandler != null)
5220 _keyInputFocusLostEventHandler(this, null);
5224 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
5226 if (keyEvent == global::System.IntPtr.Zero)
5228 NUILog.Error("keyEvent should not be null!");
5232 KeyEventArgs e = new KeyEventArgs();
5234 bool result = false;
5236 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
5238 if (_keyEventHandler != null)
5240 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
5242 // Oring the result of each callback.
5243 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
5245 result |= del(this, e);
5252 // Callback for View OnRelayout signal
5253 private void OnRelayout(IntPtr data)
5255 if (_onRelayoutEventHandler != null)
5257 _onRelayoutEventHandler(this, null);
5261 // Callback for View TouchSignal
5262 private bool OnTouch(IntPtr view, IntPtr touchData)
5264 if (touchData == global::System.IntPtr.Zero)
5266 NUILog.Error("touchData should not be null!");
5270 TouchEventArgs e = new TouchEventArgs();
5272 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
5274 if (_touchDataEventHandler != null)
5276 return _touchDataEventHandler(this, e);
5281 // Callback for View Hover signal
5282 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
5284 if (hoverEvent == global::System.IntPtr.Zero)
5286 NUILog.Error("hoverEvent should not be null!");
5290 HoverEventArgs e = new HoverEventArgs();
5292 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
5294 if (_hoverEventHandler != null)
5296 return _hoverEventHandler(this, e);
5301 // Callback for View Wheel signal
5302 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
5304 if (wheelEvent == global::System.IntPtr.Zero)
5306 NUILog.Error("wheelEvent should not be null!");
5310 WheelEventArgs e = new WheelEventArgs();
5312 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
5314 if (_wheelEventHandler != null)
5316 return _wheelEventHandler(this, e);
5321 // Callback for View OnWindow signal
5322 private void OnWindow(IntPtr data)
5324 if (_onWindowEventHandler != null)
5326 _onWindowEventHandler(this, null);
5330 // Callback for View OffWindow signal
5331 private void OffWindow(IntPtr data)
5333 if (_offWindowEventHandler != null)
5335 _offWindowEventHandler(this, null);
5339 // Callback for View visibility change signal
5340 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
5342 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
5345 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5347 e.Visibility = visibility;
5350 if (_visibilityChangedEventHandler != null)
5352 _visibilityChangedEventHandler(this, e);
5356 // Callback for View layout direction change signal
5357 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
5359 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
5362 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5366 if (_layoutDirectionChangedEventHandler != null)
5368 _layoutDirectionChangedEventHandler(this, e);
5372 private void OnResourcesLoaded(IntPtr view)
5374 if (_resourcesLoadedEventHandler != null)
5376 _resourcesLoadedEventHandler(this, null);
5380 private View ConvertIdToView(uint id)
5383 if (GetParent() is View)
5385 View parentView = GetParent() as View;
5386 view = parentView.FindChildById(id);
5391 view = Window.Instance.GetRootLayer().FindChildById(id);
5397 private void OnBackgroundResourceLoaded(IntPtr view)
5399 BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5400 e.Status = (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5402 if (_backgroundResourceLoadedEventHandler != null)
5404 _backgroundResourceLoadedEventHandler(this, e);
5409 /// Event argument passed through the ChildAdded event.
5411 /// <since_tizen> 5 </since_tizen>
5412 public class ChildAddedEventArgs : EventArgs
5415 /// Added child view at moment.
5417 /// <since_tizen> 5 </since_tizen>
5418 public View Added { get; set; }
5422 /// Event argument passed through the ChildRemoved event.
5424 /// <since_tizen> 5 </since_tizen>
5425 public class ChildRemovedEventArgs : EventArgs
5428 /// Removed child view at moment.
5430 /// <since_tizen> 5 </since_tizen>
5431 public View Removed { get; set; }
5435 /// Event arguments that passed via the KeyEvent signal.
5437 /// <since_tizen> 3 </since_tizen>
5438 public class KeyEventArgs : EventArgs
5443 /// Key - is the key sent to the view.
5445 /// <since_tizen> 3 </since_tizen>
5460 /// Event arguments that passed via the touch signal.
5462 /// <since_tizen> 3 </since_tizen>
5463 public class TouchEventArgs : EventArgs
5465 private Touch _touch;
5468 /// Touch - contains the information of touch points.
5470 /// <since_tizen> 3 </since_tizen>
5485 /// Event arguments that passed via the hover signal.
5487 /// <since_tizen> 3 </since_tizen>
5488 public class HoverEventArgs : EventArgs
5490 private Hover _hover;
5493 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
5495 /// <since_tizen> 3 </since_tizen>
5510 /// Event arguments that passed via the wheel signal.
5512 /// <since_tizen> 3 </since_tizen>
5513 public class WheelEventArgs : EventArgs
5515 private Wheel _wheel;
5518 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
5520 /// <since_tizen> 3 </since_tizen>
5535 /// Event arguments of visibility changed.
5537 /// <since_tizen> 3 </since_tizen>
5538 public class VisibilityChangedEventArgs : EventArgs
5541 private bool _visibility;
5542 private VisibilityChangeType _type;
5545 /// The view, or child of view, whose visibility has changed.
5547 /// <since_tizen> 3 </since_tizen>
5561 /// Whether the view is now visible or not.
5563 /// <since_tizen> 3 </since_tizen>
5564 public bool Visibility
5572 _visibility = value;
5577 /// Whether the view's visible property has changed or a parent's.
5579 /// <since_tizen> 3 </since_tizen>
5580 public VisibilityChangeType Type
5594 /// Event arguments of layout direction changed.
5596 /// <since_tizen> 4 </since_tizen>
5597 public class LayoutDirectionChangedEventArgs : EventArgs
5600 private ViewLayoutDirectionType _type;
5603 /// The view, or child of view, whose layout direction has changed.
5605 /// <since_tizen> 4 </since_tizen>
5619 /// Whether the view's layout direction property has changed or a parent's.
5621 /// <since_tizen> 4 </since_tizen>
5622 public ViewLayoutDirectionType Type
5635 internal class BackgroundResourceLoadedEventArgs : EventArgs
5637 private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5638 public ResourceLoadingStatusType Status
5651 internal class Property
5653 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
5654 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
5655 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
5656 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
5657 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
5658 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
5659 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
5660 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
5661 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
5662 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
5663 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
5664 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
5665 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
5666 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
5667 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
5668 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
5669 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
5670 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
5671 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
5672 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
5673 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
5674 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
5675 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
5676 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
5677 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
5678 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
5679 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
5680 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
5681 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
5682 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
5683 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
5684 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
5685 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
5686 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
5687 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
5688 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
5689 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
5690 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
5691 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
5692 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
5693 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
5694 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
5695 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
5696 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
5697 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
5698 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
5699 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
5700 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
5701 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
5702 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
5703 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
5704 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
5705 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
5706 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
5707 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
5708 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
5709 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
5710 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
5711 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
5712 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
5713 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
5714 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
5715 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();