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 /// Only for XAML property binding. This will be changed as Inhouse API by ACR later.
231 public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
233 var view = (View)bindable;
234 if (newValue != null)
236 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
239 defaultValueCreator: (bindable) =>
241 var view = (View)bindable;
243 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
247 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
248 [EditorBrowsable(EditorBrowsableState.Never)]
249 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
251 var view = (View)bindable;
252 if (newValue != null)
254 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
257 defaultValueCreator: (bindable) =>
259 var view = (View)bindable;
261 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
264 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
265 [EditorBrowsable(EditorBrowsableState.Never)]
266 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
268 var view = (View)bindable;
269 if (newValue != null)
271 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
274 defaultValueCreator: (bindable) =>
276 var view = (View)bindable;
277 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
278 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
281 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
282 [EditorBrowsable(EditorBrowsableState.Never)]
283 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
285 var view = (View)bindable;
286 if (newValue != null)
288 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
291 defaultValueCreator: (bindable) =>
293 var view = (View)bindable;
294 Vector2 temp = new Vector2(0.0f, 0.0f);
295 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
298 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
299 [EditorBrowsable(EditorBrowsableState.Never)]
300 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
302 var view = (View)bindable;
303 if (newValue != null)
305 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
308 defaultValueCreator: (bindable) =>
310 var view = (View)bindable;
312 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
315 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
316 [EditorBrowsable(EditorBrowsableState.Never)]
317 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
319 var view = (View)bindable;
320 if (newValue != null)
322 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
325 defaultValueCreator: (bindable) =>
327 var view = (View)bindable;
329 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
332 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
333 [EditorBrowsable(EditorBrowsableState.Never)]
334 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
336 var view = (View)bindable;
337 string valueToString = "";
339 if (newValue != null)
341 switch ((HorizontalAlignmentType)newValue)
343 case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
344 case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
345 case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
346 default: { valueToString = "left"; break; }
348 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
351 defaultValueCreator: (bindable) =>
353 var view = (View)bindable;
355 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
357 NUILog.Error("CellHorizontalAlignment get error!");
362 case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
363 case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
364 case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
365 default: return Tizen.NUI.HorizontalAlignmentType.Left;
368 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
369 [EditorBrowsable(EditorBrowsableState.Never)]
370 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
372 var view = (View)bindable;
373 string valueToString = "";
375 if (newValue != null)
377 switch ((VerticalAlignmentType)newValue)
379 case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
380 case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
381 case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
382 default: { valueToString = "top"; break; }
384 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
387 defaultValueCreator: (bindable) =>
389 var view = (View)bindable;
391 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
393 NUILog.Error("CellVerticalAlignment get error!");
398 case "top": return Tizen.NUI.VerticalAlignmentType.Top;
399 case "center": return Tizen.NUI.VerticalAlignmentType.Center;
400 case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
401 default: return Tizen.NUI.VerticalAlignmentType.Top;
404 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
405 [EditorBrowsable(EditorBrowsableState.Never)]
406 public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
408 var view = (View)bindable;
409 if (newValue != null)
411 Tizen.NUI.Object.SetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
414 defaultValueCreator: (bindable) =>
416 var view = (View)bindable;
418 Tizen.NUI.Object.GetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT).Get(out temp);
421 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
422 [EditorBrowsable(EditorBrowsableState.Never)]
423 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
425 var view = (View)bindable;
426 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
427 else { view.LeftFocusableViewId = -1; }
429 defaultValueCreator: (bindable) =>
431 var view = (View)bindable;
432 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
435 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
436 [EditorBrowsable(EditorBrowsableState.Never)]
437 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
439 var view = (View)bindable;
440 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
441 else { view.RightFocusableViewId = -1; }
443 defaultValueCreator: (bindable) =>
445 var view = (View)bindable;
446 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
449 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
450 [EditorBrowsable(EditorBrowsableState.Never)]
451 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
453 var view = (View)bindable;
454 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
455 else { view.UpFocusableViewId = -1; }
457 defaultValueCreator: (bindable) =>
459 var view = (View)bindable;
460 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
463 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
464 [EditorBrowsable(EditorBrowsableState.Never)]
465 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
467 var view = (View)bindable;
468 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
469 else { view.DownFocusableViewId = -1; }
471 defaultValueCreator: (bindable) =>
473 var view = (View)bindable;
474 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
477 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
478 [EditorBrowsable(EditorBrowsableState.Never)]
479 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
481 var view = (View)bindable;
482 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
484 defaultValueCreator: (bindable) =>
486 var view = (View)bindable;
487 return view.IsKeyboardFocusable();
489 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
490 [EditorBrowsable(EditorBrowsableState.Never)]
491 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
493 var view = (View)bindable;
494 if (newValue != null)
496 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size((Size2D)newValue)));
499 defaultValueCreator: (bindable) =>
501 var view = (View)bindable;
502 Size temp = new Size(0.0f, 0.0f, 0.0f);
503 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
504 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
507 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
508 [EditorBrowsable(EditorBrowsableState.Never)]
509 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
511 var view = (View)bindable;
512 if (newValue != null)
514 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
517 defaultValueCreator: (bindable) =>
519 var view = (View)bindable;
521 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
524 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
525 [EditorBrowsable(EditorBrowsableState.Never)]
526 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
528 var view = (View)bindable;
529 if (newValue != null)
531 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
534 defaultValueCreator: (bindable) =>
536 var view = (View)bindable;
537 Position temp = new Position(0.0f, 0.0f, 0.0f);
538 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
539 return new Position2D(temp);
541 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
542 [EditorBrowsable(EditorBrowsableState.Never)]
543 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
545 var view = (View)bindable;
546 if (newValue != null)
548 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
551 defaultValueCreator: (bindable) =>
553 var view = (View)bindable;
555 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
558 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
559 [EditorBrowsable(EditorBrowsableState.Never)]
560 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
562 var view = (View)bindable;
564 if (newValue != null)
566 value = (int)newValue;
569 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
572 var siblings = view.GetParent()?.Children;
573 if (siblings != null)
575 int currentOrder = siblings.IndexOf(view);
576 if (value != currentOrder)
578 if (value == 0) { view.LowerToBottom(); }
579 else if (value < siblings.Count - 1)
581 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
582 else { view.LowerBelow(siblings[value]); }
584 else { view.RaiseToTop(); }
589 defaultValueCreator: (bindable) =>
591 var view = (View)bindable;
592 var parentChildren = view.GetParent()?.Children;
593 int currentOrder = 0;
594 if (parentChildren != null)
596 currentOrder = parentChildren.IndexOf(view);
598 if (currentOrder < 0) { return 0; }
599 else if (currentOrder < parentChildren.Count) { return currentOrder; }
604 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
605 [EditorBrowsable(EditorBrowsableState.Never)]
606 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
608 var view = (View)bindable;
609 if (newValue != null)
611 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
614 defaultValueCreator: (bindable) =>
616 var view = (View)bindable;
617 Position temp = new Position(0.0f, 0.0f, 0.0f);
618 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
622 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
623 [EditorBrowsable(EditorBrowsableState.Never)]
624 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
626 var view = (View)bindable;
627 if (newValue != null)
629 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
632 defaultValueCreator: (bindable) =>
634 var view = (View)bindable;
635 Position temp = new Position(0.0f, 0.0f, 0.0f);
636 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
639 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
640 [EditorBrowsable(EditorBrowsableState.Never)]
641 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
643 var view = (View)bindable;
644 if (newValue != null)
646 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
649 defaultValueCreator: (bindable) =>
651 var view = (View)bindable;
653 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
656 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
657 [EditorBrowsable(EditorBrowsableState.Never)]
658 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
660 var view = (View)bindable;
661 if (newValue != null)
663 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
666 defaultValueCreator: (bindable) =>
668 var view = (View)bindable;
670 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
673 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
674 [EditorBrowsable(EditorBrowsableState.Never)]
675 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
677 var view = (View)bindable;
678 if (newValue != null)
680 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
683 defaultValueCreator: (bindable) =>
685 var view = (View)bindable;
686 Position temp = new Position(0.0f, 0.0f, 0.0f);
687 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
690 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
691 [EditorBrowsable(EditorBrowsableState.Never)]
692 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
694 var view = (View)bindable;
695 if (newValue != null)
697 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
700 defaultValueCreator: (bindable) =>
702 var view = (View)bindable;
704 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
707 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
708 [EditorBrowsable(EditorBrowsableState.Never)]
709 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
711 var view = (View)bindable;
712 if (newValue != null)
714 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
717 defaultValueCreator: (bindable) =>
719 var view = (View)bindable;
721 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
724 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
725 [EditorBrowsable(EditorBrowsableState.Never)]
726 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
728 var view = (View)bindable;
729 if (newValue != null)
731 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
734 defaultValueCreator: (bindable) =>
736 var view = (View)bindable;
738 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
741 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
742 [EditorBrowsable(EditorBrowsableState.Never)]
743 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
745 var view = (View)bindable;
746 if (newValue != null)
748 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
751 defaultValueCreator: (bindable) =>
753 var view = (View)bindable;
754 Rotation temp = new Rotation();
755 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
758 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
759 [EditorBrowsable(EditorBrowsableState.Never)]
760 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
762 var view = (View)bindable;
763 if (newValue != null)
765 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
768 defaultValueCreator: (bindable) =>
770 var view = (View)bindable;
771 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
772 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
775 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
776 [EditorBrowsable(EditorBrowsableState.Never)]
777 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
779 var view = (View)bindable;
780 if (newValue != null)
782 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
785 defaultValueCreator: (bindable) =>
787 var view = (View)bindable;
789 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
792 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
793 [EditorBrowsable(EditorBrowsableState.Never)]
794 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
796 var view = (View)bindable;
797 if (newValue != null)
799 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
802 defaultValueCreator: (bindable) =>
804 var view = (View)bindable;
806 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
809 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
810 [EditorBrowsable(EditorBrowsableState.Never)]
811 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
813 var view = (View)bindable;
814 if (newValue != null)
816 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
819 defaultValueCreator: (bindable) =>
821 var view = (View)bindable;
823 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
826 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
827 [EditorBrowsable(EditorBrowsableState.Never)]
828 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
830 var view = (View)bindable;
831 if (newValue != null)
833 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
836 defaultValueCreator: (bindable) =>
838 var view = (View)bindable;
840 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
843 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
844 [EditorBrowsable(EditorBrowsableState.Never)]
845 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
847 var view = (View)bindable;
848 if (newValue != null)
850 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
853 defaultValueCreator: (bindable) =>
855 var view = (View)bindable;
857 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
860 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
861 [EditorBrowsable(EditorBrowsableState.Never)]
862 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
864 var view = (View)bindable;
865 if (newValue != null)
867 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
870 defaultValueCreator: (bindable) =>
872 var view = (View)bindable;
874 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
877 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
878 [EditorBrowsable(EditorBrowsableState.Never)]
879 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
881 var view = (View)bindable;
882 if (newValue != null)
884 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
887 defaultValueCreator: (bindable) =>
889 var view = (View)bindable;
891 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
894 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
895 [EditorBrowsable(EditorBrowsableState.Never)]
896 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
898 var view = (View)bindable;
899 if (newValue != null)
901 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
904 defaultValueCreator: (bindable) =>
906 var view = (View)bindable;
908 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
911 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
912 [EditorBrowsable(EditorBrowsableState.Never)]
913 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
915 var view = (View)bindable;
916 if (newValue != null)
918 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
921 defaultValueCreator: (bindable) =>
923 var view = (View)bindable;
925 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
927 NUILog.Error("DrawMode get error!");
931 case "NORMAL": return DrawModeType.Normal;
932 case "OVERLAY_2D": return DrawModeType.Overlay2D;
933 #pragma warning disable CS0618 // Disable deprecated warning as we do need to use the deprecated API here.
934 case "STENCIL": return DrawModeType.Stencil;
935 #pragma warning restore CS0618
936 default: return DrawModeType.Normal;
939 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
940 [EditorBrowsable(EditorBrowsableState.Never)]
941 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
943 var view = (View)bindable;
944 if (newValue != null)
946 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
949 defaultValueCreator: (bindable) =>
951 var view = (View)bindable;
952 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
953 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
956 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
957 [EditorBrowsable(EditorBrowsableState.Never)]
958 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
960 var view = (View)bindable;
961 if (newValue != null)
963 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
966 defaultValueCreator: (bindable) =>
968 var view = (View)bindable;
970 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
972 NUILog.Error("WidthResizePolicy get error!");
976 case "FIXED": return ResizePolicyType.Fixed;
977 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
978 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
979 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
980 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
981 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
982 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
983 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
984 default: return ResizePolicyType.Fixed;
987 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
988 [EditorBrowsable(EditorBrowsableState.Never)]
989 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
991 var view = (View)bindable;
992 if (newValue != null)
994 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
997 defaultValueCreator: (bindable) =>
999 var view = (View)bindable;
1001 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
1003 NUILog.Error("HeightResizePolicy get error!");
1007 case "FIXED": return ResizePolicyType.Fixed;
1008 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1009 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1010 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1011 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1012 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1013 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1014 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1015 default: return ResizePolicyType.Fixed;
1018 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1019 [EditorBrowsable(EditorBrowsableState.Never)]
1020 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1022 var view = (View)bindable;
1023 string valueToString = "";
1024 if (newValue != null)
1026 switch ((SizeScalePolicyType)newValue)
1028 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1029 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1030 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1031 default: { valueToString = "USE_SIZE_SET"; break; }
1033 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1036 defaultValueCreator: (bindable) =>
1038 var view = (View)bindable;
1040 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1042 NUILog.Error("SizeScalePolicy get error!");
1046 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1047 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1048 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1049 default: return SizeScalePolicyType.UseSizeSet;
1052 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1053 [EditorBrowsable(EditorBrowsableState.Never)]
1054 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1056 var view = (View)bindable;
1057 if (newValue != null)
1059 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1062 defaultValueCreator: (bindable) =>
1064 var view = (View)bindable;
1066 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1069 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1070 [EditorBrowsable(EditorBrowsableState.Never)]
1071 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1073 var view = (View)bindable;
1074 if (newValue != null)
1076 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1079 defaultValueCreator: (bindable) =>
1081 var view = (View)bindable;
1083 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1086 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1087 [EditorBrowsable(EditorBrowsableState.Never)]
1088 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1090 var view = (View)bindable;
1091 if (newValue != null)
1093 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1096 defaultValueCreator: (bindable) =>
1098 var view = (View)bindable;
1099 Extents temp = new Extents(0, 0, 0, 0);
1100 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1103 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1104 [EditorBrowsable(EditorBrowsableState.Never)]
1105 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1107 var view = (View)bindable;
1108 if (newValue != null)
1110 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1113 defaultValueCreator: (bindable) =>
1115 var view = (View)bindable;
1116 Size temp = new Size(0, 0, 0);
1117 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1120 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1121 [EditorBrowsable(EditorBrowsableState.Never)]
1122 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1124 var view = (View)bindable;
1125 if (newValue != null)
1127 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1130 defaultValueCreator: (bindable) =>
1132 var view = (View)bindable;
1133 Size2D temp = new Size2D(0, 0);
1134 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1137 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1138 [EditorBrowsable(EditorBrowsableState.Never)]
1139 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1141 var view = (View)bindable;
1142 if (newValue != null)
1144 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1147 defaultValueCreator: (bindable) =>
1149 var view = (View)bindable;
1150 Size2D temp = new Size2D(0, 0);
1151 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1154 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1155 [EditorBrowsable(EditorBrowsableState.Never)]
1156 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1158 var view = (View)bindable;
1159 if (newValue != null)
1161 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1164 defaultValueCreator: (bindable) =>
1166 var view = (View)bindable;
1168 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1171 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1172 [EditorBrowsable(EditorBrowsableState.Never)]
1173 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1175 var view = (View)bindable;
1176 if (newValue != null)
1178 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1181 defaultValueCreator: (bindable) =>
1183 var view = (View)bindable;
1185 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1187 NUILog.Error("ClippingMode get error!");
1189 return (ClippingModeType)temp;
1191 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1192 [EditorBrowsable(EditorBrowsableState.Never)]
1193 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1195 var view = (View)bindable;
1196 if (newValue != null)
1198 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1201 defaultValueCreator: (bindable) =>
1203 var view = (View)bindable;
1205 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1208 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1209 [EditorBrowsable(EditorBrowsableState.Never)]
1210 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1212 var view = (View)bindable;
1213 if (newValue != null)
1215 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1218 defaultValueCreator: (bindable) =>
1220 var view = (View)bindable;
1222 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1224 NUILog.Error("LAYOUT_DIRECTION get error!");
1226 return (ViewLayoutDirectionType)temp;
1228 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1229 [EditorBrowsable(EditorBrowsableState.Never)]
1230 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1232 var view = (View)bindable;
1233 if (newValue != null)
1235 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1238 defaultValueCreator: (bindable) =>
1240 var view = (View)bindable;
1241 Extents temp = new Extents(0, 0, 0, 0);
1242 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1245 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1246 [EditorBrowsable(EditorBrowsableState.Never)]
1247 public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style), propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1249 internal readonly MergedStyle _mergedStyle;
1251 /// Flag to allow Layouting to be disabled for Views.
1252 /// Once a View has a Layout set then any children added to Views from then on will receive
1253 /// automatic Layouts.
1255 private static bool layoutingDisabled = true;
1256 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1258 private bool layoutSet = false; // Flag to indicate if SetLayout was called or View was automatically given a Layout
1259 private bool _backgroundImageSynchronosLoading = false;
1260 private EventHandler _offWindowEventHandler;
1261 private OffWindowEventCallbackType _offWindowEventCallback;
1262 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1263 private WheelEventCallbackType _wheelEventCallback;
1264 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1265 private KeyCallbackType _keyCallback;
1266 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1267 private TouchDataCallbackType _touchDataCallback;
1268 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1269 private HoverEventCallbackType _hoverEventCallback;
1270 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
1271 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
1272 private EventHandler _keyInputFocusGainedEventHandler;
1273 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1274 private EventHandler _keyInputFocusLostEventHandler;
1275 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1276 private EventHandler _onRelayoutEventHandler;
1277 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1278 private EventHandler _onWindowEventHandler;
1279 private OnWindowEventCallbackType _onWindowEventCallback;
1280 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
1281 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
1282 // Resource Ready Signal
1283 private EventHandler _resourcesLoadedEventHandler;
1284 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
1285 private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
1286 private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
1288 private OnWindowEventCallbackType _onWindowSendEventCallback;
1290 private void SendViewAddedEventToWindow(IntPtr data)
1292 Window.Instance?.SendViewAdded(this);
1296 /// Creates a new instance of a view.
1298 /// <since_tizen> 3 </since_tizen>
1299 public View() : this(NDalicPINVOKE.View_New(), true)
1301 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1303 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1305 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1308 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
1310 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1313 PositionUsesPivotPoint = false;
1315 _mergedStyle = new MergedStyle(GetType(), this);
1317 _onWindowSendEventCallback = SendViewAddedEventToWindow;
1318 this.OnWindowSignal().Connect(_onWindowSendEventCallback);
1321 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1323 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1326 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1327 private delegate void OffWindowEventCallbackType(IntPtr control);
1328 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1329 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1330 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1331 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1332 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1333 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1334 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1335 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1336 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1337 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
1338 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1339 private delegate void ResourcesLoadedCallbackType(IntPtr control);
1340 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1341 private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
1342 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1343 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1344 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1345 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1346 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1347 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1348 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1349 private delegate void OnWindowEventCallbackType(IntPtr control);
1350 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1351 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
1354 /// Event when a child is removed.
1356 /// <since_tizen> 5 </since_tizen>
1357 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1359 /// Event when a child is added.
1361 /// <since_tizen> 5 </since_tizen>
1362 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1365 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1366 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1368 /// <since_tizen> 3 </since_tizen>
1369 public event EventHandler FocusGained
1373 if (_keyInputFocusGainedEventHandler == null)
1375 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1376 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1379 _keyInputFocusGainedEventHandler += value;
1384 _keyInputFocusGainedEventHandler -= value;
1386 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1388 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1394 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1395 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1397 /// <since_tizen> 3 </since_tizen>
1398 public event EventHandler FocusLost
1402 if (_keyInputFocusLostEventHandler == null)
1404 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1405 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1408 _keyInputFocusLostEventHandler += value;
1413 _keyInputFocusLostEventHandler -= value;
1415 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1417 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1423 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1424 /// The KeyPressed signal is emitted when the key event is received.<br />
1426 /// <since_tizen> 3 </since_tizen>
1427 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1431 if (_keyEventHandler == null)
1433 _keyCallback = OnKeyEvent;
1434 this.KeyEventSignal().Connect(_keyCallback);
1437 _keyEventHandler += value;
1442 _keyEventHandler -= value;
1444 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1446 this.KeyEventSignal().Disconnect(_keyCallback);
1452 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1453 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1455 /// <since_tizen> 3 </since_tizen>
1456 public event EventHandler Relayout
1460 if (_onRelayoutEventHandler == null)
1462 _onRelayoutEventCallback = OnRelayout;
1463 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1466 _onRelayoutEventHandler += value;
1471 _onRelayoutEventHandler -= value;
1473 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1475 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1482 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1483 /// The touched signal is emitted when the touch input is received.<br />
1485 /// <since_tizen> 3 </since_tizen>
1486 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1490 if (_touchDataEventHandler == null)
1492 _touchDataCallback = OnTouch;
1493 this.TouchSignal().Connect(_touchDataCallback);
1496 _touchDataEventHandler += value;
1501 _touchDataEventHandler -= value;
1503 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1505 this.TouchSignal().Disconnect(_touchDataCallback);
1512 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1513 /// The hovered signal is emitted when the hover input is received.<br />
1515 /// <since_tizen> 3 </since_tizen>
1516 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1520 if (_hoverEventHandler == null)
1522 _hoverEventCallback = OnHoverEvent;
1523 this.HoveredSignal().Connect(_hoverEventCallback);
1526 _hoverEventHandler += value;
1531 _hoverEventHandler -= value;
1533 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1535 this.HoveredSignal().Disconnect(_hoverEventCallback);
1542 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1543 /// The WheelMoved signal is emitted when the wheel event is received.<br />
1545 /// <since_tizen> 3 </since_tizen>
1546 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1550 if (_wheelEventHandler == null)
1552 _wheelEventCallback = OnWheelEvent;
1553 this.WheelEventSignal().Connect(_wheelEventCallback);
1556 _wheelEventHandler += value;
1561 _wheelEventHandler -= value;
1563 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
1565 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1572 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
1573 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
1575 /// <since_tizen> 3 </since_tizen>
1576 public event EventHandler AddedToWindow
1580 if (_onWindowEventHandler == null)
1582 _onWindowEventCallback = OnWindow;
1583 this.OnWindowSignal().Connect(_onWindowEventCallback);
1586 _onWindowEventHandler += value;
1591 _onWindowEventHandler -= value;
1593 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
1595 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1601 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
1602 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
1604 /// <since_tizen> 3 </since_tizen>
1605 public event EventHandler RemovedFromWindow
1609 if (_offWindowEventHandler == null)
1611 _offWindowEventCallback = OffWindow;
1612 this.OffWindowSignal().Connect(_offWindowEventCallback);
1615 _offWindowEventHandler += value;
1620 _offWindowEventHandler -= value;
1622 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
1624 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1630 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
1631 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
1633 /// <since_tizen> 3 </since_tizen>
1634 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
1638 if (_visibilityChangedEventHandler == null)
1640 _visibilityChangedEventCallback = OnVisibilityChanged;
1641 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
1644 _visibilityChangedEventHandler += value;
1649 _visibilityChangedEventHandler -= value;
1651 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
1653 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
1659 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
1660 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
1662 /// <since_tizen> 4 </since_tizen>
1663 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
1667 if (_layoutDirectionChangedEventHandler == null)
1669 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
1670 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
1673 _layoutDirectionChangedEventHandler += value;
1678 _layoutDirectionChangedEventHandler -= value;
1680 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
1682 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
1688 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1689 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1691 /// <since_tizen> 3 </since_tizen>
1692 public event EventHandler ResourcesLoaded
1696 if (_resourcesLoadedEventHandler == null)
1698 _ResourcesLoadedCallback = OnResourcesLoaded;
1699 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1702 _resourcesLoadedEventHandler += value;
1707 _resourcesLoadedEventHandler -= value;
1709 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1711 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1716 internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
1720 if (_backgroundResourceLoadedEventHandler == null)
1722 _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
1723 this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
1726 _backgroundResourceLoadedEventHandler += value;
1730 _backgroundResourceLoadedEventHandler -= value;
1732 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1734 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1740 /// Enumeration for describing the states of the view.
1742 /// <since_tizen> 3 </since_tizen>
1746 /// The normal state.
1750 /// The focused state.
1754 /// The disabled state.
1760 /// Describes the direction to move the focus towards.
1762 /// <since_tizen> 3 </since_tizen>
1763 public enum FocusDirection
1766 /// Move keyboard focus towards the left direction.
1768 /// <since_tizen> 3 </since_tizen>
1771 /// Move keyboard focus towards the right direction.
1773 /// <since_tizen> 3 </since_tizen>
1776 /// Move keyboard focus towards the up direction.
1778 /// <since_tizen> 3 </since_tizen>
1781 /// Move keyboard focus towards the down direction.
1783 /// <since_tizen> 3 </since_tizen>
1786 /// Move keyboard focus towards the previous page direction.
1788 /// <since_tizen> 3 </since_tizen>
1791 /// Move keyboard focus towards the next page direction.
1793 /// <since_tizen> 3 </since_tizen>
1797 internal enum PropertyRange
1799 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1800 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1801 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1804 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1805 [EditorBrowsable(EditorBrowsableState.Never)]
1806 public bool IsResourcesCreated
1810 return Application.Current.IsResourcesCreated;
1814 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1815 [EditorBrowsable(EditorBrowsableState.Never)]
1816 public ResourceDictionary XamlResources
1820 return Application.Current.XamlResources;
1824 Application.Current.XamlResources = value;
1829 /// The StyleName, type string.
1831 /// <since_tizen> 3 </since_tizen>
1832 public string StyleName
1836 return (string)GetValue(StyleNameProperty);
1840 SetValue(StyleNameProperty, value);
1841 NotifyPropertyChanged();
1846 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1848 /// <since_tizen> 3 </since_tizen>
1849 public Color BackgroundColor
1853 return (Color)GetValue(BackgroundColorProperty);
1857 SetValue(BackgroundColorProperty, value);
1858 NotifyPropertyChanged();
1863 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1865 /// <since_tizen> 3 </since_tizen>
1866 public string BackgroundImage
1870 return (string)GetValue(BackgroundImageProperty);
1874 SetValue(BackgroundImageProperty, value);
1875 NotifyPropertyChanged();
1880 /// The background of view.
1882 /// <since_tizen> 3 </since_tizen>
1883 public Tizen.NUI.PropertyMap Background
1887 return (PropertyMap)GetValue(BackgroundProperty);
1891 SetValue(BackgroundProperty, value);
1892 NotifyPropertyChanged();
1898 /// The current state of the view.
1900 /// <since_tizen> 3 </since_tizen>
1905 return (States)GetValue(StateProperty);
1909 SetValue(StateProperty, value);
1910 NotifyPropertyChanged();
1915 /// The current sub state of the view.
1917 /// <since_tizen> 3 </since_tizen>
1918 public States SubState
1922 return (States)GetValue(SubStateProperty);
1926 SetValue(SubStateProperty, value);
1927 NotifyPropertyChanged();
1932 /// Displays a tooltip
1934 /// <since_tizen> 3 </since_tizen>
1935 public Tizen.NUI.PropertyMap Tooltip
1939 return (PropertyMap)GetValue(TooltipProperty);
1943 SetValue(TooltipProperty, value);
1944 NotifyPropertyChanged();
1949 /// Displays a tooltip as a text.
1951 /// <since_tizen> 3 </since_tizen>
1952 public string TooltipText
1956 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1957 NotifyPropertyChanged();
1962 /// The Child property of FlexContainer.<br />
1963 /// The proportion of the free space in the container, the flex item will receive.<br />
1964 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1966 /// <since_tizen> 3 </since_tizen>
1971 return (float)GetValue(FlexProperty);
1975 SetValue(FlexProperty, value);
1976 NotifyPropertyChanged();
1981 /// The Child property of FlexContainer.<br />
1982 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
1984 /// <since_tizen> 3 </since_tizen>
1985 public int AlignSelf
1989 return (int)GetValue(AlignSelfProperty);
1993 SetValue(AlignSelfProperty, value);
1994 NotifyPropertyChanged();
1999 /// The Child property of FlexContainer.<br />
2000 /// The space around the flex item.<br />
2002 /// <since_tizen> 3 </since_tizen>
2003 public Vector4 FlexMargin
2007 return (Vector4)GetValue(FlexMarginProperty);
2011 SetValue(FlexMarginProperty, value);
2012 NotifyPropertyChanged();
2017 /// The top-left cell this child occupies, if not set, the first available cell is used.
2019 /// <since_tizen> 3 </since_tizen>
2020 public Vector2 CellIndex
2024 return (Vector2)GetValue(CellIndexProperty);
2028 SetValue(CellIndexProperty, value);
2029 NotifyPropertyChanged();
2034 /// The number of rows this child occupies, if not set, the default value is 1.
2036 /// <since_tizen> 3 </since_tizen>
2037 public float RowSpan
2041 return (float)GetValue(RowSpanProperty);
2045 SetValue(RowSpanProperty, value);
2046 NotifyPropertyChanged();
2051 /// The number of columns this child occupies, if not set, the default value is 1.
2053 /// <since_tizen> 3 </since_tizen>
2054 public float ColumnSpan
2058 return (float)GetValue(ColumnSpanProperty);
2062 SetValue(ColumnSpanProperty, value);
2063 NotifyPropertyChanged();
2068 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
2070 /// <since_tizen> 3 </since_tizen>
2071 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
2075 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
2079 SetValue(CellHorizontalAlignmentProperty, value);
2080 NotifyPropertyChanged();
2085 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
2087 /// <since_tizen> 3 </since_tizen>
2088 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
2092 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
2096 SetValue(CellVerticalAlignmentProperty, value);
2097 NotifyPropertyChanged();
2102 /// The left focusable view.<br />
2103 /// This will return null if not set.<br />
2104 /// This will also return null if the specified left focusable view is not on a window.<br />
2106 /// <since_tizen> 3 </since_tizen>
2107 public View LeftFocusableView
2109 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2112 return (View)GetValue(LeftFocusableViewProperty);
2116 SetValue(LeftFocusableViewProperty, value);
2117 NotifyPropertyChanged();
2122 /// The right focusable view.<br />
2123 /// This will return null if not set.<br />
2124 /// This will also return null if the specified right focusable view is not on a window.<br />
2126 /// <since_tizen> 3 </since_tizen>
2127 public View RightFocusableView
2129 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2132 return (View)GetValue(RightFocusableViewProperty);
2136 SetValue(RightFocusableViewProperty, value);
2137 NotifyPropertyChanged();
2142 /// The up focusable view.<br />
2143 /// This will return null if not set.<br />
2144 /// This will also return null if the specified up focusable view is not on a window.<br />
2146 /// <since_tizen> 3 </since_tizen>
2147 public View UpFocusableView
2149 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2152 return (View)GetValue(UpFocusableViewProperty);
2156 SetValue(UpFocusableViewProperty, value);
2157 NotifyPropertyChanged();
2162 /// The down focusable view.<br />
2163 /// This will return null if not set.<br />
2164 /// This will also return null if the specified down focusable view is not on a window.<br />
2166 /// <since_tizen> 3 </since_tizen>
2167 public View DownFocusableView
2169 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2172 return (View)GetValue(DownFocusableViewProperty);
2176 SetValue(DownFocusableViewProperty, value);
2177 NotifyPropertyChanged();
2182 /// Whether the view should be focusable by keyboard navigation.
2184 /// <since_tizen> 3 </since_tizen>
2185 public bool Focusable
2189 SetValue(FocusableProperty, value);
2190 NotifyPropertyChanged();
2194 return (bool)GetValue(FocusableProperty);
2199 /// Retrieves the position of the view.<br />
2200 /// The coordinates are relative to the view's parent.<br />
2202 /// <since_tizen> 3 </since_tizen>
2203 public Position CurrentPosition
2207 return GetCurrentPosition();
2212 /// Sets the size of a view for the width and the height.<br />
2213 /// Geometry can be scaled to fit within this area.<br />
2214 /// This does not interfere with the view's scale factor.<br />
2215 /// The views default depth is the minimum of width and height.<br />
2218 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
2219 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
2220 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
2221 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2222 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2223 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2224 /// 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 />
2226 /// <since_tizen> 3 </since_tizen>
2227 public Size2D Size2D
2231 Size2D temp = (Size2D)GetValue(Size2DProperty);
2232 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
2236 SetValue(Size2DProperty, value);
2237 // Set Specification so when layouts measure this View it matches the value set here.
2238 // All Views are currently Layouts.
2239 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
2240 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
2241 NotifyPropertyChanged();
2246 /// Retrieves the size of the view.<br />
2247 /// The coordinates are relative to the view's parent.<br />
2249 /// <since_tizen> 3 </since_tizen>
2250 public Size2D CurrentSize
2254 return GetCurrentSize();
2259 /// Retrieves and sets the view's opacity.<br />
2261 /// <since_tizen> 3 </since_tizen>
2262 public float Opacity
2266 return (float)GetValue(OpacityProperty);
2270 SetValue(OpacityProperty, value);
2271 NotifyPropertyChanged();
2276 /// Sets the position of the view for X and Y.<br />
2277 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2278 /// If the position inheritance is disabled, sets the world position.<br />
2281 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
2282 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
2283 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
2284 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2285 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2286 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2288 /// <since_tizen> 3 </since_tizen>
2289 public Position2D Position2D
2293 Position2D temp = (Position2D)GetValue(Position2DProperty);
2294 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
2298 SetValue(Position2DProperty, value);
2299 NotifyPropertyChanged();
2304 /// Retrieves the screen postion of the view.<br />
2306 /// <since_tizen> 3 </since_tizen>
2307 public Vector2 ScreenPosition
2311 Vector2 temp = new Vector2(0.0f, 0.0f);
2312 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2318 /// Determines whether the pivot point should be used to determine the position of the view.
2319 /// This is true by default.
2321 /// <remarks>If false, then the top-left of the view is used for the position.
2322 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
2324 /// <since_tizen> 3 </since_tizen>
2325 public bool PositionUsesPivotPoint
2329 return (bool)GetValue(PositionUsesPivotPointProperty);
2333 SetValue(PositionUsesPivotPointProperty, value);
2334 NotifyPropertyChanged();
2339 /// Please do not use! this will be deprecated.
2341 /// Please do not use! this will be deprecated!
2342 /// Instead please use PositionUsesPivotPoint.
2343 /// <since_tizen> 3 </since_tizen>
2344 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2346 "View view = new View(); " +
2347 "view.PivotPoint = PivotPoint.Center; " +
2348 "view.PositionUsesPivotPoint = true;")]
2349 [EditorBrowsable(EditorBrowsableState.Never)]
2350 public bool PositionUsesAnchorPoint
2355 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2360 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2361 NotifyPropertyChanged();
2366 /// Queries whether the view is connected to the stage.<br />
2367 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2369 /// <since_tizen> 3 </since_tizen>
2370 public bool IsOnWindow
2379 /// Gets the depth in the hierarchy for the view.
2381 /// <since_tizen> 3 </since_tizen>
2382 public int HierarchyDepth
2386 return GetHierarchyDepth();
2391 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2394 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
2395 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2396 /// The values set by this property will likely change.
2398 /// <since_tizen> 3 </since_tizen>
2399 public int SiblingOrder
2403 return (int)GetValue(SiblingOrderProperty);
2407 SetValue(SiblingOrderProperty, value);
2408 NotifyPropertyChanged();
2413 /// Returns the natural size of the view.
2416 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2418 /// <since_tizen> 5 </since_tizen>
2419 public Vector3 NaturalSize
2423 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2424 if (NDalicPINVOKE.SWIGPendingException.Pending)
2425 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2431 /// Returns the natural size (Size2D) of the view.
2434 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2436 /// <since_tizen> 4 </since_tizen>
2437 public Size2D NaturalSize2D
2441 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2442 if (NDalicPINVOKE.SWIGPendingException.Pending)
2443 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2445 return new Size2D((int)temp.Width, (int)temp.Height);
2450 /// Gets or sets the origin of a view within its parent's area.<br />
2451 /// 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 />
2452 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
2453 /// A view's position is the distance between this origin and the view's anchor-point.<br />
2455 /// <pre>The view has been initialized.</pre>
2456 /// <since_tizen> 3 </since_tizen>
2457 public Position ParentOrigin
2461 return (Position)GetValue(ParentOriginProperty);
2465 SetValue(ParentOriginProperty, value);
2466 NotifyPropertyChanged();
2471 /// Gets or sets the anchor-point of a view.<br />
2472 /// 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 />
2473 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
2474 /// A view position is the distance between its parent-origin and this anchor-point.<br />
2475 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
2476 /// <pre>The view has been initialized.</pre>
2478 /// <since_tizen> 3 </since_tizen>
2479 public Position PivotPoint
2483 return (Position)GetValue(PivotPointProperty);
2487 SetValue(PivotPointProperty, value);
2488 NotifyPropertyChanged();
2493 /// Gets or sets the size width of the view.
2495 /// <since_tizen> 3 </since_tizen>
2496 public float SizeWidth
2500 return (float)GetValue(SizeWidthProperty);
2504 SetValue(SizeWidthProperty, value);
2505 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
2506 NotifyPropertyChanged();
2511 /// Gets or sets the size height of the view.
2513 /// <since_tizen> 3 </since_tizen>
2514 public float SizeHeight
2518 return (float)GetValue(SizeHeightProperty);
2522 SetValue(SizeHeightProperty, value);
2523 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
2524 NotifyPropertyChanged();
2529 /// Gets or sets the position of the view.<br />
2530 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
2531 /// If the position inheritance is disabled, sets the world position.<br />
2533 /// <since_tizen> 3 </since_tizen>
2534 public Position Position
2538 return (Position)GetValue(PositionProperty);
2542 SetValue(PositionProperty, value);
2543 NotifyPropertyChanged();
2548 /// Gets or sets the position X of the view.
2550 /// <since_tizen> 3 </since_tizen>
2551 public float PositionX
2555 return (float)GetValue(PositionXProperty);
2559 SetValue(PositionXProperty, value);
2560 NotifyPropertyChanged();
2565 /// Gets or sets the position Y of the view.
2567 /// <since_tizen> 3 </since_tizen>
2568 public float PositionY
2572 return (float)GetValue(PositionYProperty);
2576 SetValue(PositionYProperty, value);
2577 NotifyPropertyChanged();
2582 /// Gets or sets the position Z of the view.
2584 /// <since_tizen> 3 </since_tizen>
2585 public float PositionZ
2589 return (float)GetValue(PositionZProperty);
2593 SetValue(PositionZProperty, value);
2594 NotifyPropertyChanged();
2599 /// Gets or sets the world position of the view.
2601 /// <since_tizen> 3 </since_tizen>
2602 public Vector3 WorldPosition
2606 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2607 GetProperty(View.Property.WORLD_POSITION).Get(temp);
2613 /// Gets or sets the orientation of the view.<br />
2614 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
2616 /// <remarks>This is an asynchronous method.</remarks>
2617 /// <since_tizen> 3 </since_tizen>
2618 public Rotation Orientation
2622 return (Rotation)GetValue(OrientationProperty);
2626 SetValue(OrientationProperty, value);
2627 NotifyPropertyChanged();
2632 /// Gets or sets the world orientation of the view.<br />
2634 /// <since_tizen> 3 </since_tizen>
2635 public Rotation WorldOrientation
2639 Rotation temp = new Rotation();
2640 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
2646 /// Gets or sets the scale factor applied to the view.<br />
2648 /// <since_tizen> 3 </since_tizen>
2649 public Vector3 Scale
2653 return (Vector3)GetValue(ScaleProperty);
2657 SetValue(ScaleProperty, value);
2658 NotifyPropertyChanged();
2663 /// Gets or sets the scale X factor applied to the view.
2665 /// <since_tizen> 3 </since_tizen>
2670 return (float)GetValue(ScaleXProperty);
2674 SetValue(ScaleXProperty, value);
2675 NotifyPropertyChanged();
2680 /// Gets or sets the scale Y factor applied to the view.
2682 /// <since_tizen> 3 </since_tizen>
2687 return (float)GetValue(ScaleYProperty);
2691 SetValue(ScaleYProperty, value);
2692 NotifyPropertyChanged();
2697 /// Gets or sets the scale Z factor applied to the view.
2699 /// <since_tizen> 3 </since_tizen>
2704 return (float)GetValue(ScaleZProperty);
2708 SetValue(ScaleZProperty, value);
2709 NotifyPropertyChanged();
2714 /// Gets the world scale of the view.
2716 /// <since_tizen> 3 </since_tizen>
2717 public Vector3 WorldScale
2721 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2722 GetProperty(View.Property.WORLD_SCALE).Get(temp);
2728 /// Retrieves the visibility flag of the view.
2731 /// If the view is not visible, then the view and its children will not be rendered.
2732 /// 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.
2734 /// <since_tizen> 3 </since_tizen>
2735 public bool Visibility
2740 GetProperty(View.Property.VISIBLE).Get(out temp);
2746 /// Gets the view's world color.
2748 /// <since_tizen> 3 </since_tizen>
2749 public Vector4 WorldColor
2753 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2754 GetProperty(View.Property.WORLD_COLOR).Get(temp);
2760 /// Gets or sets the view's name.
2762 /// <since_tizen> 3 </since_tizen>
2767 return (string)GetValue(NameProperty);
2771 SetValue(NameProperty, value);
2772 NotifyPropertyChanged();
2777 /// Get the number of children held by the view.
2779 /// <since_tizen> 3 </since_tizen>
2780 public new uint ChildCount
2784 return GetChildCount();
2789 /// Gets the view's ID.
2792 /// <since_tizen> 3 </since_tizen>
2802 /// Gets or sets the status of whether the view should emit touch or hover signals.
2804 /// <since_tizen> 3 </since_tizen>
2805 public bool Sensitive
2809 return (bool)GetValue(SensitiveProperty);
2813 SetValue(SensitiveProperty, value);
2814 NotifyPropertyChanged();
2819 /// 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.
2821 /// <since_tizen> 3 </since_tizen>
2822 public bool LeaveRequired
2826 return (bool)GetValue(LeaveRequiredProperty);
2830 SetValue(LeaveRequiredProperty, value);
2831 NotifyPropertyChanged();
2836 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2838 /// <since_tizen> 3 </since_tizen>
2839 public bool InheritOrientation
2843 return (bool)GetValue(InheritOrientationProperty);
2847 SetValue(InheritOrientationProperty, value);
2848 NotifyPropertyChanged();
2853 /// Gets or sets the status of whether a child view inherits it's parent's scale.
2855 /// <since_tizen> 3 </since_tizen>
2856 public bool InheritScale
2860 return (bool)GetValue(InheritScaleProperty);
2864 SetValue(InheritScaleProperty, value);
2865 NotifyPropertyChanged();
2870 /// Gets or sets the status of how the view and its children should be drawn.<br />
2871 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2872 /// 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 />
2873 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2874 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2875 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2877 /// <since_tizen> 3 </since_tizen>
2878 public DrawModeType DrawMode
2882 return (DrawModeType)GetValue(DrawModeProperty);
2886 SetValue(DrawModeProperty, value);
2887 NotifyPropertyChanged();
2892 /// Gets or sets the relative to parent size factor of the view.<br />
2893 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2894 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2896 /// <since_tizen> 3 </since_tizen>
2897 public Vector3 SizeModeFactor
2901 return (Vector3)GetValue(SizeModeFactorProperty);
2905 SetValue(SizeModeFactorProperty, value);
2906 NotifyPropertyChanged();
2911 /// Gets or sets the width resize policy to be used.
2913 /// <since_tizen> 3 </since_tizen>
2914 public ResizePolicyType WidthResizePolicy
2918 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2922 SetValue(WidthResizePolicyProperty, value);
2923 // Match ResizePolicy to new Layouting.
2924 // Parent relative policies can not be mapped at this point as parent size unknown.
2927 case ResizePolicyType.UseNaturalSize:
2929 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
2932 case ResizePolicyType.FillToParent:
2934 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.MatchParent));
2937 case ResizePolicyType.FitToChildren:
2939 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.WrapContent));
2945 NotifyPropertyChanged();
2950 /// Gets or sets the height resize policy to be used.
2952 /// <since_tizen> 3 </since_tizen>
2953 public ResizePolicyType HeightResizePolicy
2957 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
2961 SetValue(HeightResizePolicyProperty, value);
2962 // Match ResizePolicy to new Layouting.
2963 // Parent relative policies can not be mapped at this point as parent size unknown.
2966 case ResizePolicyType.UseNaturalSize:
2968 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
2971 case ResizePolicyType.FillToParent:
2973 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.MatchParent));
2976 case ResizePolicyType.FitToChildren:
2978 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.WrapContent));
2984 NotifyPropertyChanged();
2989 /// Gets or sets the policy to use when setting size with size negotiation.<br />
2990 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
2992 /// <since_tizen> 3 </since_tizen>
2993 public SizeScalePolicyType SizeScalePolicy
2997 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
3001 SetValue(SizeScalePolicyProperty, value);
3002 NotifyPropertyChanged();
3007 /// Gets or sets the status of whether the width size is dependent on the height size.
3009 /// <since_tizen> 3 </since_tizen>
3010 public bool WidthForHeight
3014 return (bool)GetValue(WidthForHeightProperty);
3018 SetValue(WidthForHeightProperty, value);
3019 NotifyPropertyChanged();
3024 /// Gets or sets the status of whether the height size is dependent on the width size.
3026 /// <since_tizen> 3 </since_tizen>
3027 public bool HeightForWidth
3031 return (bool)GetValue(HeightForWidthProperty);
3035 SetValue(HeightForWidthProperty, value);
3036 NotifyPropertyChanged();
3041 /// Gets or sets the padding for use in layout.
3043 /// <since_tizen> 5 </since_tizen>
3044 public Extents Padding
3048 return (Extents)GetValue(PaddingProperty);
3052 SetValue(PaddingProperty, value);
3053 NotifyPropertyChanged();
3058 /// Gets or sets the minimum size the view can be assigned in size negotiation.
3060 /// <since_tizen> 3 </since_tizen>
3061 public Size2D MinimumSize
3065 return (Size2D)GetValue(MinimumSizeProperty);
3071 // Note: it only works if minimum size is >= than natural size.
3072 // To force the size it should be done through the width&height spec or Size2D.
3073 Layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
3074 Layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
3076 SetValue(MinimumSizeProperty, value);
3077 NotifyPropertyChanged();
3082 /// Gets or sets the maximum size the view can be assigned in size negotiation.
3084 /// <since_tizen> 3 </since_tizen>
3085 public Size2D MaximumSize
3089 return (Size2D)GetValue(MaximumSizeProperty);
3093 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
3094 // MATCH_PARENT spec + parent container size can be used to limit
3095 SetValue(MaximumSizeProperty, value);
3096 NotifyPropertyChanged();
3101 /// Gets or sets whether a child view inherits it's parent's position.<br />
3102 /// Default is to inherit.<br />
3103 /// 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 />
3105 /// <since_tizen> 3 </since_tizen>
3106 public bool InheritPosition
3110 return (bool)GetValue(InheritPositionProperty);
3114 SetValue(InheritPositionProperty, value);
3115 NotifyPropertyChanged();
3120 /// Gets or sets the clipping behavior (mode) of it's children.
3122 /// <since_tizen> 3 </since_tizen>
3123 public ClippingModeType ClippingMode
3127 return (ClippingModeType)GetValue(ClippingModeProperty);
3131 SetValue(ClippingModeProperty, value);
3132 NotifyPropertyChanged();
3137 /// Gets the number of renderers held by the view.
3139 /// <since_tizen> 3 </since_tizen>
3140 public uint RendererCount
3144 return GetRendererCount();
3149 /// [Obsolete("Please do not use! this will be deprecated")]
3151 /// <since_tizen> 3 </since_tizen>
3152 /// Please do not use! this will be deprecated!
3153 /// Instead please use PivotPoint.
3154 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
3156 "View view = new View(); " +
3157 "view.PivotPoint = PivotPoint.Center; " +
3158 "view.PositionUsesPivotPoint = true;")]
3159 [EditorBrowsable(EditorBrowsableState.Never)]
3160 public Position AnchorPoint
3164 Position temp = new Position(0.0f, 0.0f, 0.0f);
3165 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3170 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3171 NotifyPropertyChanged();
3176 /// Sets the size of a view for the width, the height and the depth.<br />
3177 /// Geometry can be scaled to fit within this area.<br />
3178 /// This does not interfere with the view's scale factor.<br />
3179 /// The views default depth is the minimum of width and height.<br />
3182 /// Please note that multi-cascade setting is not possible for this NUI object. <br />
3183 /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3184 /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
3185 /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
3186 /// 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 />
3188 /// <since_tizen> 5 </since_tizen>
3193 return (Size)GetValue(SizeProperty);
3197 SetValue(SizeProperty, value);
3198 // Set Specification so when layouts measure this View it matches the value set here.
3199 // All Views are currently Layouts.
3200 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
3201 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
3202 NotifyPropertyChanged();
3207 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
3209 /// <since_tizen> 3 </since_tizen>
3210 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
3212 "Container parent = view.GetParent(); " +
3213 "View view = parent as View;")]
3214 [EditorBrowsable(EditorBrowsableState.Never)]
3215 public new View Parent
3220 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
3221 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3222 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3224 if (basehandle is Layer layer)
3226 ret = new View(Layer.getCPtr(layer).Handle, false);
3227 NUILog.Error("This Parent property is deprecated, shoud do not be used");
3231 ret = basehandle as View;
3234 NDalicPINVOKE.delete_BaseHandle(CPtr);
3235 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3237 if (NDalicPINVOKE.SWIGPendingException.Pending)
3238 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3244 /// Gets/Sets whether inherit parent's the layout Direction.
3246 /// <since_tizen> 4 </since_tizen>
3247 public bool InheritLayoutDirection
3251 return (bool)GetValue(InheritLayoutDirectionProperty);
3255 SetValue(InheritLayoutDirectionProperty, value);
3256 NotifyPropertyChanged();
3261 /// Gets/Sets the layout Direction.
3263 /// <since_tizen> 4 </since_tizen>
3264 public ViewLayoutDirectionType LayoutDirection
3268 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
3272 SetValue(LayoutDirectionProperty, value);
3273 NotifyPropertyChanged();
3278 /// Gets or sets the Margin for use in layout.
3281 /// Margin property is supported by Layout algorithms and containers.
3282 /// Please Set Layout if you want to use Margin property.
3284 /// <since_tizen> 4 </since_tizen>
3285 public Extents Margin
3289 return (Extents)GetValue(MarginProperty);
3293 SetValue(MarginProperty, value);
3294 NotifyPropertyChanged();
3299 /// [Obsolete("Please do not use! this will be deprecated")]
3301 /// Please do not use! this will be deprecated!
3302 /// Instead please use Padding.
3303 /// <since_tizen> 4 </since_tizen>
3304 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
3305 [EditorBrowsable(EditorBrowsableState.Never)]
3306 public Extents PaddingEX
3310 Extents temp = new Extents(0, 0, 0, 0);
3311 GetProperty(View.Property.PADDING).Get(temp);
3316 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3317 NotifyPropertyChanged();
3321 internal Style Style
3325 return (Style)GetValue(StyleProperty);
3329 SetValue(StyleProperty, value);
3334 /// Child property to specify desired width
3336 internal int LayoutWidthSpecificationFixed
3341 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
3343 NUILog.Error("WidthSpecificationFixed get error!");
3349 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
3354 /// Child property to specify desired height
3356 internal int LayoutHeightSpecificationFixed
3361 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
3363 NUILog.Error("HeightSpecificationFixed get error!");
3369 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
3374 /// Child property to specify desired width, use MatchParent/WrapContent)
3376 internal ChildLayoutData LayoutWidthSpecification
3381 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
3383 NUILog.Error("WidthSpecificationFixed get error!");
3385 return (ChildLayoutData)tmp;
3389 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
3394 /// Child property to specify desired height, use MatchParent/WrapContent)
3396 internal ChildLayoutData LayoutHeightSpecification
3401 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
3403 NUILog.Error("HeightSpecificationFixed get error!");
3405 return (ChildLayoutData)tmp;
3409 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
3413 internal float Weight
3417 return (float)GetValue(WeightProperty);
3421 SetValue(WeightProperty, value);
3422 NotifyPropertyChanged();
3426 internal bool BackgroundImageSynchronosLoading
3430 return _backgroundImageSynchronosLoading;
3434 if (value != _backgroundImageSynchronosLoading)
3437 PropertyMap bgMap = this.Background;
3439 bgMap.Find(Visual.Property.Type)?.Get(out visualType);
3440 if (visualType == (int)Visual.Type.Image)
3442 bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
3444 if (bgUrl.Length != 0)
3446 _backgroundImageSynchronosLoading = value;
3447 bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
3448 this.Background = bgMap;
3454 internal float WorldPositionX
3459 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3464 internal float WorldPositionY
3469 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3474 internal float WorldPositionZ
3479 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3484 internal bool FocusState
3488 return IsKeyboardFocusable();
3492 SetKeyboardFocusable(value);
3497 /// Set the layout on this control.
3501 internal LayoutItem Layout
3505 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
3507 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3508 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3509 NDalicPINVOKE.delete_BaseHandle(CPtr);
3510 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3512 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3514 return basehandle as LayoutItem;
3518 Log.Info("NUI", "Set Layout on:" + Name + "\n");
3519 layoutingDisabled = false;
3526 /// Set that layouting is required on this View. It will automatically receive a Layout.
3530 internal bool LayoutingRequired
3534 bool result = Tizen.NUI.NDalicManualPINVOKE.View_IsLayoutingRequired(View.getCPtr(this));
3535 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3540 Tizen.NUI.NDalicManualPINVOKE.View_SetLayoutingRequired(View.getCPtr(this), value);
3544 internal float ParentOriginX
3549 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3554 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3555 NotifyPropertyChanged();
3559 internal float ParentOriginY
3564 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3569 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3570 NotifyPropertyChanged();
3574 internal float ParentOriginZ
3579 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3584 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3585 NotifyPropertyChanged();
3589 internal float PivotPointX
3594 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3599 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3603 internal float PivotPointY
3608 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3613 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3617 internal float PivotPointZ
3622 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3627 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3631 internal Matrix WorldMatrix
3635 Matrix temp = new Matrix();
3636 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3641 private int LeftFocusableViewId
3646 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
3651 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3655 private int RightFocusableViewId
3660 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
3665 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3669 private int UpFocusableViewId
3674 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
3679 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3683 private int DownFocusableViewId
3688 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
3693 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3698 /// Perform an action on a visual registered to this view. <br />
3699 /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
3701 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
3702 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
3703 /// <param name="attributes">Optional attributes for the action.</param>
3704 /// <since_tizen> 5 </since_tizen>
3705 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
3707 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
3708 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3712 /// Creates an animation to animate the background color visual. If there is no
3713 /// background visual, creates one with transparent black as it's mixColor.
3715 /// <since_tizen> 3 </since_tizen>
3716 public Animation AnimateBackgroundColor(object destinationValue,
3719 AlphaFunction.BuiltinFunctions? alphaFunction = null,
3720 object initialValue = null)
3722 Tizen.NUI.PropertyMap background = Background;
3724 if (background.Empty())
3726 // If there is no background yet, ensure there is a transparent
3728 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
3729 background = Background;
3731 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
3735 /// Creates an animation to animate the mixColor of the named visual.
3737 /// <since_tizen> 3 </since_tizen>
3738 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
3740 Animation animation = null;
3742 PropertyMap _animator = new PropertyMap();
3743 if (alphaFunction != null)
3745 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
3748 PropertyMap _timePeriod = new PropertyMap();
3749 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
3750 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
3751 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
3753 PropertyMap _transition = new PropertyMap();
3754 _transition.Add("animator", new PropertyValue(_animator));
3755 _transition.Add("target", new PropertyValue(targetVisual));
3756 _transition.Add("property", new PropertyValue("mixColor"));
3758 if (initialColor != null)
3760 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
3761 _transition.Add("initialValue", initValue);
3764 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
3765 _transition.Add("targetValue", destValue);
3766 TransitionData _transitionData = new TransitionData(_transition);
3768 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
3769 if (NDalicPINVOKE.SWIGPendingException.Pending)
3770 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3775 // From Container Base class
3777 /// Adds a child view to this view.
3779 /// <seealso cref="Container.Add" />
3780 /// <since_tizen> 4 </since_tizen>
3781 public override void Add(View child)
3785 Tizen.Log.Fatal("NUI", "Child is null");
3789 Log.Info("NUI", "Adding Child:" + child.Name + " to " + Name + "\n");
3791 Container oldParent = child.GetParent();
3792 if (oldParent != this)
3794 if (oldParent != null)
3796 oldParent.Remove(child);
3798 child.InternalParent = this;
3800 // Only give children a layout if their parent is an explicit container or a pure View.
3801 // Pure View meaning not derived from a View, e.g a Legacy container.
3802 // layoutSet flag is true when the View became a layout using the set Layout API opposed to automatically due to it's parent.
3803 // First time the set Layout API is used by any View the Window no longer has layoutingDisabled.
3804 if ((true == layoutSet || GetType() == typeof(View)) && null == child.Layout && false == layoutingDisabled)
3806 Log.Info("NUI", "Parent[" + Name + "] Layout set[" + layoutSet.ToString() + "] Pure View[" + (!layoutSet).ToString() + "]\n");
3807 // If child is a View or explicitly set to require layouting then set child as a LayoutGroup.
3808 // If the child is derived from a View then it may be a legacy or existing container hence will do layouting itself.
3809 if (child.GetType() == typeof(View) || true == child.LayoutingRequired)
3811 Log.Info("NUI", "Creating LayoutGroup for " + child.Name + " LayoutingRequired[" + child.LayoutingRequired.ToString() + "]\n");
3812 child.SetLayout(new LayoutGroup());
3816 // Adding child as a leaf, layouting will not propagate past this child.
3817 // Legacy containers will be a LayoutItems too and layout their children how they wish.
3818 Log.Info("NUI", "Creating LayoutItem for " + child.Name + "\n");
3819 child.SetLayout(new LayoutItem());
3825 Layout.LayoutChildren.Add(child.Layout);
3828 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
3829 if (NDalicPINVOKE.SWIGPendingException.Pending)
3830 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3831 Children.Add(child);
3833 if (ChildAdded != null)
3835 ChildAddedEventArgs e = new ChildAddedEventArgs
3839 ChildAdded(this, e);
3845 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
3847 /// <seealso cref="Container.Remove" />
3848 /// <since_tizen> 4 </since_tizen>
3849 public override void Remove(View child)
3851 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
3852 if (NDalicPINVOKE.SWIGPendingException.Pending)
3853 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3855 Children.Remove(child);
3856 child.InternalParent = null;
3862 Layout.LayoutChildren.Remove(child.Layout);
3866 if (ChildRemoved != null)
3868 ChildRemovedEventArgs e = new ChildRemovedEventArgs
3872 ChildRemoved(this, e);
3877 /// Retrieves a child view by index.
3879 /// <seealso cref="Container.GetChildAt" />
3880 /// <since_tizen> 4 </since_tizen>
3881 public override View GetChildAt(uint index)
3883 if (index < Children.Count)
3885 return Children[Convert.ToInt32(index)];
3894 /// Retrieves the number of children held by the view.
3896 /// <seealso cref="Container.GetChildCount" />
3897 /// <since_tizen> 4 </since_tizen>
3898 public override uint GetChildCount()
3900 return Convert.ToUInt32(Children.Count);
3904 /// Gets the views parent.
3906 /// <seealso cref="Container.GetParent()" />
3907 /// <since_tizen> 4 </since_tizen>
3908 public override Container GetParent()
3910 return this.InternalParent as Container;
3914 /// Queries whether the view has a focus.
3916 /// <returns>True if this view has a focus.</returns>
3917 /// <since_tizen> 3 </since_tizen>
3918 public bool HasFocus()
3920 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
3921 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3926 /// Sets the name of the style to be applied to the view.
3928 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
3929 /// <since_tizen> 3 </since_tizen>
3930 public void SetStyleName(string styleName)
3932 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
3933 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3937 /// Retrieves the name of the style to be applied to the view (if any).
3939 /// <returns>A string matching a style, or an empty string.</returns>
3940 /// <since_tizen> 3 </since_tizen>
3941 public string GetStyleName()
3943 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
3944 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3949 /// Clears the background.
3951 /// <since_tizen> 3 </since_tizen>
3952 public void ClearBackground()
3954 NDalicPINVOKE.View_ClearBackground(swigCPtr);
3955 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3962 /// This is an asynchronous method.
3964 /// <since_tizen> 3 </since_tizen>
3974 /// This is an asynchronous method.
3975 /// If the view is hidden, then the view and its children will not be rendered.
3976 /// 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.
3978 /// <since_tizen> 3 </since_tizen>
3985 /// Raises the view above all other views.
3988 /// Sibling order of views within the parent will be updated automatically.
3989 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
3991 /// <since_tizen> 3 </since_tizen>
3992 public void RaiseToTop()
3994 var parentChildren = GetParent()?.Children;
3996 if (parentChildren != null)
3998 parentChildren.Remove(this);
3999 parentChildren.Add(this);
4001 NDalicPINVOKE.RaiseToTop(swigCPtr);
4002 if (NDalicPINVOKE.SWIGPendingException.Pending)
4003 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4009 /// Lowers the view to the bottom of all views.
4012 /// The sibling order of views within the parent will be updated automatically.
4013 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4015 /// <since_tizen> 3 </since_tizen>
4016 public void LowerToBottom()
4018 var parentChildren = GetParent()?.Children;
4020 if (parentChildren != null)
4022 parentChildren.Remove(this);
4023 parentChildren.Insert(0, this);
4025 NDalicPINVOKE.LowerToBottom(swigCPtr);
4026 if (NDalicPINVOKE.SWIGPendingException.Pending)
4027 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4032 /// Queries if all resources required by a view are loaded and ready.
4034 /// <remarks>Most resources are only loaded when the control is placed on the stage.
4036 /// <since_tizen> 3 </since_tizen>
4037 public bool IsResourceReady()
4039 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
4040 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4045 /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
4047 /// <pre>The view has been initialized. </pre>
4048 /// <returns>The parent layer of view </returns>
4049 /// <since_tizen> 5 </since_tizen>
4050 public Layer GetLayer()
4052 //to fix memory leak issue, match the handle count with native side.
4053 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
4054 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4055 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
4056 NDalicPINVOKE.delete_BaseHandle(CPtr);
4057 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4059 if (NDalicPINVOKE.SWIGPendingException.Pending)
4060 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4065 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
4067 /// <pre>The (child) view has been initialized. </pre>
4068 /// <since_tizen> 4 </since_tizen>
4069 public void Unparent()
4071 GetParent()?.Remove(this);
4075 /// Search through this view's hierarchy for a view with the given name.
4076 /// The view itself is also considered in the search.
4078 /// <pre>The view has been initialized.</pre>
4079 /// <param name="viewName">The name of the view to find.</param>
4080 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
4081 /// <since_tizen> 3 </since_tizen>
4082 public View FindChildByName(string viewName)
4084 //to fix memory leak issue, match the handle count with native side.
4085 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
4086 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4087 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4088 NDalicPINVOKE.delete_BaseHandle(CPtr);
4089 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4091 if (NDalicPINVOKE.SWIGPendingException.Pending)
4092 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4097 /// Converts screen coordinates into the view's coordinate system using the default camera.
4099 /// <pre>The view has been initialized.</pre>
4100 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4101 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4102 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4103 /// <param name="screenX">The screen X-coordinate.</param>
4104 /// <param name="screenY">The screen Y-coordinate.</param>
4105 /// <returns>True if the conversion succeeded.</returns>
4106 /// <since_tizen> 3 </since_tizen>
4107 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4109 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4110 if (NDalicPINVOKE.SWIGPendingException.Pending)
4111 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4116 /// Sets the relative to parent size factor of the view.<br />
4117 /// This factor is only used when ResizePolicy is set to either:
4118 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4119 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4121 /// <pre>The view has been initialized.</pre>
4122 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4123 /// <since_tizen> 3 </since_tizen>
4124 public void SetSizeModeFactor(Vector3 factor)
4126 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4127 if (NDalicPINVOKE.SWIGPendingException.Pending)
4128 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4131 /// Calculates the height of the view given a width.<br />
4132 /// The natural size is used for default calculation.<br />
4133 /// Size 0 is treated as aspect ratio 1:1.<br />
4135 /// <param name="width">The width to use.</param>
4136 /// <returns>The height based on the width.</returns>
4137 /// <since_tizen> 3 </since_tizen>
4138 public float GetHeightForWidth(float width)
4140 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
4141 if (NDalicPINVOKE.SWIGPendingException.Pending)
4142 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4147 /// Calculates the width of the view given a height.<br />
4148 /// The natural size is used for default calculation.<br />
4149 /// Size 0 is treated as aspect ratio 1:1.<br />
4151 /// <param name="height">The height to use.</param>
4152 /// <returns>The width based on the height.</returns>
4153 /// <since_tizen> 3 </since_tizen>
4154 public float GetWidthForHeight(float height)
4156 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
4157 if (NDalicPINVOKE.SWIGPendingException.Pending)
4158 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4163 /// Return the amount of size allocated for relayout.
4165 /// <param name="dimension">The dimension to retrieve.</param>
4166 /// <returns>Return the size.</returns>
4167 /// <since_tizen> 3 </since_tizen>
4168 public float GetRelayoutSize(DimensionType dimension)
4170 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4171 if (NDalicPINVOKE.SWIGPendingException.Pending)
4172 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4177 /// Set the padding for the view.
4179 /// <param name="padding">Padding for the view.</param>
4180 /// <since_tizen> 3 </since_tizen>
4181 public void SetPadding(PaddingType padding)
4183 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4184 if (NDalicPINVOKE.SWIGPendingException.Pending)
4185 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4189 /// Return the value of padding for the view.
4191 /// <param name="paddingOut">the value of padding for the view</param>
4192 /// <since_tizen> 3 </since_tizen>
4193 public void GetPadding(PaddingType paddingOut)
4195 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4196 if (NDalicPINVOKE.SWIGPendingException.Pending)
4197 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4200 /// <since_tizen> 3 </since_tizen>
4201 public uint AddRenderer(Renderer renderer)
4203 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4204 if (NDalicPINVOKE.SWIGPendingException.Pending)
4205 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4209 /// <since_tizen> 3 </since_tizen>
4210 public Renderer GetRendererAt(uint index)
4212 //to fix memory leak issue, match the handle count with native side.
4213 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
4214 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4215 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4216 if (cPtr != null && ret == null)
4218 ret = new Renderer(cPtr, false);
4219 if (NDalicPINVOKE.SWIGPendingException.Pending)
4220 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4223 NDalicPINVOKE.delete_BaseHandle(CPtr);
4224 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4226 if (NDalicPINVOKE.SWIGPendingException.Pending)
4227 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4231 /// <since_tizen> 3 </since_tizen>
4232 public void RemoveRenderer(Renderer renderer)
4234 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4235 if (NDalicPINVOKE.SWIGPendingException.Pending)
4236 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4239 /// <since_tizen> 3 </since_tizen>
4240 public void RemoveRenderer(uint index)
4242 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4243 if (NDalicPINVOKE.SWIGPendingException.Pending)
4244 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4247 internal void Raise()
4249 var parentChildren = GetParent()?.Children;
4251 if (parentChildren != null)
4253 int currentIndex = parentChildren.IndexOf(this);
4255 // If the view is not already the last item in the list.
4256 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
4258 View temp = parentChildren[currentIndex + 1];
4259 parentChildren[currentIndex + 1] = this;
4260 parentChildren[currentIndex] = temp;
4262 NDalicPINVOKE.Raise(swigCPtr);
4263 if (NDalicPINVOKE.SWIGPendingException.Pending)
4264 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4269 internal void Lower()
4271 var parentChildren = GetParent()?.Children;
4273 if (parentChildren != null)
4275 int currentIndex = parentChildren.IndexOf(this);
4277 // If the view is not already the first item in the list.
4278 if (currentIndex > 0 && currentIndex < parentChildren.Count)
4280 View temp = parentChildren[currentIndex - 1];
4281 parentChildren[currentIndex - 1] = this;
4282 parentChildren[currentIndex] = temp;
4284 NDalicPINVOKE.Lower(swigCPtr);
4285 if (NDalicPINVOKE.SWIGPendingException.Pending)
4286 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4292 /// Raises the view to above the target view.
4294 /// <remarks>The sibling order of views within the parent will be updated automatically.
4295 /// Views on the level above the target view will still be shown above this view.
4296 /// Raising this view above views with the same sibling order as each other will raise this view above them.
4297 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4299 /// <param name="target">Will be raised above this view.</param>
4300 internal void RaiseAbove(View target)
4302 var parentChildren = GetParent()?.Children;
4304 if (parentChildren != null)
4306 int currentIndex = parentChildren.IndexOf(this);
4307 int targetIndex = parentChildren.IndexOf(target);
4309 if (currentIndex < 0 || targetIndex < 0 ||
4310 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4312 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4315 // If the currentIndex is less than the target index and the target has the same parent.
4316 if (currentIndex < targetIndex)
4318 parentChildren.Remove(this);
4319 parentChildren.Insert(targetIndex, this);
4321 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
4322 if (NDalicPINVOKE.SWIGPendingException.Pending)
4323 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4330 /// Lowers the view to below the target view.
4332 /// <remarks>The sibling order of views within the parent will be updated automatically.
4333 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
4334 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4336 /// <param name="target">Will be lowered below this view.</param>
4337 internal void LowerBelow(View target)
4339 var parentChildren = GetParent()?.Children;
4341 if (parentChildren != null)
4343 int currentIndex = parentChildren.IndexOf(this);
4344 int targetIndex = parentChildren.IndexOf(target);
4345 if (currentIndex < 0 || targetIndex < 0 ||
4346 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4348 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4352 // If the currentIndex is not already the 0th index and the target has the same parent.
4353 if ((currentIndex != 0) && (targetIndex != -1) &&
4354 (currentIndex > targetIndex))
4356 parentChildren.Remove(this);
4357 parentChildren.Insert(targetIndex, this);
4359 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
4360 if (NDalicPINVOKE.SWIGPendingException.Pending)
4361 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4367 internal string GetName()
4369 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
4370 if (NDalicPINVOKE.SWIGPendingException.Pending)
4371 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4375 internal void SetName(string name)
4377 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
4378 if (NDalicPINVOKE.SWIGPendingException.Pending)
4379 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4382 internal uint GetId()
4384 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
4385 if (NDalicPINVOKE.SWIGPendingException.Pending)
4386 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4390 internal bool IsRoot()
4392 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
4393 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4397 internal bool OnWindow()
4399 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
4400 if (NDalicPINVOKE.SWIGPendingException.Pending)
4401 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4405 internal View FindChildById(uint id)
4407 //to fix memory leak issue, match the handle count with native side.
4408 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
4409 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4410 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4411 NDalicPINVOKE.delete_BaseHandle(CPtr);
4412 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4414 if (NDalicPINVOKE.SWIGPendingException.Pending)
4415 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4419 internal void SetParentOrigin(Vector3 origin)
4421 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
4422 if (NDalicPINVOKE.SWIGPendingException.Pending)
4423 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4426 internal Vector3 GetCurrentParentOrigin()
4428 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
4429 if (NDalicPINVOKE.SWIGPendingException.Pending)
4430 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4434 internal void SetAnchorPoint(Vector3 anchorPoint)
4436 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
4437 if (NDalicPINVOKE.SWIGPendingException.Pending)
4438 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4441 internal Vector3 GetCurrentAnchorPoint()
4443 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
4444 if (NDalicPINVOKE.SWIGPendingException.Pending)
4445 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4449 internal void SetSize(float width, float height)
4451 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
4452 if (NDalicPINVOKE.SWIGPendingException.Pending)
4453 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4456 internal void SetSize(float width, float height, float depth)
4458 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
4459 if (NDalicPINVOKE.SWIGPendingException.Pending)
4460 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4463 internal void SetSize(Vector2 size)
4465 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
4466 if (NDalicPINVOKE.SWIGPendingException.Pending)
4467 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4470 internal void SetSize(Vector3 size)
4472 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
4473 if (NDalicPINVOKE.SWIGPendingException.Pending)
4474 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4477 internal Vector3 GetTargetSize()
4479 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
4480 if (NDalicPINVOKE.SWIGPendingException.Pending)
4481 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4485 internal Size2D GetCurrentSize()
4487 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
4488 if (NDalicPINVOKE.SWIGPendingException.Pending)
4489 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4490 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
4494 internal Vector3 GetNaturalSize()
4496 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
4497 if (NDalicPINVOKE.SWIGPendingException.Pending)
4498 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4502 internal void SetPosition(float x, float y)
4504 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
4505 if (NDalicPINVOKE.SWIGPendingException.Pending)
4506 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4509 internal void SetPosition(float x, float y, float z)
4511 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
4512 if (NDalicPINVOKE.SWIGPendingException.Pending)
4513 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4516 internal void SetPosition(Vector3 position)
4518 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
4519 if (NDalicPINVOKE.SWIGPendingException.Pending)
4520 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4523 internal void SetX(float x)
4525 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
4526 if (NDalicPINVOKE.SWIGPendingException.Pending)
4527 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4530 internal void SetY(float y)
4532 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
4533 if (NDalicPINVOKE.SWIGPendingException.Pending)
4534 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4537 internal void SetZ(float z)
4539 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
4540 if (NDalicPINVOKE.SWIGPendingException.Pending)
4541 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4544 internal void TranslateBy(Vector3 distance)
4546 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
4547 if (NDalicPINVOKE.SWIGPendingException.Pending)
4548 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4551 internal Position GetCurrentPosition()
4553 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
4554 if (NDalicPINVOKE.SWIGPendingException.Pending)
4555 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4559 internal Vector3 GetCurrentWorldPosition()
4561 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
4562 if (NDalicPINVOKE.SWIGPendingException.Pending)
4563 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4567 internal void SetInheritPosition(bool inherit)
4569 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
4570 if (NDalicPINVOKE.SWIGPendingException.Pending)
4571 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4574 internal bool IsPositionInherited()
4576 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
4577 if (NDalicPINVOKE.SWIGPendingException.Pending)
4578 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4582 internal void SetOrientation(Degree angle, Vector3 axis)
4584 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4585 if (NDalicPINVOKE.SWIGPendingException.Pending)
4586 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4589 internal void SetOrientation(Radian angle, Vector3 axis)
4591 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4592 if (NDalicPINVOKE.SWIGPendingException.Pending)
4593 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4596 internal void SetOrientation(Rotation orientation)
4598 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
4599 if (NDalicPINVOKE.SWIGPendingException.Pending)
4600 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4603 internal void RotateBy(Degree angle, Vector3 axis)
4605 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4606 if (NDalicPINVOKE.SWIGPendingException.Pending)
4607 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4610 internal void RotateBy(Radian angle, Vector3 axis)
4612 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4613 if (NDalicPINVOKE.SWIGPendingException.Pending)
4614 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4617 internal void RotateBy(Rotation relativeRotation)
4619 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4620 if (NDalicPINVOKE.SWIGPendingException.Pending)
4621 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4624 internal Rotation GetCurrentOrientation()
4626 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
4627 if (NDalicPINVOKE.SWIGPendingException.Pending)
4628 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4632 internal void SetInheritOrientation(bool inherit)
4634 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
4635 if (NDalicPINVOKE.SWIGPendingException.Pending)
4636 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4639 internal bool IsOrientationInherited()
4641 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
4642 if (NDalicPINVOKE.SWIGPendingException.Pending)
4643 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4647 internal Rotation GetCurrentWorldOrientation()
4649 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4650 if (NDalicPINVOKE.SWIGPendingException.Pending)
4651 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4655 internal void SetScale(float scale)
4657 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
4658 if (NDalicPINVOKE.SWIGPendingException.Pending)
4659 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4662 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4664 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4665 if (NDalicPINVOKE.SWIGPendingException.Pending)
4666 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4669 internal void SetScale(Vector3 scale)
4671 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4672 if (NDalicPINVOKE.SWIGPendingException.Pending)
4673 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4676 internal void ScaleBy(Vector3 relativeScale)
4678 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4679 if (NDalicPINVOKE.SWIGPendingException.Pending)
4680 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4683 internal Vector3 GetCurrentScale()
4685 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
4686 if (NDalicPINVOKE.SWIGPendingException.Pending)
4687 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4691 internal Vector3 GetCurrentWorldScale()
4693 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
4694 if (NDalicPINVOKE.SWIGPendingException.Pending)
4695 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4699 internal void SetInheritScale(bool inherit)
4701 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
4702 if (NDalicPINVOKE.SWIGPendingException.Pending)
4703 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4706 internal bool IsScaleInherited()
4708 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
4709 if (NDalicPINVOKE.SWIGPendingException.Pending)
4710 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4714 internal Matrix GetCurrentWorldMatrix()
4716 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4717 if (NDalicPINVOKE.SWIGPendingException.Pending)
4718 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4722 internal void SetVisible(bool visible)
4724 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
4725 if (NDalicPINVOKE.SWIGPendingException.Pending)
4726 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4729 internal bool IsVisible()
4731 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
4732 if (NDalicPINVOKE.SWIGPendingException.Pending)
4733 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4737 internal void SetOpacity(float opacity)
4739 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
4740 if (NDalicPINVOKE.SWIGPendingException.Pending)
4741 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4744 internal float GetCurrentOpacity()
4746 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
4747 if (NDalicPINVOKE.SWIGPendingException.Pending)
4748 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4752 internal void SetColor(Vector4 color)
4754 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4755 if (NDalicPINVOKE.SWIGPendingException.Pending)
4756 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4759 internal Vector4 GetCurrentColor()
4761 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
4762 if (NDalicPINVOKE.SWIGPendingException.Pending)
4763 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4767 internal void SetColorMode(ColorMode colorMode)
4769 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
4770 if (NDalicPINVOKE.SWIGPendingException.Pending)
4771 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4774 internal ColorMode GetColorMode()
4776 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
4777 if (NDalicPINVOKE.SWIGPendingException.Pending)
4778 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4782 internal Vector4 GetCurrentWorldColor()
4784 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
4785 if (NDalicPINVOKE.SWIGPendingException.Pending)
4786 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4790 internal void SetDrawMode(DrawModeType drawMode)
4792 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4793 if (NDalicPINVOKE.SWIGPendingException.Pending)
4794 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4797 internal DrawModeType GetDrawMode()
4799 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
4800 if (NDalicPINVOKE.SWIGPendingException.Pending)
4801 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4805 internal void SetKeyboardFocusable(bool focusable)
4807 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4808 if (NDalicPINVOKE.SWIGPendingException.Pending)
4809 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4812 internal bool IsKeyboardFocusable()
4814 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
4815 if (NDalicPINVOKE.SWIGPendingException.Pending)
4816 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4820 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4822 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4823 if (NDalicPINVOKE.SWIGPendingException.Pending)
4824 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4827 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4829 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4830 if (NDalicPINVOKE.SWIGPendingException.Pending)
4831 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4835 internal Vector3 GetSizeModeFactor()
4837 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
4838 if (NDalicPINVOKE.SWIGPendingException.Pending)
4839 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4843 internal void SetMinimumSize(Vector2 size)
4845 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4846 if (NDalicPINVOKE.SWIGPendingException.Pending)
4847 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4850 internal Vector2 GetMinimumSize()
4852 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
4853 if (NDalicPINVOKE.SWIGPendingException.Pending)
4854 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4858 internal void SetMaximumSize(Vector2 size)
4860 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4861 if (NDalicPINVOKE.SWIGPendingException.Pending)
4862 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4865 internal Vector2 GetMaximumSize()
4867 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
4868 if (NDalicPINVOKE.SWIGPendingException.Pending)
4869 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4873 internal int GetHierarchyDepth()
4875 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
4876 if (NDalicPINVOKE.SWIGPendingException.Pending)
4877 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4881 internal uint GetRendererCount()
4883 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
4884 if (NDalicPINVOKE.SWIGPendingException.Pending)
4885 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4889 internal TouchDataSignal TouchSignal()
4891 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
4892 if (NDalicPINVOKE.SWIGPendingException.Pending)
4893 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4897 internal HoverSignal HoveredSignal()
4899 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
4900 if (NDalicPINVOKE.SWIGPendingException.Pending)
4901 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4905 internal WheelSignal WheelEventSignal()
4907 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
4908 if (NDalicPINVOKE.SWIGPendingException.Pending)
4909 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4913 internal ViewSignal OnWindowSignal()
4915 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
4916 if (NDalicPINVOKE.SWIGPendingException.Pending)
4917 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4921 internal ViewSignal OffWindowSignal()
4923 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
4924 if (NDalicPINVOKE.SWIGPendingException.Pending)
4925 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4929 internal ViewSignal OnRelayoutSignal()
4931 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
4932 if (NDalicPINVOKE.SWIGPendingException.Pending)
4933 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4937 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
4939 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
4940 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4944 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
4946 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
4947 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4951 internal ViewSignal ResourcesLoadedSignal()
4953 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
4954 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4958 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
4960 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
4963 internal bool IsTopLevelView()
4965 if (GetParent() is Layer)
4972 internal void SetKeyInputFocus()
4974 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
4975 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4978 internal void ClearKeyInputFocus()
4980 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
4981 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4984 internal PinchGestureDetector GetPinchGestureDetector()
4986 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
4987 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4991 internal PanGestureDetector GetPanGestureDetector()
4993 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
4994 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4998 internal TapGestureDetector GetTapGestureDetector()
5000 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
5001 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5005 internal LongPressGestureDetector GetLongPressGestureDetector()
5007 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
5008 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5012 internal void SetBackgroundColor(Vector4 color)
5014 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
5015 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5018 internal Vector4 GetBackgroundColor()
5020 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
5021 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5025 internal void SetBackgroundImage(Image image)
5027 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
5028 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5031 internal ControlKeySignal KeyEventSignal()
5033 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
5034 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5038 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
5040 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
5041 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5045 internal KeyInputFocusSignal KeyInputFocusLostSignal()
5047 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
5048 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5052 internal IntPtr GetPtrfromView()
5054 return (IntPtr)swigCPtr;
5057 internal void SetLayout(LayoutItem layout)
5059 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(layout));
5060 layout.LayoutChildren.Clear();
5061 foreach (View view in Children)
5063 layout.LayoutChildren.Add(view.Layout);
5067 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5069 return (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5073 /// you can override it to clean-up your own resources.
5075 /// <param name="type">DisposeTypes</param>
5076 /// <since_tizen> 3 </since_tizen>
5077 protected override void Dispose(DisposeTypes type)
5084 if (type == DisposeTypes.Explicit)
5087 //Release your own managed resources here.
5088 //You should release all of your own disposable objects here.
5091 //Release your own unmanaged resources here.
5092 //You should not access any managed member here except static instance.
5093 //because the execution order of Finalizes is non-deterministic.
5096 DisConnectFromSignals();
5099 if (swigCPtr.Handle != global::System.IntPtr.Zero)
5103 swigCMemOwn = false;
5104 NDalicPINVOKE.delete_View(swigCPtr);
5106 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5109 foreach (View view in Children)
5111 view.InternalParent = null;
5118 private void OnSize2DChanged(int width, int height)
5120 Size2D = new Size2D(width, height);
5123 private void OnPosition2DChanged(int x, int y)
5125 Position2D = new Position2D(x, y);
5128 private void DisConnectFromSignals()
5130 // Save current CPtr.
5131 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
5133 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
5134 swigCPtr = GetBaseHandleCPtrHandleRef;
5136 if (_onRelayoutEventCallback != null)
5138 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5141 if (_offWindowEventCallback != null)
5143 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5146 if (_onWindowEventCallback != null)
5148 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5151 if (_wheelEventCallback != null)
5153 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5156 if (_hoverEventCallback != null)
5158 this.HoveredSignal().Disconnect(_hoverEventCallback);
5161 if (_touchDataCallback != null)
5163 this.TouchSignal().Disconnect(_touchDataCallback);
5166 if (_ResourcesLoadedCallback != null)
5168 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
5171 if (_offWindowEventCallback != null)
5173 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5176 if (_onWindowEventCallback != null)
5178 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5181 if (_wheelEventCallback != null)
5183 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5186 if (_hoverEventCallback != null)
5188 this.HoveredSignal().Disconnect(_hoverEventCallback);
5191 if (_touchDataCallback != null)
5193 this.TouchSignal().Disconnect(_touchDataCallback);
5196 if (_onRelayoutEventCallback != null)
5198 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5201 if (_keyCallback != null)
5203 this.KeyEventSignal().Disconnect(_keyCallback);
5206 if (_keyInputFocusLostCallback != null)
5208 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
5211 if (_keyInputFocusGainedCallback != null)
5213 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
5216 if (_backgroundResourceLoadedCallback != null)
5218 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5221 if (_onWindowSendEventCallback != null)
5223 this.OnWindowSignal().Disconnect(_onWindowSendEventCallback);
5226 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
5227 // Restore current CPtr.
5228 swigCPtr = currentCPtr;
5231 private void OnKeyInputFocusGained(IntPtr view)
5233 if (_keyInputFocusGainedEventHandler != null)
5235 _keyInputFocusGainedEventHandler(this, null);
5239 private void OnKeyInputFocusLost(IntPtr view)
5241 if (_keyInputFocusLostEventHandler != null)
5243 _keyInputFocusLostEventHandler(this, null);
5247 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
5249 if (keyEvent == global::System.IntPtr.Zero)
5251 NUILog.Error("keyEvent should not be null!");
5255 KeyEventArgs e = new KeyEventArgs();
5257 bool result = false;
5259 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
5261 if (_keyEventHandler != null)
5263 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
5265 // Oring the result of each callback.
5266 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
5268 result |= del(this, e);
5275 // Callback for View OnRelayout signal
5276 private void OnRelayout(IntPtr data)
5278 if (_onRelayoutEventHandler != null)
5280 _onRelayoutEventHandler(this, null);
5284 // Callback for View TouchSignal
5285 private bool OnTouch(IntPtr view, IntPtr touchData)
5287 if (touchData == global::System.IntPtr.Zero)
5289 NUILog.Error("touchData should not be null!");
5293 TouchEventArgs e = new TouchEventArgs();
5295 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
5297 if (_touchDataEventHandler != null)
5299 return _touchDataEventHandler(this, e);
5304 // Callback for View Hover signal
5305 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
5307 if (hoverEvent == global::System.IntPtr.Zero)
5309 NUILog.Error("hoverEvent should not be null!");
5313 HoverEventArgs e = new HoverEventArgs();
5315 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
5317 if (_hoverEventHandler != null)
5319 return _hoverEventHandler(this, e);
5324 // Callback for View Wheel signal
5325 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
5327 if (wheelEvent == global::System.IntPtr.Zero)
5329 NUILog.Error("wheelEvent should not be null!");
5333 WheelEventArgs e = new WheelEventArgs();
5335 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
5337 if (_wheelEventHandler != null)
5339 return _wheelEventHandler(this, e);
5344 // Callback for View OnWindow signal
5345 private void OnWindow(IntPtr data)
5347 if (_onWindowEventHandler != null)
5349 _onWindowEventHandler(this, null);
5353 // Callback for View OffWindow signal
5354 private void OffWindow(IntPtr data)
5356 if (_offWindowEventHandler != null)
5358 _offWindowEventHandler(this, null);
5362 // Callback for View visibility change signal
5363 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
5365 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
5368 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5370 e.Visibility = visibility;
5373 if (_visibilityChangedEventHandler != null)
5375 _visibilityChangedEventHandler(this, e);
5379 // Callback for View layout direction change signal
5380 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
5382 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
5385 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5389 if (_layoutDirectionChangedEventHandler != null)
5391 _layoutDirectionChangedEventHandler(this, e);
5395 private void OnResourcesLoaded(IntPtr view)
5397 if (_resourcesLoadedEventHandler != null)
5399 _resourcesLoadedEventHandler(this, null);
5403 private View ConvertIdToView(uint id)
5406 if (GetParent() is View)
5408 View parentView = GetParent() as View;
5409 view = parentView.FindChildById(id);
5414 view = Window.Instance.GetRootLayer().FindChildById(id);
5420 private void OnBackgroundResourceLoaded(IntPtr view)
5422 BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5423 e.Status = (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5425 if (_backgroundResourceLoadedEventHandler != null)
5427 _backgroundResourceLoadedEventHandler(this, e);
5432 /// Event argument passed through the ChildAdded event.
5434 /// <since_tizen> 5 </since_tizen>
5435 public class ChildAddedEventArgs : EventArgs
5438 /// Added child view at moment.
5440 /// <since_tizen> 5 </since_tizen>
5441 public View Added { get; set; }
5445 /// Event argument passed through the ChildRemoved event.
5447 /// <since_tizen> 5 </since_tizen>
5448 public class ChildRemovedEventArgs : EventArgs
5451 /// Removed child view at moment.
5453 /// <since_tizen> 5 </since_tizen>
5454 public View Removed { get; set; }
5458 /// Event arguments that passed via the KeyEvent signal.
5460 /// <since_tizen> 3 </since_tizen>
5461 public class KeyEventArgs : EventArgs
5466 /// Key - is the key sent to the view.
5468 /// <since_tizen> 3 </since_tizen>
5483 /// Event arguments that passed via the touch signal.
5485 /// <since_tizen> 3 </since_tizen>
5486 public class TouchEventArgs : EventArgs
5488 private Touch _touch;
5491 /// Touch - contains the information of touch points.
5493 /// <since_tizen> 3 </since_tizen>
5508 /// Event arguments that passed via the hover signal.
5510 /// <since_tizen> 3 </since_tizen>
5511 public class HoverEventArgs : EventArgs
5513 private Hover _hover;
5516 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
5518 /// <since_tizen> 3 </since_tizen>
5533 /// Event arguments that passed via the wheel signal.
5535 /// <since_tizen> 3 </since_tizen>
5536 public class WheelEventArgs : EventArgs
5538 private Wheel _wheel;
5541 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
5543 /// <since_tizen> 3 </since_tizen>
5558 /// Event arguments of visibility changed.
5560 /// <since_tizen> 3 </since_tizen>
5561 public class VisibilityChangedEventArgs : EventArgs
5564 private bool _visibility;
5565 private VisibilityChangeType _type;
5568 /// The view, or child of view, whose visibility has changed.
5570 /// <since_tizen> 3 </since_tizen>
5584 /// Whether the view is now visible or not.
5586 /// <since_tizen> 3 </since_tizen>
5587 public bool Visibility
5595 _visibility = value;
5600 /// Whether the view's visible property has changed or a parent's.
5602 /// <since_tizen> 3 </since_tizen>
5603 public VisibilityChangeType Type
5617 /// Event arguments of layout direction changed.
5619 /// <since_tizen> 4 </since_tizen>
5620 public class LayoutDirectionChangedEventArgs : EventArgs
5623 private ViewLayoutDirectionType _type;
5626 /// The view, or child of view, whose layout direction has changed.
5628 /// <since_tizen> 4 </since_tizen>
5642 /// Whether the view's layout direction property has changed or a parent's.
5644 /// <since_tizen> 4 </since_tizen>
5645 public ViewLayoutDirectionType Type
5658 internal class BackgroundResourceLoadedEventArgs : EventArgs
5660 private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5661 public ResourceLoadingStatusType Status
5674 internal class Property
5676 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
5677 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
5678 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
5679 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
5680 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
5681 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
5682 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
5683 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
5684 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
5685 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
5686 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
5687 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
5688 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
5689 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
5690 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
5691 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
5692 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
5693 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
5694 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
5695 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
5696 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
5697 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
5698 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
5699 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
5700 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
5701 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
5702 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
5703 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
5704 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
5705 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
5706 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
5707 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
5708 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
5709 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
5710 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
5711 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
5712 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
5713 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
5714 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
5715 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
5716 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
5717 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
5718 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
5719 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
5720 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
5721 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
5722 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
5723 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
5724 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
5725 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
5726 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
5727 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
5728 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
5729 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
5730 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
5731 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
5732 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
5733 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
5734 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
5735 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
5736 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
5737 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
5738 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();