2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.ComponentModel;
19 using System.Runtime.InteropServices;
20 using Tizen.NUI.Binding;
22 namespace Tizen.NUI.BaseComponents
25 /// The View layout Direction type.
27 /// <since_tizen> 4 </since_tizen>
28 public enum ViewLayoutDirectionType
33 /// <since_tizen> 4 </since_tizen>
38 /// <since_tizen> 4 </since_tizen>
42 internal enum ChildLayoutData
45 /// Constant which indicates child size should match parent size
49 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
54 internal enum ResourceLoadingStatusType
63 /// View is the base class for all views.
65 /// <since_tizen> 3 </since_tizen>
66 public class View : Container, IResourcesProvider
68 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
69 [EditorBrowsable(EditorBrowsableState.Never)]
70 public static readonly BindableProperty StyleNameProperty = BindableProperty.Create("StyleName", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
72 var view = (View)bindable;
75 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue));
78 defaultValueCreator: (bindable) =>
80 var view = (View)bindable;
82 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STYLE_NAME).Get(out temp);
85 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
86 [EditorBrowsable(EditorBrowsableState.Never)]
87 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
89 var view = (View)bindable;
92 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((Color)newValue));
95 defaultValueCreator: (bindable) =>
97 var view = (View)bindable;
98 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
100 Tizen.NUI.PropertyMap background = view.Background;
102 background.Find(Visual.Property.Type)?.Get(out visualType);
103 if (visualType == (int)Visual.Type.Color)
105 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
108 return backgroundColor;
110 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
111 [EditorBrowsable(EditorBrowsableState.Never)]
112 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
114 var view = (View)bindable;
115 if (newValue != null)
117 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((string)newValue));
120 defaultValueCreator: (bindable) =>
122 var view = (View)bindable;
123 string backgroundImage = "";
125 Tizen.NUI.PropertyMap background = view.Background;
127 background.Find(Visual.Property.Type)?.Get(out visualType);
128 if (visualType == (int)Visual.Type.Image)
130 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
133 return backgroundImage;
135 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
136 [EditorBrowsable(EditorBrowsableState.Never)]
137 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create("Background", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
139 var view = (View)bindable;
140 if (newValue != null)
142 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
145 defaultValueCreator: (bindable) =>
147 var view = (View)bindable;
148 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
149 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
152 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
153 [EditorBrowsable(EditorBrowsableState.Never)]
154 public static readonly BindableProperty StateProperty = BindableProperty.Create("State", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
156 var view = (View)bindable;
157 if (newValue != null)
159 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
162 defaultValueCreator: (bindable) =>
164 var view = (View)bindable;
166 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
168 NUILog.Error("State get error!");
172 case 0: return States.Normal;
173 case 1: return States.Focused;
174 case 2: return States.Disabled;
175 default: return States.Normal;
178 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
179 [EditorBrowsable(EditorBrowsableState.Never)]
180 public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
182 var view = (View)bindable;
183 string valueToString = "";
184 if (newValue != null)
186 switch ((States)newValue)
188 case States.Normal: { valueToString = "NORMAL"; break; }
189 case States.Focused: { valueToString = "FOCUSED"; break; }
190 case States.Disabled: { valueToString = "DISABLED"; break; }
191 default: { valueToString = "NORMAL"; break; }
193 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
196 defaultValueCreator: (bindable) =>
198 var view = (View)bindable;
200 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
202 NUILog.Error("subState get error!");
206 case "NORMAL": return States.Normal;
207 case "FOCUSED": return States.Focused;
208 case "DISABLED": return States.Disabled;
209 default: return States.Normal;
212 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
213 [EditorBrowsable(EditorBrowsableState.Never)]
214 public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
216 var view = (View)bindable;
217 if (newValue != null)
219 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
222 defaultValueCreator: (bindable) =>
224 var view = (View)bindable;
225 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
226 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
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 #pragma warning disable CS0618 // Disable deprecated warning as we do need to use the deprecated API here.
941 case "STENCIL": return DrawModeType.Stencil;
942 #pragma warning restore CS0618
943 default: return DrawModeType.Normal;
946 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
947 [EditorBrowsable(EditorBrowsableState.Never)]
948 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
950 var view = (View)bindable;
951 if (newValue != null)
953 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
956 defaultValueCreator: (bindable) =>
958 var view = (View)bindable;
959 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
960 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
963 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
964 [EditorBrowsable(EditorBrowsableState.Never)]
965 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
967 var view = (View)bindable;
968 if (newValue != null)
970 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
973 defaultValueCreator: (bindable) =>
975 var view = (View)bindable;
977 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
979 NUILog.Error("WidthResizePolicy get error!");
983 case "FIXED": return ResizePolicyType.Fixed;
984 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
985 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
986 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
987 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
988 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
989 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
990 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
991 default: return ResizePolicyType.Fixed;
994 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
995 [EditorBrowsable(EditorBrowsableState.Never)]
996 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
998 var view = (View)bindable;
999 if (newValue != null)
1001 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
1004 defaultValueCreator: (bindable) =>
1006 var view = (View)bindable;
1008 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
1010 NUILog.Error("HeightResizePolicy get error!");
1014 case "FIXED": return ResizePolicyType.Fixed;
1015 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1016 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1017 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1018 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1019 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1020 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1021 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1022 default: return ResizePolicyType.Fixed;
1025 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1026 [EditorBrowsable(EditorBrowsableState.Never)]
1027 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1029 var view = (View)bindable;
1030 string valueToString = "";
1031 if (newValue != null)
1033 switch ((SizeScalePolicyType)newValue)
1035 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1036 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1037 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1038 default: { valueToString = "USE_SIZE_SET"; break; }
1040 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1043 defaultValueCreator: (bindable) =>
1045 var view = (View)bindable;
1047 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1049 NUILog.Error("SizeScalePolicy get error!");
1053 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1054 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1055 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1056 default: return SizeScalePolicyType.UseSizeSet;
1059 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1060 [EditorBrowsable(EditorBrowsableState.Never)]
1061 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1063 var view = (View)bindable;
1064 if (newValue != null)
1066 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1069 defaultValueCreator: (bindable) =>
1071 var view = (View)bindable;
1073 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1076 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1077 [EditorBrowsable(EditorBrowsableState.Never)]
1078 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1080 var view = (View)bindable;
1081 if (newValue != null)
1083 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1086 defaultValueCreator: (bindable) =>
1088 var view = (View)bindable;
1090 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1093 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1094 [EditorBrowsable(EditorBrowsableState.Never)]
1095 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1097 var view = (View)bindable;
1098 if (newValue != null)
1100 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1103 defaultValueCreator: (bindable) =>
1105 var view = (View)bindable;
1106 Extents temp = new Extents(0, 0, 0, 0);
1107 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1110 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1111 [EditorBrowsable(EditorBrowsableState.Never)]
1112 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1114 var view = (View)bindable;
1115 if (newValue != null)
1117 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1120 defaultValueCreator: (bindable) =>
1122 var view = (View)bindable;
1123 Size temp = new Size(0, 0, 0);
1124 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1127 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1128 [EditorBrowsable(EditorBrowsableState.Never)]
1129 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1131 var view = (View)bindable;
1132 if (newValue != null)
1134 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1137 defaultValueCreator: (bindable) =>
1139 var view = (View)bindable;
1140 Size2D temp = new Size2D(0, 0);
1141 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1144 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1145 [EditorBrowsable(EditorBrowsableState.Never)]
1146 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1148 var view = (View)bindable;
1149 if (newValue != null)
1151 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1154 defaultValueCreator: (bindable) =>
1156 var view = (View)bindable;
1157 Size2D temp = new Size2D(0, 0);
1158 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1161 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1162 [EditorBrowsable(EditorBrowsableState.Never)]
1163 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1165 var view = (View)bindable;
1166 if (newValue != null)
1168 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1171 defaultValueCreator: (bindable) =>
1173 var view = (View)bindable;
1175 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1178 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1179 [EditorBrowsable(EditorBrowsableState.Never)]
1180 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1182 var view = (View)bindable;
1183 if (newValue != null)
1185 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1188 defaultValueCreator: (bindable) =>
1190 var view = (View)bindable;
1192 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1194 NUILog.Error("ClippingMode get error!");
1196 return (ClippingModeType)temp;
1198 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1199 [EditorBrowsable(EditorBrowsableState.Never)]
1200 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1202 var view = (View)bindable;
1203 if (newValue != null)
1205 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1208 defaultValueCreator: (bindable) =>
1210 var view = (View)bindable;
1212 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1215 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1216 [EditorBrowsable(EditorBrowsableState.Never)]
1217 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1219 var view = (View)bindable;
1220 if (newValue != null)
1222 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1225 defaultValueCreator: (bindable) =>
1227 var view = (View)bindable;
1229 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1231 NUILog.Error("LAYOUT_DIRECTION get error!");
1233 return (ViewLayoutDirectionType)temp;
1235 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1236 [EditorBrowsable(EditorBrowsableState.Never)]
1237 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1239 var view = (View)bindable;
1240 if (newValue != null)
1242 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1245 defaultValueCreator: (bindable) =>
1247 var view = (View)bindable;
1248 Extents temp = new Extents(0, 0, 0, 0);
1249 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1252 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1253 [EditorBrowsable(EditorBrowsableState.Never)]
1254 public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style), propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1256 internal readonly MergedStyle _mergedStyle;
1258 /// Flag to allow Layouting to be disabled for Views.
1259 /// Once a View has a Layout set then any children added to Views from then on will receive
1260 /// automatic Layouts.
1262 private static bool layoutingDisabled = true;
1263 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1265 private bool layoutSet = false; // Flag to indicate if SetLayout was called or View was automatically given a Layout
1266 private bool _backgroundImageSynchronosLoading = false;
1267 private EventHandler _offWindowEventHandler;
1268 private OffWindowEventCallbackType _offWindowEventCallback;
1269 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1270 private WheelEventCallbackType _wheelEventCallback;
1271 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1272 private KeyCallbackType _keyCallback;
1273 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1274 private TouchDataCallbackType _touchDataCallback;
1275 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1276 private HoverEventCallbackType _hoverEventCallback;
1277 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
1278 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
1279 private EventHandler _keyInputFocusGainedEventHandler;
1280 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1281 private EventHandler _keyInputFocusLostEventHandler;
1282 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1283 private EventHandler _onRelayoutEventHandler;
1284 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1285 private EventHandler _onWindowEventHandler;
1286 private OnWindowEventCallbackType _onWindowEventCallback;
1287 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
1288 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
1289 // Resource Ready Signal
1290 private EventHandler _resourcesLoadedEventHandler;
1291 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
1292 private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
1293 private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
1296 /// Creates a new instance of a view.
1298 /// <since_tizen> 3 </since_tizen>
1299 public View() : this(NDalicPINVOKE.View_New(), true)
1301 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1303 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1305 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1308 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
1310 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1313 PositionUsesPivotPoint = false;
1315 _mergedStyle = new MergedStyle(GetType(), this);
1318 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1320 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1323 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1324 private delegate void OffWindowEventCallbackType(IntPtr control);
1325 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1326 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1327 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1328 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1329 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1330 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1331 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1332 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1333 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1334 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
1335 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1336 private delegate void ResourcesLoadedCallbackType(IntPtr control);
1337 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1338 private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
1339 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1340 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1341 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1342 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1343 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1344 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1345 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1346 private delegate void OnWindowEventCallbackType(IntPtr control);
1347 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1348 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
1351 /// Event when a child is removed.
1353 /// <since_tizen> 5 </since_tizen>
1354 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1356 /// Event when a child is added.
1358 /// <since_tizen> 5 </since_tizen>
1359 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1362 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1363 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1365 /// <since_tizen> 3 </since_tizen>
1366 public event EventHandler FocusGained
1370 if (_keyInputFocusGainedEventHandler == null)
1372 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1373 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1376 _keyInputFocusGainedEventHandler += value;
1381 _keyInputFocusGainedEventHandler -= value;
1383 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1385 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1391 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1392 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1394 /// <since_tizen> 3 </since_tizen>
1395 public event EventHandler FocusLost
1399 if (_keyInputFocusLostEventHandler == null)
1401 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1402 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1405 _keyInputFocusLostEventHandler += value;
1410 _keyInputFocusLostEventHandler -= value;
1412 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1414 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1420 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1421 /// The KeyPressed signal is emitted when the key event is received.<br />
1423 /// <since_tizen> 3 </since_tizen>
1424 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1428 if (_keyEventHandler == null)
1430 _keyCallback = OnKeyEvent;
1431 this.KeyEventSignal().Connect(_keyCallback);
1434 _keyEventHandler += value;
1439 _keyEventHandler -= value;
1441 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1443 this.KeyEventSignal().Disconnect(_keyCallback);
1449 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1450 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1452 /// <since_tizen> 3 </since_tizen>
1453 public event EventHandler Relayout
1457 if (_onRelayoutEventHandler == null)
1459 _onRelayoutEventCallback = OnRelayout;
1460 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1463 _onRelayoutEventHandler += value;
1468 _onRelayoutEventHandler -= value;
1470 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1472 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1479 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1480 /// The touched signal is emitted when the touch input is received.<br />
1482 /// <since_tizen> 3 </since_tizen>
1483 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1487 if (_touchDataEventHandler == null)
1489 _touchDataCallback = OnTouch;
1490 this.TouchSignal().Connect(_touchDataCallback);
1493 _touchDataEventHandler += value;
1498 _touchDataEventHandler -= value;
1500 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1502 this.TouchSignal().Disconnect(_touchDataCallback);
1509 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1510 /// The hovered signal is emitted when the hover input is received.<br />
1512 /// <since_tizen> 3 </since_tizen>
1513 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1517 if (_hoverEventHandler == null)
1519 _hoverEventCallback = OnHoverEvent;
1520 this.HoveredSignal().Connect(_hoverEventCallback);
1523 _hoverEventHandler += value;
1528 _hoverEventHandler -= value;
1530 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1532 this.HoveredSignal().Disconnect(_hoverEventCallback);
1539 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1540 /// The WheelMoved signal is emitted when the wheel event is received.<br />
1542 /// <since_tizen> 3 </since_tizen>
1543 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1547 if (_wheelEventHandler == null)
1549 _wheelEventCallback = OnWheelEvent;
1550 this.WheelEventSignal().Connect(_wheelEventCallback);
1553 _wheelEventHandler += value;
1558 _wheelEventHandler -= value;
1560 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
1562 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1569 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
1570 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
1572 /// <since_tizen> 3 </since_tizen>
1573 public event EventHandler AddedToWindow
1577 if (_onWindowEventHandler == null)
1579 _onWindowEventCallback = OnWindow;
1580 this.OnWindowSignal().Connect(_onWindowEventCallback);
1583 _onWindowEventHandler += value;
1588 _onWindowEventHandler -= value;
1590 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
1592 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1598 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
1599 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
1601 /// <since_tizen> 3 </since_tizen>
1602 public event EventHandler RemovedFromWindow
1606 if (_offWindowEventHandler == null)
1608 _offWindowEventCallback = OffWindow;
1609 this.OffWindowSignal().Connect(_offWindowEventCallback);
1612 _offWindowEventHandler += value;
1617 _offWindowEventHandler -= value;
1619 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
1621 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1627 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
1628 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
1630 /// <since_tizen> 3 </since_tizen>
1631 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
1635 if (_visibilityChangedEventHandler == null)
1637 _visibilityChangedEventCallback = OnVisibilityChanged;
1638 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
1641 _visibilityChangedEventHandler += value;
1646 _visibilityChangedEventHandler -= value;
1648 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
1650 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
1656 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
1657 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
1659 /// <since_tizen> 4 </since_tizen>
1660 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
1664 if (_layoutDirectionChangedEventHandler == null)
1666 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
1667 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
1670 _layoutDirectionChangedEventHandler += value;
1675 _layoutDirectionChangedEventHandler -= value;
1677 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
1679 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
1685 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1686 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1688 /// <since_tizen> 3 </since_tizen>
1689 public event EventHandler ResourcesLoaded
1693 if (_resourcesLoadedEventHandler == null)
1695 _ResourcesLoadedCallback = OnResourcesLoaded;
1696 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1699 _resourcesLoadedEventHandler += value;
1704 _resourcesLoadedEventHandler -= value;
1706 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1708 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1713 internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
1717 if (_backgroundResourceLoadedEventHandler == null)
1719 _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
1720 this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
1723 _backgroundResourceLoadedEventHandler += value;
1727 _backgroundResourceLoadedEventHandler -= value;
1729 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1731 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1737 /// Enumeration for describing the states of the view.
1739 /// <since_tizen> 3 </since_tizen>
1743 /// The normal state.
1747 /// The focused state.
1751 /// The disabled state.
1757 /// Describes the direction to move the focus towards.
1759 /// <since_tizen> 3 </since_tizen>
1760 public enum FocusDirection
1763 /// Move keyboard focus towards the left direction.
1765 /// <since_tizen> 3 </since_tizen>
1768 /// Move keyboard focus towards the right direction.
1770 /// <since_tizen> 3 </since_tizen>
1773 /// Move keyboard focus towards the up direction.
1775 /// <since_tizen> 3 </since_tizen>
1778 /// Move keyboard focus towards the down direction.
1780 /// <since_tizen> 3 </since_tizen>
1783 /// Move keyboard focus towards the previous page direction.
1785 /// <since_tizen> 3 </since_tizen>
1788 /// Move keyboard focus towards the next page direction.
1790 /// <since_tizen> 3 </since_tizen>
1794 internal enum PropertyRange
1796 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1797 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1798 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1801 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1802 [EditorBrowsable(EditorBrowsableState.Never)]
1803 public bool IsResourcesCreated
1807 return Application.Current.IsResourcesCreated;
1811 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1812 [EditorBrowsable(EditorBrowsableState.Never)]
1813 public ResourceDictionary XamlResources
1817 return Application.Current.XamlResources;
1821 Application.Current.XamlResources = value;
1826 /// The StyleName, type string.
1828 /// <since_tizen> 3 </since_tizen>
1829 public string StyleName
1833 return (string)GetValue(StyleNameProperty);
1837 SetValue(StyleNameProperty, value);
1838 NotifyPropertyChanged();
1843 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1845 /// <since_tizen> 3 </since_tizen>
1846 public Color BackgroundColor
1850 return (Color)GetValue(BackgroundColorProperty);
1854 SetValue(BackgroundColorProperty, value);
1855 NotifyPropertyChanged();
1860 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1862 /// <since_tizen> 3 </since_tizen>
1863 public string BackgroundImage
1867 return (string)GetValue(BackgroundImageProperty);
1871 SetValue(BackgroundImageProperty, value);
1872 NotifyPropertyChanged();
1877 /// The background of view.
1879 /// <since_tizen> 3 </since_tizen>
1880 public Tizen.NUI.PropertyMap Background
1884 return (PropertyMap)GetValue(BackgroundProperty);
1888 SetValue(BackgroundProperty, value);
1889 NotifyPropertyChanged();
1895 /// The current state of the view.
1897 /// <since_tizen> 3 </since_tizen>
1902 return (States)GetValue(StateProperty);
1906 SetValue(StateProperty, value);
1907 NotifyPropertyChanged();
1912 /// The current sub state of the view.
1914 /// <since_tizen> 3 </since_tizen>
1915 public States SubState
1919 return (States)GetValue(SubStateProperty);
1923 SetValue(SubStateProperty, value);
1924 NotifyPropertyChanged();
1929 /// Displays a tooltip
1931 /// <since_tizen> 3 </since_tizen>
1932 public Tizen.NUI.PropertyMap Tooltip
1936 return (PropertyMap)GetValue(TooltipProperty);
1940 SetValue(TooltipProperty, value);
1941 NotifyPropertyChanged();
1946 /// Displays a tooltip as a text.
1948 /// <since_tizen> 3 </since_tizen>
1949 public string TooltipText
1953 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1954 NotifyPropertyChanged();
1959 /// The Child property of FlexContainer.<br />
1960 /// The proportion of the free space in the container, the flex item will receive.<br />
1961 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1963 /// <since_tizen> 3 </since_tizen>
1968 return (float)GetValue(FlexProperty);
1972 SetValue(FlexProperty, value);
1973 NotifyPropertyChanged();
1978 /// The Child property of FlexContainer.<br />
1979 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
1981 /// <since_tizen> 3 </since_tizen>
1982 public int AlignSelf
1986 return (int)GetValue(AlignSelfProperty);
1990 SetValue(AlignSelfProperty, value);
1991 NotifyPropertyChanged();
1996 /// The Child property of FlexContainer.<br />
1997 /// The space around the flex item.<br />
1999 /// <since_tizen> 3 </since_tizen>
2000 public Vector4 FlexMargin
2004 return (Vector4)GetValue(FlexMarginProperty);
2008 SetValue(FlexMarginProperty, value);
2009 NotifyPropertyChanged();
2014 /// The top-left cell this child occupies, if not set, the first available cell is used.
2016 /// <since_tizen> 3 </since_tizen>
2017 public Vector2 CellIndex
2021 return (Vector2)GetValue(CellIndexProperty);
2025 SetValue(CellIndexProperty, value);
2026 NotifyPropertyChanged();
2031 /// The number of rows this child occupies, if not set, the default value is 1.
2033 /// <since_tizen> 3 </since_tizen>
2034 public float RowSpan
2038 return (float)GetValue(RowSpanProperty);
2042 SetValue(RowSpanProperty, value);
2043 NotifyPropertyChanged();
2048 /// The number of columns this child occupies, if not set, the default value is 1.
2050 /// <since_tizen> 3 </since_tizen>
2051 public float ColumnSpan
2055 return (float)GetValue(ColumnSpanProperty);
2059 SetValue(ColumnSpanProperty, value);
2060 NotifyPropertyChanged();
2065 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
2067 /// <since_tizen> 3 </since_tizen>
2068 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
2072 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
2076 SetValue(CellHorizontalAlignmentProperty, value);
2077 NotifyPropertyChanged();
2082 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
2084 /// <since_tizen> 3 </since_tizen>
2085 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
2089 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
2093 SetValue(CellVerticalAlignmentProperty, value);
2094 NotifyPropertyChanged();
2099 /// The left focusable view.<br />
2100 /// This will return null if not set.<br />
2101 /// This will also return null if the specified left focusable view is not on a window.<br />
2103 /// <since_tizen> 3 </since_tizen>
2104 public View LeftFocusableView
2106 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2109 return (View)GetValue(LeftFocusableViewProperty);
2113 SetValue(LeftFocusableViewProperty, value);
2114 NotifyPropertyChanged();
2119 /// The right focusable view.<br />
2120 /// This will return null if not set.<br />
2121 /// This will also return null if the specified right focusable view is not on a window.<br />
2123 /// <since_tizen> 3 </since_tizen>
2124 public View RightFocusableView
2126 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2129 return (View)GetValue(RightFocusableViewProperty);
2133 SetValue(RightFocusableViewProperty, value);
2134 NotifyPropertyChanged();
2139 /// The up focusable view.<br />
2140 /// This will return null if not set.<br />
2141 /// This will also return null if the specified up focusable view is not on a window.<br />
2143 /// <since_tizen> 3 </since_tizen>
2144 public View UpFocusableView
2146 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2149 return (View)GetValue(UpFocusableViewProperty);
2153 SetValue(UpFocusableViewProperty, value);
2154 NotifyPropertyChanged();
2159 /// The down focusable view.<br />
2160 /// This will return null if not set.<br />
2161 /// This will also return null if the specified down focusable view is not on a window.<br />
2163 /// <since_tizen> 3 </since_tizen>
2164 public View DownFocusableView
2166 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2169 return (View)GetValue(DownFocusableViewProperty);
2173 SetValue(DownFocusableViewProperty, value);
2174 NotifyPropertyChanged();
2179 /// Whether the view should be focusable by keyboard navigation.
2181 /// <since_tizen> 3 </since_tizen>
2182 public bool Focusable
2186 SetValue(FocusableProperty, value);
2187 NotifyPropertyChanged();
2191 return (bool)GetValue(FocusableProperty);
2196 /// Retrieves the position of the view.<br />
2197 /// The coordinates are relative to the view's parent.<br />
2199 /// <since_tizen> 3 </since_tizen>
2200 public Position CurrentPosition
2204 return GetCurrentPosition();
2209 /// Sets the size of a view for the width and the height.<br />
2210 /// Geometry can be scaled to fit within this area.<br />
2211 /// This does not interfere with the view's scale factor.<br />
2212 /// The views default depth is the minimum of width and height.<br />
2215 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
2216 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
2217 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
2218 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2219 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2220 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2221 /// 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 />
2223 /// <since_tizen> 3 </since_tizen>
2224 public Size2D Size2D
2228 Size2D temp = (Size2D)GetValue(Size2DProperty);
2229 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
2233 SetValue(Size2DProperty, value);
2234 // Set Specification so when layouts measure this View it matches the value set here.
2235 // All Views are currently Layouts.
2236 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
2237 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
2238 NotifyPropertyChanged();
2243 /// Retrieves the size of the view.<br />
2244 /// The coordinates are relative to the view's parent.<br />
2246 /// <since_tizen> 3 </since_tizen>
2247 public Size2D CurrentSize
2251 return GetCurrentSize();
2256 /// Retrieves and sets the view's opacity.<br />
2258 /// <since_tizen> 3 </since_tizen>
2259 public float Opacity
2263 return (float)GetValue(OpacityProperty);
2267 SetValue(OpacityProperty, value);
2268 NotifyPropertyChanged();
2273 /// Sets the position of the view for X and Y.<br />
2274 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2275 /// If the position inheritance is disabled, sets the world position.<br />
2278 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
2279 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
2280 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
2281 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2282 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2283 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2285 /// <since_tizen> 3 </since_tizen>
2286 public Position2D Position2D
2290 Position2D temp = (Position2D)GetValue(Position2DProperty);
2291 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
2295 SetValue(Position2DProperty, value);
2296 NotifyPropertyChanged();
2301 /// Retrieves the screen postion of the view.<br />
2303 /// <since_tizen> 3 </since_tizen>
2304 public Vector2 ScreenPosition
2308 Vector2 temp = new Vector2(0.0f, 0.0f);
2309 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2315 /// Determines whether the pivot point should be used to determine the position of the view.
2316 /// This is true by default.
2318 /// <remarks>If false, then the top-left of the view is used for the position.
2319 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
2321 /// <since_tizen> 3 </since_tizen>
2322 public bool PositionUsesPivotPoint
2326 return (bool)GetValue(PositionUsesPivotPointProperty);
2330 SetValue(PositionUsesPivotPointProperty, value);
2331 NotifyPropertyChanged();
2336 /// Please do not use! this will be deprecated.
2338 /// Please do not use! this will be deprecated!
2339 /// Instead please use PositionUsesPivotPoint.
2340 /// <since_tizen> 3 </since_tizen>
2341 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2343 "View view = new View(); " +
2344 "view.PivotPoint = PivotPoint.Center; " +
2345 "view.PositionUsesPivotPoint = true;")]
2346 [EditorBrowsable(EditorBrowsableState.Never)]
2347 public bool PositionUsesAnchorPoint
2352 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2357 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2358 NotifyPropertyChanged();
2363 /// Queries whether the view is connected to the stage.<br />
2364 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2366 /// <since_tizen> 3 </since_tizen>
2367 public bool IsOnWindow
2376 /// Gets the depth in the hierarchy for the view.
2378 /// <since_tizen> 3 </since_tizen>
2379 public int HierarchyDepth
2383 return GetHierarchyDepth();
2388 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2391 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
2392 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2393 /// The values set by this property will likely change.
2395 /// <since_tizen> 3 </since_tizen>
2396 public int SiblingOrder
2400 return (int)GetValue(SiblingOrderProperty);
2404 SetValue(SiblingOrderProperty, value);
2405 NotifyPropertyChanged();
2410 /// Returns the natural size of the view.
2413 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2415 /// <since_tizen> 5 </since_tizen>
2416 public Vector3 NaturalSize
2420 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2421 if (NDalicPINVOKE.SWIGPendingException.Pending)
2422 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2428 /// Returns the natural size (Size2D) of the view.
2431 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2433 /// <since_tizen> 4 </since_tizen>
2434 public Size2D NaturalSize2D
2438 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2439 if (NDalicPINVOKE.SWIGPendingException.Pending)
2440 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2442 return new Size2D((int)temp.Width, (int)temp.Height);
2447 /// Gets or sets the origin of a view within its parent's area.<br />
2448 /// 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 />
2449 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
2450 /// A view's position is the distance between this origin and the view's anchor-point.<br />
2452 /// <pre>The view has been initialized.</pre>
2453 /// <since_tizen> 3 </since_tizen>
2454 public Position ParentOrigin
2458 return (Position)GetValue(ParentOriginProperty);
2462 SetValue(ParentOriginProperty, value);
2463 NotifyPropertyChanged();
2468 /// Gets or sets the anchor-point of a view.<br />
2469 /// 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 />
2470 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
2471 /// A view position is the distance between its parent-origin and this anchor-point.<br />
2472 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
2473 /// <pre>The view has been initialized.</pre>
2475 /// <since_tizen> 3 </since_tizen>
2476 public Position PivotPoint
2480 return (Position)GetValue(PivotPointProperty);
2484 SetValue(PivotPointProperty, value);
2485 NotifyPropertyChanged();
2490 /// Gets or sets the size width of the view.
2492 /// <since_tizen> 3 </since_tizen>
2493 public float SizeWidth
2497 return (float)GetValue(SizeWidthProperty);
2501 SetValue(SizeWidthProperty, value);
2502 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
2503 NotifyPropertyChanged();
2508 /// Gets or sets the size height of the view.
2510 /// <since_tizen> 3 </since_tizen>
2511 public float SizeHeight
2515 return (float)GetValue(SizeHeightProperty);
2519 SetValue(SizeHeightProperty, value);
2520 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
2521 NotifyPropertyChanged();
2526 /// Gets or sets the position of the view.<br />
2527 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
2528 /// If the position inheritance is disabled, sets the world position.<br />
2530 /// <since_tizen> 3 </since_tizen>
2531 public Position Position
2535 return (Position)GetValue(PositionProperty);
2539 SetValue(PositionProperty, value);
2540 NotifyPropertyChanged();
2545 /// Gets or sets the position X of the view.
2547 /// <since_tizen> 3 </since_tizen>
2548 public float PositionX
2552 return (float)GetValue(PositionXProperty);
2556 SetValue(PositionXProperty, value);
2557 NotifyPropertyChanged();
2562 /// Gets or sets the position Y of the view.
2564 /// <since_tizen> 3 </since_tizen>
2565 public float PositionY
2569 return (float)GetValue(PositionYProperty);
2573 SetValue(PositionYProperty, value);
2574 NotifyPropertyChanged();
2579 /// Gets or sets the position Z of the view.
2581 /// <since_tizen> 3 </since_tizen>
2582 public float PositionZ
2586 return (float)GetValue(PositionZProperty);
2590 SetValue(PositionZProperty, value);
2591 NotifyPropertyChanged();
2596 /// Gets or sets the world position of the view.
2598 /// <since_tizen> 3 </since_tizen>
2599 public Vector3 WorldPosition
2603 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2604 GetProperty(View.Property.WORLD_POSITION).Get(temp);
2610 /// Gets or sets the orientation of the view.<br />
2611 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
2613 /// <remarks>This is an asynchronous method.</remarks>
2614 /// <since_tizen> 3 </since_tizen>
2615 public Rotation Orientation
2619 return (Rotation)GetValue(OrientationProperty);
2623 SetValue(OrientationProperty, value);
2624 NotifyPropertyChanged();
2629 /// Gets or sets the world orientation of the view.<br />
2631 /// <since_tizen> 3 </since_tizen>
2632 public Rotation WorldOrientation
2636 Rotation temp = new Rotation();
2637 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
2643 /// Gets or sets the scale factor applied to the view.<br />
2645 /// <since_tizen> 3 </since_tizen>
2646 public Vector3 Scale
2650 return (Vector3)GetValue(ScaleProperty);
2654 SetValue(ScaleProperty, value);
2655 NotifyPropertyChanged();
2660 /// Gets or sets the scale X factor applied to the view.
2662 /// <since_tizen> 3 </since_tizen>
2667 return (float)GetValue(ScaleXProperty);
2671 SetValue(ScaleXProperty, value);
2672 NotifyPropertyChanged();
2677 /// Gets or sets the scale Y factor applied to the view.
2679 /// <since_tizen> 3 </since_tizen>
2684 return (float)GetValue(ScaleYProperty);
2688 SetValue(ScaleYProperty, value);
2689 NotifyPropertyChanged();
2694 /// Gets or sets the scale Z factor applied to the view.
2696 /// <since_tizen> 3 </since_tizen>
2701 return (float)GetValue(ScaleZProperty);
2705 SetValue(ScaleZProperty, value);
2706 NotifyPropertyChanged();
2711 /// Gets the world scale of the view.
2713 /// <since_tizen> 3 </since_tizen>
2714 public Vector3 WorldScale
2718 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2719 GetProperty(View.Property.WORLD_SCALE).Get(temp);
2725 /// Retrieves the visibility flag of the view.
2728 /// If the view is not visible, then the view and its children will not be rendered.
2729 /// 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.
2731 /// <since_tizen> 3 </since_tizen>
2732 public bool Visibility
2737 GetProperty(View.Property.VISIBLE).Get(out temp);
2743 /// Gets the view's world color.
2745 /// <since_tizen> 3 </since_tizen>
2746 public Vector4 WorldColor
2750 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2751 GetProperty(View.Property.WORLD_COLOR).Get(temp);
2757 /// Gets or sets the view's name.
2759 /// <since_tizen> 3 </since_tizen>
2764 return (string)GetValue(NameProperty);
2768 SetValue(NameProperty, value);
2769 NotifyPropertyChanged();
2774 /// Get the number of children held by the view.
2776 /// <since_tizen> 3 </since_tizen>
2777 public new uint ChildCount
2781 return GetChildCount();
2786 /// Gets the view's ID.
2789 /// <since_tizen> 3 </since_tizen>
2799 /// Gets or sets the status of whether the view should emit touch or hover signals.
2801 /// <since_tizen> 3 </since_tizen>
2802 public bool Sensitive
2806 return (bool)GetValue(SensitiveProperty);
2810 SetValue(SensitiveProperty, value);
2811 NotifyPropertyChanged();
2816 /// 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.
2818 /// <since_tizen> 3 </since_tizen>
2819 public bool LeaveRequired
2823 return (bool)GetValue(LeaveRequiredProperty);
2827 SetValue(LeaveRequiredProperty, value);
2828 NotifyPropertyChanged();
2833 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2835 /// <since_tizen> 3 </since_tizen>
2836 public bool InheritOrientation
2840 return (bool)GetValue(InheritOrientationProperty);
2844 SetValue(InheritOrientationProperty, value);
2845 NotifyPropertyChanged();
2850 /// Gets or sets the status of whether a child view inherits it's parent's scale.
2852 /// <since_tizen> 3 </since_tizen>
2853 public bool InheritScale
2857 return (bool)GetValue(InheritScaleProperty);
2861 SetValue(InheritScaleProperty, value);
2862 NotifyPropertyChanged();
2867 /// Gets or sets the status of how the view and its children should be drawn.<br />
2868 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2869 /// 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 />
2870 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2871 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2872 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2874 /// <since_tizen> 3 </since_tizen>
2875 public DrawModeType DrawMode
2879 return (DrawModeType)GetValue(DrawModeProperty);
2883 SetValue(DrawModeProperty, value);
2884 NotifyPropertyChanged();
2889 /// Gets or sets the relative to parent size factor of the view.<br />
2890 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2891 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2893 /// <since_tizen> 3 </since_tizen>
2894 public Vector3 SizeModeFactor
2898 return (Vector3)GetValue(SizeModeFactorProperty);
2902 SetValue(SizeModeFactorProperty, value);
2903 NotifyPropertyChanged();
2908 /// Gets or sets the width resize policy to be used.
2910 /// <since_tizen> 3 </since_tizen>
2911 public ResizePolicyType WidthResizePolicy
2915 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2919 SetValue(WidthResizePolicyProperty, value);
2920 // Match ResizePolicy to new Layouting.
2921 // Parent relative policies can not be mapped at this point as parent size unknown.
2924 case ResizePolicyType.UseNaturalSize:
2926 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
2929 case ResizePolicyType.FillToParent:
2931 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.MatchParent));
2934 case ResizePolicyType.FitToChildren:
2936 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.WrapContent));
2942 NotifyPropertyChanged();
2947 /// Gets or sets the height resize policy to be used.
2949 /// <since_tizen> 3 </since_tizen>
2950 public ResizePolicyType HeightResizePolicy
2954 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
2958 SetValue(HeightResizePolicyProperty, value);
2959 // Match ResizePolicy to new Layouting.
2960 // Parent relative policies can not be mapped at this point as parent size unknown.
2963 case ResizePolicyType.UseNaturalSize:
2965 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
2968 case ResizePolicyType.FillToParent:
2970 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.MatchParent));
2973 case ResizePolicyType.FitToChildren:
2975 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.WrapContent));
2981 NotifyPropertyChanged();
2986 /// Gets or sets the policy to use when setting size with size negotiation.<br />
2987 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
2989 /// <since_tizen> 3 </since_tizen>
2990 public SizeScalePolicyType SizeScalePolicy
2994 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
2998 SetValue(SizeScalePolicyProperty, value);
2999 NotifyPropertyChanged();
3004 /// Gets or sets the status of whether the width size is dependent on the height size.
3006 /// <since_tizen> 3 </since_tizen>
3007 public bool WidthForHeight
3011 return (bool)GetValue(WidthForHeightProperty);
3015 SetValue(WidthForHeightProperty, value);
3016 NotifyPropertyChanged();
3021 /// Gets or sets the status of whether the height size is dependent on the width size.
3023 /// <since_tizen> 3 </since_tizen>
3024 public bool HeightForWidth
3028 return (bool)GetValue(HeightForWidthProperty);
3032 SetValue(HeightForWidthProperty, value);
3033 NotifyPropertyChanged();
3038 /// Gets or sets the padding for use in layout.
3040 /// <since_tizen> 5 </since_tizen>
3041 public Extents Padding
3045 return (Extents)GetValue(PaddingProperty);
3049 SetValue(PaddingProperty, value);
3050 NotifyPropertyChanged();
3055 /// Gets or sets the minimum size the view can be assigned in size negotiation.
3057 /// <since_tizen> 3 </since_tizen>
3058 public Size2D MinimumSize
3062 return (Size2D)GetValue(MinimumSizeProperty);
3068 // Note: it only works if minimum size is >= than natural size.
3069 // To force the size it should be done through the width&height spec or Size2D.
3070 Layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
3071 Layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
3073 SetValue(MinimumSizeProperty, value);
3074 NotifyPropertyChanged();
3079 /// Gets or sets the maximum size the view can be assigned in size negotiation.
3081 /// <since_tizen> 3 </since_tizen>
3082 public Size2D MaximumSize
3086 return (Size2D)GetValue(MaximumSizeProperty);
3090 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
3091 // MATCH_PARENT spec + parent container size can be used to limit
3092 SetValue(MaximumSizeProperty, value);
3093 NotifyPropertyChanged();
3098 /// Gets or sets whether a child view inherits it's parent's position.<br />
3099 /// Default is to inherit.<br />
3100 /// 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 />
3102 /// <since_tizen> 3 </since_tizen>
3103 public bool InheritPosition
3107 return (bool)GetValue(InheritPositionProperty);
3111 SetValue(InheritPositionProperty, value);
3112 NotifyPropertyChanged();
3117 /// Gets or sets the clipping behavior (mode) of it's children.
3119 /// <since_tizen> 3 </since_tizen>
3120 public ClippingModeType ClippingMode
3124 return (ClippingModeType)GetValue(ClippingModeProperty);
3128 SetValue(ClippingModeProperty, value);
3129 NotifyPropertyChanged();
3134 /// Gets the number of renderers held by the view.
3136 /// <since_tizen> 3 </since_tizen>
3137 public uint RendererCount
3141 return GetRendererCount();
3146 /// [Obsolete("Please do not use! this will be deprecated")]
3148 /// <since_tizen> 3 </since_tizen>
3149 /// Please do not use! this will be deprecated!
3150 /// Instead please use PivotPoint.
3151 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
3153 "View view = new View(); " +
3154 "view.PivotPoint = PivotPoint.Center; " +
3155 "view.PositionUsesPivotPoint = true;")]
3156 [EditorBrowsable(EditorBrowsableState.Never)]
3157 public Position AnchorPoint
3161 Position temp = new Position(0.0f, 0.0f, 0.0f);
3162 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3167 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3168 NotifyPropertyChanged();
3173 /// Sets the size of a view for the width, the height and the depth.<br />
3174 /// Geometry can be scaled to fit within this area.<br />
3175 /// This does not interfere with the view's scale factor.<br />
3176 /// The views default depth is the minimum of width and height.<br />
3179 /// Please note that multi-cascade setting is not possible for this NUI object. <br />
3180 /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3181 /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
3182 /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
3183 /// 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 />
3185 /// <since_tizen> 5 </since_tizen>
3190 return (Size)GetValue(SizeProperty);
3194 SetValue(SizeProperty, value);
3195 // Set Specification so when layouts measure this View it matches the value set here.
3196 // All Views are currently Layouts.
3197 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
3198 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
3199 NotifyPropertyChanged();
3204 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
3206 /// <since_tizen> 3 </since_tizen>
3207 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
3209 "Container parent = view.GetParent(); " +
3210 "View view = parent as View;")]
3211 [EditorBrowsable(EditorBrowsableState.Never)]
3212 public new View Parent
3217 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
3218 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3219 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3221 if (basehandle is Layer layer)
3223 ret = new View(Layer.getCPtr(layer).Handle, false);
3224 NUILog.Error("This Parent property is deprecated, shoud do not be used");
3228 ret = basehandle as View;
3231 NDalicPINVOKE.delete_BaseHandle(CPtr);
3232 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3234 if (NDalicPINVOKE.SWIGPendingException.Pending)
3235 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3241 /// Gets/Sets whether inherit parent's the layout Direction.
3243 /// <since_tizen> 4 </since_tizen>
3244 public bool InheritLayoutDirection
3248 return (bool)GetValue(InheritLayoutDirectionProperty);
3252 SetValue(InheritLayoutDirectionProperty, value);
3253 NotifyPropertyChanged();
3258 /// Gets/Sets the layout Direction.
3260 /// <since_tizen> 4 </since_tizen>
3261 public ViewLayoutDirectionType LayoutDirection
3265 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
3269 SetValue(LayoutDirectionProperty, value);
3270 NotifyPropertyChanged();
3275 /// Gets or sets the Margin for use in layout.
3278 /// Margin property is supported by Layout algorithms and containers.
3279 /// Please Set Layout if you want to use Margin property.
3281 /// <since_tizen> 4 </since_tizen>
3282 public Extents Margin
3286 return (Extents)GetValue(MarginProperty);
3290 SetValue(MarginProperty, value);
3291 NotifyPropertyChanged();
3296 /// [Obsolete("Please do not use! this will be deprecated")]
3298 /// Please do not use! this will be deprecated!
3299 /// Instead please use Padding.
3300 /// <since_tizen> 4 </since_tizen>
3301 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
3302 [EditorBrowsable(EditorBrowsableState.Never)]
3303 public Extents PaddingEX
3307 Extents temp = new Extents(0, 0, 0, 0);
3308 GetProperty(View.Property.PADDING).Get(temp);
3313 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3314 NotifyPropertyChanged();
3318 internal Style Style
3322 return (Style)GetValue(StyleProperty);
3326 SetValue(StyleProperty, value);
3331 /// Child property to specify desired width
3333 internal int LayoutWidthSpecificationFixed
3338 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
3340 NUILog.Error("WidthSpecificationFixed get error!");
3346 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
3351 /// Child property to specify desired height
3353 internal int LayoutHeightSpecificationFixed
3358 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
3360 NUILog.Error("HeightSpecificationFixed get error!");
3366 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
3371 /// Child property to specify desired width, use MatchParent/WrapContent)
3373 internal ChildLayoutData LayoutWidthSpecification
3378 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
3380 NUILog.Error("WidthSpecificationFixed get error!");
3382 return (ChildLayoutData)tmp;
3386 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
3391 /// Child property to specify desired height, use MatchParent/WrapContent)
3393 internal ChildLayoutData LayoutHeightSpecification
3398 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
3400 NUILog.Error("HeightSpecificationFixed get error!");
3402 return (ChildLayoutData)tmp;
3406 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
3410 internal float Weight
3414 return (float)GetValue(WeightProperty);
3418 SetValue(WeightProperty, value);
3419 NotifyPropertyChanged();
3423 internal bool BackgroundImageSynchronosLoading
3427 return _backgroundImageSynchronosLoading;
3431 if (value != _backgroundImageSynchronosLoading)
3434 PropertyMap bgMap = this.Background;
3436 bgMap.Find(Visual.Property.Type)?.Get(out visualType);
3437 if (visualType == (int)Visual.Type.Image)
3439 bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
3441 if (bgUrl.Length != 0)
3443 _backgroundImageSynchronosLoading = value;
3444 bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
3445 this.Background = bgMap;
3451 internal float WorldPositionX
3456 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3461 internal float WorldPositionY
3466 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3471 internal float WorldPositionZ
3476 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3481 internal bool FocusState
3485 return IsKeyboardFocusable();
3489 SetKeyboardFocusable(value);
3494 /// Set the layout on this control.
3498 internal LayoutItem Layout
3502 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
3504 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3505 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3506 NDalicPINVOKE.delete_BaseHandle(CPtr);
3507 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3509 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3511 return basehandle as LayoutItem;
3515 Log.Info("NUI", "Set Layout on:" + Name + "\n");
3516 layoutingDisabled = false;
3523 /// Set that layouting is required on this View. It will automatically receive a Layout.
3527 internal bool LayoutingRequired
3531 bool result = Tizen.NUI.NDalicManualPINVOKE.View_IsLayoutingRequired(View.getCPtr(this));
3532 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3537 Tizen.NUI.NDalicManualPINVOKE.View_SetLayoutingRequired(View.getCPtr(this), value);
3541 internal float ParentOriginX
3546 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3551 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3552 NotifyPropertyChanged();
3556 internal float ParentOriginY
3561 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3566 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3567 NotifyPropertyChanged();
3571 internal float ParentOriginZ
3576 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3581 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3582 NotifyPropertyChanged();
3586 internal float PivotPointX
3591 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3596 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3600 internal float PivotPointY
3605 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3610 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3614 internal float PivotPointZ
3619 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3624 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3628 internal Matrix WorldMatrix
3632 Matrix temp = new Matrix();
3633 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3638 private int LeftFocusableViewId
3643 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
3648 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3652 private int RightFocusableViewId
3657 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
3662 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3666 private int UpFocusableViewId
3671 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
3676 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3680 private int DownFocusableViewId
3685 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
3690 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3695 /// Perform an action on a visual registered to this view. <br />
3696 /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
3698 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
3699 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
3700 /// <param name="attributes">Optional attributes for the action.</param>
3701 /// <since_tizen> 5 </since_tizen>
3702 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
3704 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
3705 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3709 /// Creates an animation to animate the background color visual. If there is no
3710 /// background visual, creates one with transparent black as it's mixColor.
3712 /// <since_tizen> 3 </since_tizen>
3713 public Animation AnimateBackgroundColor(object destinationValue,
3716 AlphaFunction.BuiltinFunctions? alphaFunction = null,
3717 object initialValue = null)
3719 Tizen.NUI.PropertyMap background = Background;
3721 if (background.Empty())
3723 // If there is no background yet, ensure there is a transparent
3725 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
3726 background = Background;
3728 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
3732 /// Creates an animation to animate the mixColor of the named visual.
3734 /// <since_tizen> 3 </since_tizen>
3735 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
3737 Animation animation = null;
3739 PropertyMap _animator = new PropertyMap();
3740 if (alphaFunction != null)
3742 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
3745 PropertyMap _timePeriod = new PropertyMap();
3746 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
3747 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
3748 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
3750 PropertyMap _transition = new PropertyMap();
3751 _transition.Add("animator", new PropertyValue(_animator));
3752 _transition.Add("target", new PropertyValue(targetVisual));
3753 _transition.Add("property", new PropertyValue("mixColor"));
3755 if (initialColor != null)
3757 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
3758 _transition.Add("initialValue", initValue);
3761 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
3762 _transition.Add("targetValue", destValue);
3763 TransitionData _transitionData = new TransitionData(_transition);
3765 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
3766 if (NDalicPINVOKE.SWIGPendingException.Pending)
3767 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3772 // From Container Base class
3774 /// Adds a child view to this view.
3776 /// <seealso cref="Container.Add" />
3777 /// <since_tizen> 4 </since_tizen>
3778 public override void Add(View child)
3782 Tizen.Log.Fatal("NUI", "Child is null");
3786 Log.Info("NUI", "Adding Child:" + child.Name + " to " + Name + "\n");
3788 Container oldParent = child.GetParent();
3789 if (oldParent != this)
3791 if (oldParent != null)
3793 oldParent.Remove(child);
3795 child.InternalParent = this;
3797 // Only give children a layout if their parent is an explicit container or a pure View.
3798 // Pure View meaning not derived from a View, e.g a Legacy container.
3799 // layoutSet flag is true when the View became a layout using the set Layout API opposed to automatically due to it's parent.
3800 // First time the set Layout API is used by any View the Window no longer has layoutingDisabled.
3801 if ((true == layoutSet || GetType() == typeof(View)) && null == child.Layout && false == layoutingDisabled)
3803 Log.Info("NUI", "Parent[" + Name + "] Layout set[" + layoutSet.ToString() + "] Pure View[" + (!layoutSet).ToString() + "]\n");
3804 // If child is a View or explicitly set to require layouting then set child as a LayoutGroup.
3805 // If the child is derived from a View then it may be a legacy or existing container hence will do layouting itself.
3806 if (child.GetType() == typeof(View) || true == child.LayoutingRequired)
3808 Log.Info("NUI", "Creating LayoutGroup for " + child.Name + " LayoutingRequired[" + child.LayoutingRequired.ToString() + "]\n");
3809 child.SetLayout(new LayoutGroup());
3813 // Adding child as a leaf, layouting will not propagate past this child.
3814 // Legacy containers will be a LayoutItems too and layout their children how they wish.
3815 Log.Info("NUI", "Creating LayoutItem for " + child.Name + "\n");
3816 child.SetLayout(new LayoutItem());
3822 Layout.LayoutChildren.Add(child.Layout);
3825 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
3826 if (NDalicPINVOKE.SWIGPendingException.Pending)
3827 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3828 Children.Add(child);
3830 if (ChildAdded != null)
3832 ChildAddedEventArgs e = new ChildAddedEventArgs
3836 ChildAdded(this, e);
3842 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
3844 /// <seealso cref="Container.Remove" />
3845 /// <since_tizen> 4 </since_tizen>
3846 public override void Remove(View child)
3848 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
3849 if (NDalicPINVOKE.SWIGPendingException.Pending)
3850 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3852 Children.Remove(child);
3853 child.InternalParent = null;
3859 Layout.LayoutChildren.Remove(child.Layout);
3863 if (ChildRemoved != null)
3865 ChildRemovedEventArgs e = new ChildRemovedEventArgs
3869 ChildRemoved(this, e);
3874 /// Retrieves a child view by index.
3876 /// <seealso cref="Container.GetChildAt" />
3877 /// <since_tizen> 4 </since_tizen>
3878 public override View GetChildAt(uint index)
3880 if (index < Children.Count)
3882 return Children[Convert.ToInt32(index)];
3891 /// Retrieves the number of children held by the view.
3893 /// <seealso cref="Container.GetChildCount" />
3894 /// <since_tizen> 4 </since_tizen>
3895 public override uint GetChildCount()
3897 return Convert.ToUInt32(Children.Count);
3901 /// Gets the views parent.
3903 /// <seealso cref="Container.GetParent()" />
3904 /// <since_tizen> 4 </since_tizen>
3905 public override Container GetParent()
3907 return this.InternalParent as Container;
3911 /// Queries whether the view has a focus.
3913 /// <returns>True if this view has a focus.</returns>
3914 /// <since_tizen> 3 </since_tizen>
3915 public bool HasFocus()
3917 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
3918 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3923 /// Sets the name of the style to be applied to the view.
3925 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
3926 /// <since_tizen> 3 </since_tizen>
3927 public void SetStyleName(string styleName)
3929 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
3930 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3934 /// Retrieves the name of the style to be applied to the view (if any).
3936 /// <returns>A string matching a style, or an empty string.</returns>
3937 /// <since_tizen> 3 </since_tizen>
3938 public string GetStyleName()
3940 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
3941 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3946 /// Clears the background.
3948 /// <since_tizen> 3 </since_tizen>
3949 public void ClearBackground()
3951 NDalicPINVOKE.View_ClearBackground(swigCPtr);
3952 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3959 /// This is an asynchronous method.
3961 /// <since_tizen> 3 </since_tizen>
3971 /// This is an asynchronous method.
3972 /// If the view is hidden, then the view and its children will not be rendered.
3973 /// 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.
3975 /// <since_tizen> 3 </since_tizen>
3982 /// Raises the view above all other views.
3985 /// Sibling order of views within the parent will be updated automatically.
3986 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
3988 /// <since_tizen> 3 </since_tizen>
3989 public void RaiseToTop()
3991 var parentChildren = GetParent()?.Children;
3993 if (parentChildren != null)
3995 parentChildren.Remove(this);
3996 parentChildren.Add(this);
3998 NDalicPINVOKE.RaiseToTop(swigCPtr);
3999 if (NDalicPINVOKE.SWIGPendingException.Pending)
4000 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4006 /// Lowers the view to the bottom of all views.
4009 /// The sibling order of views within the parent will be updated automatically.
4010 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4012 /// <since_tizen> 3 </since_tizen>
4013 public void LowerToBottom()
4015 var parentChildren = GetParent()?.Children;
4017 if (parentChildren != null)
4019 parentChildren.Remove(this);
4020 parentChildren.Insert(0, this);
4022 NDalicPINVOKE.LowerToBottom(swigCPtr);
4023 if (NDalicPINVOKE.SWIGPendingException.Pending)
4024 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4029 /// Queries if all resources required by a view are loaded and ready.
4031 /// <remarks>Most resources are only loaded when the control is placed on the stage.
4033 /// <since_tizen> 3 </since_tizen>
4034 public bool IsResourceReady()
4036 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
4037 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4042 /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
4044 /// <pre>The view has been initialized. </pre>
4045 /// <returns>The parent layer of view </returns>
4046 /// <since_tizen> 5 </since_tizen>
4047 public Layer GetLayer()
4049 //to fix memory leak issue, match the handle count with native side.
4050 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
4051 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4052 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
4053 NDalicPINVOKE.delete_BaseHandle(CPtr);
4054 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4056 if (NDalicPINVOKE.SWIGPendingException.Pending)
4057 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4062 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
4064 /// <pre>The (child) view has been initialized. </pre>
4065 /// <since_tizen> 4 </since_tizen>
4066 public void Unparent()
4068 GetParent()?.Remove(this);
4072 /// Search through this view's hierarchy for a view with the given name.
4073 /// The view itself is also considered in the search.
4075 /// <pre>The view has been initialized.</pre>
4076 /// <param name="viewName">The name of the view to find.</param>
4077 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
4078 /// <since_tizen> 3 </since_tizen>
4079 public View FindChildByName(string viewName)
4081 //to fix memory leak issue, match the handle count with native side.
4082 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
4083 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4084 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4085 NDalicPINVOKE.delete_BaseHandle(CPtr);
4086 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4088 if (NDalicPINVOKE.SWIGPendingException.Pending)
4089 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4094 /// Converts screen coordinates into the view's coordinate system using the default camera.
4096 /// <pre>The view has been initialized.</pre>
4097 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4098 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4099 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4100 /// <param name="screenX">The screen X-coordinate.</param>
4101 /// <param name="screenY">The screen Y-coordinate.</param>
4102 /// <returns>True if the conversion succeeded.</returns>
4103 /// <since_tizen> 3 </since_tizen>
4104 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4106 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4107 if (NDalicPINVOKE.SWIGPendingException.Pending)
4108 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4113 /// Sets the relative to parent size factor of the view.<br />
4114 /// This factor is only used when ResizePolicy is set to either:
4115 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4116 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4118 /// <pre>The view has been initialized.</pre>
4119 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4120 /// <since_tizen> 3 </since_tizen>
4121 public void SetSizeModeFactor(Vector3 factor)
4123 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4124 if (NDalicPINVOKE.SWIGPendingException.Pending)
4125 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4128 /// Calculates the height of the view given a width.<br />
4129 /// The natural size is used for default calculation.<br />
4130 /// Size 0 is treated as aspect ratio 1:1.<br />
4132 /// <param name="width">The width to use.</param>
4133 /// <returns>The height based on the width.</returns>
4134 /// <since_tizen> 3 </since_tizen>
4135 public float GetHeightForWidth(float width)
4137 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
4138 if (NDalicPINVOKE.SWIGPendingException.Pending)
4139 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4144 /// Calculates the width of the view given a height.<br />
4145 /// The natural size is used for default calculation.<br />
4146 /// Size 0 is treated as aspect ratio 1:1.<br />
4148 /// <param name="height">The height to use.</param>
4149 /// <returns>The width based on the height.</returns>
4150 /// <since_tizen> 3 </since_tizen>
4151 public float GetWidthForHeight(float height)
4153 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
4154 if (NDalicPINVOKE.SWIGPendingException.Pending)
4155 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4160 /// Return the amount of size allocated for relayout.
4162 /// <param name="dimension">The dimension to retrieve.</param>
4163 /// <returns>Return the size.</returns>
4164 /// <since_tizen> 3 </since_tizen>
4165 public float GetRelayoutSize(DimensionType dimension)
4167 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4168 if (NDalicPINVOKE.SWIGPendingException.Pending)
4169 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4174 /// Set the padding for the view.
4176 /// <param name="padding">Padding for the view.</param>
4177 /// <since_tizen> 3 </since_tizen>
4178 public void SetPadding(PaddingType padding)
4180 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4181 if (NDalicPINVOKE.SWIGPendingException.Pending)
4182 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4186 /// Return the value of padding for the view.
4188 /// <param name="paddingOut">the value of padding for the view</param>
4189 /// <since_tizen> 3 </since_tizen>
4190 public void GetPadding(PaddingType paddingOut)
4192 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4193 if (NDalicPINVOKE.SWIGPendingException.Pending)
4194 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4197 /// <since_tizen> 3 </since_tizen>
4198 public uint AddRenderer(Renderer renderer)
4200 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4201 if (NDalicPINVOKE.SWIGPendingException.Pending)
4202 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4206 /// <since_tizen> 3 </since_tizen>
4207 public Renderer GetRendererAt(uint index)
4209 //to fix memory leak issue, match the handle count with native side.
4210 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
4211 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4212 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4213 NDalicPINVOKE.delete_BaseHandle(CPtr);
4214 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4216 if (NDalicPINVOKE.SWIGPendingException.Pending)
4217 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4221 /// <since_tizen> 3 </since_tizen>
4222 public void RemoveRenderer(Renderer renderer)
4224 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4225 if (NDalicPINVOKE.SWIGPendingException.Pending)
4226 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4229 /// <since_tizen> 3 </since_tizen>
4230 public void RemoveRenderer(uint index)
4232 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4233 if (NDalicPINVOKE.SWIGPendingException.Pending)
4234 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4237 internal void Raise()
4239 var parentChildren = GetParent()?.Children;
4241 if (parentChildren != null)
4243 int currentIndex = parentChildren.IndexOf(this);
4245 // If the view is not already the last item in the list.
4246 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
4248 View temp = parentChildren[currentIndex + 1];
4249 parentChildren[currentIndex + 1] = this;
4250 parentChildren[currentIndex] = temp;
4252 NDalicPINVOKE.Raise(swigCPtr);
4253 if (NDalicPINVOKE.SWIGPendingException.Pending)
4254 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4259 internal void Lower()
4261 var parentChildren = GetParent()?.Children;
4263 if (parentChildren != null)
4265 int currentIndex = parentChildren.IndexOf(this);
4267 // If the view is not already the first item in the list.
4268 if (currentIndex > 0 && currentIndex < parentChildren.Count)
4270 View temp = parentChildren[currentIndex - 1];
4271 parentChildren[currentIndex - 1] = this;
4272 parentChildren[currentIndex] = temp;
4274 NDalicPINVOKE.Lower(swigCPtr);
4275 if (NDalicPINVOKE.SWIGPendingException.Pending)
4276 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4282 /// Raises the view to above the target view.
4284 /// <remarks>The sibling order of views within the parent will be updated automatically.
4285 /// Views on the level above the target view will still be shown above this view.
4286 /// Raising this view above views with the same sibling order as each other will raise this view above them.
4287 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4289 /// <param name="target">Will be raised above this view.</param>
4290 internal void RaiseAbove(View target)
4292 var parentChildren = GetParent()?.Children;
4294 if (parentChildren != null)
4296 int currentIndex = parentChildren.IndexOf(this);
4297 int targetIndex = parentChildren.IndexOf(target);
4299 if (currentIndex < 0 || targetIndex < 0 ||
4300 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4302 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4305 // If the currentIndex is less than the target index and the target has the same parent.
4306 if (currentIndex < targetIndex)
4308 parentChildren.Remove(this);
4309 parentChildren.Insert(targetIndex, this);
4311 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
4312 if (NDalicPINVOKE.SWIGPendingException.Pending)
4313 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4320 /// Lowers the view to below the target view.
4322 /// <remarks>The sibling order of views within the parent will be updated automatically.
4323 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
4324 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4326 /// <param name="target">Will be lowered below this view.</param>
4327 internal void LowerBelow(View target)
4329 var parentChildren = GetParent()?.Children;
4331 if (parentChildren != null)
4333 int currentIndex = parentChildren.IndexOf(this);
4334 int targetIndex = parentChildren.IndexOf(target);
4335 if (currentIndex < 0 || targetIndex < 0 ||
4336 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4338 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4342 // If the currentIndex is not already the 0th index and the target has the same parent.
4343 if ((currentIndex != 0) && (targetIndex != -1) &&
4344 (currentIndex > targetIndex))
4346 parentChildren.Remove(this);
4347 parentChildren.Insert(targetIndex, this);
4349 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
4350 if (NDalicPINVOKE.SWIGPendingException.Pending)
4351 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4357 internal string GetName()
4359 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
4360 if (NDalicPINVOKE.SWIGPendingException.Pending)
4361 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4365 internal void SetName(string name)
4367 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
4368 if (NDalicPINVOKE.SWIGPendingException.Pending)
4369 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4372 internal uint GetId()
4374 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
4375 if (NDalicPINVOKE.SWIGPendingException.Pending)
4376 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4380 internal bool IsRoot()
4382 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
4383 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4387 internal bool OnWindow()
4389 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
4390 if (NDalicPINVOKE.SWIGPendingException.Pending)
4391 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4395 internal View FindChildById(uint id)
4397 //to fix memory leak issue, match the handle count with native side.
4398 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
4399 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4400 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4401 NDalicPINVOKE.delete_BaseHandle(CPtr);
4402 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4404 if (NDalicPINVOKE.SWIGPendingException.Pending)
4405 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4409 internal void SetParentOrigin(Vector3 origin)
4411 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
4412 if (NDalicPINVOKE.SWIGPendingException.Pending)
4413 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4416 internal Vector3 GetCurrentParentOrigin()
4418 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
4419 if (NDalicPINVOKE.SWIGPendingException.Pending)
4420 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4424 internal void SetAnchorPoint(Vector3 anchorPoint)
4426 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
4427 if (NDalicPINVOKE.SWIGPendingException.Pending)
4428 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4431 internal Vector3 GetCurrentAnchorPoint()
4433 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
4434 if (NDalicPINVOKE.SWIGPendingException.Pending)
4435 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4439 internal void SetSize(float width, float height)
4441 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
4442 if (NDalicPINVOKE.SWIGPendingException.Pending)
4443 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4446 internal void SetSize(float width, float height, float depth)
4448 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
4449 if (NDalicPINVOKE.SWIGPendingException.Pending)
4450 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4453 internal void SetSize(Vector2 size)
4455 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
4456 if (NDalicPINVOKE.SWIGPendingException.Pending)
4457 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4460 internal void SetSize(Vector3 size)
4462 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
4463 if (NDalicPINVOKE.SWIGPendingException.Pending)
4464 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4467 internal Vector3 GetTargetSize()
4469 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
4470 if (NDalicPINVOKE.SWIGPendingException.Pending)
4471 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4475 internal Size2D GetCurrentSize()
4477 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
4478 if (NDalicPINVOKE.SWIGPendingException.Pending)
4479 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4480 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
4484 internal Vector3 GetNaturalSize()
4486 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
4487 if (NDalicPINVOKE.SWIGPendingException.Pending)
4488 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4492 internal void SetPosition(float x, float y)
4494 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
4495 if (NDalicPINVOKE.SWIGPendingException.Pending)
4496 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4499 internal void SetPosition(float x, float y, float z)
4501 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
4502 if (NDalicPINVOKE.SWIGPendingException.Pending)
4503 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4506 internal void SetPosition(Vector3 position)
4508 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
4509 if (NDalicPINVOKE.SWIGPendingException.Pending)
4510 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4513 internal void SetX(float x)
4515 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
4516 if (NDalicPINVOKE.SWIGPendingException.Pending)
4517 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4520 internal void SetY(float y)
4522 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
4523 if (NDalicPINVOKE.SWIGPendingException.Pending)
4524 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4527 internal void SetZ(float z)
4529 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
4530 if (NDalicPINVOKE.SWIGPendingException.Pending)
4531 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4534 internal void TranslateBy(Vector3 distance)
4536 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
4537 if (NDalicPINVOKE.SWIGPendingException.Pending)
4538 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4541 internal Position GetCurrentPosition()
4543 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
4544 if (NDalicPINVOKE.SWIGPendingException.Pending)
4545 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4549 internal Vector3 GetCurrentWorldPosition()
4551 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
4552 if (NDalicPINVOKE.SWIGPendingException.Pending)
4553 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4557 internal void SetInheritPosition(bool inherit)
4559 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
4560 if (NDalicPINVOKE.SWIGPendingException.Pending)
4561 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4564 internal bool IsPositionInherited()
4566 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
4567 if (NDalicPINVOKE.SWIGPendingException.Pending)
4568 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4572 internal void SetOrientation(Degree angle, Vector3 axis)
4574 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4575 if (NDalicPINVOKE.SWIGPendingException.Pending)
4576 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4579 internal void SetOrientation(Radian angle, Vector3 axis)
4581 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4582 if (NDalicPINVOKE.SWIGPendingException.Pending)
4583 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4586 internal void SetOrientation(Rotation orientation)
4588 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
4589 if (NDalicPINVOKE.SWIGPendingException.Pending)
4590 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4593 internal void RotateBy(Degree angle, Vector3 axis)
4595 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4596 if (NDalicPINVOKE.SWIGPendingException.Pending)
4597 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4600 internal void RotateBy(Radian angle, Vector3 axis)
4602 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4603 if (NDalicPINVOKE.SWIGPendingException.Pending)
4604 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4607 internal void RotateBy(Rotation relativeRotation)
4609 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4610 if (NDalicPINVOKE.SWIGPendingException.Pending)
4611 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4614 internal Rotation GetCurrentOrientation()
4616 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
4617 if (NDalicPINVOKE.SWIGPendingException.Pending)
4618 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4622 internal void SetInheritOrientation(bool inherit)
4624 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
4625 if (NDalicPINVOKE.SWIGPendingException.Pending)
4626 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4629 internal bool IsOrientationInherited()
4631 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
4632 if (NDalicPINVOKE.SWIGPendingException.Pending)
4633 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4637 internal Rotation GetCurrentWorldOrientation()
4639 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4640 if (NDalicPINVOKE.SWIGPendingException.Pending)
4641 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4645 internal void SetScale(float scale)
4647 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
4648 if (NDalicPINVOKE.SWIGPendingException.Pending)
4649 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4652 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4654 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4655 if (NDalicPINVOKE.SWIGPendingException.Pending)
4656 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4659 internal void SetScale(Vector3 scale)
4661 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4662 if (NDalicPINVOKE.SWIGPendingException.Pending)
4663 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4666 internal void ScaleBy(Vector3 relativeScale)
4668 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4669 if (NDalicPINVOKE.SWIGPendingException.Pending)
4670 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4673 internal Vector3 GetCurrentScale()
4675 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
4676 if (NDalicPINVOKE.SWIGPendingException.Pending)
4677 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4681 internal Vector3 GetCurrentWorldScale()
4683 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
4684 if (NDalicPINVOKE.SWIGPendingException.Pending)
4685 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4689 internal void SetInheritScale(bool inherit)
4691 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
4692 if (NDalicPINVOKE.SWIGPendingException.Pending)
4693 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4696 internal bool IsScaleInherited()
4698 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
4699 if (NDalicPINVOKE.SWIGPendingException.Pending)
4700 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4704 internal Matrix GetCurrentWorldMatrix()
4706 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4707 if (NDalicPINVOKE.SWIGPendingException.Pending)
4708 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4712 internal void SetVisible(bool visible)
4714 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
4715 if (NDalicPINVOKE.SWIGPendingException.Pending)
4716 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4719 internal bool IsVisible()
4721 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
4722 if (NDalicPINVOKE.SWIGPendingException.Pending)
4723 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4727 internal void SetOpacity(float opacity)
4729 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
4730 if (NDalicPINVOKE.SWIGPendingException.Pending)
4731 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4734 internal float GetCurrentOpacity()
4736 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
4737 if (NDalicPINVOKE.SWIGPendingException.Pending)
4738 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4742 internal void SetColor(Vector4 color)
4744 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4745 if (NDalicPINVOKE.SWIGPendingException.Pending)
4746 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4749 internal Vector4 GetCurrentColor()
4751 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
4752 if (NDalicPINVOKE.SWIGPendingException.Pending)
4753 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4757 internal void SetColorMode(ColorMode colorMode)
4759 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
4760 if (NDalicPINVOKE.SWIGPendingException.Pending)
4761 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4764 internal ColorMode GetColorMode()
4766 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
4767 if (NDalicPINVOKE.SWIGPendingException.Pending)
4768 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4772 internal Vector4 GetCurrentWorldColor()
4774 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
4775 if (NDalicPINVOKE.SWIGPendingException.Pending)
4776 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4780 internal void SetDrawMode(DrawModeType drawMode)
4782 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4783 if (NDalicPINVOKE.SWIGPendingException.Pending)
4784 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4787 internal DrawModeType GetDrawMode()
4789 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
4790 if (NDalicPINVOKE.SWIGPendingException.Pending)
4791 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4795 internal void SetKeyboardFocusable(bool focusable)
4797 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4798 if (NDalicPINVOKE.SWIGPendingException.Pending)
4799 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4802 internal bool IsKeyboardFocusable()
4804 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
4805 if (NDalicPINVOKE.SWIGPendingException.Pending)
4806 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4810 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4812 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4813 if (NDalicPINVOKE.SWIGPendingException.Pending)
4814 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4817 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4819 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4820 if (NDalicPINVOKE.SWIGPendingException.Pending)
4821 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4825 internal Vector3 GetSizeModeFactor()
4827 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
4828 if (NDalicPINVOKE.SWIGPendingException.Pending)
4829 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4833 internal void SetMinimumSize(Vector2 size)
4835 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4836 if (NDalicPINVOKE.SWIGPendingException.Pending)
4837 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4840 internal Vector2 GetMinimumSize()
4842 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
4843 if (NDalicPINVOKE.SWIGPendingException.Pending)
4844 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4848 internal void SetMaximumSize(Vector2 size)
4850 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4851 if (NDalicPINVOKE.SWIGPendingException.Pending)
4852 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4855 internal Vector2 GetMaximumSize()
4857 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
4858 if (NDalicPINVOKE.SWIGPendingException.Pending)
4859 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4863 internal int GetHierarchyDepth()
4865 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
4866 if (NDalicPINVOKE.SWIGPendingException.Pending)
4867 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4871 internal uint GetRendererCount()
4873 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
4874 if (NDalicPINVOKE.SWIGPendingException.Pending)
4875 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4879 internal TouchDataSignal TouchSignal()
4881 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
4882 if (NDalicPINVOKE.SWIGPendingException.Pending)
4883 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4887 internal HoverSignal HoveredSignal()
4889 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
4890 if (NDalicPINVOKE.SWIGPendingException.Pending)
4891 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4895 internal WheelSignal WheelEventSignal()
4897 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
4898 if (NDalicPINVOKE.SWIGPendingException.Pending)
4899 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4903 internal ViewSignal OnWindowSignal()
4905 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
4906 if (NDalicPINVOKE.SWIGPendingException.Pending)
4907 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4911 internal ViewSignal OffWindowSignal()
4913 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
4914 if (NDalicPINVOKE.SWIGPendingException.Pending)
4915 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4919 internal ViewSignal OnRelayoutSignal()
4921 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
4922 if (NDalicPINVOKE.SWIGPendingException.Pending)
4923 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4927 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
4929 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
4930 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4934 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
4936 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
4937 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4941 internal ViewSignal ResourcesLoadedSignal()
4943 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
4944 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4948 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
4950 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
4953 internal bool IsTopLevelView()
4955 if (GetParent() is Layer)
4962 internal void SetKeyInputFocus()
4964 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
4965 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4968 internal void ClearKeyInputFocus()
4970 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
4971 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4974 internal PinchGestureDetector GetPinchGestureDetector()
4976 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
4977 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4981 internal PanGestureDetector GetPanGestureDetector()
4983 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
4984 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4988 internal TapGestureDetector GetTapGestureDetector()
4990 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
4991 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4995 internal LongPressGestureDetector GetLongPressGestureDetector()
4997 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
4998 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5002 internal void SetBackgroundColor(Vector4 color)
5004 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
5005 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5008 internal Vector4 GetBackgroundColor()
5010 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
5011 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5015 internal void SetBackgroundImage(Image image)
5017 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
5018 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5021 internal ControlKeySignal KeyEventSignal()
5023 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
5024 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5028 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
5030 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
5031 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5035 internal KeyInputFocusSignal KeyInputFocusLostSignal()
5037 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
5038 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5042 internal IntPtr GetPtrfromView()
5044 return (IntPtr)swigCPtr;
5047 internal void SetLayout(LayoutItem layout)
5049 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(layout));
5050 layout.LayoutChildren.Clear();
5051 foreach (View view in Children)
5053 layout.LayoutChildren.Add(view.Layout);
5057 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5059 return (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5063 /// you can override it to clean-up your own resources.
5065 /// <param name="type">DisposeTypes</param>
5066 /// <since_tizen> 3 </since_tizen>
5067 protected override void Dispose(DisposeTypes type)
5074 if (type == DisposeTypes.Explicit)
5077 //Release your own managed resources here.
5078 //You should release all of your own disposable objects here.
5081 //Release your own unmanaged resources here.
5082 //You should not access any managed member here except static instance.
5083 //because the execution order of Finalizes is non-deterministic.
5086 DisConnectFromSignals();
5089 if (swigCPtr.Handle != global::System.IntPtr.Zero)
5093 swigCMemOwn = false;
5094 NDalicPINVOKE.delete_View(swigCPtr);
5096 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5099 foreach (View view in Children)
5101 view.InternalParent = null;
5108 private void OnSize2DChanged(int width, int height)
5110 Size2D = new Size2D(width, height);
5113 private void OnPosition2DChanged(int x, int y)
5115 Position2D = new Position2D(x, y);
5118 private void DisConnectFromSignals()
5120 // Save current CPtr.
5121 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
5123 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
5124 swigCPtr = GetBaseHandleCPtrHandleRef;
5126 if (_onRelayoutEventCallback != null)
5128 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5131 if (_offWindowEventCallback != null)
5133 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5136 if (_onWindowEventCallback != null)
5138 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5141 if (_wheelEventCallback != null)
5143 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5146 if (_hoverEventCallback != null)
5148 this.HoveredSignal().Disconnect(_hoverEventCallback);
5151 if (_touchDataCallback != null)
5153 this.TouchSignal().Disconnect(_touchDataCallback);
5156 if (_ResourcesLoadedCallback != null)
5158 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
5161 if (_offWindowEventCallback != null)
5163 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5166 if (_onWindowEventCallback != null)
5168 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5171 if (_wheelEventCallback != null)
5173 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5176 if (_hoverEventCallback != null)
5178 this.HoveredSignal().Disconnect(_hoverEventCallback);
5181 if (_touchDataCallback != null)
5183 this.TouchSignal().Disconnect(_touchDataCallback);
5186 if (_onRelayoutEventCallback != null)
5188 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5191 if (_keyCallback != null)
5193 this.KeyEventSignal().Disconnect(_keyCallback);
5196 if (_keyInputFocusLostCallback != null)
5198 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
5201 if (_keyInputFocusGainedCallback != null)
5203 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
5206 if (_backgroundResourceLoadedCallback != null)
5208 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5211 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
5212 // Restore current CPtr.
5213 swigCPtr = currentCPtr;
5216 private void OnKeyInputFocusGained(IntPtr view)
5218 if (_keyInputFocusGainedEventHandler != null)
5220 _keyInputFocusGainedEventHandler(this, null);
5224 private void OnKeyInputFocusLost(IntPtr view)
5226 if (_keyInputFocusLostEventHandler != null)
5228 _keyInputFocusLostEventHandler(this, null);
5232 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
5234 if (keyEvent == global::System.IntPtr.Zero)
5236 NUILog.Error("keyEvent should not be null!");
5240 KeyEventArgs e = new KeyEventArgs();
5242 bool result = false;
5244 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
5246 if (_keyEventHandler != null)
5248 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
5250 // Oring the result of each callback.
5251 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
5253 result |= del(this, e);
5260 // Callback for View OnRelayout signal
5261 private void OnRelayout(IntPtr data)
5263 if (_onRelayoutEventHandler != null)
5265 _onRelayoutEventHandler(this, null);
5269 // Callback for View TouchSignal
5270 private bool OnTouch(IntPtr view, IntPtr touchData)
5272 if (touchData == global::System.IntPtr.Zero)
5274 NUILog.Error("touchData should not be null!");
5278 TouchEventArgs e = new TouchEventArgs();
5280 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
5282 if (_touchDataEventHandler != null)
5284 return _touchDataEventHandler(this, e);
5289 // Callback for View Hover signal
5290 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
5292 if (hoverEvent == global::System.IntPtr.Zero)
5294 NUILog.Error("hoverEvent should not be null!");
5298 HoverEventArgs e = new HoverEventArgs();
5300 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
5302 if (_hoverEventHandler != null)
5304 return _hoverEventHandler(this, e);
5309 // Callback for View Wheel signal
5310 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
5312 if (wheelEvent == global::System.IntPtr.Zero)
5314 NUILog.Error("wheelEvent should not be null!");
5318 WheelEventArgs e = new WheelEventArgs();
5320 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
5322 if (_wheelEventHandler != null)
5324 return _wheelEventHandler(this, e);
5329 // Callback for View OnWindow signal
5330 private void OnWindow(IntPtr data)
5332 if (_onWindowEventHandler != null)
5334 _onWindowEventHandler(this, null);
5338 // Callback for View OffWindow signal
5339 private void OffWindow(IntPtr data)
5341 if (_offWindowEventHandler != null)
5343 _offWindowEventHandler(this, null);
5347 // Callback for View visibility change signal
5348 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
5350 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
5353 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5355 e.Visibility = visibility;
5358 if (_visibilityChangedEventHandler != null)
5360 _visibilityChangedEventHandler(this, e);
5364 // Callback for View layout direction change signal
5365 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
5367 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
5370 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5374 if (_layoutDirectionChangedEventHandler != null)
5376 _layoutDirectionChangedEventHandler(this, e);
5380 private void OnResourcesLoaded(IntPtr view)
5382 if (_resourcesLoadedEventHandler != null)
5384 _resourcesLoadedEventHandler(this, null);
5388 private View ConvertIdToView(uint id)
5391 if (GetParent() is View)
5393 View parentView = GetParent() as View;
5394 view = parentView.FindChildById(id);
5399 view = Window.Instance.GetRootLayer().FindChildById(id);
5405 private void OnBackgroundResourceLoaded(IntPtr view)
5407 BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5408 e.Status = (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5410 if (_backgroundResourceLoadedEventHandler != null)
5412 _backgroundResourceLoadedEventHandler(this, e);
5417 /// Event argument passed through the ChildAdded event.
5419 /// <since_tizen> 5 </since_tizen>
5420 public class ChildAddedEventArgs : EventArgs
5423 /// Added child view at moment.
5425 /// <since_tizen> 5 </since_tizen>
5426 public View Added { get; set; }
5430 /// Event argument passed through the ChildRemoved event.
5432 /// <since_tizen> 5 </since_tizen>
5433 public class ChildRemovedEventArgs : EventArgs
5436 /// Removed child view at moment.
5438 /// <since_tizen> 5 </since_tizen>
5439 public View Removed { get; set; }
5443 /// Event arguments that passed via the KeyEvent signal.
5445 /// <since_tizen> 3 </since_tizen>
5446 public class KeyEventArgs : EventArgs
5451 /// Key - is the key sent to the view.
5453 /// <since_tizen> 3 </since_tizen>
5468 /// Event arguments that passed via the touch signal.
5470 /// <since_tizen> 3 </since_tizen>
5471 public class TouchEventArgs : EventArgs
5473 private Touch _touch;
5476 /// Touch - contains the information of touch points.
5478 /// <since_tizen> 3 </since_tizen>
5493 /// Event arguments that passed via the hover signal.
5495 /// <since_tizen> 3 </since_tizen>
5496 public class HoverEventArgs : EventArgs
5498 private Hover _hover;
5501 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
5503 /// <since_tizen> 3 </since_tizen>
5518 /// Event arguments that passed via the wheel signal.
5520 /// <since_tizen> 3 </since_tizen>
5521 public class WheelEventArgs : EventArgs
5523 private Wheel _wheel;
5526 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
5528 /// <since_tizen> 3 </since_tizen>
5543 /// Event arguments of visibility changed.
5545 /// <since_tizen> 3 </since_tizen>
5546 public class VisibilityChangedEventArgs : EventArgs
5549 private bool _visibility;
5550 private VisibilityChangeType _type;
5553 /// The view, or child of view, whose visibility has changed.
5555 /// <since_tizen> 3 </since_tizen>
5569 /// Whether the view is now visible or not.
5571 /// <since_tizen> 3 </since_tizen>
5572 public bool Visibility
5580 _visibility = value;
5585 /// Whether the view's visible property has changed or a parent's.
5587 /// <since_tizen> 3 </since_tizen>
5588 public VisibilityChangeType Type
5602 /// Event arguments of layout direction changed.
5604 /// <since_tizen> 4 </since_tizen>
5605 public class LayoutDirectionChangedEventArgs : EventArgs
5608 private ViewLayoutDirectionType _type;
5611 /// The view, or child of view, whose layout direction has changed.
5613 /// <since_tizen> 4 </since_tizen>
5627 /// Whether the view's layout direction property has changed or a parent's.
5629 /// <since_tizen> 4 </since_tizen>
5630 public ViewLayoutDirectionType Type
5643 internal class BackgroundResourceLoadedEventArgs : EventArgs
5645 private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5646 public ResourceLoadingStatusType Status
5659 internal class Property
5661 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
5662 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
5663 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
5664 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
5665 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
5666 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
5667 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
5668 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
5669 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
5670 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
5671 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
5672 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
5673 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
5674 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
5675 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
5676 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
5677 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
5678 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
5679 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
5680 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
5681 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
5682 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
5683 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
5684 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
5685 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
5686 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
5687 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
5688 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
5689 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
5690 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
5691 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
5692 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
5693 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
5694 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
5695 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
5696 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
5697 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
5698 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
5699 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
5700 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
5701 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
5702 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
5703 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
5704 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
5705 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
5706 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
5707 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
5708 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
5709 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
5710 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
5711 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
5712 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
5713 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
5714 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
5715 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
5716 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
5717 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
5718 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
5719 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
5720 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
5721 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
5722 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
5723 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();