2 * Copyright(c) 2018 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);
229 // public static readonly BindableProperty TooltipTextProperty = BindableProperty.Create("TooltipText", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
231 // var view = (View)bindable;
232 // if (newValue != null)
234 // Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((string)newValue));
237 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
238 [EditorBrowsable(EditorBrowsableState.Never)]
239 public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
241 var view = (View)bindable;
242 if (newValue != null)
244 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
247 defaultValueCreator: (bindable) =>
249 var view = (View)bindable;
251 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
254 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
255 [EditorBrowsable(EditorBrowsableState.Never)]
256 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
258 var view = (View)bindable;
259 if (newValue != null)
261 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
264 defaultValueCreator: (bindable) =>
266 var view = (View)bindable;
268 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
271 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
272 [EditorBrowsable(EditorBrowsableState.Never)]
273 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
275 var view = (View)bindable;
276 if (newValue != null)
278 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
281 defaultValueCreator: (bindable) =>
283 var view = (View)bindable;
284 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
285 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
288 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
289 [EditorBrowsable(EditorBrowsableState.Never)]
290 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
292 var view = (View)bindable;
293 if (newValue != null)
295 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
298 defaultValueCreator: (bindable) =>
300 var view = (View)bindable;
301 Vector2 temp = new Vector2(0.0f, 0.0f);
302 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
305 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
306 [EditorBrowsable(EditorBrowsableState.Never)]
307 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
309 var view = (View)bindable;
310 if (newValue != null)
312 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
315 defaultValueCreator: (bindable) =>
317 var view = (View)bindable;
319 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
322 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
323 [EditorBrowsable(EditorBrowsableState.Never)]
324 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
326 var view = (View)bindable;
327 if (newValue != null)
329 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
332 defaultValueCreator: (bindable) =>
334 var view = (View)bindable;
336 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
339 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
340 [EditorBrowsable(EditorBrowsableState.Never)]
341 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
343 var view = (View)bindable;
344 string valueToString = "";
346 if (newValue != null)
348 switch ((HorizontalAlignmentType)newValue)
350 case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
351 case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
352 case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
353 default: { valueToString = "left"; break; }
355 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
358 defaultValueCreator: (bindable) =>
360 var view = (View)bindable;
362 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
364 NUILog.Error("CellHorizontalAlignment get error!");
369 case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
370 case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
371 case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
372 default: return Tizen.NUI.HorizontalAlignmentType.Left;
375 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
376 [EditorBrowsable(EditorBrowsableState.Never)]
377 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
379 var view = (View)bindable;
380 string valueToString = "";
382 if (newValue != null)
384 switch ((VerticalAlignmentType)newValue)
386 case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
387 case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
388 case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
389 default: { valueToString = "top"; break; }
391 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
394 defaultValueCreator: (bindable) =>
396 var view = (View)bindable;
398 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
400 NUILog.Error("CellVerticalAlignment get error!");
405 case "top": return Tizen.NUI.VerticalAlignmentType.Top;
406 case "center": return Tizen.NUI.VerticalAlignmentType.Center;
407 case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
408 default: return Tizen.NUI.VerticalAlignmentType.Top;
411 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
412 [EditorBrowsable(EditorBrowsableState.Never)]
413 public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
415 var view = (View)bindable;
416 if (newValue != null)
418 Tizen.NUI.Object.SetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
421 defaultValueCreator: (bindable) =>
423 var view = (View)bindable;
425 Tizen.NUI.Object.GetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT).Get(out temp);
428 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
429 [EditorBrowsable(EditorBrowsableState.Never)]
430 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
432 var view = (View)bindable;
433 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
434 else { view.LeftFocusableViewId = -1; }
436 defaultValueCreator: (bindable) =>
438 var view = (View)bindable;
439 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
442 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
443 [EditorBrowsable(EditorBrowsableState.Never)]
444 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
446 var view = (View)bindable;
447 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
448 else { view.RightFocusableViewId = -1; }
450 defaultValueCreator: (bindable) =>
452 var view = (View)bindable;
453 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
456 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
457 [EditorBrowsable(EditorBrowsableState.Never)]
458 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
460 var view = (View)bindable;
461 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
462 else { view.UpFocusableViewId = -1; }
464 defaultValueCreator: (bindable) =>
466 var view = (View)bindable;
467 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
470 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
471 [EditorBrowsable(EditorBrowsableState.Never)]
472 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
474 var view = (View)bindable;
475 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
476 else { view.DownFocusableViewId = -1; }
478 defaultValueCreator: (bindable) =>
480 var view = (View)bindable;
481 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
484 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
485 [EditorBrowsable(EditorBrowsableState.Never)]
486 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
488 var view = (View)bindable;
489 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
491 defaultValueCreator: (bindable) =>
493 var view = (View)bindable;
494 return view.IsKeyboardFocusable();
496 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
497 [EditorBrowsable(EditorBrowsableState.Never)]
498 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
500 var view = (View)bindable;
501 if (newValue != null)
503 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size((Size2D)newValue)));
506 defaultValueCreator: (bindable) =>
508 var view = (View)bindable;
509 Size temp = new Size(0.0f, 0.0f, 0.0f);
510 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
511 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
514 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
515 [EditorBrowsable(EditorBrowsableState.Never)]
516 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
518 var view = (View)bindable;
519 if (newValue != null)
521 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
524 defaultValueCreator: (bindable) =>
526 var view = (View)bindable;
528 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
531 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
532 [EditorBrowsable(EditorBrowsableState.Never)]
533 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
535 var view = (View)bindable;
536 if (newValue != null)
538 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
541 defaultValueCreator: (bindable) =>
543 var view = (View)bindable;
544 Position temp = new Position(0.0f, 0.0f, 0.0f);
545 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
546 return new Position2D(temp);
548 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
549 [EditorBrowsable(EditorBrowsableState.Never)]
550 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
552 var view = (View)bindable;
553 if (newValue != null)
555 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
558 defaultValueCreator: (bindable) =>
560 var view = (View)bindable;
562 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
565 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
566 [EditorBrowsable(EditorBrowsableState.Never)]
567 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
569 var view = (View)bindable;
571 if (newValue != null)
573 value = (int)newValue;
576 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
579 var siblings = view.GetParent()?.Children;
580 if (siblings != null)
582 int currentOrder = siblings.IndexOf(view);
583 if (value != currentOrder)
585 if (value == 0) { view.LowerToBottom(); }
586 else if (value < siblings.Count - 1)
588 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
589 else { view.LowerBelow(siblings[value]); }
591 else { view.RaiseToTop(); }
596 defaultValueCreator: (bindable) =>
598 var view = (View)bindable;
599 var parentChildren = view.GetParent()?.Children;
600 int currentOrder = 0;
601 if (parentChildren != null)
603 currentOrder = parentChildren.IndexOf(view);
605 if (currentOrder < 0) { return 0; }
606 else if (currentOrder < parentChildren.Count) { return currentOrder; }
611 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
612 [EditorBrowsable(EditorBrowsableState.Never)]
613 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
615 var view = (View)bindable;
616 if (newValue != null)
618 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
621 defaultValueCreator: (bindable) =>
623 var view = (View)bindable;
624 Position temp = new Position(0.0f, 0.0f, 0.0f);
625 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
629 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
630 [EditorBrowsable(EditorBrowsableState.Never)]
631 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
633 var view = (View)bindable;
634 if (newValue != null)
636 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
639 defaultValueCreator: (bindable) =>
641 var view = (View)bindable;
642 Position temp = new Position(0.0f, 0.0f, 0.0f);
643 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
646 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
647 [EditorBrowsable(EditorBrowsableState.Never)]
648 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
650 var view = (View)bindable;
651 if (newValue != null)
653 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
656 defaultValueCreator: (bindable) =>
658 var view = (View)bindable;
660 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
663 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
664 [EditorBrowsable(EditorBrowsableState.Never)]
665 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
667 var view = (View)bindable;
668 if (newValue != null)
670 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
673 defaultValueCreator: (bindable) =>
675 var view = (View)bindable;
677 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
680 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
681 [EditorBrowsable(EditorBrowsableState.Never)]
682 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
684 var view = (View)bindable;
685 if (newValue != null)
687 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
690 defaultValueCreator: (bindable) =>
692 var view = (View)bindable;
693 Position temp = new Position(0.0f, 0.0f, 0.0f);
694 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
697 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
698 [EditorBrowsable(EditorBrowsableState.Never)]
699 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
701 var view = (View)bindable;
702 if (newValue != null)
704 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
707 defaultValueCreator: (bindable) =>
709 var view = (View)bindable;
711 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
714 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
715 [EditorBrowsable(EditorBrowsableState.Never)]
716 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
718 var view = (View)bindable;
719 if (newValue != null)
721 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
724 defaultValueCreator: (bindable) =>
726 var view = (View)bindable;
728 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
731 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
732 [EditorBrowsable(EditorBrowsableState.Never)]
733 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
735 var view = (View)bindable;
736 if (newValue != null)
738 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
741 defaultValueCreator: (bindable) =>
743 var view = (View)bindable;
745 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
748 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
749 [EditorBrowsable(EditorBrowsableState.Never)]
750 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
752 var view = (View)bindable;
753 if (newValue != null)
755 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
758 defaultValueCreator: (bindable) =>
760 var view = (View)bindable;
761 Rotation temp = new Rotation();
762 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
765 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
766 [EditorBrowsable(EditorBrowsableState.Never)]
767 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
769 var view = (View)bindable;
770 if (newValue != null)
772 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
775 defaultValueCreator: (bindable) =>
777 var view = (View)bindable;
778 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
779 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
782 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
783 [EditorBrowsable(EditorBrowsableState.Never)]
784 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
786 var view = (View)bindable;
787 if (newValue != null)
789 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
792 defaultValueCreator: (bindable) =>
794 var view = (View)bindable;
796 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
799 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
800 [EditorBrowsable(EditorBrowsableState.Never)]
801 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
803 var view = (View)bindable;
804 if (newValue != null)
806 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
809 defaultValueCreator: (bindable) =>
811 var view = (View)bindable;
813 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
816 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
817 [EditorBrowsable(EditorBrowsableState.Never)]
818 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
820 var view = (View)bindable;
821 if (newValue != null)
823 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
826 defaultValueCreator: (bindable) =>
828 var view = (View)bindable;
830 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
833 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
834 [EditorBrowsable(EditorBrowsableState.Never)]
835 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
837 var view = (View)bindable;
838 if (newValue != null)
840 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
843 defaultValueCreator: (bindable) =>
845 var view = (View)bindable;
847 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
850 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
851 [EditorBrowsable(EditorBrowsableState.Never)]
852 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
854 var view = (View)bindable;
855 if (newValue != null)
857 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
860 defaultValueCreator: (bindable) =>
862 var view = (View)bindable;
864 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
867 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
868 [EditorBrowsable(EditorBrowsableState.Never)]
869 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
871 var view = (View)bindable;
872 if (newValue != null)
874 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
877 defaultValueCreator: (bindable) =>
879 var view = (View)bindable;
881 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
884 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
885 [EditorBrowsable(EditorBrowsableState.Never)]
886 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
888 var view = (View)bindable;
889 if (newValue != null)
891 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
894 defaultValueCreator: (bindable) =>
896 var view = (View)bindable;
898 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
901 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
902 [EditorBrowsable(EditorBrowsableState.Never)]
903 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
905 var view = (View)bindable;
906 if (newValue != null)
908 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
911 defaultValueCreator: (bindable) =>
913 var view = (View)bindable;
915 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
918 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
919 [EditorBrowsable(EditorBrowsableState.Never)]
920 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
922 var view = (View)bindable;
923 if (newValue != null)
925 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
928 defaultValueCreator: (bindable) =>
930 var view = (View)bindable;
932 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
934 NUILog.Error("DrawMode get error!");
938 case "NORMAL": return DrawModeType.Normal;
939 case "OVERLAY_2D": return DrawModeType.Overlay2D;
940 case "STENCIL": return DrawModeType.Stencil;
941 default: return DrawModeType.Normal;
944 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
945 [EditorBrowsable(EditorBrowsableState.Never)]
946 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
948 var view = (View)bindable;
949 if (newValue != null)
951 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
954 defaultValueCreator: (bindable) =>
956 var view = (View)bindable;
957 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
958 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
961 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
962 [EditorBrowsable(EditorBrowsableState.Never)]
963 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
965 var view = (View)bindable;
966 if (newValue != null)
968 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
971 defaultValueCreator: (bindable) =>
973 var view = (View)bindable;
975 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
977 NUILog.Error("WidthResizePolicy get error!");
981 case "FIXED": return ResizePolicyType.Fixed;
982 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
983 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
984 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
985 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
986 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
987 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
988 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
989 default: return ResizePolicyType.Fixed;
992 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
993 [EditorBrowsable(EditorBrowsableState.Never)]
994 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
996 var view = (View)bindable;
997 if (newValue != null)
999 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
1002 defaultValueCreator: (bindable) =>
1004 var view = (View)bindable;
1006 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
1008 NUILog.Error("HeightResizePolicy get error!");
1012 case "FIXED": return ResizePolicyType.Fixed;
1013 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1014 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1015 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1016 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1017 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1018 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1019 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1020 default: return ResizePolicyType.Fixed;
1023 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1024 [EditorBrowsable(EditorBrowsableState.Never)]
1025 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1027 var view = (View)bindable;
1028 string valueToString = "";
1029 if (newValue != null)
1031 switch ((SizeScalePolicyType)newValue)
1033 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1034 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1035 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1036 default: { valueToString = "USE_SIZE_SET"; break; }
1038 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1041 defaultValueCreator: (bindable) =>
1043 var view = (View)bindable;
1045 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1047 NUILog.Error("SizeScalePolicy get error!");
1051 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1052 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1053 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1054 default: return SizeScalePolicyType.UseSizeSet;
1057 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1058 [EditorBrowsable(EditorBrowsableState.Never)]
1059 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1061 var view = (View)bindable;
1062 if (newValue != null)
1064 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1067 defaultValueCreator: (bindable) =>
1069 var view = (View)bindable;
1071 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1074 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1075 [EditorBrowsable(EditorBrowsableState.Never)]
1076 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1078 var view = (View)bindable;
1079 if (newValue != null)
1081 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1084 defaultValueCreator: (bindable) =>
1086 var view = (View)bindable;
1088 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1091 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1092 [EditorBrowsable(EditorBrowsableState.Never)]
1093 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1095 var view = (View)bindable;
1096 if (newValue != null)
1098 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1101 defaultValueCreator: (bindable) =>
1103 var view = (View)bindable;
1104 Extents temp = new Extents(0, 0, 0, 0);
1105 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1108 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1109 [EditorBrowsable(EditorBrowsableState.Never)]
1110 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1112 var view = (View)bindable;
1113 if (newValue != null)
1115 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1118 defaultValueCreator: (bindable) =>
1120 var view = (View)bindable;
1121 Size temp = new Size(0, 0, 0);
1122 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1125 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1126 [EditorBrowsable(EditorBrowsableState.Never)]
1127 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1129 var view = (View)bindable;
1130 if (newValue != null)
1132 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1135 defaultValueCreator: (bindable) =>
1137 var view = (View)bindable;
1138 Size2D temp = new Size2D(0, 0);
1139 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1142 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1143 [EditorBrowsable(EditorBrowsableState.Never)]
1144 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1146 var view = (View)bindable;
1147 if (newValue != null)
1149 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1152 defaultValueCreator: (bindable) =>
1154 var view = (View)bindable;
1155 Size2D temp = new Size2D(0, 0);
1156 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1159 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1160 [EditorBrowsable(EditorBrowsableState.Never)]
1161 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1163 var view = (View)bindable;
1164 if (newValue != null)
1166 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1169 defaultValueCreator: (bindable) =>
1171 var view = (View)bindable;
1173 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1176 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1177 [EditorBrowsable(EditorBrowsableState.Never)]
1178 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1180 var view = (View)bindable;
1181 if (newValue != null)
1183 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1186 defaultValueCreator: (bindable) =>
1188 var view = (View)bindable;
1190 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1192 NUILog.Error("ClippingMode get error!");
1194 return (ClippingModeType)temp;
1196 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1197 [EditorBrowsable(EditorBrowsableState.Never)]
1198 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1200 var view = (View)bindable;
1201 if (newValue != null)
1203 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1206 defaultValueCreator: (bindable) =>
1208 var view = (View)bindable;
1210 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1213 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1214 [EditorBrowsable(EditorBrowsableState.Never)]
1215 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1217 var view = (View)bindable;
1218 if (newValue != null)
1220 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1223 defaultValueCreator: (bindable) =>
1225 var view = (View)bindable;
1227 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1229 NUILog.Error("LAYOUT_DIRECTION get error!");
1231 return (ViewLayoutDirectionType)temp;
1233 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1234 [EditorBrowsable(EditorBrowsableState.Never)]
1235 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1237 var view = (View)bindable;
1238 if (newValue != null)
1240 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1243 defaultValueCreator: (bindable) =>
1245 var view = (View)bindable;
1246 Extents temp = new Extents(0, 0, 0, 0);
1247 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1250 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1251 [EditorBrowsable(EditorBrowsableState.Never)]
1252 public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style), propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1254 internal readonly MergedStyle _mergedStyle;
1256 /// Flag to allow Layouting to be disabled for Views.
1257 /// Once a View has a Layout set then any children added to Views from then on will receive
1258 /// automatic Layouts.
1260 private static bool layoutingDisabled = true;
1261 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1263 private bool layoutSet = false; // Flag to indicate if SetLayout was called or View was automatically given a Layout
1264 private bool _backgroundImageSynchronosLoading = false;
1265 private EventHandler _offWindowEventHandler;
1266 private OffWindowEventCallbackType _offWindowEventCallback;
1267 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1268 private WheelEventCallbackType _wheelEventCallback;
1269 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1270 private KeyCallbackType _keyCallback;
1271 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1272 private TouchDataCallbackType _touchDataCallback;
1273 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1274 private HoverEventCallbackType _hoverEventCallback;
1275 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
1276 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
1277 private EventHandler _keyInputFocusGainedEventHandler;
1278 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1279 private EventHandler _keyInputFocusLostEventHandler;
1280 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1281 private EventHandler _onRelayoutEventHandler;
1282 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1283 private EventHandler _onWindowEventHandler;
1284 private OnWindowEventCallbackType _onWindowEventCallback;
1285 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
1286 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
1287 // Resource Ready Signal
1288 private EventHandler _resourcesLoadedEventHandler;
1289 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
1290 private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
1291 private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
1294 /// Creates a new instance of a view.
1296 /// <since_tizen> 3 </since_tizen>
1297 public View() : this(NDalicPINVOKE.View_New(), true)
1299 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1301 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1303 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1306 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
1308 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1311 PositionUsesPivotPoint = false;
1313 _mergedStyle = new MergedStyle(GetType(), this);
1316 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1318 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1321 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1322 private delegate void OffWindowEventCallbackType(IntPtr control);
1323 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1324 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1325 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1326 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1327 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1328 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1329 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1330 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1331 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1332 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
1333 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1334 private delegate void ResourcesLoadedCallbackType(IntPtr control);
1335 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1336 private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
1337 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1338 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1339 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1340 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1341 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1342 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1343 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1344 private delegate void OnWindowEventCallbackType(IntPtr control);
1345 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1346 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
1349 /// Event when a child is removed.
1351 /// <since_tizen> 5 </since_tizen>
1352 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1354 /// Event when a child is added.
1356 /// <since_tizen> 5 </since_tizen>
1357 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1360 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1361 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1363 /// <since_tizen> 3 </since_tizen>
1364 public event EventHandler FocusGained
1368 if (_keyInputFocusGainedEventHandler == null)
1370 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1371 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1374 _keyInputFocusGainedEventHandler += value;
1379 _keyInputFocusGainedEventHandler -= value;
1381 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1383 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1389 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1390 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1392 /// <since_tizen> 3 </since_tizen>
1393 public event EventHandler FocusLost
1397 if (_keyInputFocusLostEventHandler == null)
1399 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1400 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1403 _keyInputFocusLostEventHandler += value;
1408 _keyInputFocusLostEventHandler -= value;
1410 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1412 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1418 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1419 /// The KeyPressed signal is emitted when the key event is received.<br />
1421 /// <since_tizen> 3 </since_tizen>
1422 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1426 if (_keyEventHandler == null)
1428 _keyCallback = OnKeyEvent;
1429 this.KeyEventSignal().Connect(_keyCallback);
1432 _keyEventHandler += value;
1437 _keyEventHandler -= value;
1439 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1441 this.KeyEventSignal().Disconnect(_keyCallback);
1447 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1448 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1450 /// <since_tizen> 3 </since_tizen>
1451 public event EventHandler Relayout
1455 if (_onRelayoutEventHandler == null)
1457 _onRelayoutEventCallback = OnRelayout;
1458 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1461 _onRelayoutEventHandler += value;
1466 _onRelayoutEventHandler -= value;
1468 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1470 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1477 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1478 /// The touched signal is emitted when the touch input is received.<br />
1480 /// <since_tizen> 3 </since_tizen>
1481 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1485 if (_touchDataEventHandler == null)
1487 _touchDataCallback = OnTouch;
1488 this.TouchSignal().Connect(_touchDataCallback);
1491 _touchDataEventHandler += value;
1496 _touchDataEventHandler -= value;
1498 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1500 this.TouchSignal().Disconnect(_touchDataCallback);
1507 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1508 /// The hovered signal is emitted when the hover input is received.<br />
1510 /// <since_tizen> 3 </since_tizen>
1511 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1515 if (_hoverEventHandler == null)
1517 _hoverEventCallback = OnHoverEvent;
1518 this.HoveredSignal().Connect(_hoverEventCallback);
1521 _hoverEventHandler += value;
1526 _hoverEventHandler -= value;
1528 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1530 this.HoveredSignal().Disconnect(_hoverEventCallback);
1537 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1538 /// The WheelMoved signal is emitted when the wheel event is received.<br />
1540 /// <since_tizen> 3 </since_tizen>
1541 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1545 if (_wheelEventHandler == null)
1547 _wheelEventCallback = OnWheelEvent;
1548 this.WheelEventSignal().Connect(_wheelEventCallback);
1551 _wheelEventHandler += value;
1556 _wheelEventHandler -= value;
1558 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
1560 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1567 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
1568 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
1570 /// <since_tizen> 3 </since_tizen>
1571 public event EventHandler AddedToWindow
1575 if (_onWindowEventHandler == null)
1577 _onWindowEventCallback = OnWindow;
1578 this.OnWindowSignal().Connect(_onWindowEventCallback);
1581 _onWindowEventHandler += value;
1586 _onWindowEventHandler -= value;
1588 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
1590 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1596 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
1597 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
1599 /// <since_tizen> 3 </since_tizen>
1600 public event EventHandler RemovedFromWindow
1604 if (_offWindowEventHandler == null)
1606 _offWindowEventCallback = OffWindow;
1607 this.OffWindowSignal().Connect(_offWindowEventCallback);
1610 _offWindowEventHandler += value;
1615 _offWindowEventHandler -= value;
1617 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
1619 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1625 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
1626 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
1628 /// <since_tizen> 3 </since_tizen>
1629 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
1633 if (_visibilityChangedEventHandler == null)
1635 _visibilityChangedEventCallback = OnVisibilityChanged;
1636 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
1639 _visibilityChangedEventHandler += value;
1644 _visibilityChangedEventHandler -= value;
1646 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
1648 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
1654 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
1655 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
1657 /// <since_tizen> 4 </since_tizen>
1658 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
1662 if (_layoutDirectionChangedEventHandler == null)
1664 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
1665 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
1668 _layoutDirectionChangedEventHandler += value;
1673 _layoutDirectionChangedEventHandler -= value;
1675 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
1677 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
1683 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1684 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1686 /// <since_tizen> 3 </since_tizen>
1687 public event EventHandler ResourcesLoaded
1691 if (_resourcesLoadedEventHandler == null)
1693 _ResourcesLoadedCallback = OnResourcesLoaded;
1694 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1697 _resourcesLoadedEventHandler += value;
1702 _resourcesLoadedEventHandler -= value;
1704 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1706 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1711 internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
1715 if (_backgroundResourceLoadedEventHandler == null)
1717 _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
1718 this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
1721 _backgroundResourceLoadedEventHandler += value;
1725 _backgroundResourceLoadedEventHandler -= value;
1727 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1729 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1735 /// Enumeration for describing the states of the view.
1737 /// <since_tizen> 3 </since_tizen>
1741 /// The normal state.
1745 /// The focused state.
1749 /// The disabled state.
1755 /// Describes the direction to move the focus towards.
1757 /// <since_tizen> 3 </since_tizen>
1758 public enum FocusDirection
1761 /// Move keyboard focus towards the left direction.
1763 /// <since_tizen> 3 </since_tizen>
1766 /// Move keyboard focus towards the right direction.
1768 /// <since_tizen> 3 </since_tizen>
1771 /// Move keyboard focus towards the up direction.
1773 /// <since_tizen> 3 </since_tizen>
1776 /// Move keyboard focus towards the down direction.
1778 /// <since_tizen> 3 </since_tizen>
1781 /// Move keyboard focus towards the previous page direction.
1783 /// <since_tizen> 3 </since_tizen>
1786 /// Move keyboard focus towards the next page direction.
1788 /// <since_tizen> 3 </since_tizen>
1792 internal enum PropertyRange
1794 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1795 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1796 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1799 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1800 [EditorBrowsable(EditorBrowsableState.Never)]
1801 public bool IsResourcesCreated
1805 return Application.Current.IsResourcesCreated;
1809 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1810 [EditorBrowsable(EditorBrowsableState.Never)]
1811 public ResourceDictionary XamlResources
1815 return Application.Current.XamlResources;
1819 Application.Current.XamlResources = value;
1824 /// The StyleName, type string.
1826 /// <since_tizen> 3 </since_tizen>
1827 public string StyleName
1831 return (string)GetValue(StyleNameProperty);
1835 SetValue(StyleNameProperty, value);
1836 NotifyPropertyChanged();
1841 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1843 /// <since_tizen> 3 </since_tizen>
1844 public Color BackgroundColor
1848 return (Color)GetValue(BackgroundColorProperty);
1852 SetValue(BackgroundColorProperty, value);
1853 NotifyPropertyChanged();
1858 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1860 /// <since_tizen> 3 </since_tizen>
1861 public string BackgroundImage
1865 return (string)GetValue(BackgroundImageProperty);
1869 SetValue(BackgroundImageProperty, value);
1870 NotifyPropertyChanged();
1875 /// The background of view.
1877 /// <since_tizen> 3 </since_tizen>
1878 public Tizen.NUI.PropertyMap Background
1882 return (PropertyMap)GetValue(BackgroundProperty);
1886 SetValue(BackgroundProperty, value);
1887 NotifyPropertyChanged();
1893 /// The current state of the view.
1895 /// <since_tizen> 3 </since_tizen>
1900 return (States)GetValue(StateProperty);
1904 SetValue(StateProperty, value);
1905 NotifyPropertyChanged();
1910 /// The current sub state of the view.
1912 /// <since_tizen> 3 </since_tizen>
1913 public States SubState
1917 return (States)GetValue(SubStateProperty);
1921 SetValue(SubStateProperty, value);
1922 NotifyPropertyChanged();
1927 /// Displays a tooltip
1929 /// <since_tizen> 3 </since_tizen>
1930 public Tizen.NUI.PropertyMap Tooltip
1934 return (PropertyMap)GetValue(TooltipProperty);
1938 SetValue(TooltipProperty, value);
1939 NotifyPropertyChanged();
1944 /// Displays a tooltip as a text.
1946 /// <since_tizen> 3 </since_tizen>
1947 public string TooltipText
1951 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1952 NotifyPropertyChanged();
1957 /// The Child property of FlexContainer.<br />
1958 /// The proportion of the free space in the container, the flex item will receive.<br />
1959 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1961 /// <since_tizen> 3 </since_tizen>
1966 return (float)GetValue(FlexProperty);
1970 SetValue(FlexProperty, value);
1971 NotifyPropertyChanged();
1976 /// The Child property of FlexContainer.<br />
1977 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
1979 /// <since_tizen> 3 </since_tizen>
1980 public int AlignSelf
1984 return (int)GetValue(AlignSelfProperty);
1988 SetValue(AlignSelfProperty, value);
1989 NotifyPropertyChanged();
1994 /// The Child property of FlexContainer.<br />
1995 /// The space around the flex item.<br />
1997 /// <since_tizen> 3 </since_tizen>
1998 public Vector4 FlexMargin
2002 return (Vector4)GetValue(FlexMarginProperty);
2006 SetValue(FlexMarginProperty, value);
2007 NotifyPropertyChanged();
2012 /// The top-left cell this child occupies, if not set, the first available cell is used.
2014 /// <since_tizen> 3 </since_tizen>
2015 public Vector2 CellIndex
2019 return (Vector2)GetValue(CellIndexProperty);
2023 SetValue(CellIndexProperty, value);
2024 NotifyPropertyChanged();
2029 /// The number of rows this child occupies, if not set, the default value is 1.
2031 /// <since_tizen> 3 </since_tizen>
2032 public float RowSpan
2036 return (float)GetValue(RowSpanProperty);
2040 SetValue(RowSpanProperty, value);
2041 NotifyPropertyChanged();
2046 /// The number of columns this child occupies, if not set, the default value is 1.
2048 /// <since_tizen> 3 </since_tizen>
2049 public float ColumnSpan
2053 return (float)GetValue(ColumnSpanProperty);
2057 SetValue(ColumnSpanProperty, value);
2058 NotifyPropertyChanged();
2063 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
2065 /// <since_tizen> 3 </since_tizen>
2066 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
2070 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
2074 SetValue(CellHorizontalAlignmentProperty, value);
2075 NotifyPropertyChanged();
2080 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
2082 /// <since_tizen> 3 </since_tizen>
2083 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
2087 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
2091 SetValue(CellVerticalAlignmentProperty, value);
2092 NotifyPropertyChanged();
2097 /// The left focusable view.<br />
2098 /// This will return null if not set.<br />
2099 /// This will also return null if the specified left focusable view is not on a window.<br />
2101 /// <since_tizen> 3 </since_tizen>
2102 public View LeftFocusableView
2104 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2107 return (View)GetValue(LeftFocusableViewProperty);
2111 SetValue(LeftFocusableViewProperty, value);
2112 NotifyPropertyChanged();
2117 /// The right focusable view.<br />
2118 /// This will return null if not set.<br />
2119 /// This will also return null if the specified right focusable view is not on a window.<br />
2121 /// <since_tizen> 3 </since_tizen>
2122 public View RightFocusableView
2124 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2127 return (View)GetValue(RightFocusableViewProperty);
2131 SetValue(RightFocusableViewProperty, value);
2132 NotifyPropertyChanged();
2137 /// The up focusable view.<br />
2138 /// This will return null if not set.<br />
2139 /// This will also return null if the specified up focusable view is not on a window.<br />
2141 /// <since_tizen> 3 </since_tizen>
2142 public View UpFocusableView
2144 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2147 return (View)GetValue(UpFocusableViewProperty);
2151 SetValue(UpFocusableViewProperty, value);
2152 NotifyPropertyChanged();
2157 /// The down focusable view.<br />
2158 /// This will return null if not set.<br />
2159 /// This will also return null if the specified down focusable view is not on a window.<br />
2161 /// <since_tizen> 3 </since_tizen>
2162 public View DownFocusableView
2164 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2167 return (View)GetValue(DownFocusableViewProperty);
2171 SetValue(DownFocusableViewProperty, value);
2172 NotifyPropertyChanged();
2177 /// Whether the view should be focusable by keyboard navigation.
2179 /// <since_tizen> 3 </since_tizen>
2180 public bool Focusable
2184 SetValue(FocusableProperty, value);
2185 NotifyPropertyChanged();
2189 return (bool)GetValue(FocusableProperty);
2194 /// Retrieves the position of the view.<br />
2195 /// The coordinates are relative to the view's parent.<br />
2197 /// <since_tizen> 3 </since_tizen>
2198 public Position CurrentPosition
2202 return GetCurrentPosition();
2207 /// Sets the size of a view for the width and the height.<br />
2208 /// Geometry can be scaled to fit within this area.<br />
2209 /// This does not interfere with the view's scale factor.<br />
2210 /// The views default depth is the minimum of width and height.<br />
2213 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
2214 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
2215 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
2216 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2217 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2218 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2219 /// 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 />
2221 /// <since_tizen> 3 </since_tizen>
2222 public Size2D Size2D
2226 Size2D temp = (Size2D)GetValue(Size2DProperty);
2227 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
2231 SetValue(Size2DProperty, value);
2232 // Set Specification so when layouts measure this View it matches the value set here.
2233 // All Views are currently Layouts.
2234 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
2235 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
2236 NotifyPropertyChanged();
2241 /// Retrieves the size of the view.<br />
2242 /// The coordinates are relative to the view's parent.<br />
2244 /// <since_tizen> 3 </since_tizen>
2245 public Size2D CurrentSize
2249 return GetCurrentSize();
2254 /// Retrieves and sets the view's opacity.<br />
2256 /// <since_tizen> 3 </since_tizen>
2257 public float Opacity
2261 return (float)GetValue(OpacityProperty);
2265 SetValue(OpacityProperty, value);
2266 NotifyPropertyChanged();
2271 /// Sets the position of the view for X and Y.<br />
2272 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2273 /// If the position inheritance is disabled, sets the world position.<br />
2276 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
2277 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
2278 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
2279 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2280 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2281 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2283 /// <since_tizen> 3 </since_tizen>
2284 public Position2D Position2D
2288 Position2D temp = (Position2D)GetValue(Position2DProperty);
2289 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
2293 SetValue(Position2DProperty, value);
2294 NotifyPropertyChanged();
2299 /// Retrieves the screen postion of the view.<br />
2301 /// <since_tizen> 3 </since_tizen>
2302 public Vector2 ScreenPosition
2306 Vector2 temp = new Vector2(0.0f, 0.0f);
2307 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2313 /// Determines whether the pivot point should be used to determine the position of the view.
2314 /// This is true by default.
2316 /// <remarks>If false, then the top-left of the view is used for the position.
2317 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
2319 /// <since_tizen> 3 </since_tizen>
2320 public bool PositionUsesPivotPoint
2324 return (bool)GetValue(PositionUsesPivotPointProperty);
2328 SetValue(PositionUsesPivotPointProperty, value);
2329 NotifyPropertyChanged();
2334 /// Please do not use! this will be deprecated.
2336 /// Please do not use! this will be deprecated!
2337 /// Instead please use PositionUsesPivotPoint.
2338 /// <since_tizen> 3 </since_tizen>
2339 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2341 "View view = new View(); " +
2342 "view.PivotPoint = PivotPoint.Center; " +
2343 "view.PositionUsesPivotPoint = true;")]
2344 [EditorBrowsable(EditorBrowsableState.Never)]
2345 public bool PositionUsesAnchorPoint
2350 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2355 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2356 NotifyPropertyChanged();
2361 /// Queries whether the view is connected to the stage.<br />
2362 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2364 /// <since_tizen> 3 </since_tizen>
2365 public bool IsOnWindow
2374 /// Gets the depth in the hierarchy for the view.
2376 /// <since_tizen> 3 </since_tizen>
2377 public int HierarchyDepth
2381 return GetHierarchyDepth();
2386 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2389 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
2390 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2391 /// The values set by this property will likely change.
2393 /// <since_tizen> 3 </since_tizen>
2394 public int SiblingOrder
2398 return (int)GetValue(SiblingOrderProperty);
2402 SetValue(SiblingOrderProperty, value);
2403 NotifyPropertyChanged();
2408 /// Returns the natural size of the view.
2411 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2413 /// <since_tizen> 5 </since_tizen>
2414 public Vector3 NaturalSize
2418 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2419 if (NDalicPINVOKE.SWIGPendingException.Pending)
2420 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2426 /// Returns the natural size (Size2D) of the view.
2429 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2431 /// <since_tizen> 4 </since_tizen>
2432 public Size2D NaturalSize2D
2436 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2437 if (NDalicPINVOKE.SWIGPendingException.Pending)
2438 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2440 return new Size2D((int)temp.Width, (int)temp.Height);
2445 /// Gets or sets the origin of a view within its parent's area.<br />
2446 /// 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 />
2447 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
2448 /// A view's position is the distance between this origin and the view's anchor-point.<br />
2450 /// <pre>The view has been initialized.</pre>
2451 /// <since_tizen> 3 </since_tizen>
2452 public Position ParentOrigin
2456 return (Position)GetValue(ParentOriginProperty);
2460 SetValue(ParentOriginProperty, value);
2461 NotifyPropertyChanged();
2466 /// Gets or sets the anchor-point of a view.<br />
2467 /// 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 />
2468 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
2469 /// A view position is the distance between its parent-origin and this anchor-point.<br />
2470 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
2471 /// <pre>The view has been initialized.</pre>
2473 /// <since_tizen> 3 </since_tizen>
2474 public Position PivotPoint
2478 return (Position)GetValue(PivotPointProperty);
2482 SetValue(PivotPointProperty, value);
2483 NotifyPropertyChanged();
2488 /// Gets or sets the size width of the view.
2490 /// <since_tizen> 3 </since_tizen>
2491 public float SizeWidth
2495 return (float)GetValue(SizeWidthProperty);
2499 SetValue(SizeWidthProperty, value);
2500 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
2501 NotifyPropertyChanged();
2506 /// Gets or sets the size height of the view.
2508 /// <since_tizen> 3 </since_tizen>
2509 public float SizeHeight
2513 return (float)GetValue(SizeHeightProperty);
2517 SetValue(SizeHeightProperty, value);
2518 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
2519 NotifyPropertyChanged();
2524 /// Gets or sets the position of the view.<br />
2525 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
2526 /// If the position inheritance is disabled, sets the world position.<br />
2528 /// <since_tizen> 3 </since_tizen>
2529 public Position Position
2533 return (Position)GetValue(PositionProperty);
2537 SetValue(PositionProperty, value);
2538 NotifyPropertyChanged();
2543 /// Gets or sets the position X of the view.
2545 /// <since_tizen> 3 </since_tizen>
2546 public float PositionX
2550 return (float)GetValue(PositionXProperty);
2554 SetValue(PositionXProperty, value);
2555 NotifyPropertyChanged();
2560 /// Gets or sets the position Y of the view.
2562 /// <since_tizen> 3 </since_tizen>
2563 public float PositionY
2567 return (float)GetValue(PositionYProperty);
2571 SetValue(PositionYProperty, value);
2572 NotifyPropertyChanged();
2577 /// Gets or sets the position Z of the view.
2579 /// <since_tizen> 3 </since_tizen>
2580 public float PositionZ
2584 return (float)GetValue(PositionZProperty);
2588 SetValue(PositionZProperty, value);
2589 NotifyPropertyChanged();
2594 /// Gets or sets the world position of the view.
2596 /// <since_tizen> 3 </since_tizen>
2597 public Vector3 WorldPosition
2601 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2602 GetProperty(View.Property.WORLD_POSITION).Get(temp);
2608 /// Gets or sets the orientation of the view.<br />
2609 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
2611 /// <remarks>This is an asynchronous method.</remarks>
2612 /// <since_tizen> 3 </since_tizen>
2613 public Rotation Orientation
2617 return (Rotation)GetValue(OrientationProperty);
2621 SetValue(OrientationProperty, value);
2622 NotifyPropertyChanged();
2627 /// Gets or sets the world orientation of the view.<br />
2629 /// <since_tizen> 3 </since_tizen>
2630 public Rotation WorldOrientation
2634 Rotation temp = new Rotation();
2635 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
2641 /// Gets or sets the scale factor applied to the view.<br />
2643 /// <since_tizen> 3 </since_tizen>
2644 public Vector3 Scale
2648 return (Vector3)GetValue(ScaleProperty);
2652 SetValue(ScaleProperty, value);
2653 NotifyPropertyChanged();
2658 /// Gets or sets the scale X factor applied to the view.
2660 /// <since_tizen> 3 </since_tizen>
2665 return (float)GetValue(ScaleXProperty);
2669 SetValue(ScaleXProperty, value);
2670 NotifyPropertyChanged();
2675 /// Gets or sets the scale Y factor applied to the view.
2677 /// <since_tizen> 3 </since_tizen>
2682 return (float)GetValue(ScaleYProperty);
2686 SetValue(ScaleYProperty, value);
2687 NotifyPropertyChanged();
2692 /// Gets or sets the scale Z factor applied to the view.
2694 /// <since_tizen> 3 </since_tizen>
2699 return (float)GetValue(ScaleZProperty);
2703 SetValue(ScaleZProperty, value);
2704 NotifyPropertyChanged();
2709 /// Gets the world scale of the view.
2711 /// <since_tizen> 3 </since_tizen>
2712 public Vector3 WorldScale
2716 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2717 GetProperty(View.Property.WORLD_SCALE).Get(temp);
2723 /// Retrieves the visibility flag of the view.
2726 /// If the view is not visible, then the view and its children will not be rendered.
2727 /// 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.
2729 /// <since_tizen> 3 </since_tizen>
2730 public bool Visibility
2735 GetProperty(View.Property.VISIBLE).Get(out temp);
2741 /// Gets the view's world color.
2743 /// <since_tizen> 3 </since_tizen>
2744 public Vector4 WorldColor
2748 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2749 GetProperty(View.Property.WORLD_COLOR).Get(temp);
2755 /// Gets or sets the view's name.
2757 /// <since_tizen> 3 </since_tizen>
2762 return (string)GetValue(NameProperty);
2766 SetValue(NameProperty, value);
2767 NotifyPropertyChanged();
2772 /// Get the number of children held by the view.
2774 /// <since_tizen> 3 </since_tizen>
2775 public new uint ChildCount
2779 return GetChildCount();
2784 /// Gets the view's ID.
2787 /// <since_tizen> 3 </since_tizen>
2797 /// Gets or sets the status of whether the view should emit touch or hover signals.
2799 /// <since_tizen> 3 </since_tizen>
2800 public bool Sensitive
2804 return (bool)GetValue(SensitiveProperty);
2808 SetValue(SensitiveProperty, value);
2809 NotifyPropertyChanged();
2814 /// 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.
2816 /// <since_tizen> 3 </since_tizen>
2817 public bool LeaveRequired
2821 return (bool)GetValue(LeaveRequiredProperty);
2825 SetValue(LeaveRequiredProperty, value);
2826 NotifyPropertyChanged();
2831 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2833 /// <since_tizen> 3 </since_tizen>
2834 public bool InheritOrientation
2838 return (bool)GetValue(InheritOrientationProperty);
2842 SetValue(InheritOrientationProperty, value);
2843 NotifyPropertyChanged();
2848 /// Gets or sets the status of whether a child view inherits it's parent's scale.
2850 /// <since_tizen> 3 </since_tizen>
2851 public bool InheritScale
2855 return (bool)GetValue(InheritScaleProperty);
2859 SetValue(InheritScaleProperty, value);
2860 NotifyPropertyChanged();
2865 /// Gets or sets the status of how the view and its children should be drawn.<br />
2866 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2867 /// 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 />
2868 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2869 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2870 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2872 /// <since_tizen> 3 </since_tizen>
2873 public DrawModeType DrawMode
2877 return (DrawModeType)GetValue(DrawModeProperty);
2881 SetValue(DrawModeProperty, value);
2882 NotifyPropertyChanged();
2887 /// Gets or sets the relative to parent size factor of the view.<br />
2888 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2889 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2891 /// <since_tizen> 3 </since_tizen>
2892 public Vector3 SizeModeFactor
2896 return (Vector3)GetValue(SizeModeFactorProperty);
2900 SetValue(SizeModeFactorProperty, value);
2901 NotifyPropertyChanged();
2906 /// Gets or sets the width resize policy to be used.
2908 /// <since_tizen> 3 </since_tizen>
2909 public ResizePolicyType WidthResizePolicy
2913 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2917 SetValue(WidthResizePolicyProperty, value);
2918 // Match ResizePolicy to new Layouting.
2919 // Parent relative policies can not be mapped at this point as parent size unknown.
2922 case ResizePolicyType.UseNaturalSize:
2924 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
2927 case ResizePolicyType.FillToParent:
2929 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.MatchParent));
2932 case ResizePolicyType.FitToChildren:
2934 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.WrapContent));
2940 NotifyPropertyChanged();
2945 /// Gets or sets the height resize policy to be used.
2947 /// <since_tizen> 3 </since_tizen>
2948 public ResizePolicyType HeightResizePolicy
2952 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
2956 SetValue(HeightResizePolicyProperty, value);
2957 // Match ResizePolicy to new Layouting.
2958 // Parent relative policies can not be mapped at this point as parent size unknown.
2961 case ResizePolicyType.UseNaturalSize:
2963 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
2966 case ResizePolicyType.FillToParent:
2968 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.MatchParent));
2971 case ResizePolicyType.FitToChildren:
2973 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.WrapContent));
2979 NotifyPropertyChanged();
2984 /// Gets or sets the policy to use when setting size with size negotiation.<br />
2985 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
2987 /// <since_tizen> 3 </since_tizen>
2988 public SizeScalePolicyType SizeScalePolicy
2992 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
2996 SetValue(SizeScalePolicyProperty, value);
2997 NotifyPropertyChanged();
3002 /// Gets or sets the status of whether the width size is dependent on the height size.
3004 /// <since_tizen> 3 </since_tizen>
3005 public bool WidthForHeight
3009 return (bool)GetValue(WidthForHeightProperty);
3013 SetValue(WidthForHeightProperty, value);
3014 NotifyPropertyChanged();
3019 /// Gets or sets the status of whether the height size is dependent on the width size.
3021 /// <since_tizen> 3 </since_tizen>
3022 public bool HeightForWidth
3026 return (bool)GetValue(HeightForWidthProperty);
3030 SetValue(HeightForWidthProperty, value);
3031 NotifyPropertyChanged();
3036 /// Gets or sets the padding for use in layout.
3038 /// <since_tizen> 5 </since_tizen>
3039 public Extents Padding
3043 return (Extents)GetValue(PaddingProperty);
3047 SetValue(PaddingProperty, value);
3048 NotifyPropertyChanged();
3053 /// Gets or sets the minimum size the view can be assigned in size negotiation.
3055 /// <since_tizen> 3 </since_tizen>
3056 public Size2D MinimumSize
3060 return (Size2D)GetValue(MinimumSizeProperty);
3066 // Note: it only works if minimum size is >= than natural size.
3067 // To force the size it should be done through the width&height spec or Size2D.
3068 Layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
3069 Layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
3071 SetValue(MinimumSizeProperty, value);
3072 NotifyPropertyChanged();
3077 /// Gets or sets the maximum size the view can be assigned in size negotiation.
3079 /// <since_tizen> 3 </since_tizen>
3080 public Size2D MaximumSize
3084 return (Size2D)GetValue(MaximumSizeProperty);
3088 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
3089 // MATCH_PARENT spec + parent container size can be used to limit
3090 SetValue(MaximumSizeProperty, value);
3091 NotifyPropertyChanged();
3096 /// Gets or sets whether a child view inherits it's parent's position.<br />
3097 /// Default is to inherit.<br />
3098 /// 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 />
3100 /// <since_tizen> 3 </since_tizen>
3101 public bool InheritPosition
3105 return (bool)GetValue(InheritPositionProperty);
3109 SetValue(InheritPositionProperty, value);
3110 NotifyPropertyChanged();
3115 /// Gets or sets the clipping behavior (mode) of it's children.
3117 /// <since_tizen> 3 </since_tizen>
3118 public ClippingModeType ClippingMode
3122 return (ClippingModeType)GetValue(ClippingModeProperty);
3126 SetValue(ClippingModeProperty, value);
3127 NotifyPropertyChanged();
3132 /// Gets the number of renderers held by the view.
3134 /// <since_tizen> 3 </since_tizen>
3135 public uint RendererCount
3139 return GetRendererCount();
3144 /// [Obsolete("Please do not use! this will be deprecated")]
3146 /// <since_tizen> 3 </since_tizen>
3147 /// Please do not use! this will be deprecated!
3148 /// Instead please use PivotPoint.
3149 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
3151 "View view = new View(); " +
3152 "view.PivotPoint = PivotPoint.Center; " +
3153 "view.PositionUsesPivotPoint = true;")]
3154 [EditorBrowsable(EditorBrowsableState.Never)]
3155 public Position AnchorPoint
3159 Position temp = new Position(0.0f, 0.0f, 0.0f);
3160 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3165 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3166 NotifyPropertyChanged();
3171 /// Sets the size of a view for the width, the height and the depth.<br />
3172 /// Geometry can be scaled to fit within this area.<br />
3173 /// This does not interfere with the view's scale factor.<br />
3174 /// The views default depth is the minimum of width and height.<br />
3177 /// Please note that multi-cascade setting is not possible for this NUI object. <br />
3178 /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3179 /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
3180 /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
3181 /// 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 />
3183 /// <since_tizen> 5 </since_tizen>
3188 return (Size)GetValue(SizeProperty);
3192 SetValue(SizeProperty, value);
3193 // Set Specification so when layouts measure this View it matches the value set here.
3194 // All Views are currently Layouts.
3195 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
3196 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
3197 NotifyPropertyChanged();
3202 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
3204 /// <since_tizen> 3 </since_tizen>
3205 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
3207 "Container parent = view.GetParent(); " +
3208 "View view = parent as View;")]
3209 [EditorBrowsable(EditorBrowsableState.Never)]
3210 public new View Parent
3215 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
3216 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3217 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3219 if (basehandle is Layer layer)
3221 ret = new View(Layer.getCPtr(layer).Handle, false);
3222 NUILog.Error("This Parent property is deprecated, shoud do not be used");
3226 ret = basehandle as View;
3229 NDalicPINVOKE.delete_BaseHandle(CPtr);
3230 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3232 if (NDalicPINVOKE.SWIGPendingException.Pending)
3233 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3239 /// Gets/Sets whether inherit parent's the layout Direction.
3241 /// <since_tizen> 4 </since_tizen>
3242 public bool InheritLayoutDirection
3246 return (bool)GetValue(InheritLayoutDirectionProperty);
3250 SetValue(InheritLayoutDirectionProperty, value);
3251 NotifyPropertyChanged();
3256 /// Gets/Sets the layout Direction.
3258 /// <since_tizen> 4 </since_tizen>
3259 public ViewLayoutDirectionType LayoutDirection
3263 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
3267 SetValue(LayoutDirectionProperty, value);
3268 NotifyPropertyChanged();
3273 /// Gets or sets the Margin for use in layout.
3276 /// Margin property is supported by Layout algorithms and containers.
3277 /// Please Set Layout if you want to use Margin property.
3279 /// <since_tizen> 4 </since_tizen>
3280 public Extents Margin
3284 return (Extents)GetValue(MarginProperty);
3288 SetValue(MarginProperty, value);
3289 NotifyPropertyChanged();
3294 /// [Obsolete("Please do not use! this will be deprecated")]
3296 /// Please do not use! this will be deprecated!
3297 /// Instead please use Padding.
3298 /// <since_tizen> 4 </since_tizen>
3299 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
3300 [EditorBrowsable(EditorBrowsableState.Never)]
3301 public Extents PaddingEX
3305 Extents temp = new Extents(0, 0, 0, 0);
3306 GetProperty(View.Property.PADDING).Get(temp);
3311 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3312 NotifyPropertyChanged();
3316 internal Style Style
3320 return (Style)GetValue(StyleProperty);
3324 SetValue(StyleProperty, value);
3329 /// Child property to specify desired width
3331 internal int LayoutWidthSpecificationFixed
3336 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
3338 NUILog.Error("WidthSpecificationFixed get error!");
3344 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
3349 /// Child property to specify desired height
3351 internal int LayoutHeightSpecificationFixed
3356 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
3358 NUILog.Error("HeightSpecificationFixed get error!");
3364 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
3369 /// Child property to specify desired width, use MatchParent/WrapContent)
3371 internal ChildLayoutData LayoutWidthSpecification
3376 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
3378 NUILog.Error("WidthSpecificationFixed get error!");
3380 return (ChildLayoutData)tmp;
3384 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
3389 /// Child property to specify desired height, use MatchParent/WrapContent)
3391 internal ChildLayoutData LayoutHeightSpecification
3396 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
3398 NUILog.Error("HeightSpecificationFixed get error!");
3400 return (ChildLayoutData)tmp;
3404 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
3408 internal float Weight
3412 return (float)GetValue(WeightProperty);
3416 SetValue(WeightProperty, value);
3417 NotifyPropertyChanged();
3421 internal bool BackgroundImageSynchronosLoading
3425 return _backgroundImageSynchronosLoading;
3429 if (value != _backgroundImageSynchronosLoading)
3432 PropertyMap bgMap = this.Background;
3434 bgMap.Find(Visual.Property.Type)?.Get(out visualType);
3435 if (visualType == (int)Visual.Type.Image)
3437 bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
3439 if (bgUrl.Length != 0)
3441 _backgroundImageSynchronosLoading = value;
3442 bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
3443 this.Background = bgMap;
3449 internal float WorldPositionX
3454 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3459 internal float WorldPositionY
3464 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3469 internal float WorldPositionZ
3474 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3479 internal bool FocusState
3483 return IsKeyboardFocusable();
3487 SetKeyboardFocusable(value);
3492 /// Set the layout on this control.
3496 internal LayoutItem Layout
3500 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
3502 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3503 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3504 NDalicPINVOKE.delete_BaseHandle(CPtr);
3505 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3507 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3509 return basehandle as LayoutItem;
3513 Log.Info("NUI", "Set Layout on:" + Name + "\n");
3514 layoutingDisabled = false;
3521 /// Set that layouting is required on this View. It will automatically receive a Layout.
3525 internal bool LayoutingRequired
3529 bool result = Tizen.NUI.NDalicManualPINVOKE.View_IsLayoutingRequired(View.getCPtr(this));
3530 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3535 Tizen.NUI.NDalicManualPINVOKE.View_SetLayoutingRequired(View.getCPtr(this), value);
3539 internal float ParentOriginX
3544 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3549 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3550 NotifyPropertyChanged();
3554 internal float ParentOriginY
3559 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3564 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3565 NotifyPropertyChanged();
3569 internal float ParentOriginZ
3574 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3579 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3580 NotifyPropertyChanged();
3584 internal float PivotPointX
3589 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3594 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3598 internal float PivotPointY
3603 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3608 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3612 internal float PivotPointZ
3617 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3622 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3626 internal Matrix WorldMatrix
3630 Matrix temp = new Matrix();
3631 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3636 private int LeftFocusableViewId
3641 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
3646 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3650 private int RightFocusableViewId
3655 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
3660 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3664 private int UpFocusableViewId
3669 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
3674 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3678 private int DownFocusableViewId
3683 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
3688 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3693 /// Perform an action on a visual registered to this view. <br />
3694 /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
3696 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
3697 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
3698 /// <param name="attributes">Optional attributes for the action.</param>
3699 /// <since_tizen> 5 </since_tizen>
3700 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
3702 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
3703 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3707 /// Creates an animation to animate the background color visual. If there is no
3708 /// background visual, creates one with transparent black as it's mixColor.
3710 /// <since_tizen> 3 </since_tizen>
3711 public Animation AnimateBackgroundColor(object destinationValue,
3714 AlphaFunction.BuiltinFunctions? alphaFunction = null,
3715 object initialValue = null)
3717 Tizen.NUI.PropertyMap background = Background;
3719 if (background.Empty())
3721 // If there is no background yet, ensure there is a transparent
3723 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
3724 background = Background;
3726 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
3730 /// Creates an animation to animate the mixColor of the named visual.
3732 /// <since_tizen> 3 </since_tizen>
3733 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
3735 Animation animation = null;
3737 PropertyMap _animator = new PropertyMap();
3738 if (alphaFunction != null)
3740 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
3743 PropertyMap _timePeriod = new PropertyMap();
3744 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
3745 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
3746 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
3748 PropertyMap _transition = new PropertyMap();
3749 _transition.Add("animator", new PropertyValue(_animator));
3750 _transition.Add("target", new PropertyValue(targetVisual));
3751 _transition.Add("property", new PropertyValue("mixColor"));
3753 if (initialColor != null)
3755 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
3756 _transition.Add("initialValue", initValue);
3759 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
3760 _transition.Add("targetValue", destValue);
3761 TransitionData _transitionData = new TransitionData(_transition);
3763 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
3764 if (NDalicPINVOKE.SWIGPendingException.Pending)
3765 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3770 // From Container Base class
3772 /// Adds a child view to this view.
3774 /// <seealso cref="Container.Add" />
3775 /// <since_tizen> 4 </since_tizen>
3776 public override void Add(View child)
3780 Tizen.Log.Fatal("NUI", "Child is null");
3784 Log.Info("NUI", "Adding Child:" + child.Name + " to " + Name + "\n");
3786 Container oldParent = child.GetParent();
3787 if (oldParent != this)
3789 if (oldParent != null)
3791 oldParent.Remove(child);
3793 child.InternalParent = this;
3795 // Only give children a layout if their parent is an explicit container or a pure View.
3796 // Pure View meaning not derived from a View, e.g a Legacy container.
3797 // layoutSet flag is true when the View became a layout using the set Layout API opposed to automatically due to it's parent.
3798 // First time the set Layout API is used by any View the Window no longer has layoutingDisabled.
3799 if ((true == layoutSet || GetType() == typeof(View)) && null == child.Layout && false == layoutingDisabled)
3801 Log.Info("NUI", "Parent[" + Name + "] Layout set[" + layoutSet.ToString() + "] Pure View[" + (!layoutSet).ToString() + "]\n");
3802 // If child is a View or explicitly set to require layouting then set child as a LayoutGroup.
3803 // If the child is derived from a View then it may be a legacy or existing container hence will do layouting itself.
3804 if (child.GetType() == typeof(View) || true == child.LayoutingRequired)
3806 Log.Info("NUI", "Creating LayoutGroup for " + child.Name + " LayoutingRequired[" + child.LayoutingRequired.ToString() + "]\n");
3807 child.SetLayout(new LayoutGroup());
3811 // Adding child as a leaf, layouting will not propagate past this child.
3812 // Legacy containers will be a LayoutItems too and layout their children how they wish.
3813 Log.Info("NUI", "Creating LayoutItem for " + child.Name + "\n");
3814 child.SetLayout(new LayoutItem());
3820 Layout.LayoutChildren.Add(child.Layout);
3823 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
3824 if (NDalicPINVOKE.SWIGPendingException.Pending)
3825 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3826 Children.Add(child);
3828 if (ChildAdded != null)
3830 ChildAddedEventArgs e = new ChildAddedEventArgs
3834 ChildAdded(this, e);
3840 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
3842 /// <seealso cref="Container.Remove" />
3843 /// <since_tizen> 4 </since_tizen>
3844 public override void Remove(View child)
3846 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
3847 if (NDalicPINVOKE.SWIGPendingException.Pending)
3848 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3850 Children.Remove(child);
3851 child.InternalParent = null;
3857 Layout.LayoutChildren.Remove(child.Layout);
3861 if (ChildRemoved != null)
3863 ChildRemovedEventArgs e = new ChildRemovedEventArgs
3867 ChildRemoved(this, e);
3872 /// Retrieves a child view by index.
3874 /// <seealso cref="Container.GetChildAt" />
3875 /// <since_tizen> 4 </since_tizen>
3876 public override View GetChildAt(uint index)
3878 if (index < Children.Count)
3880 return Children[Convert.ToInt32(index)];
3889 /// Retrieves the number of children held by the view.
3891 /// <seealso cref="Container.GetChildCount" />
3892 /// <since_tizen> 4 </since_tizen>
3893 public override uint GetChildCount()
3895 return Convert.ToUInt32(Children.Count);
3899 /// Gets the views parent.
3901 /// <seealso cref="Container.GetParent()" />
3902 /// <since_tizen> 4 </since_tizen>
3903 public override Container GetParent()
3905 return this.InternalParent as Container;
3909 /// Queries whether the view has a focus.
3911 /// <returns>True if this view has a focus.</returns>
3912 /// <since_tizen> 3 </since_tizen>
3913 public bool HasFocus()
3915 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
3916 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3921 /// Sets the name of the style to be applied to the view.
3923 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
3924 /// <since_tizen> 3 </since_tizen>
3925 public void SetStyleName(string styleName)
3927 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
3928 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3932 /// Retrieves the name of the style to be applied to the view (if any).
3934 /// <returns>A string matching a style, or an empty string.</returns>
3935 /// <since_tizen> 3 </since_tizen>
3936 public string GetStyleName()
3938 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
3939 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3944 /// Clears the background.
3946 /// <since_tizen> 3 </since_tizen>
3947 public void ClearBackground()
3949 NDalicPINVOKE.View_ClearBackground(swigCPtr);
3950 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3957 /// This is an asynchronous method.
3959 /// <since_tizen> 3 </since_tizen>
3969 /// This is an asynchronous method.
3970 /// If the view is hidden, then the view and its children will not be rendered.
3971 /// 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.
3973 /// <since_tizen> 3 </since_tizen>
3980 /// Raises the view above all other views.
3983 /// Sibling order of views within the parent will be updated automatically.
3984 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
3986 /// <since_tizen> 3 </since_tizen>
3987 public void RaiseToTop()
3989 var parentChildren = GetParent()?.Children;
3991 if (parentChildren != null)
3993 parentChildren.Remove(this);
3994 parentChildren.Add(this);
3996 NDalicPINVOKE.RaiseToTop(swigCPtr);
3997 if (NDalicPINVOKE.SWIGPendingException.Pending)
3998 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4004 /// Lowers the view to the bottom of all views.
4007 /// The sibling order of views within the parent will be updated automatically.
4008 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4010 /// <since_tizen> 3 </since_tizen>
4011 public void LowerToBottom()
4013 var parentChildren = GetParent()?.Children;
4015 if (parentChildren != null)
4017 parentChildren.Remove(this);
4018 parentChildren.Insert(0, this);
4020 NDalicPINVOKE.LowerToBottom(swigCPtr);
4021 if (NDalicPINVOKE.SWIGPendingException.Pending)
4022 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4027 /// Queries if all resources required by a view are loaded and ready.
4029 /// <remarks>Most resources are only loaded when the control is placed on the stage.
4031 /// <since_tizen> 3 </since_tizen>
4032 public bool IsResourceReady()
4034 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
4035 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4040 /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
4042 /// <pre>The view has been initialized. </pre>
4043 /// <returns>The parent layer of view </returns>
4044 /// <since_tizen> 5 </since_tizen>
4045 public Layer GetLayer()
4047 //to fix memory leak issue, match the handle count with native side.
4048 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
4049 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4050 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
4051 NDalicPINVOKE.delete_BaseHandle(CPtr);
4052 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4054 if (NDalicPINVOKE.SWIGPendingException.Pending)
4055 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4060 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
4062 /// <pre>The (child) view has been initialized. </pre>
4063 /// <since_tizen> 4 </since_tizen>
4064 public void Unparent()
4066 GetParent()?.Remove(this);
4070 /// Search through this view's hierarchy for a view with the given name.
4071 /// The view itself is also considered in the search.
4073 /// <pre>The view has been initialized.</pre>
4074 /// <param name="viewName">The name of the view to find.</param>
4075 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
4076 /// <since_tizen> 3 </since_tizen>
4077 public View FindChildByName(string viewName)
4079 //to fix memory leak issue, match the handle count with native side.
4080 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
4081 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4082 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4083 NDalicPINVOKE.delete_BaseHandle(CPtr);
4084 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4086 if (NDalicPINVOKE.SWIGPendingException.Pending)
4087 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4092 /// Converts screen coordinates into the view's coordinate system using the default camera.
4094 /// <pre>The view has been initialized.</pre>
4095 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4096 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4097 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4098 /// <param name="screenX">The screen X-coordinate.</param>
4099 /// <param name="screenY">The screen Y-coordinate.</param>
4100 /// <returns>True if the conversion succeeded.</returns>
4101 /// <since_tizen> 3 </since_tizen>
4102 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4104 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4105 if (NDalicPINVOKE.SWIGPendingException.Pending)
4106 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4111 /// Sets the relative to parent size factor of the view.<br />
4112 /// This factor is only used when ResizePolicy is set to either:
4113 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4114 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4116 /// <pre>The view has been initialized.</pre>
4117 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4118 /// <since_tizen> 3 </since_tizen>
4119 public void SetSizeModeFactor(Vector3 factor)
4121 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4122 if (NDalicPINVOKE.SWIGPendingException.Pending)
4123 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4126 /// Calculates the height of the view given a width.<br />
4127 /// The natural size is used for default calculation.<br />
4128 /// Size 0 is treated as aspect ratio 1:1.<br />
4130 /// <param name="width">The width to use.</param>
4131 /// <returns>The height based on the width.</returns>
4132 /// <since_tizen> 3 </since_tizen>
4133 public float GetHeightForWidth(float width)
4135 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
4136 if (NDalicPINVOKE.SWIGPendingException.Pending)
4137 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4142 /// Calculates the width of the view given a height.<br />
4143 /// The natural size is used for default calculation.<br />
4144 /// Size 0 is treated as aspect ratio 1:1.<br />
4146 /// <param name="height">The height to use.</param>
4147 /// <returns>The width based on the height.</returns>
4148 /// <since_tizen> 3 </since_tizen>
4149 public float GetWidthForHeight(float height)
4151 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
4152 if (NDalicPINVOKE.SWIGPendingException.Pending)
4153 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4158 /// Return the amount of size allocated for relayout.
4160 /// <param name="dimension">The dimension to retrieve.</param>
4161 /// <returns>Return the size.</returns>
4162 /// <since_tizen> 3 </since_tizen>
4163 public float GetRelayoutSize(DimensionType dimension)
4165 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4166 if (NDalicPINVOKE.SWIGPendingException.Pending)
4167 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4172 /// Set the padding for the view.
4174 /// <param name="padding">Padding for the view.</param>
4175 /// <since_tizen> 3 </since_tizen>
4176 public void SetPadding(PaddingType padding)
4178 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4179 if (NDalicPINVOKE.SWIGPendingException.Pending)
4180 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4184 /// Return the value of padding for the view.
4186 /// <param name="paddingOut">the value of padding for the view</param>
4187 /// <since_tizen> 3 </since_tizen>
4188 public void GetPadding(PaddingType paddingOut)
4190 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4191 if (NDalicPINVOKE.SWIGPendingException.Pending)
4192 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4195 /// <since_tizen> 3 </since_tizen>
4196 public uint AddRenderer(Renderer renderer)
4198 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4199 if (NDalicPINVOKE.SWIGPendingException.Pending)
4200 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4204 /// <since_tizen> 3 </since_tizen>
4205 public Renderer GetRendererAt(uint index)
4207 //to fix memory leak issue, match the handle count with native side.
4208 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
4209 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4210 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4211 NDalicPINVOKE.delete_BaseHandle(CPtr);
4212 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4214 if (NDalicPINVOKE.SWIGPendingException.Pending)
4215 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4219 /// <since_tizen> 3 </since_tizen>
4220 public void RemoveRenderer(Renderer renderer)
4222 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4223 if (NDalicPINVOKE.SWIGPendingException.Pending)
4224 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4227 /// <since_tizen> 3 </since_tizen>
4228 public void RemoveRenderer(uint index)
4230 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4231 if (NDalicPINVOKE.SWIGPendingException.Pending)
4232 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4235 internal void Raise()
4237 var parentChildren = GetParent()?.Children;
4239 if (parentChildren != null)
4241 int currentIndex = parentChildren.IndexOf(this);
4243 // If the view is not already the last item in the list.
4244 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
4246 View temp = parentChildren[currentIndex + 1];
4247 parentChildren[currentIndex + 1] = this;
4248 parentChildren[currentIndex] = temp;
4250 NDalicPINVOKE.Raise(swigCPtr);
4251 if (NDalicPINVOKE.SWIGPendingException.Pending)
4252 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4257 internal void Lower()
4259 var parentChildren = GetParent()?.Children;
4261 if (parentChildren != null)
4263 int currentIndex = parentChildren.IndexOf(this);
4265 // If the view is not already the first item in the list.
4266 if (currentIndex > 0 && currentIndex < parentChildren.Count)
4268 View temp = parentChildren[currentIndex - 1];
4269 parentChildren[currentIndex - 1] = this;
4270 parentChildren[currentIndex] = temp;
4272 NDalicPINVOKE.Lower(swigCPtr);
4273 if (NDalicPINVOKE.SWIGPendingException.Pending)
4274 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4280 /// Raises the view to above the target view.
4282 /// <remarks>The sibling order of views within the parent will be updated automatically.
4283 /// Views on the level above the target view will still be shown above this view.
4284 /// Raising this view above views with the same sibling order as each other will raise this view above them.
4285 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4287 /// <param name="target">Will be raised above this view.</param>
4288 internal void RaiseAbove(View target)
4290 var parentChildren = GetParent()?.Children;
4292 if (parentChildren != null)
4294 int currentIndex = parentChildren.IndexOf(this);
4295 int targetIndex = parentChildren.IndexOf(target);
4297 if (currentIndex < 0 || targetIndex < 0 ||
4298 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4300 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4303 // If the currentIndex is less than the target index and the target has the same parent.
4304 if (currentIndex < targetIndex)
4306 parentChildren.Remove(this);
4307 parentChildren.Insert(targetIndex, this);
4309 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
4310 if (NDalicPINVOKE.SWIGPendingException.Pending)
4311 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4318 /// Lowers the view to below the target view.
4320 /// <remarks>The sibling order of views within the parent will be updated automatically.
4321 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
4322 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4324 /// <param name="target">Will be lowered below this view.</param>
4325 internal void LowerBelow(View target)
4327 var parentChildren = GetParent()?.Children;
4329 if (parentChildren != null)
4331 int currentIndex = parentChildren.IndexOf(this);
4332 int targetIndex = parentChildren.IndexOf(target);
4333 if (currentIndex < 0 || targetIndex < 0 ||
4334 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4336 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4340 // If the currentIndex is not already the 0th index and the target has the same parent.
4341 if ((currentIndex != 0) && (targetIndex != -1) &&
4342 (currentIndex > targetIndex))
4344 parentChildren.Remove(this);
4345 parentChildren.Insert(targetIndex, this);
4347 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
4348 if (NDalicPINVOKE.SWIGPendingException.Pending)
4349 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4355 internal string GetName()
4357 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
4358 if (NDalicPINVOKE.SWIGPendingException.Pending)
4359 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4363 internal void SetName(string name)
4365 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
4366 if (NDalicPINVOKE.SWIGPendingException.Pending)
4367 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4370 internal uint GetId()
4372 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
4373 if (NDalicPINVOKE.SWIGPendingException.Pending)
4374 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4378 internal bool IsRoot()
4380 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
4381 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4385 internal bool OnWindow()
4387 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
4388 if (NDalicPINVOKE.SWIGPendingException.Pending)
4389 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4393 internal View FindChildById(uint id)
4395 //to fix memory leak issue, match the handle count with native side.
4396 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
4397 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4398 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4399 NDalicPINVOKE.delete_BaseHandle(CPtr);
4400 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4402 if (NDalicPINVOKE.SWIGPendingException.Pending)
4403 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4407 internal void SetParentOrigin(Vector3 origin)
4409 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
4410 if (NDalicPINVOKE.SWIGPendingException.Pending)
4411 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4414 internal Vector3 GetCurrentParentOrigin()
4416 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
4417 if (NDalicPINVOKE.SWIGPendingException.Pending)
4418 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4422 internal void SetAnchorPoint(Vector3 anchorPoint)
4424 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
4425 if (NDalicPINVOKE.SWIGPendingException.Pending)
4426 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4429 internal Vector3 GetCurrentAnchorPoint()
4431 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
4432 if (NDalicPINVOKE.SWIGPendingException.Pending)
4433 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4437 internal void SetSize(float width, float height)
4439 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
4440 if (NDalicPINVOKE.SWIGPendingException.Pending)
4441 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4444 internal void SetSize(float width, float height, float depth)
4446 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
4447 if (NDalicPINVOKE.SWIGPendingException.Pending)
4448 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4451 internal void SetSize(Vector2 size)
4453 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
4454 if (NDalicPINVOKE.SWIGPendingException.Pending)
4455 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4458 internal void SetSize(Vector3 size)
4460 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
4461 if (NDalicPINVOKE.SWIGPendingException.Pending)
4462 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4465 internal Vector3 GetTargetSize()
4467 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
4468 if (NDalicPINVOKE.SWIGPendingException.Pending)
4469 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4473 internal Size2D GetCurrentSize()
4475 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
4476 if (NDalicPINVOKE.SWIGPendingException.Pending)
4477 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4478 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
4482 internal Vector3 GetNaturalSize()
4484 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
4485 if (NDalicPINVOKE.SWIGPendingException.Pending)
4486 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4490 internal void SetPosition(float x, float y)
4492 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
4493 if (NDalicPINVOKE.SWIGPendingException.Pending)
4494 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4497 internal void SetPosition(float x, float y, float z)
4499 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
4500 if (NDalicPINVOKE.SWIGPendingException.Pending)
4501 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4504 internal void SetPosition(Vector3 position)
4506 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
4507 if (NDalicPINVOKE.SWIGPendingException.Pending)
4508 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4511 internal void SetX(float x)
4513 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
4514 if (NDalicPINVOKE.SWIGPendingException.Pending)
4515 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4518 internal void SetY(float y)
4520 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
4521 if (NDalicPINVOKE.SWIGPendingException.Pending)
4522 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4525 internal void SetZ(float z)
4527 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
4528 if (NDalicPINVOKE.SWIGPendingException.Pending)
4529 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4532 internal void TranslateBy(Vector3 distance)
4534 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
4535 if (NDalicPINVOKE.SWIGPendingException.Pending)
4536 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4539 internal Position GetCurrentPosition()
4541 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
4542 if (NDalicPINVOKE.SWIGPendingException.Pending)
4543 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4547 internal Vector3 GetCurrentWorldPosition()
4549 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
4550 if (NDalicPINVOKE.SWIGPendingException.Pending)
4551 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4555 internal void SetInheritPosition(bool inherit)
4557 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
4558 if (NDalicPINVOKE.SWIGPendingException.Pending)
4559 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4562 internal bool IsPositionInherited()
4564 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
4565 if (NDalicPINVOKE.SWIGPendingException.Pending)
4566 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4570 internal void SetOrientation(Degree angle, Vector3 axis)
4572 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4573 if (NDalicPINVOKE.SWIGPendingException.Pending)
4574 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4577 internal void SetOrientation(Radian angle, Vector3 axis)
4579 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4580 if (NDalicPINVOKE.SWIGPendingException.Pending)
4581 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4584 internal void SetOrientation(Rotation orientation)
4586 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
4587 if (NDalicPINVOKE.SWIGPendingException.Pending)
4588 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4591 internal void RotateBy(Degree angle, Vector3 axis)
4593 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4594 if (NDalicPINVOKE.SWIGPendingException.Pending)
4595 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4598 internal void RotateBy(Radian angle, Vector3 axis)
4600 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4601 if (NDalicPINVOKE.SWIGPendingException.Pending)
4602 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4605 internal void RotateBy(Rotation relativeRotation)
4607 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4608 if (NDalicPINVOKE.SWIGPendingException.Pending)
4609 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4612 internal Rotation GetCurrentOrientation()
4614 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
4615 if (NDalicPINVOKE.SWIGPendingException.Pending)
4616 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4620 internal void SetInheritOrientation(bool inherit)
4622 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
4623 if (NDalicPINVOKE.SWIGPendingException.Pending)
4624 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4627 internal bool IsOrientationInherited()
4629 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
4630 if (NDalicPINVOKE.SWIGPendingException.Pending)
4631 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4635 internal Rotation GetCurrentWorldOrientation()
4637 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4638 if (NDalicPINVOKE.SWIGPendingException.Pending)
4639 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4643 internal void SetScale(float scale)
4645 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
4646 if (NDalicPINVOKE.SWIGPendingException.Pending)
4647 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4650 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4652 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4653 if (NDalicPINVOKE.SWIGPendingException.Pending)
4654 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4657 internal void SetScale(Vector3 scale)
4659 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4660 if (NDalicPINVOKE.SWIGPendingException.Pending)
4661 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4664 internal void ScaleBy(Vector3 relativeScale)
4666 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4667 if (NDalicPINVOKE.SWIGPendingException.Pending)
4668 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4671 internal Vector3 GetCurrentScale()
4673 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
4674 if (NDalicPINVOKE.SWIGPendingException.Pending)
4675 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4679 internal Vector3 GetCurrentWorldScale()
4681 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
4682 if (NDalicPINVOKE.SWIGPendingException.Pending)
4683 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4687 internal void SetInheritScale(bool inherit)
4689 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
4690 if (NDalicPINVOKE.SWIGPendingException.Pending)
4691 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4694 internal bool IsScaleInherited()
4696 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
4697 if (NDalicPINVOKE.SWIGPendingException.Pending)
4698 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4702 internal Matrix GetCurrentWorldMatrix()
4704 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4705 if (NDalicPINVOKE.SWIGPendingException.Pending)
4706 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4710 internal void SetVisible(bool visible)
4712 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
4713 if (NDalicPINVOKE.SWIGPendingException.Pending)
4714 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4717 internal bool IsVisible()
4719 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
4720 if (NDalicPINVOKE.SWIGPendingException.Pending)
4721 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4725 internal void SetOpacity(float opacity)
4727 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
4728 if (NDalicPINVOKE.SWIGPendingException.Pending)
4729 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4732 internal float GetCurrentOpacity()
4734 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
4735 if (NDalicPINVOKE.SWIGPendingException.Pending)
4736 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4740 internal void SetColor(Vector4 color)
4742 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4743 if (NDalicPINVOKE.SWIGPendingException.Pending)
4744 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4747 internal Vector4 GetCurrentColor()
4749 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
4750 if (NDalicPINVOKE.SWIGPendingException.Pending)
4751 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4755 internal void SetColorMode(ColorMode colorMode)
4757 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
4758 if (NDalicPINVOKE.SWIGPendingException.Pending)
4759 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4762 internal ColorMode GetColorMode()
4764 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
4765 if (NDalicPINVOKE.SWIGPendingException.Pending)
4766 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4770 internal Vector4 GetCurrentWorldColor()
4772 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
4773 if (NDalicPINVOKE.SWIGPendingException.Pending)
4774 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4778 internal void SetDrawMode(DrawModeType drawMode)
4780 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4781 if (NDalicPINVOKE.SWIGPendingException.Pending)
4782 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4785 internal DrawModeType GetDrawMode()
4787 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
4788 if (NDalicPINVOKE.SWIGPendingException.Pending)
4789 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4793 internal void SetKeyboardFocusable(bool focusable)
4795 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4796 if (NDalicPINVOKE.SWIGPendingException.Pending)
4797 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4800 internal bool IsKeyboardFocusable()
4802 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
4803 if (NDalicPINVOKE.SWIGPendingException.Pending)
4804 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4808 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4810 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4811 if (NDalicPINVOKE.SWIGPendingException.Pending)
4812 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4815 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4817 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4818 if (NDalicPINVOKE.SWIGPendingException.Pending)
4819 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4823 internal Vector3 GetSizeModeFactor()
4825 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
4826 if (NDalicPINVOKE.SWIGPendingException.Pending)
4827 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4831 internal void SetMinimumSize(Vector2 size)
4833 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4834 if (NDalicPINVOKE.SWIGPendingException.Pending)
4835 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4838 internal Vector2 GetMinimumSize()
4840 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
4841 if (NDalicPINVOKE.SWIGPendingException.Pending)
4842 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4846 internal void SetMaximumSize(Vector2 size)
4848 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4849 if (NDalicPINVOKE.SWIGPendingException.Pending)
4850 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4853 internal Vector2 GetMaximumSize()
4855 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
4856 if (NDalicPINVOKE.SWIGPendingException.Pending)
4857 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4861 internal int GetHierarchyDepth()
4863 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
4864 if (NDalicPINVOKE.SWIGPendingException.Pending)
4865 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4869 internal uint GetRendererCount()
4871 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
4872 if (NDalicPINVOKE.SWIGPendingException.Pending)
4873 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4877 internal TouchDataSignal TouchSignal()
4879 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
4880 if (NDalicPINVOKE.SWIGPendingException.Pending)
4881 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4885 internal HoverSignal HoveredSignal()
4887 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
4888 if (NDalicPINVOKE.SWIGPendingException.Pending)
4889 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4893 internal WheelSignal WheelEventSignal()
4895 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
4896 if (NDalicPINVOKE.SWIGPendingException.Pending)
4897 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4901 internal ViewSignal OnWindowSignal()
4903 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
4904 if (NDalicPINVOKE.SWIGPendingException.Pending)
4905 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4909 internal ViewSignal OffWindowSignal()
4911 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
4912 if (NDalicPINVOKE.SWIGPendingException.Pending)
4913 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4917 internal ViewSignal OnRelayoutSignal()
4919 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
4920 if (NDalicPINVOKE.SWIGPendingException.Pending)
4921 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4925 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
4927 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
4928 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4932 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
4934 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
4935 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4939 internal ViewSignal ResourcesLoadedSignal()
4941 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
4942 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4946 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
4948 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
4951 internal bool IsTopLevelView()
4953 if (GetParent() is Layer)
4960 internal void SetKeyInputFocus()
4962 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
4963 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4966 internal void ClearKeyInputFocus()
4968 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
4969 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4972 internal PinchGestureDetector GetPinchGestureDetector()
4974 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
4975 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4979 internal PanGestureDetector GetPanGestureDetector()
4981 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
4982 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4986 internal TapGestureDetector GetTapGestureDetector()
4988 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
4989 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4993 internal LongPressGestureDetector GetLongPressGestureDetector()
4995 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
4996 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5000 internal void SetBackgroundColor(Vector4 color)
5002 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
5003 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5006 internal Vector4 GetBackgroundColor()
5008 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
5009 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5013 internal void SetBackgroundImage(Image image)
5015 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
5016 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5019 internal ControlKeySignal KeyEventSignal()
5021 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
5022 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5026 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
5028 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
5029 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5033 internal KeyInputFocusSignal KeyInputFocusLostSignal()
5035 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
5036 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5040 internal IntPtr GetPtrfromView()
5042 return (IntPtr)swigCPtr;
5045 internal void SetLayout(LayoutItem layout)
5047 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(layout));
5048 layout.LayoutChildren.Clear();
5049 foreach (View view in Children)
5051 layout.LayoutChildren.Add(view.Layout);
5055 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5057 return (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5061 /// you can override it to clean-up your own resources.
5063 /// <param name="type">DisposeTypes</param>
5064 /// <since_tizen> 3 </since_tizen>
5065 protected override void Dispose(DisposeTypes type)
5072 if (type == DisposeTypes.Explicit)
5075 //Release your own managed resources here.
5076 //You should release all of your own disposable objects here.
5079 //Release your own unmanaged resources here.
5080 //You should not access any managed member here except static instance.
5081 //because the execution order of Finalizes is non-deterministic.
5084 DisConnectFromSignals();
5087 if (swigCPtr.Handle != global::System.IntPtr.Zero)
5091 swigCMemOwn = false;
5092 NDalicPINVOKE.delete_View(swigCPtr);
5094 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5097 foreach (View view in Children)
5099 view.InternalParent = null;
5106 private void OnSize2DChanged(int width, int height)
5108 Size2D = new Size2D(width, height);
5111 private void OnPosition2DChanged(int x, int y)
5113 Position2D = new Position2D(x, y);
5116 private void DisConnectFromSignals()
5118 // Save current CPtr.
5119 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
5121 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
5122 swigCPtr = GetBaseHandleCPtrHandleRef;
5124 if (_onRelayoutEventCallback != null)
5126 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5129 if (_offWindowEventCallback != null)
5131 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5134 if (_onWindowEventCallback != null)
5136 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5139 if (_wheelEventCallback != null)
5141 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5144 if (_hoverEventCallback != null)
5146 this.HoveredSignal().Disconnect(_hoverEventCallback);
5149 if (_touchDataCallback != null)
5151 this.TouchSignal().Disconnect(_touchDataCallback);
5154 if (_ResourcesLoadedCallback != null)
5156 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
5159 if (_offWindowEventCallback != null)
5161 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5164 if (_onWindowEventCallback != null)
5166 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5169 if (_wheelEventCallback != null)
5171 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5174 if (_hoverEventCallback != null)
5176 this.HoveredSignal().Disconnect(_hoverEventCallback);
5179 if (_touchDataCallback != null)
5181 this.TouchSignal().Disconnect(_touchDataCallback);
5184 if (_onRelayoutEventCallback != null)
5186 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5189 if (_keyCallback != null)
5191 this.KeyEventSignal().Disconnect(_keyCallback);
5194 if (_keyInputFocusLostCallback != null)
5196 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
5199 if (_keyInputFocusGainedCallback != null)
5201 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
5204 if (_backgroundResourceLoadedCallback != null)
5206 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5209 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
5210 // Restore current CPtr.
5211 swigCPtr = currentCPtr;
5214 private void OnKeyInputFocusGained(IntPtr view)
5216 if (_keyInputFocusGainedEventHandler != null)
5218 _keyInputFocusGainedEventHandler(this, null);
5222 private void OnKeyInputFocusLost(IntPtr view)
5224 if (_keyInputFocusLostEventHandler != null)
5226 _keyInputFocusLostEventHandler(this, null);
5230 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
5232 if (keyEvent == global::System.IntPtr.Zero)
5234 NUILog.Error("keyEvent should not be null!");
5238 KeyEventArgs e = new KeyEventArgs();
5240 bool result = false;
5242 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
5244 if (_keyEventHandler != null)
5246 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
5248 // Oring the result of each callback.
5249 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
5251 result |= del(this, e);
5258 // Callback for View OnRelayout signal
5259 private void OnRelayout(IntPtr data)
5261 if (_onRelayoutEventHandler != null)
5263 _onRelayoutEventHandler(this, null);
5267 // Callback for View TouchSignal
5268 private bool OnTouch(IntPtr view, IntPtr touchData)
5270 if (touchData == global::System.IntPtr.Zero)
5272 NUILog.Error("touchData should not be null!");
5276 TouchEventArgs e = new TouchEventArgs();
5278 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
5280 if (_touchDataEventHandler != null)
5282 return _touchDataEventHandler(this, e);
5287 // Callback for View Hover signal
5288 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
5290 if (hoverEvent == global::System.IntPtr.Zero)
5292 NUILog.Error("hoverEvent should not be null!");
5296 HoverEventArgs e = new HoverEventArgs();
5298 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
5300 if (_hoverEventHandler != null)
5302 return _hoverEventHandler(this, e);
5307 // Callback for View Wheel signal
5308 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
5310 if (wheelEvent == global::System.IntPtr.Zero)
5312 NUILog.Error("wheelEvent should not be null!");
5316 WheelEventArgs e = new WheelEventArgs();
5318 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
5320 if (_wheelEventHandler != null)
5322 return _wheelEventHandler(this, e);
5327 // Callback for View OnWindow signal
5328 private void OnWindow(IntPtr data)
5330 if (_onWindowEventHandler != null)
5332 _onWindowEventHandler(this, null);
5336 // Callback for View OffWindow signal
5337 private void OffWindow(IntPtr data)
5339 if (_offWindowEventHandler != null)
5341 _offWindowEventHandler(this, null);
5345 // Callback for View visibility change signal
5346 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
5348 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
5351 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5353 e.Visibility = visibility;
5356 if (_visibilityChangedEventHandler != null)
5358 _visibilityChangedEventHandler(this, e);
5362 // Callback for View layout direction change signal
5363 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
5365 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
5368 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5372 if (_layoutDirectionChangedEventHandler != null)
5374 _layoutDirectionChangedEventHandler(this, e);
5378 private void OnResourcesLoaded(IntPtr view)
5380 if (_resourcesLoadedEventHandler != null)
5382 _resourcesLoadedEventHandler(this, null);
5386 private View ConvertIdToView(uint id)
5389 if (GetParent() is View)
5391 View parentView = GetParent() as View;
5392 view = parentView.FindChildById(id);
5397 view = Window.Instance.GetRootLayer().FindChildById(id);
5403 private void OnBackgroundResourceLoaded(IntPtr view)
5405 BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5406 e.Status = (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5408 if (_backgroundResourceLoadedEventHandler != null)
5410 _backgroundResourceLoadedEventHandler(this, e);
5415 /// Event argument passed through the ChildAdded event.
5417 /// <since_tizen> 5 </since_tizen>
5418 public class ChildAddedEventArgs : EventArgs
5421 /// Added child view at moment.
5423 /// <since_tizen> 5 </since_tizen>
5424 public View Added { get; set; }
5428 /// Event argument passed through the ChildRemoved event.
5430 /// <since_tizen> 5 </since_tizen>
5431 public class ChildRemovedEventArgs : EventArgs
5434 /// Removed child view at moment.
5436 /// <since_tizen> 5 </since_tizen>
5437 public View Removed { get; set; }
5441 /// Event arguments that passed via the KeyEvent signal.
5443 /// <since_tizen> 3 </since_tizen>
5444 public class KeyEventArgs : EventArgs
5449 /// Key - is the key sent to the view.
5451 /// <since_tizen> 3 </since_tizen>
5466 /// Event arguments that passed via the touch signal.
5468 /// <since_tizen> 3 </since_tizen>
5469 public class TouchEventArgs : EventArgs
5471 private Touch _touch;
5474 /// Touch - contains the information of touch points.
5476 /// <since_tizen> 3 </since_tizen>
5491 /// Event arguments that passed via the hover signal.
5493 /// <since_tizen> 3 </since_tizen>
5494 public class HoverEventArgs : EventArgs
5496 private Hover _hover;
5499 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
5501 /// <since_tizen> 3 </since_tizen>
5516 /// Event arguments that passed via the wheel signal.
5518 /// <since_tizen> 3 </since_tizen>
5519 public class WheelEventArgs : EventArgs
5521 private Wheel _wheel;
5524 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
5526 /// <since_tizen> 3 </since_tizen>
5541 /// Event arguments of visibility changed.
5543 /// <since_tizen> 3 </since_tizen>
5544 public class VisibilityChangedEventArgs : EventArgs
5547 private bool _visibility;
5548 private VisibilityChangeType _type;
5551 /// The view, or child of view, whose visibility has changed.
5553 /// <since_tizen> 3 </since_tizen>
5567 /// Whether the view is now visible or not.
5569 /// <since_tizen> 3 </since_tizen>
5570 public bool Visibility
5578 _visibility = value;
5583 /// Whether the view's visible property has changed or a parent's.
5585 /// <since_tizen> 3 </since_tizen>
5586 public VisibilityChangeType Type
5600 /// Event arguments of layout direction changed.
5602 /// <since_tizen> 4 </since_tizen>
5603 public class LayoutDirectionChangedEventArgs : EventArgs
5606 private ViewLayoutDirectionType _type;
5609 /// The view, or child of view, whose layout direction has changed.
5611 /// <since_tizen> 4 </since_tizen>
5625 /// Whether the view's layout direction property has changed or a parent's.
5627 /// <since_tizen> 4 </since_tizen>
5628 public ViewLayoutDirectionType Type
5641 internal class BackgroundResourceLoadedEventArgs : EventArgs
5643 private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5644 public ResourceLoadingStatusType Status
5657 internal class Property
5659 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
5660 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
5661 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
5662 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
5663 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
5664 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
5665 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
5666 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
5667 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
5668 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
5669 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
5670 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
5671 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
5672 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
5673 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
5674 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
5675 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
5676 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
5677 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
5678 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
5679 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
5680 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
5681 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
5682 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
5683 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
5684 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
5685 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
5686 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
5687 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
5688 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
5689 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
5690 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
5691 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
5692 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
5693 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
5694 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
5695 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
5696 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
5697 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
5698 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
5699 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
5700 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
5701 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
5702 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
5703 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
5704 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
5705 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
5706 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
5707 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
5708 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
5709 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
5710 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
5711 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
5712 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
5713 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
5714 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
5715 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
5716 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
5717 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
5718 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
5719 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
5720 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
5721 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();