2 * Copyright(c) 2018 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.ComponentModel;
19 using System.Runtime.InteropServices;
20 using Tizen.NUI.Binding;
22 namespace Tizen.NUI.BaseComponents
25 /// The View layout Direction type.
27 /// <since_tizen> 4 </since_tizen>
28 public enum ViewLayoutDirectionType
33 /// <since_tizen> 4 </since_tizen>
38 /// <since_tizen> 4 </since_tizen>
42 internal enum ChildLayoutData
45 /// Constant which indicates child size should match parent size
49 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
54 internal enum ResourceLoadingStatusType
63 /// View is the base class for all views.
65 /// <since_tizen> 3 </since_tizen>
66 public class View : Container, IResourcesProvider
68 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
69 [EditorBrowsable(EditorBrowsableState.Never)]
70 public static readonly BindableProperty StyleNameProperty = BindableProperty.Create("StyleName", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
72 var view = (View)bindable;
75 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue));
78 defaultValueCreator: (bindable) =>
80 var view = (View)bindable;
82 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STYLE_NAME).Get(out temp);
85 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
86 [EditorBrowsable(EditorBrowsableState.Never)]
87 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), Color.Transparent, 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), new PropertyMap(), 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 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
173 [EditorBrowsable(EditorBrowsableState.Never)]
174 public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
176 var view = (View)bindable;
177 string valueToString = "";
178 if (newValue != null)
180 switch ((States)newValue)
182 case States.Normal: { valueToString = "NORMAL"; break; }
183 case States.Focused: { valueToString = "FOCUSED"; break; }
184 case States.Disabled: { valueToString = "DISABLED"; break; }
185 default: { valueToString = "NORMAL"; break; }
187 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
190 defaultValueCreator: (bindable) =>
192 var view = (View)bindable;
194 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
196 NUILog.Error("subState get error!");
200 case "NORMAL": return States.Normal;
201 case "FOCUSED": return States.Focused;
202 case "DISABLED": return States.Disabled;
203 default: return States.Normal;
206 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
207 [EditorBrowsable(EditorBrowsableState.Never)]
208 public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
210 var view = (View)bindable;
211 if (newValue != null)
213 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
216 defaultValueCreator: (bindable) =>
218 var view = (View)bindable;
219 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
220 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
223 // public static readonly BindableProperty TooltipTextProperty = BindableProperty.Create("TooltipText", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
225 // var view = (View)bindable;
226 // if (newValue != null)
228 // Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((string)newValue));
231 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
232 [EditorBrowsable(EditorBrowsableState.Never)]
233 public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
235 var view = (View)bindable;
236 if (newValue != null)
238 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
241 defaultValueCreator: (bindable) =>
243 var view = (View)bindable;
245 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
248 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
249 [EditorBrowsable(EditorBrowsableState.Never)]
250 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
252 var view = (View)bindable;
253 if (newValue != null)
255 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
258 defaultValueCreator: (bindable) =>
260 var view = (View)bindable;
262 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
265 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
266 [EditorBrowsable(EditorBrowsableState.Never)]
267 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), Vector4.Zero, propertyChanged: (bindable, oldValue, newValue) =>
269 var view = (View)bindable;
270 if (newValue != null)
272 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
275 defaultValueCreator: (bindable) =>
277 var view = (View)bindable;
278 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
279 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
282 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
283 [EditorBrowsable(EditorBrowsableState.Never)]
284 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
286 var view = (View)bindable;
287 if (newValue != null)
289 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
292 defaultValueCreator: (bindable) =>
294 var view = (View)bindable;
295 Vector2 temp = new Vector2(0.0f, 0.0f);
296 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
299 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
300 [EditorBrowsable(EditorBrowsableState.Never)]
301 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
303 var view = (View)bindable;
304 if (newValue != null)
306 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
309 defaultValueCreator: (bindable) =>
311 var view = (View)bindable;
313 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
316 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
317 [EditorBrowsable(EditorBrowsableState.Never)]
318 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
320 var view = (View)bindable;
321 if (newValue != null)
323 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
326 defaultValueCreator: (bindable) =>
328 var view = (View)bindable;
330 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
333 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
334 [EditorBrowsable(EditorBrowsableState.Never)]
335 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
337 var view = (View)bindable;
338 string valueToString = "";
340 if (newValue != null)
342 switch ((HorizontalAlignmentType)newValue)
344 case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
345 case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
346 case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
347 default: { valueToString = "left"; break; }
349 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
352 defaultValueCreator: (bindable) =>
354 var view = (View)bindable;
356 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
358 NUILog.Error("CellHorizontalAlignment get error!");
363 case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
364 case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
365 case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
366 default: return Tizen.NUI.HorizontalAlignmentType.Left;
369 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
370 [EditorBrowsable(EditorBrowsableState.Never)]
371 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
373 var view = (View)bindable;
374 string valueToString = "";
376 if (newValue != null)
378 switch ((VerticalAlignmentType)newValue)
380 case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
381 case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
382 case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
383 default: { valueToString = "top"; break; }
385 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
388 defaultValueCreator: (bindable) =>
390 var view = (View)bindable;
392 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
394 NUILog.Error("CellVerticalAlignment get error!");
399 case "top": return Tizen.NUI.VerticalAlignmentType.Top;
400 case "center": return Tizen.NUI.VerticalAlignmentType.Center;
401 case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
402 default: return Tizen.NUI.VerticalAlignmentType.Top;
405 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
406 [EditorBrowsable(EditorBrowsableState.Never)]
407 public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
409 var view = (View)bindable;
410 if (newValue != null)
412 Tizen.NUI.Object.SetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
415 defaultValueCreator: (bindable) =>
417 var view = (View)bindable;
419 Tizen.NUI.Object.GetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT).Get(out temp);
422 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
423 [EditorBrowsable(EditorBrowsableState.Never)]
424 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
426 var view = (View)bindable;
427 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
428 else { view.LeftFocusableViewId = -1; }
430 defaultValueCreator: (bindable) =>
432 var view = (View)bindable;
433 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
436 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
437 [EditorBrowsable(EditorBrowsableState.Never)]
438 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
440 var view = (View)bindable;
441 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
442 else { view.RightFocusableViewId = -1; }
444 defaultValueCreator: (bindable) =>
446 var view = (View)bindable;
447 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
450 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
451 [EditorBrowsable(EditorBrowsableState.Never)]
452 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
454 var view = (View)bindable;
456 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View).GetId(); }
457 else { view.UpFocusableViewId = -1; }
459 defaultValueCreator: (bindable) =>
461 var view = (View)bindable;
462 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
465 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
466 [EditorBrowsable(EditorBrowsableState.Never)]
467 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
469 var view = (View)bindable;
470 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
471 else { view.DownFocusableViewId = -1; }
473 defaultValueCreator: (bindable) =>
475 var view = (View)bindable;
476 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
479 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
480 [EditorBrowsable(EditorBrowsableState.Never)]
481 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
483 var view = (View)bindable;
484 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
486 defaultValueCreator: (bindable) =>
488 var view = (View)bindable;
489 return view.IsKeyboardFocusable();
491 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
492 [EditorBrowsable(EditorBrowsableState.Never)]
493 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), new Size2D(0, 0), propertyChanged: (bindable, oldValue, newValue) =>
495 var view = (View)bindable;
496 if (newValue != null)
498 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size((Size2D)newValue)));
501 defaultValueCreator: (bindable) =>
503 var view = (View)bindable;
504 Size temp = new Size(0.0f, 0.0f, 0.0f);
505 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
506 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
509 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
510 [EditorBrowsable(EditorBrowsableState.Never)]
511 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
513 var view = (View)bindable;
514 if (newValue != null)
516 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
519 defaultValueCreator: (bindable) =>
521 var view = (View)bindable;
523 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
526 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
527 [EditorBrowsable(EditorBrowsableState.Never)]
528 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), new Position2D(0, 0), propertyChanged: (bindable, oldValue, newValue) =>
530 var view = (View)bindable;
531 if (newValue != null)
533 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
536 defaultValueCreator: (bindable) =>
538 var view = (View)bindable;
539 Position temp = new Position(0.0f, 0.0f, 0.0f);
540 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
541 return new Position2D(temp);
543 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
544 [EditorBrowsable(EditorBrowsableState.Never)]
545 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
547 var view = (View)bindable;
548 if (newValue != null)
550 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
553 defaultValueCreator: (bindable) =>
555 var view = (View)bindable;
557 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
560 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
561 [EditorBrowsable(EditorBrowsableState.Never)]
562 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
564 var view = (View)bindable;
566 if (newValue != null)
568 value = (int)newValue;
571 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
574 var siblings = view.GetParent()?.Children;
575 if (siblings != null)
577 int currentOrder = siblings.IndexOf(view);
578 if (value != currentOrder)
580 if (value == 0) { view.LowerToBottom(); }
581 else if (value < siblings.Count - 1)
583 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
584 else { view.LowerBelow(siblings[value]); }
586 else { view.RaiseToTop(); }
591 defaultValueCreator: (bindable) =>
593 var view = (View)bindable;
594 var parentChildren = view.GetParent()?.Children;
595 int currentOrder = 0;
596 if (parentChildren != null)
598 currentOrder = parentChildren.IndexOf(view);
600 if (currentOrder < 0) { return 0; }
601 else if (currentOrder < parentChildren.Count) { return currentOrder; }
606 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
607 [EditorBrowsable(EditorBrowsableState.Never)]
608 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), Position.ParentOriginTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
610 var view = (View)bindable;
611 if (newValue != null)
613 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
616 defaultValueCreator: (bindable) =>
618 var view = (View)bindable;
619 Position temp = new Position(0.0f, 0.0f, 0.0f);
620 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
624 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
625 [EditorBrowsable(EditorBrowsableState.Never)]
626 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), Position.PivotPointTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
628 var view = (View)bindable;
629 if (newValue != null)
631 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
634 defaultValueCreator: (bindable) =>
636 var view = (View)bindable;
637 Position temp = new Position(0.0f, 0.0f, 0.0f);
638 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
641 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
642 [EditorBrowsable(EditorBrowsableState.Never)]
643 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
645 var view = (View)bindable;
646 if (newValue != null)
648 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
651 defaultValueCreator: (bindable) =>
653 var view = (View)bindable;
655 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
658 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
659 [EditorBrowsable(EditorBrowsableState.Never)]
660 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
662 var view = (View)bindable;
663 if (newValue != null)
665 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
668 defaultValueCreator: (bindable) =>
670 var view = (View)bindable;
672 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
675 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
676 [EditorBrowsable(EditorBrowsableState.Never)]
677 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), Position.Zero, propertyChanged: (bindable, oldValue, newValue) =>
679 var view = (View)bindable;
680 if (newValue != null)
682 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
685 defaultValueCreator: (bindable) =>
687 var view = (View)bindable;
688 Position temp = new Position(0.0f, 0.0f, 0.0f);
689 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
692 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
693 [EditorBrowsable(EditorBrowsableState.Never)]
694 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
696 var view = (View)bindable;
697 if (newValue != null)
699 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
702 defaultValueCreator: (bindable) =>
704 var view = (View)bindable;
706 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
709 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
710 [EditorBrowsable(EditorBrowsableState.Never)]
711 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
713 var view = (View)bindable;
714 if (newValue != null)
716 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
719 defaultValueCreator: (bindable) =>
721 var view = (View)bindable;
723 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
726 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
727 [EditorBrowsable(EditorBrowsableState.Never)]
728 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
730 var view = (View)bindable;
731 if (newValue != null)
733 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
736 defaultValueCreator: (bindable) =>
738 var view = (View)bindable;
740 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
743 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
744 [EditorBrowsable(EditorBrowsableState.Never)]
745 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), new Rotation(new Radian(0), Vector3.ZAxis), propertyChanged: (bindable, oldValue, newValue) =>
747 var view = (View)bindable;
748 if (newValue != null)
750 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
753 defaultValueCreator: (bindable) =>
755 var view = (View)bindable;
756 Rotation temp = new Rotation();
757 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
760 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
761 [EditorBrowsable(EditorBrowsableState.Never)]
762 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
764 var view = (View)bindable;
765 if (newValue != null)
767 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
770 defaultValueCreator: (bindable) =>
772 var view = (View)bindable;
773 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
774 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
777 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
778 [EditorBrowsable(EditorBrowsableState.Never)]
779 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
781 var view = (View)bindable;
782 if (newValue != null)
784 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
787 defaultValueCreator: (bindable) =>
789 var view = (View)bindable;
791 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
794 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
795 [EditorBrowsable(EditorBrowsableState.Never)]
796 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
798 var view = (View)bindable;
799 if (newValue != null)
801 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
804 defaultValueCreator: (bindable) =>
806 var view = (View)bindable;
808 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
811 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
812 [EditorBrowsable(EditorBrowsableState.Never)]
813 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
815 var view = (View)bindable;
816 if (newValue != null)
818 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
821 defaultValueCreator: (bindable) =>
823 var view = (View)bindable;
825 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
828 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
829 [EditorBrowsable(EditorBrowsableState.Never)]
830 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
832 var view = (View)bindable;
833 if (newValue != null)
835 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
838 defaultValueCreator: (bindable) =>
840 var view = (View)bindable;
842 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
845 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
846 [EditorBrowsable(EditorBrowsableState.Never)]
847 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
849 var view = (View)bindable;
850 if (newValue != null)
852 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
855 defaultValueCreator: (bindable) =>
857 var view = (View)bindable;
859 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
862 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
863 [EditorBrowsable(EditorBrowsableState.Never)]
864 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
866 var view = (View)bindable;
867 if (newValue != null)
869 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
872 defaultValueCreator: (bindable) =>
874 var view = (View)bindable;
876 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
879 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
880 [EditorBrowsable(EditorBrowsableState.Never)]
881 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
883 var view = (View)bindable;
884 if (newValue != null)
886 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
889 defaultValueCreator: (bindable) =>
891 var view = (View)bindable;
893 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
896 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
897 [EditorBrowsable(EditorBrowsableState.Never)]
898 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
900 var view = (View)bindable;
901 if (newValue != null)
903 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
906 defaultValueCreator: (bindable) =>
908 var view = (View)bindable;
910 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
913 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
914 [EditorBrowsable(EditorBrowsableState.Never)]
915 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
917 var view = (View)bindable;
918 if (newValue != null)
920 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
923 defaultValueCreator: (bindable) =>
925 var view = (View)bindable;
927 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
929 NUILog.Error("DrawMode get error!");
933 case "NORMAL": return DrawModeType.Normal;
934 case "OVERLAY_2D": return DrawModeType.Overlay2D;
935 case "STENCIL": return DrawModeType.Stencil;
936 default: return DrawModeType.Normal;
939 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
940 [EditorBrowsable(EditorBrowsableState.Never)]
941 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
943 var view = (View)bindable;
944 if (newValue != null)
946 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
949 defaultValueCreator: (bindable) =>
951 var view = (View)bindable;
952 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
953 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
956 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
957 [EditorBrowsable(EditorBrowsableState.Never)]
958 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
960 var view = (View)bindable;
961 if (newValue != null)
963 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
966 defaultValueCreator: (bindable) =>
968 var view = (View)bindable;
970 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
972 NUILog.Error("WidthResizePolicy get error!");
976 case "FIXED": return ResizePolicyType.Fixed;
977 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
978 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
979 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
980 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
981 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
982 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
983 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
984 default: return ResizePolicyType.Fixed;
987 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
988 [EditorBrowsable(EditorBrowsableState.Never)]
989 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
991 var view = (View)bindable;
992 if (newValue != null)
994 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
997 defaultValueCreator: (bindable) =>
999 var view = (View)bindable;
1001 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
1003 NUILog.Error("HeightResizePolicy get error!");
1007 case "FIXED": return ResizePolicyType.Fixed;
1008 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1009 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1010 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1011 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1012 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1013 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1014 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1015 default: return ResizePolicyType.Fixed;
1018 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1019 [EditorBrowsable(EditorBrowsableState.Never)]
1020 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1022 var view = (View)bindable;
1023 string valueToString = "";
1024 if (newValue != null)
1026 switch ((SizeScalePolicyType)newValue)
1028 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1029 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1030 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1031 default: { valueToString = "USE_SIZE_SET"; break; }
1033 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1036 defaultValueCreator: (bindable) =>
1038 var view = (View)bindable;
1040 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1042 NUILog.Error("SizeScalePolicy get error!");
1046 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1047 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1048 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1049 default: return SizeScalePolicyType.UseSizeSet;
1052 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1053 [EditorBrowsable(EditorBrowsableState.Never)]
1054 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1056 var view = (View)bindable;
1057 if (newValue != null)
1059 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1062 defaultValueCreator: (bindable) =>
1064 var view = (View)bindable;
1066 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1069 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1070 [EditorBrowsable(EditorBrowsableState.Never)]
1071 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1073 var view = (View)bindable;
1074 if (newValue != null)
1076 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1079 defaultValueCreator: (bindable) =>
1081 var view = (View)bindable;
1083 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1086 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1087 [EditorBrowsable(EditorBrowsableState.Never)]
1088 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), new Extents(0, 0, 0, 0), propertyChanged: (bindable, oldValue, newValue) =>
1090 var view = (View)bindable;
1091 if (newValue != null)
1093 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1096 defaultValueCreator: (bindable) =>
1098 var view = (View)bindable;
1099 Extents temp = new Extents(0, 0, 0, 0);
1100 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1103 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1104 [EditorBrowsable(EditorBrowsableState.Never)]
1105 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), new Size(0, 0, 0), propertyChanged: (bindable, oldValue, newValue) =>
1107 var view = (View)bindable;
1108 if (newValue != null)
1110 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1113 defaultValueCreator: (bindable) =>
1115 var view = (View)bindable;
1116 Size temp = new Size(0, 0, 0);
1117 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1120 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1121 [EditorBrowsable(EditorBrowsableState.Never)]
1122 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), new Size2D(0, 0), propertyChanged: (bindable, oldValue, newValue) =>
1124 var view = (View)bindable;
1125 if (newValue != null)
1127 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1130 defaultValueCreator: (bindable) =>
1132 var view = (View)bindable;
1133 Size2D temp = new Size2D(0, 0);
1134 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1137 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1138 [EditorBrowsable(EditorBrowsableState.Never)]
1139 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), new Size2D(0, 0), propertyChanged: (bindable, oldValue, newValue) =>
1141 var view = (View)bindable;
1142 if (newValue != null)
1144 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1147 defaultValueCreator: (bindable) =>
1149 var view = (View)bindable;
1150 Size2D temp = new Size2D(0, 0);
1151 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1154 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1155 [EditorBrowsable(EditorBrowsableState.Never)]
1156 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1158 var view = (View)bindable;
1159 if (newValue != null)
1161 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1164 defaultValueCreator: (bindable) =>
1166 var view = (View)bindable;
1168 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1171 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1172 [EditorBrowsable(EditorBrowsableState.Never)]
1173 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1175 var view = (View)bindable;
1176 if (newValue != null)
1178 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1181 defaultValueCreator: (bindable) =>
1183 var view = (View)bindable;
1185 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1187 NUILog.Error("ClippingMode get error!");
1189 return (ClippingModeType)temp;
1191 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1192 [EditorBrowsable(EditorBrowsableState.Never)]
1193 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1195 var view = (View)bindable;
1196 if (newValue != null)
1198 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1201 defaultValueCreator: (bindable) =>
1203 var view = (View)bindable;
1205 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1208 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1209 [EditorBrowsable(EditorBrowsableState.Never)]
1210 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1212 var view = (View)bindable;
1213 if (newValue != null)
1215 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1218 defaultValueCreator: (bindable) =>
1220 var view = (View)bindable;
1222 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1224 NUILog.Error("LAYOUT_DIRECTION get error!");
1226 return (ViewLayoutDirectionType)temp;
1228 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1229 [EditorBrowsable(EditorBrowsableState.Never)]
1230 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), new Extents(0, 0, 0, 0), propertyChanged: (bindable, oldValue, newValue) =>
1232 var view = (View)bindable;
1233 if (newValue != null)
1235 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1238 defaultValueCreator: (bindable) =>
1240 var view = (View)bindable;
1241 Extents temp = new Extents(0, 0, 0, 0);
1242 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1245 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1246 [EditorBrowsable(EditorBrowsableState.Never)]
1247 public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style), propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1249 internal readonly MergedStyle _mergedStyle;
1251 /// Flag to allow Layouting to be disabled for Views.
1252 /// Once a View has a Layout set then any children added to Views from then on will receive
1253 /// automatic Layouts.
1255 private static bool layoutingDisabled = true;
1256 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1258 private bool layoutSet = false; // Flag to indicate if SetLayout was called or View was automatically given a Layout
1259 private bool _backgroundImageSynchronosLoading = false;
1260 private EventHandler _offWindowEventHandler;
1261 private OffWindowEventCallbackType _offWindowEventCallback;
1262 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1263 private WheelEventCallbackType _wheelEventCallback;
1264 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1265 private KeyCallbackType _keyCallback;
1266 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1267 private TouchDataCallbackType _touchDataCallback;
1268 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1269 private HoverEventCallbackType _hoverEventCallback;
1270 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
1271 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
1272 private EventHandler _keyInputFocusGainedEventHandler;
1273 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1274 private EventHandler _keyInputFocusLostEventHandler;
1275 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1276 private EventHandler _onRelayoutEventHandler;
1277 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1278 private EventHandler _onWindowEventHandler;
1279 private OnWindowEventCallbackType _onWindowEventCallback;
1280 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
1281 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
1282 // Resource Ready Signal
1283 private EventHandler _resourcesLoadedEventHandler;
1284 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
1285 private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
1286 private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
1289 /// Creates a new instance of a view.
1291 /// <since_tizen> 3 </since_tizen>
1292 public View() : this(NDalicPINVOKE.View_New(), true)
1294 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1296 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1298 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1301 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
1303 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1306 PositionUsesPivotPoint = false;
1308 _mergedStyle = new MergedStyle(GetType(), this);
1311 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1313 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1316 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1317 private delegate void OffWindowEventCallbackType(IntPtr control);
1318 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1319 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1320 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1321 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1322 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1323 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1324 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1325 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1326 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1327 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
1328 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1329 private delegate void ResourcesLoadedCallbackType(IntPtr control);
1330 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1331 private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
1332 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1333 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1334 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1335 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1336 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1337 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1338 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1339 private delegate void OnWindowEventCallbackType(IntPtr control);
1340 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1341 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
1344 /// Event when a child is removed.
1346 /// <since_tizen> 5 </since_tizen>
1347 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1349 /// Event when a child is added.
1351 /// <since_tizen> 5 </since_tizen>
1352 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1355 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1356 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1358 /// <since_tizen> 3 </since_tizen>
1359 public event EventHandler FocusGained
1363 if (_keyInputFocusGainedEventHandler == null)
1365 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1366 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1369 _keyInputFocusGainedEventHandler += value;
1374 _keyInputFocusGainedEventHandler -= value;
1376 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1378 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1384 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1385 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1387 /// <since_tizen> 3 </since_tizen>
1388 public event EventHandler FocusLost
1392 if (_keyInputFocusLostEventHandler == null)
1394 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1395 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1398 _keyInputFocusLostEventHandler += value;
1403 _keyInputFocusLostEventHandler -= value;
1405 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1407 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1413 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1414 /// The KeyPressed signal is emitted when the key event is received.<br />
1416 /// <since_tizen> 3 </since_tizen>
1417 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1421 if (_keyEventHandler == null)
1423 _keyCallback = OnKeyEvent;
1424 this.KeyEventSignal().Connect(_keyCallback);
1427 _keyEventHandler += value;
1432 _keyEventHandler -= value;
1434 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1436 this.KeyEventSignal().Disconnect(_keyCallback);
1442 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1443 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1445 /// <since_tizen> 3 </since_tizen>
1446 public event EventHandler Relayout
1450 if (_onRelayoutEventHandler == null)
1452 _onRelayoutEventCallback = OnRelayout;
1453 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1456 _onRelayoutEventHandler += value;
1461 _onRelayoutEventHandler -= value;
1463 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1465 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1472 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1473 /// The touched signal is emitted when the touch input is received.<br />
1475 /// <since_tizen> 3 </since_tizen>
1476 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1480 if (_touchDataEventHandler == null)
1482 _touchDataCallback = OnTouch;
1483 this.TouchSignal().Connect(_touchDataCallback);
1486 _touchDataEventHandler += value;
1491 _touchDataEventHandler -= value;
1493 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1495 this.TouchSignal().Disconnect(_touchDataCallback);
1502 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1503 /// The hovered signal is emitted when the hover input is received.<br />
1505 /// <since_tizen> 3 </since_tizen>
1506 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1510 if (_hoverEventHandler == null)
1512 _hoverEventCallback = OnHoverEvent;
1513 this.HoveredSignal().Connect(_hoverEventCallback);
1516 _hoverEventHandler += value;
1521 _hoverEventHandler -= value;
1523 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1525 this.HoveredSignal().Disconnect(_hoverEventCallback);
1532 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1533 /// The WheelMoved signal is emitted when the wheel event is received.<br />
1535 /// <since_tizen> 3 </since_tizen>
1536 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1540 if (_wheelEventHandler == null)
1542 _wheelEventCallback = OnWheelEvent;
1543 this.WheelEventSignal().Connect(_wheelEventCallback);
1546 _wheelEventHandler += value;
1551 _wheelEventHandler -= value;
1553 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
1555 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1562 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
1563 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
1565 /// <since_tizen> 3 </since_tizen>
1566 public event EventHandler AddedToWindow
1570 if (_onWindowEventHandler == null)
1572 _onWindowEventCallback = OnWindow;
1573 this.OnWindowSignal().Connect(_onWindowEventCallback);
1576 _onWindowEventHandler += value;
1581 _onWindowEventHandler -= value;
1583 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
1585 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1591 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
1592 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
1594 /// <since_tizen> 3 </since_tizen>
1595 public event EventHandler RemovedFromWindow
1599 if (_offWindowEventHandler == null)
1601 _offWindowEventCallback = OffWindow;
1602 this.OffWindowSignal().Connect(_offWindowEventCallback);
1605 _offWindowEventHandler += value;
1610 _offWindowEventHandler -= value;
1612 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
1614 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1620 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
1621 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
1623 /// <since_tizen> 3 </since_tizen>
1624 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
1628 if (_visibilityChangedEventHandler == null)
1630 _visibilityChangedEventCallback = OnVisibilityChanged;
1631 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
1634 _visibilityChangedEventHandler += value;
1639 _visibilityChangedEventHandler -= value;
1641 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
1643 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
1649 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
1650 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
1652 /// <since_tizen> 4 </since_tizen>
1653 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
1657 if (_layoutDirectionChangedEventHandler == null)
1659 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
1660 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
1663 _layoutDirectionChangedEventHandler += value;
1668 _layoutDirectionChangedEventHandler -= value;
1670 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
1672 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
1678 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1679 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1681 /// <since_tizen> 3 </since_tizen>
1682 public event EventHandler ResourcesLoaded
1686 if (_resourcesLoadedEventHandler == null)
1688 _ResourcesLoadedCallback = OnResourcesLoaded;
1689 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1692 _resourcesLoadedEventHandler += value;
1697 _resourcesLoadedEventHandler -= value;
1699 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1701 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1706 internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
1710 if (_backgroundResourceLoadedEventHandler == null)
1712 _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
1713 this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
1716 _backgroundResourceLoadedEventHandler += value;
1720 _backgroundResourceLoadedEventHandler -= value;
1722 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1724 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1730 /// Enumeration for describing the states of the view.
1732 /// <since_tizen> 3 </since_tizen>
1736 /// The normal state.
1740 /// The focused state.
1744 /// The disabled state.
1750 /// Describes the direction to move the focus towards.
1752 /// <since_tizen> 3 </since_tizen>
1753 public enum FocusDirection
1756 /// Move keyboard focus towards the left direction.
1758 /// <since_tizen> 3 </since_tizen>
1761 /// Move keyboard focus towards the right direction.
1763 /// <since_tizen> 3 </since_tizen>
1766 /// Move keyboard focus towards the up direction.
1768 /// <since_tizen> 3 </since_tizen>
1771 /// Move keyboard focus towards the down direction.
1773 /// <since_tizen> 3 </since_tizen>
1776 /// Move keyboard focus towards the previous page direction.
1778 /// <since_tizen> 3 </since_tizen>
1781 /// Move keyboard focus towards the next page direction.
1783 /// <since_tizen> 3 </since_tizen>
1787 internal enum PropertyRange
1789 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1790 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1791 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1794 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1795 [EditorBrowsable(EditorBrowsableState.Never)]
1796 public bool IsResourcesCreated
1800 return Application.Current.IsResourcesCreated;
1804 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1805 [EditorBrowsable(EditorBrowsableState.Never)]
1806 public ResourceDictionary XamlResources
1810 return Application.Current.XamlResources;
1814 Application.Current.XamlResources = value;
1819 /// The StyleName, type string.
1821 /// <since_tizen> 3 </since_tizen>
1822 public string StyleName
1826 return (string)GetValue(StyleNameProperty);
1830 SetValue(StyleNameProperty, value);
1831 NotifyPropertyChanged();
1836 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1838 /// <since_tizen> 3 </since_tizen>
1839 public Color BackgroundColor
1843 return (Color)GetValue(BackgroundColorProperty);
1847 SetValue(BackgroundColorProperty, value);
1848 NotifyPropertyChanged();
1853 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1855 /// <since_tizen> 3 </since_tizen>
1856 public string BackgroundImage
1860 return (string)GetValue(BackgroundImageProperty);
1864 SetValue(BackgroundImageProperty, value);
1865 NotifyPropertyChanged();
1870 /// The background of view.
1872 /// <since_tizen> 3 </since_tizen>
1873 public Tizen.NUI.PropertyMap Background
1877 return (PropertyMap)GetValue(BackgroundProperty);
1881 SetValue(BackgroundProperty, value);
1882 NotifyPropertyChanged();
1888 /// The current state of the view.
1890 /// <since_tizen> 3 </since_tizen>
1895 return (States)GetValue(StateProperty);
1899 SetValue(StateProperty, value);
1900 NotifyPropertyChanged();
1905 /// The current sub state of the view.
1907 /// <since_tizen> 3 </since_tizen>
1908 public States SubState
1912 return (States)GetValue(SubStateProperty);
1916 SetValue(SubStateProperty, value);
1917 NotifyPropertyChanged();
1922 /// Displays a tooltip
1924 /// <since_tizen> 3 </since_tizen>
1925 public Tizen.NUI.PropertyMap Tooltip
1929 return (PropertyMap)GetValue(TooltipProperty);
1933 SetValue(TooltipProperty, value);
1934 NotifyPropertyChanged();
1939 /// Displays a tooltip as a text.
1941 /// <since_tizen> 3 </since_tizen>
1942 public string TooltipText
1946 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1947 NotifyPropertyChanged();
1952 /// The Child property of FlexContainer.<br />
1953 /// The proportion of the free space in the container, the flex item will receive.<br />
1954 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1956 /// <since_tizen> 3 </since_tizen>
1961 return (float)GetValue(FlexProperty);
1965 SetValue(FlexProperty, value);
1966 NotifyPropertyChanged();
1971 /// The Child property of FlexContainer.<br />
1972 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
1974 /// <since_tizen> 3 </since_tizen>
1975 public int AlignSelf
1979 return (int)GetValue(AlignSelfProperty);
1983 SetValue(AlignSelfProperty, value);
1984 NotifyPropertyChanged();
1989 /// The Child property of FlexContainer.<br />
1990 /// The space around the flex item.<br />
1992 /// <since_tizen> 3 </since_tizen>
1993 public Vector4 FlexMargin
1997 return (Vector4)GetValue(FlexMarginProperty);
2001 SetValue(FlexMarginProperty, value);
2002 NotifyPropertyChanged();
2007 /// The top-left cell this child occupies, if not set, the first available cell is used.
2009 /// <since_tizen> 3 </since_tizen>
2010 public Vector2 CellIndex
2014 return (Vector2)GetValue(CellIndexProperty);
2018 SetValue(CellIndexProperty, value);
2019 NotifyPropertyChanged();
2024 /// The number of rows this child occupies, if not set, the default value is 1.
2026 /// <since_tizen> 3 </since_tizen>
2027 public float RowSpan
2031 return (float)GetValue(RowSpanProperty);
2035 SetValue(RowSpanProperty, value);
2036 NotifyPropertyChanged();
2041 /// The number of columns this child occupies, if not set, the default value is 1.
2043 /// <since_tizen> 3 </since_tizen>
2044 public float ColumnSpan
2048 return (float)GetValue(ColumnSpanProperty);
2052 SetValue(ColumnSpanProperty, value);
2053 NotifyPropertyChanged();
2058 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
2060 /// <since_tizen> 3 </since_tizen>
2061 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
2065 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
2069 SetValue(CellHorizontalAlignmentProperty, value);
2070 NotifyPropertyChanged();
2075 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
2077 /// <since_tizen> 3 </since_tizen>
2078 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
2082 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
2086 SetValue(CellVerticalAlignmentProperty, value);
2087 NotifyPropertyChanged();
2092 /// The left focusable view.<br />
2093 /// This will return null if not set.<br />
2094 /// This will also return null if the specified left focusable view is not on a window.<br />
2096 /// <since_tizen> 3 </since_tizen>
2097 public View LeftFocusableView
2099 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2102 return (View)GetValue(LeftFocusableViewProperty);
2106 SetValue(LeftFocusableViewProperty, value);
2107 NotifyPropertyChanged();
2112 /// The right focusable view.<br />
2113 /// This will return null if not set.<br />
2114 /// This will also return null if the specified right focusable view is not on a window.<br />
2116 /// <since_tizen> 3 </since_tizen>
2117 public View RightFocusableView
2119 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2122 return (View)GetValue(RightFocusableViewProperty);
2126 SetValue(RightFocusableViewProperty, value);
2127 NotifyPropertyChanged();
2132 /// The up focusable view.<br />
2133 /// This will return null if not set.<br />
2134 /// This will also return null if the specified up focusable view is not on a window.<br />
2136 /// <since_tizen> 3 </since_tizen>
2137 public View UpFocusableView
2139 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2142 return (View)GetValue(UpFocusableViewProperty);
2146 SetValue(UpFocusableViewProperty, value);
2147 NotifyPropertyChanged();
2152 /// The down focusable view.<br />
2153 /// This will return null if not set.<br />
2154 /// This will also return null if the specified down focusable view is not on a window.<br />
2156 /// <since_tizen> 3 </since_tizen>
2157 public View DownFocusableView
2159 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2162 return (View)GetValue(DownFocusableViewProperty);
2166 SetValue(DownFocusableViewProperty, value);
2167 NotifyPropertyChanged();
2172 /// Whether the view should be focusable by keyboard navigation.
2174 /// <since_tizen> 3 </since_tizen>
2175 public bool Focusable
2179 SetValue(FocusableProperty, value);
2180 NotifyPropertyChanged();
2184 return (bool)GetValue(FocusableProperty);
2189 /// Retrieves the position of the view.<br />
2190 /// The coordinates are relative to the view's parent.<br />
2192 /// <since_tizen> 3 </since_tizen>
2193 public Position CurrentPosition
2197 return GetCurrentPosition();
2202 /// Sets the size of a view for the width and the height.<br />
2203 /// Geometry can be scaled to fit within this area.<br />
2204 /// This does not interfere with the view's scale factor.<br />
2205 /// The views default depth is the minimum of width and height.<br />
2208 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
2209 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
2210 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
2211 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2212 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2213 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2214 /// 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 />
2216 /// <since_tizen> 3 </since_tizen>
2217 public Size2D Size2D
2221 Size2D temp = (Size2D)GetValue(Size2DProperty);
2222 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
2226 SetValue(Size2DProperty, value);
2227 // Set Specification so when layouts measure this View it matches the value set here.
2228 // All Views are currently Layouts.
2229 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
2230 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
2231 NotifyPropertyChanged();
2236 /// Retrieves the size of the view.<br />
2237 /// The coordinates are relative to the view's parent.<br />
2239 /// <since_tizen> 3 </since_tizen>
2240 public Size2D CurrentSize
2244 return GetCurrentSize();
2249 /// Retrieves and sets the view's opacity.<br />
2251 /// <since_tizen> 3 </since_tizen>
2252 public float Opacity
2256 return (float)GetValue(OpacityProperty);
2260 SetValue(OpacityProperty, value);
2261 NotifyPropertyChanged();
2266 /// Sets the position of the view for X and Y.<br />
2267 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2268 /// If the position inheritance is disabled, sets the world position.<br />
2271 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
2272 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
2273 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
2274 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2275 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2276 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2278 /// <since_tizen> 3 </since_tizen>
2279 public Position2D Position2D
2283 Position2D temp = (Position2D)GetValue(Position2DProperty);
2284 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
2288 SetValue(Position2DProperty, value);
2289 NotifyPropertyChanged();
2294 /// Retrieves the screen postion of the view.<br />
2296 /// <since_tizen> 3 </since_tizen>
2297 public Vector2 ScreenPosition
2301 Vector2 temp = new Vector2(0.0f, 0.0f);
2302 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2308 /// Determines whether the pivot point should be used to determine the position of the view.
2309 /// This is true by default.
2311 /// <remarks>If false, then the top-left of the view is used for the position.
2312 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
2314 /// <since_tizen> 3 </since_tizen>
2315 public bool PositionUsesPivotPoint
2319 return (bool)GetValue(PositionUsesPivotPointProperty);
2323 SetValue(PositionUsesPivotPointProperty, value);
2324 NotifyPropertyChanged();
2329 /// Please do not use! this will be deprecated.
2331 /// Please do not use! this will be deprecated!
2332 /// Instead please use PositionUsesPivotPoint.
2333 /// <since_tizen> 3 </since_tizen>
2334 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2336 "View view = new View(); " +
2337 "view.PivotPoint = PivotPoint.Center; " +
2338 "view.PositionUsesPivotPoint = true;")]
2339 [EditorBrowsable(EditorBrowsableState.Never)]
2340 public bool PositionUsesAnchorPoint
2345 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2350 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2351 NotifyPropertyChanged();
2356 /// Queries whether the view is connected to the stage.<br />
2357 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2359 /// <since_tizen> 3 </since_tizen>
2360 public bool IsOnWindow
2369 /// Gets the depth in the hierarchy for the view.
2371 /// <since_tizen> 3 </since_tizen>
2372 public int HierarchyDepth
2376 return GetHierarchyDepth();
2381 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2384 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
2385 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2386 /// The values set by this property will likely change.
2388 /// <since_tizen> 3 </since_tizen>
2389 public int SiblingOrder
2393 return (int)GetValue(SiblingOrderProperty);
2397 SetValue(SiblingOrderProperty, value);
2398 NotifyPropertyChanged();
2403 /// Returns the natural size of the view.
2406 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2408 /// <since_tizen> 5 </since_tizen>
2409 public Vector3 NaturalSize
2413 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2414 if (NDalicPINVOKE.SWIGPendingException.Pending)
2415 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2421 /// Returns the natural size (Size2D) of the view.
2424 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2426 /// <since_tizen> 4 </since_tizen>
2427 public Size2D NaturalSize2D
2431 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
2432 if (NDalicPINVOKE.SWIGPendingException.Pending)
2433 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2435 return new Size2D((int)temp.Width, (int)temp.Height);
2440 /// Gets or sets the origin of a view within its parent's area.<br />
2441 /// 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 />
2442 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
2443 /// A view's position is the distance between this origin and the view's anchor-point.<br />
2445 /// <pre>The view has been initialized.</pre>
2446 /// <since_tizen> 3 </since_tizen>
2447 public Position ParentOrigin
2451 return (Position)GetValue(ParentOriginProperty);
2455 SetValue(ParentOriginProperty, value);
2456 NotifyPropertyChanged();
2461 /// Gets or sets the anchor-point of a view.<br />
2462 /// 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 />
2463 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
2464 /// A view position is the distance between its parent-origin and this anchor-point.<br />
2465 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
2466 /// <pre>The view has been initialized.</pre>
2468 /// <since_tizen> 3 </since_tizen>
2469 public Position PivotPoint
2473 return (Position)GetValue(PivotPointProperty);
2477 SetValue(PivotPointProperty, value);
2478 NotifyPropertyChanged();
2483 /// Gets or sets the size width of the view.
2485 /// <since_tizen> 3 </since_tizen>
2486 public float SizeWidth
2490 return (float)GetValue(SizeWidthProperty);
2494 SetValue(SizeWidthProperty, value);
2495 NotifyPropertyChanged();
2500 /// Gets or sets the size height of the view.
2502 /// <since_tizen> 3 </since_tizen>
2503 public float SizeHeight
2507 return (float)GetValue(SizeHeightProperty);
2511 SetValue(SizeHeightProperty, value);
2512 NotifyPropertyChanged();
2517 /// Gets or sets the position of the view.<br />
2518 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
2519 /// If the position inheritance is disabled, sets the world position.<br />
2521 /// <since_tizen> 3 </since_tizen>
2522 public Position Position
2526 return (Position)GetValue(PositionProperty);
2530 SetValue(PositionProperty, value);
2531 NotifyPropertyChanged();
2536 /// Gets or sets the position X of the view.
2538 /// <since_tizen> 3 </since_tizen>
2539 public float PositionX
2543 return (float)GetValue(PositionXProperty);
2547 SetValue(PositionXProperty, value);
2548 NotifyPropertyChanged();
2553 /// Gets or sets the position Y of the view.
2555 /// <since_tizen> 3 </since_tizen>
2556 public float PositionY
2560 return (float)GetValue(PositionYProperty);
2564 SetValue(PositionYProperty, value);
2565 NotifyPropertyChanged();
2570 /// Gets or sets the position Z of the view.
2572 /// <since_tizen> 3 </since_tizen>
2573 public float PositionZ
2577 return (float)GetValue(PositionZProperty);
2581 SetValue(PositionZProperty, value);
2582 NotifyPropertyChanged();
2587 /// Gets or sets the world position of the view.
2589 /// <since_tizen> 3 </since_tizen>
2590 public Vector3 WorldPosition
2594 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2595 GetProperty(View.Property.WORLD_POSITION).Get(temp);
2601 /// Gets or sets the orientation of the view.<br />
2602 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
2604 /// <remarks>This is an asynchronous method.</remarks>
2605 /// <since_tizen> 3 </since_tizen>
2606 public Rotation Orientation
2610 return (Rotation)GetValue(OrientationProperty);
2614 SetValue(OrientationProperty, value);
2615 NotifyPropertyChanged();
2620 /// Gets or sets the world orientation of the view.<br />
2622 /// <since_tizen> 3 </since_tizen>
2623 public Rotation WorldOrientation
2627 Rotation temp = new Rotation();
2628 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
2634 /// Gets or sets the scale factor applied to the view.<br />
2636 /// <since_tizen> 3 </since_tizen>
2637 public Vector3 Scale
2641 return (Vector3)GetValue(ScaleProperty);
2645 SetValue(ScaleProperty, value);
2646 NotifyPropertyChanged();
2651 /// Gets or sets the scale X factor applied to the view.
2653 /// <since_tizen> 3 </since_tizen>
2658 return (float)GetValue(ScaleXProperty);
2662 SetValue(ScaleXProperty, value);
2663 NotifyPropertyChanged();
2668 /// Gets or sets the scale Y factor applied to the view.
2670 /// <since_tizen> 3 </since_tizen>
2675 return (float)GetValue(ScaleYProperty);
2679 SetValue(ScaleYProperty, value);
2680 NotifyPropertyChanged();
2685 /// Gets or sets the scale Z factor applied to the view.
2687 /// <since_tizen> 3 </since_tizen>
2692 return (float)GetValue(ScaleZProperty);
2696 SetValue(ScaleZProperty, value);
2697 NotifyPropertyChanged();
2702 /// Gets the world scale of the view.
2704 /// <since_tizen> 3 </since_tizen>
2705 public Vector3 WorldScale
2709 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2710 GetProperty(View.Property.WORLD_SCALE).Get(temp);
2716 /// Retrieves the visibility flag of the view.
2719 /// If the view is not visible, then the view and its children will not be rendered.
2720 /// 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.
2722 /// <since_tizen> 3 </since_tizen>
2723 public bool Visibility
2728 GetProperty(View.Property.VISIBLE).Get(out temp);
2734 /// Gets the view's world color.
2736 /// <since_tizen> 3 </since_tizen>
2737 public Vector4 WorldColor
2741 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2742 GetProperty(View.Property.WORLD_COLOR).Get(temp);
2748 /// Gets or sets the view's name.
2750 /// <since_tizen> 3 </since_tizen>
2755 return (string)GetValue(NameProperty);
2759 SetValue(NameProperty, value);
2760 NotifyPropertyChanged();
2765 /// Get the number of children held by the view.
2767 /// <since_tizen> 3 </since_tizen>
2768 public new uint ChildCount
2772 return GetChildCount();
2777 /// Gets the view's ID.
2780 /// <since_tizen> 3 </since_tizen>
2790 /// Gets or sets the status of whether the view should emit touch or hover signals.
2792 /// <since_tizen> 3 </since_tizen>
2793 public bool Sensitive
2797 return (bool)GetValue(SensitiveProperty);
2801 SetValue(SensitiveProperty, value);
2802 NotifyPropertyChanged();
2807 /// 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.
2809 /// <since_tizen> 3 </since_tizen>
2810 public bool LeaveRequired
2814 return (bool)GetValue(LeaveRequiredProperty);
2818 SetValue(LeaveRequiredProperty, value);
2819 NotifyPropertyChanged();
2824 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2826 /// <since_tizen> 3 </since_tizen>
2827 public bool InheritOrientation
2831 return (bool)GetValue(InheritOrientationProperty);
2835 SetValue(InheritOrientationProperty, value);
2836 NotifyPropertyChanged();
2841 /// Gets or sets the status of whether a child view inherits it's parent's scale.
2843 /// <since_tizen> 3 </since_tizen>
2844 public bool InheritScale
2848 return (bool)GetValue(InheritScaleProperty);
2852 SetValue(InheritScaleProperty, value);
2853 NotifyPropertyChanged();
2858 /// Gets or sets the status of how the view and its children should be drawn.<br />
2859 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2860 /// 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 />
2861 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2862 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2863 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2865 /// <since_tizen> 3 </since_tizen>
2866 public DrawModeType DrawMode
2870 return (DrawModeType)GetValue(DrawModeProperty);
2874 SetValue(DrawModeProperty, value);
2875 NotifyPropertyChanged();
2880 /// Gets or sets the relative to parent size factor of the view.<br />
2881 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2882 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2884 /// <since_tizen> 3 </since_tizen>
2885 public Vector3 SizeModeFactor
2889 return (Vector3)GetValue(SizeModeFactorProperty);
2893 SetValue(SizeModeFactorProperty, value);
2894 NotifyPropertyChanged();
2899 /// Gets or sets the width resize policy to be used.
2901 /// <since_tizen> 3 </since_tizen>
2902 public ResizePolicyType WidthResizePolicy
2906 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2910 SetValue(WidthResizePolicyProperty, value);
2911 // Match ResizePolicy to new Layouting.
2912 // Parent relative policies can not be mapped at this point as parent size unknown.
2915 case ResizePolicyType.UseNaturalSize:
2917 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(NaturalSize.Width));
2920 case ResizePolicyType.FillToParent:
2922 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.MatchParent));
2925 case ResizePolicyType.FitToChildren:
2927 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.WrapContent));
2933 NotifyPropertyChanged();
2938 /// Gets or sets the height resize policy to be used.
2940 /// <since_tizen> 3 </since_tizen>
2941 public ResizePolicyType HeightResizePolicy
2945 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
2949 SetValue(HeightResizePolicyProperty, value);
2950 // Match ResizePolicy to new Layouting.
2951 // Parent relative policies can not be mapped at this point as parent size unknown.
2954 case ResizePolicyType.UseNaturalSize:
2956 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(NaturalSize.Height));
2959 case ResizePolicyType.FillToParent:
2961 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.MatchParent));
2964 case ResizePolicyType.FitToChildren:
2966 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)ChildLayoutData.WrapContent));
2972 NotifyPropertyChanged();
2977 /// Gets or sets the policy to use when setting size with size negotiation.<br />
2978 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
2980 /// <since_tizen> 3 </since_tizen>
2981 public SizeScalePolicyType SizeScalePolicy
2985 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
2989 SetValue(SizeScalePolicyProperty, value);
2990 NotifyPropertyChanged();
2995 /// Gets or sets the status of whether the width size is dependent on the height size.
2997 /// <since_tizen> 3 </since_tizen>
2998 public bool WidthForHeight
3002 return (bool)GetValue(WidthForHeightProperty);
3006 SetValue(WidthForHeightProperty, value);
3007 NotifyPropertyChanged();
3012 /// Gets or sets the status of whether the height size is dependent on the width size.
3014 /// <since_tizen> 3 </since_tizen>
3015 public bool HeightForWidth
3019 return (bool)GetValue(HeightForWidthProperty);
3023 SetValue(HeightForWidthProperty, value);
3024 NotifyPropertyChanged();
3029 /// Gets or sets the padding for use in layout.
3031 /// <since_tizen> 5 </since_tizen>
3032 public Extents Padding
3036 return (Extents)GetValue(PaddingProperty);
3040 SetValue(PaddingProperty, value);
3041 NotifyPropertyChanged();
3046 /// Gets or sets the minimum size the view can be assigned in size negotiation.
3048 /// <since_tizen> 3 </since_tizen>
3049 public Size2D MinimumSize
3053 return (Size2D)GetValue(MinimumSizeProperty);
3059 // Note: it only works if minimum size is >= than natural size.
3060 // To force the size it should be done through the width&height spec or Size2D.
3061 Layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
3062 Layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
3064 SetValue(MinimumSizeProperty, value);
3065 NotifyPropertyChanged();
3070 /// Gets or sets the maximum size the view can be assigned in size negotiation.
3072 /// <since_tizen> 3 </since_tizen>
3073 public Size2D MaximumSize
3077 return (Size2D)GetValue(MaximumSizeProperty);
3081 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
3082 // MATCH_PARENT spec + parent container size can be used to limit
3083 SetValue(MaximumSizeProperty, value);
3084 NotifyPropertyChanged();
3089 /// Gets or sets whether a child view inherits it's parent's position.<br />
3090 /// Default is to inherit.<br />
3091 /// 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 />
3093 /// <since_tizen> 3 </since_tizen>
3094 public bool InheritPosition
3098 return (bool)GetValue(InheritPositionProperty);
3102 SetValue(InheritPositionProperty, value);
3103 NotifyPropertyChanged();
3108 /// Gets or sets the clipping behavior (mode) of it's children.
3110 /// <since_tizen> 3 </since_tizen>
3111 public ClippingModeType ClippingMode
3115 return (ClippingModeType)GetValue(ClippingModeProperty);
3119 SetValue(ClippingModeProperty, value);
3120 NotifyPropertyChanged();
3125 /// Gets the number of renderers held by the view.
3127 /// <since_tizen> 3 </since_tizen>
3128 public uint RendererCount
3132 return GetRendererCount();
3137 /// [Obsolete("Please do not use! this will be deprecated")]
3139 /// <since_tizen> 3 </since_tizen>
3140 /// Please do not use! this will be deprecated!
3141 /// Instead please use PivotPoint.
3142 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
3144 "View view = new View(); " +
3145 "view.PivotPoint = PivotPoint.Center; " +
3146 "view.PositionUsesPivotPoint = true;")]
3147 [EditorBrowsable(EditorBrowsableState.Never)]
3148 public Position AnchorPoint
3152 Position temp = new Position(0.0f, 0.0f, 0.0f);
3153 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3158 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3159 NotifyPropertyChanged();
3164 /// Sets the size of a view for the width, the height and the depth.<br />
3165 /// Geometry can be scaled to fit within this area.<br />
3166 /// This does not interfere with the view's scale factor.<br />
3167 /// The views default depth is the minimum of width and height.<br />
3170 /// Please note that multi-cascade setting is not possible for this NUI object. <br />
3171 /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3172 /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
3173 /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
3174 /// 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 />
3176 /// <since_tizen> 5 </since_tizen>
3181 return (Size)GetValue(SizeProperty);
3185 SetValue(SizeProperty, value);
3186 // Set Specification so when layouts measure this View it matches the value set here.
3187 // All Views are currently Layouts.
3188 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
3189 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
3190 NotifyPropertyChanged();
3195 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
3197 /// <since_tizen> 3 </since_tizen>
3198 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
3200 "Container parent = view.GetParent(); " +
3201 "View view = parent as View;")]
3202 [EditorBrowsable(EditorBrowsableState.Never)]
3203 public new View Parent
3208 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
3209 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3210 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3212 if (basehandle is Layer layer)
3214 ret = new View(Layer.getCPtr(layer).Handle, false);
3215 NUILog.Error("This Parent property is deprecated, shoud do not be used");
3219 ret = basehandle as View;
3222 NDalicPINVOKE.delete_BaseHandle(CPtr);
3223 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3225 if (NDalicPINVOKE.SWIGPendingException.Pending)
3226 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3232 /// Gets/Sets whether inherit parent's the layout Direction.
3234 /// <since_tizen> 4 </since_tizen>
3235 public bool InheritLayoutDirection
3239 return (bool)GetValue(InheritLayoutDirectionProperty);
3243 SetValue(InheritLayoutDirectionProperty, value);
3244 NotifyPropertyChanged();
3249 /// Gets/Sets the layout Direction.
3251 /// <since_tizen> 4 </since_tizen>
3252 public ViewLayoutDirectionType LayoutDirection
3256 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
3260 SetValue(LayoutDirectionProperty, value);
3261 NotifyPropertyChanged();
3266 /// Gets or sets the Margin for use in layout.
3269 /// Margin property is supported by Layout algorithms and containers.
3270 /// Please Set Layout if you want to use Margin property.
3272 /// <since_tizen> 4 </since_tizen>
3273 public Extents Margin
3277 return (Extents)GetValue(MarginProperty);
3281 SetValue(MarginProperty, value);
3282 NotifyPropertyChanged();
3287 /// [Obsolete("Please do not use! this will be deprecated")]
3289 /// Please do not use! this will be deprecated!
3290 /// Instead please use Padding.
3291 /// <since_tizen> 4 </since_tizen>
3292 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
3293 [EditorBrowsable(EditorBrowsableState.Never)]
3294 public Extents PaddingEX
3298 Extents temp = new Extents(0, 0, 0, 0);
3299 GetProperty(View.Property.PADDING).Get(temp);
3304 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3305 NotifyPropertyChanged();
3309 internal Style Style
3313 return (Style)GetValue(StyleProperty);
3317 SetValue(StyleProperty, value);
3322 /// Child property to specify desired width
3324 internal int LayoutWidthSpecificationFixed
3329 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
3331 NUILog.Error("WidthSpecificationFixed get error!");
3337 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
3342 /// Child property to specify desired height
3344 internal int LayoutHeightSpecificationFixed
3349 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
3351 NUILog.Error("HeightSpecificationFixed get error!");
3357 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
3362 /// Child property to specify desired width, use MatchParent/WrapContent)
3364 internal ChildLayoutData LayoutWidthSpecification
3369 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
3371 NUILog.Error("WidthSpecificationFixed get error!");
3373 return (ChildLayoutData)tmp;
3377 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
3382 /// Child property to specify desired height, use MatchParent/WrapContent)
3384 internal ChildLayoutData LayoutHeightSpecification
3389 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
3391 NUILog.Error("HeightSpecificationFixed get error!");
3393 return (ChildLayoutData)tmp;
3397 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
3401 internal float Weight
3405 return (float)GetValue(WeightProperty);
3409 SetValue(WeightProperty, value);
3410 NotifyPropertyChanged();
3414 internal bool BackgroundImageSynchronosLoading
3418 return _backgroundImageSynchronosLoading;
3422 if (value != _backgroundImageSynchronosLoading)
3425 PropertyMap bgMap = this.Background;
3427 bgMap.Find(Visual.Property.Type)?.Get(out visualType);
3428 if (visualType == (int)Visual.Type.Image)
3430 bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
3432 if (bgUrl.Length != 0)
3434 _backgroundImageSynchronosLoading = value;
3435 bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
3436 this.Background = bgMap;
3442 internal float WorldPositionX
3447 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3452 internal float WorldPositionY
3457 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3462 internal float WorldPositionZ
3467 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3472 internal bool FocusState
3476 return IsKeyboardFocusable();
3480 SetKeyboardFocusable(value);
3485 /// Set the layout on this control.
3489 internal LayoutItem Layout
3493 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
3495 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3496 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3497 NDalicPINVOKE.delete_BaseHandle(CPtr);
3498 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3500 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3502 return basehandle as LayoutItem;
3506 Log.Info("NUI", "Set Layout on:" + Name + "\n");
3507 layoutingDisabled = false;
3514 /// Set that layouting is required on this View. It will automatically receive a Layout.
3518 internal bool LayoutingRequired
3522 bool result = Tizen.NUI.NDalicManualPINVOKE.View_IsLayoutingRequired(View.getCPtr(this));
3523 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3528 Tizen.NUI.NDalicManualPINVOKE.View_SetLayoutingRequired(View.getCPtr(this), value);
3532 internal float ParentOriginX
3537 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3542 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3543 NotifyPropertyChanged();
3547 internal float ParentOriginY
3552 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3557 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3558 NotifyPropertyChanged();
3562 internal float ParentOriginZ
3567 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3572 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3573 NotifyPropertyChanged();
3577 internal float PivotPointX
3582 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3587 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3591 internal float PivotPointY
3596 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3601 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3605 internal float PivotPointZ
3610 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3615 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3619 internal Matrix WorldMatrix
3623 Matrix temp = new Matrix();
3624 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3629 private int LeftFocusableViewId
3634 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
3639 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3643 private int RightFocusableViewId
3648 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
3653 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3657 private int UpFocusableViewId
3662 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
3667 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3671 private int DownFocusableViewId
3676 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
3681 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3686 /// Perform an action on a visual registered to this view. <br />
3687 /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
3689 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
3690 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
3691 /// <param name="attributes">Optional attributes for the action.</param>
3692 /// <since_tizen> 5 </since_tizen>
3693 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
3695 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
3696 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3700 /// Creates an animation to animate the background color visual. If there is no
3701 /// background visual, creates one with transparent black as it's mixColor.
3703 /// <since_tizen> 3 </since_tizen>
3704 public Animation AnimateBackgroundColor(object destinationValue,
3707 AlphaFunction.BuiltinFunctions? alphaFunction = null,
3708 object initialValue = null)
3710 Tizen.NUI.PropertyMap background = Background;
3712 if (background.Empty())
3714 // If there is no background yet, ensure there is a transparent
3716 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
3717 background = Background;
3719 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
3723 /// Creates an animation to animate the mixColor of the named visual.
3725 /// <since_tizen> 3 </since_tizen>
3726 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
3728 Animation animation = null;
3730 PropertyMap _animator = new PropertyMap();
3731 if (alphaFunction != null)
3733 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
3736 PropertyMap _timePeriod = new PropertyMap();
3737 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
3738 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
3739 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
3741 PropertyMap _transition = new PropertyMap();
3742 _transition.Add("animator", new PropertyValue(_animator));
3743 _transition.Add("target", new PropertyValue(targetVisual));
3744 _transition.Add("property", new PropertyValue("mixColor"));
3746 if (initialColor != null)
3748 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
3749 _transition.Add("initialValue", initValue);
3752 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
3753 _transition.Add("targetValue", destValue);
3754 TransitionData _transitionData = new TransitionData(_transition);
3756 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
3757 if (NDalicPINVOKE.SWIGPendingException.Pending)
3758 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3763 // From Container Base class
3765 /// Adds a child view to this view.
3767 /// <seealso cref="Container.Add" />
3768 /// <since_tizen> 4 </since_tizen>
3769 public override void Add(View child)
3773 Tizen.Log.Fatal("NUI", "Child is null");
3777 Log.Info("NUI", "Adding Child:" + child.Name + " to " + Name + "\n");
3779 Container oldParent = child.GetParent();
3780 if (oldParent != this)
3782 if (oldParent != null)
3784 oldParent.Remove(child);
3786 child.InternalParent = this;
3788 // Only give children a layout if their parent is an explicit container or a pure View.
3789 // Pure View meaning not derived from a View, e.g a Legacy container.
3790 // layoutSet flag is true when the View became a layout using the set Layout API opposed to automatically due to it's parent.
3791 // First time the set Layout API is used by any View the Window no longer has layoutingDisabled.
3792 if ((true == layoutSet || GetType() == typeof(View)) && null == child.Layout && false == layoutingDisabled)
3794 Log.Info("NUI", "Parent[" + Name + "] Layout set[" + layoutSet.ToString() + "] Pure View[" + (!layoutSet).ToString() + "]\n");
3795 // If child is a View or explicitly set to require layouting then set child as a LayoutGroup.
3796 // If the child is derived from a View then it may be a legacy or existing container hence will do layouting itself.
3797 if (child.GetType() == typeof(View) || true == child.LayoutingRequired)
3799 Log.Info("NUI", "Creating LayoutGroup for " + child.Name + " LayoutingRequired[" + child.LayoutingRequired.ToString() + "]\n");
3800 child.SetLayout(new LayoutGroup());
3804 // Adding child as a leaf, layouting will not propagate past this child.
3805 // Legacy containers will be a LayoutItems too and layout their children how they wish.
3806 Log.Info("NUI", "Creating LayoutItem for " + child.Name + "\n");
3807 child.SetLayout(new LayoutItem());
3813 Layout.LayoutChildren.Add(child.Layout);
3816 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
3817 if (NDalicPINVOKE.SWIGPendingException.Pending)
3818 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3819 Children.Add(child);
3821 if (ChildAdded != null)
3823 ChildAddedEventArgs e = new ChildAddedEventArgs
3827 ChildAdded(this, e);
3833 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
3835 /// <seealso cref="Container.Remove" />
3836 /// <since_tizen> 4 </since_tizen>
3837 public override void Remove(View child)
3839 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
3840 if (NDalicPINVOKE.SWIGPendingException.Pending)
3841 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3843 Children.Remove(child);
3844 child.InternalParent = null;
3850 Layout.LayoutChildren.Remove(child.Layout);
3854 if (ChildRemoved != null)
3856 ChildRemovedEventArgs e = new ChildRemovedEventArgs
3860 ChildRemoved(this, e);
3865 /// Retrieves a child view by index.
3867 /// <seealso cref="Container.GetChildAt" />
3868 /// <since_tizen> 4 </since_tizen>
3869 public override View GetChildAt(uint index)
3871 if (index < Children.Count)
3873 return Children[Convert.ToInt32(index)];
3882 /// Retrieves the number of children held by the view.
3884 /// <seealso cref="Container.GetChildCount" />
3885 /// <since_tizen> 4 </since_tizen>
3886 public override uint GetChildCount()
3888 return Convert.ToUInt32(Children.Count);
3892 /// Gets the views parent.
3894 /// <seealso cref="Container.GetParent()" />
3895 /// <since_tizen> 4 </since_tizen>
3896 public override Container GetParent()
3898 return this.InternalParent as Container;
3902 /// Queries whether the view has a focus.
3904 /// <returns>True if this view has a focus.</returns>
3905 /// <since_tizen> 3 </since_tizen>
3906 public bool HasFocus()
3908 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
3909 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3914 /// Sets the name of the style to be applied to the view.
3916 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
3917 /// <since_tizen> 3 </since_tizen>
3918 public void SetStyleName(string styleName)
3920 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
3921 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3925 /// Retrieves the name of the style to be applied to the view (if any).
3927 /// <returns>A string matching a style, or an empty string.</returns>
3928 /// <since_tizen> 3 </since_tizen>
3929 public string GetStyleName()
3931 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
3932 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3937 /// Clears the background.
3939 /// <since_tizen> 3 </since_tizen>
3940 public void ClearBackground()
3942 NDalicPINVOKE.View_ClearBackground(swigCPtr);
3943 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3950 /// This is an asynchronous method.
3952 /// <since_tizen> 3 </since_tizen>
3962 /// This is an asynchronous method.
3963 /// If the view is hidden, then the view and its children will not be rendered.
3964 /// 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.
3966 /// <since_tizen> 3 </since_tizen>
3973 /// Raises the view above all other views.
3976 /// Sibling order of views within the parent will be updated automatically.
3977 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
3979 /// <since_tizen> 3 </since_tizen>
3980 public void RaiseToTop()
3982 var parentChildren = GetParent()?.Children;
3984 if (parentChildren != null)
3986 parentChildren.Remove(this);
3987 parentChildren.Add(this);
3989 NDalicPINVOKE.RaiseToTop(swigCPtr);
3990 if (NDalicPINVOKE.SWIGPendingException.Pending)
3991 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3997 /// Lowers the view to the bottom of all views.
4000 /// The sibling order of views within the parent will be updated automatically.
4001 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4003 /// <since_tizen> 3 </since_tizen>
4004 public void LowerToBottom()
4006 var parentChildren = GetParent()?.Children;
4008 if (parentChildren != null)
4010 parentChildren.Remove(this);
4011 parentChildren.Insert(0, this);
4013 NDalicPINVOKE.LowerToBottom(swigCPtr);
4014 if (NDalicPINVOKE.SWIGPendingException.Pending)
4015 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4020 /// Queries if all resources required by a view are loaded and ready.
4022 /// <remarks>Most resources are only loaded when the control is placed on the stage.
4024 /// <since_tizen> 3 </since_tizen>
4025 public bool IsResourceReady()
4027 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
4028 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4033 /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
4035 /// <pre>The view has been initialized. </pre>
4036 /// <returns>The parent layer of view </returns>
4037 /// <since_tizen> 5 </since_tizen>
4038 public Layer GetLayer()
4040 //to fix memory leak issue, match the handle count with native side.
4041 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
4042 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4043 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
4044 NDalicPINVOKE.delete_BaseHandle(CPtr);
4045 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4047 if (NDalicPINVOKE.SWIGPendingException.Pending)
4048 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4053 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
4055 /// <pre>The (child) view has been initialized. </pre>
4056 /// <since_tizen> 4 </since_tizen>
4057 public void Unparent()
4059 GetParent()?.Remove(this);
4063 /// Search through this view's hierarchy for a view with the given name.
4064 /// The view itself is also considered in the search.
4066 /// <pre>The view has been initialized.</pre>
4067 /// <param name="viewName">The name of the view to find.</param>
4068 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
4069 /// <since_tizen> 3 </since_tizen>
4070 public View FindChildByName(string viewName)
4072 //to fix memory leak issue, match the handle count with native side.
4073 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
4074 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4075 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4076 NDalicPINVOKE.delete_BaseHandle(CPtr);
4077 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4079 if (NDalicPINVOKE.SWIGPendingException.Pending)
4080 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4085 /// Converts screen coordinates into the view's coordinate system using the default camera.
4087 /// <pre>The view has been initialized.</pre>
4088 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4089 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4090 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4091 /// <param name="screenX">The screen X-coordinate.</param>
4092 /// <param name="screenY">The screen Y-coordinate.</param>
4093 /// <returns>True if the conversion succeeded.</returns>
4094 /// <since_tizen> 3 </since_tizen>
4095 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4097 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4098 if (NDalicPINVOKE.SWIGPendingException.Pending)
4099 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4104 /// Sets the relative to parent size factor of the view.<br />
4105 /// This factor is only used when ResizePolicy is set to either:
4106 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4107 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4109 /// <pre>The view has been initialized.</pre>
4110 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4111 /// <since_tizen> 3 </since_tizen>
4112 public void SetSizeModeFactor(Vector3 factor)
4114 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4115 if (NDalicPINVOKE.SWIGPendingException.Pending)
4116 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4119 /// Calculates the height of the view given a width.<br />
4120 /// The natural size is used for default calculation.<br />
4121 /// Size 0 is treated as aspect ratio 1:1.<br />
4123 /// <param name="width">The width to use.</param>
4124 /// <returns>The height based on the width.</returns>
4125 /// <since_tizen> 3 </since_tizen>
4126 public float GetHeightForWidth(float width)
4128 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
4129 if (NDalicPINVOKE.SWIGPendingException.Pending)
4130 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4135 /// Calculates the width of the view given a height.<br />
4136 /// The natural size is used for default calculation.<br />
4137 /// Size 0 is treated as aspect ratio 1:1.<br />
4139 /// <param name="height">The height to use.</param>
4140 /// <returns>The width based on the height.</returns>
4141 /// <since_tizen> 3 </since_tizen>
4142 public float GetWidthForHeight(float height)
4144 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
4145 if (NDalicPINVOKE.SWIGPendingException.Pending)
4146 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4151 /// Return the amount of size allocated for relayout.
4153 /// <param name="dimension">The dimension to retrieve.</param>
4154 /// <returns>Return the size.</returns>
4155 /// <since_tizen> 3 </since_tizen>
4156 public float GetRelayoutSize(DimensionType dimension)
4158 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4159 if (NDalicPINVOKE.SWIGPendingException.Pending)
4160 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4165 /// Set the padding for the view.
4167 /// <param name="padding">Padding for the view.</param>
4168 /// <since_tizen> 3 </since_tizen>
4169 public void SetPadding(PaddingType padding)
4171 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4172 if (NDalicPINVOKE.SWIGPendingException.Pending)
4173 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4177 /// Return the value of padding for the view.
4179 /// <param name="paddingOut">the value of padding for the view</param>
4180 /// <since_tizen> 3 </since_tizen>
4181 public void GetPadding(PaddingType paddingOut)
4183 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4184 if (NDalicPINVOKE.SWIGPendingException.Pending)
4185 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4188 /// <since_tizen> 3 </since_tizen>
4189 public uint AddRenderer(Renderer renderer)
4191 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4192 if (NDalicPINVOKE.SWIGPendingException.Pending)
4193 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4197 /// <since_tizen> 3 </since_tizen>
4198 public Renderer GetRendererAt(uint index)
4200 //to fix memory leak issue, match the handle count with native side.
4201 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
4202 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4203 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4204 NDalicPINVOKE.delete_BaseHandle(CPtr);
4205 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4207 if (NDalicPINVOKE.SWIGPendingException.Pending)
4208 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4212 /// <since_tizen> 3 </since_tizen>
4213 public void RemoveRenderer(Renderer renderer)
4215 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4216 if (NDalicPINVOKE.SWIGPendingException.Pending)
4217 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4220 /// <since_tizen> 3 </since_tizen>
4221 public void RemoveRenderer(uint index)
4223 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4224 if (NDalicPINVOKE.SWIGPendingException.Pending)
4225 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4228 internal void Raise()
4230 var parentChildren = GetParent()?.Children;
4232 if (parentChildren != null)
4234 int currentIndex = parentChildren.IndexOf(this);
4236 // If the view is not already the last item in the list.
4237 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
4239 View temp = parentChildren[currentIndex + 1];
4240 parentChildren[currentIndex + 1] = this;
4241 parentChildren[currentIndex] = temp;
4243 NDalicPINVOKE.Raise(swigCPtr);
4244 if (NDalicPINVOKE.SWIGPendingException.Pending)
4245 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4250 internal void Lower()
4252 var parentChildren = GetParent()?.Children;
4254 if (parentChildren != null)
4256 int currentIndex = parentChildren.IndexOf(this);
4258 // If the view is not already the first item in the list.
4259 if (currentIndex > 0 && currentIndex < parentChildren.Count)
4261 View temp = parentChildren[currentIndex - 1];
4262 parentChildren[currentIndex - 1] = this;
4263 parentChildren[currentIndex] = temp;
4265 NDalicPINVOKE.Lower(swigCPtr);
4266 if (NDalicPINVOKE.SWIGPendingException.Pending)
4267 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4273 /// Raises the view to above the target view.
4275 /// <remarks>The sibling order of views within the parent will be updated automatically.
4276 /// Views on the level above the target view will still be shown above this view.
4277 /// Raising this view above views with the same sibling order as each other will raise this view above them.
4278 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4280 /// <param name="target">Will be raised above this view.</param>
4281 internal void RaiseAbove(View target)
4283 var parentChildren = GetParent()?.Children;
4285 if (parentChildren != null)
4287 int currentIndex = parentChildren.IndexOf(this);
4288 int targetIndex = parentChildren.IndexOf(target);
4290 if (currentIndex < 0 || targetIndex < 0 ||
4291 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4293 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4296 // If the currentIndex is less than the target index and the target has the same parent.
4297 if (currentIndex < targetIndex)
4299 parentChildren.Remove(this);
4300 parentChildren.Insert(targetIndex, this);
4302 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
4303 if (NDalicPINVOKE.SWIGPendingException.Pending)
4304 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4311 /// Lowers the view to below the target view.
4313 /// <remarks>The sibling order of views within the parent will be updated automatically.
4314 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
4315 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4317 /// <param name="target">Will be lowered below this view.</param>
4318 internal void LowerBelow(View target)
4320 var parentChildren = GetParent()?.Children;
4322 if (parentChildren != null)
4324 int currentIndex = parentChildren.IndexOf(this);
4325 int targetIndex = parentChildren.IndexOf(target);
4326 if (currentIndex < 0 || targetIndex < 0 ||
4327 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4329 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4333 // If the currentIndex is not already the 0th index and the target has the same parent.
4334 if ((currentIndex != 0) && (targetIndex != -1) &&
4335 (currentIndex > targetIndex))
4337 parentChildren.Remove(this);
4338 parentChildren.Insert(targetIndex, this);
4340 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
4341 if (NDalicPINVOKE.SWIGPendingException.Pending)
4342 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4348 internal string GetName()
4350 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
4351 if (NDalicPINVOKE.SWIGPendingException.Pending)
4352 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4356 internal void SetName(string name)
4358 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
4359 if (NDalicPINVOKE.SWIGPendingException.Pending)
4360 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4363 internal uint GetId()
4365 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
4366 if (NDalicPINVOKE.SWIGPendingException.Pending)
4367 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4371 internal bool IsRoot()
4373 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
4374 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4378 internal bool OnWindow()
4380 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
4381 if (NDalicPINVOKE.SWIGPendingException.Pending)
4382 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4386 internal View FindChildById(uint id)
4388 //to fix memory leak issue, match the handle count with native side.
4389 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
4390 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4391 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4392 NDalicPINVOKE.delete_BaseHandle(CPtr);
4393 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4395 if (NDalicPINVOKE.SWIGPendingException.Pending)
4396 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4400 internal void SetParentOrigin(Vector3 origin)
4402 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
4403 if (NDalicPINVOKE.SWIGPendingException.Pending)
4404 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4407 internal Vector3 GetCurrentParentOrigin()
4409 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
4410 if (NDalicPINVOKE.SWIGPendingException.Pending)
4411 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4415 internal void SetAnchorPoint(Vector3 anchorPoint)
4417 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
4418 if (NDalicPINVOKE.SWIGPendingException.Pending)
4419 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4422 internal Vector3 GetCurrentAnchorPoint()
4424 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
4425 if (NDalicPINVOKE.SWIGPendingException.Pending)
4426 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4430 internal void SetSize(float width, float height)
4432 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
4433 if (NDalicPINVOKE.SWIGPendingException.Pending)
4434 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4437 internal void SetSize(float width, float height, float depth)
4439 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
4440 if (NDalicPINVOKE.SWIGPendingException.Pending)
4441 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4444 internal void SetSize(Vector2 size)
4446 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
4447 if (NDalicPINVOKE.SWIGPendingException.Pending)
4448 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4451 internal void SetSize(Vector3 size)
4453 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
4454 if (NDalicPINVOKE.SWIGPendingException.Pending)
4455 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4458 internal Vector3 GetTargetSize()
4460 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
4461 if (NDalicPINVOKE.SWIGPendingException.Pending)
4462 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4466 internal Size2D GetCurrentSize()
4468 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
4469 if (NDalicPINVOKE.SWIGPendingException.Pending)
4470 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4471 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
4475 internal Vector3 GetNaturalSize()
4477 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
4478 if (NDalicPINVOKE.SWIGPendingException.Pending)
4479 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4483 internal void SetPosition(float x, float y)
4485 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
4486 if (NDalicPINVOKE.SWIGPendingException.Pending)
4487 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4490 internal void SetPosition(float x, float y, float z)
4492 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
4493 if (NDalicPINVOKE.SWIGPendingException.Pending)
4494 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4497 internal void SetPosition(Vector3 position)
4499 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
4500 if (NDalicPINVOKE.SWIGPendingException.Pending)
4501 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4504 internal void SetX(float x)
4506 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
4507 if (NDalicPINVOKE.SWIGPendingException.Pending)
4508 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4511 internal void SetY(float y)
4513 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
4514 if (NDalicPINVOKE.SWIGPendingException.Pending)
4515 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4518 internal void SetZ(float z)
4520 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
4521 if (NDalicPINVOKE.SWIGPendingException.Pending)
4522 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4525 internal void TranslateBy(Vector3 distance)
4527 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
4528 if (NDalicPINVOKE.SWIGPendingException.Pending)
4529 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4532 internal Position GetCurrentPosition()
4534 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
4535 if (NDalicPINVOKE.SWIGPendingException.Pending)
4536 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4540 internal Vector3 GetCurrentWorldPosition()
4542 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
4543 if (NDalicPINVOKE.SWIGPendingException.Pending)
4544 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4548 internal void SetInheritPosition(bool inherit)
4550 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
4551 if (NDalicPINVOKE.SWIGPendingException.Pending)
4552 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4555 internal bool IsPositionInherited()
4557 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
4558 if (NDalicPINVOKE.SWIGPendingException.Pending)
4559 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4563 internal void SetOrientation(Degree angle, Vector3 axis)
4565 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4566 if (NDalicPINVOKE.SWIGPendingException.Pending)
4567 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4570 internal void SetOrientation(Radian angle, Vector3 axis)
4572 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4573 if (NDalicPINVOKE.SWIGPendingException.Pending)
4574 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4577 internal void SetOrientation(Rotation orientation)
4579 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
4580 if (NDalicPINVOKE.SWIGPendingException.Pending)
4581 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4584 internal void RotateBy(Degree angle, Vector3 axis)
4586 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4587 if (NDalicPINVOKE.SWIGPendingException.Pending)
4588 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4591 internal void RotateBy(Radian angle, Vector3 axis)
4593 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4594 if (NDalicPINVOKE.SWIGPendingException.Pending)
4595 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4598 internal void RotateBy(Rotation relativeRotation)
4600 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4601 if (NDalicPINVOKE.SWIGPendingException.Pending)
4602 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4605 internal Rotation GetCurrentOrientation()
4607 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
4608 if (NDalicPINVOKE.SWIGPendingException.Pending)
4609 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4613 internal void SetInheritOrientation(bool inherit)
4615 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
4616 if (NDalicPINVOKE.SWIGPendingException.Pending)
4617 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4620 internal bool IsOrientationInherited()
4622 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
4623 if (NDalicPINVOKE.SWIGPendingException.Pending)
4624 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4628 internal Rotation GetCurrentWorldOrientation()
4630 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4631 if (NDalicPINVOKE.SWIGPendingException.Pending)
4632 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4636 internal void SetScale(float scale)
4638 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
4639 if (NDalicPINVOKE.SWIGPendingException.Pending)
4640 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4643 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4645 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4646 if (NDalicPINVOKE.SWIGPendingException.Pending)
4647 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4650 internal void SetScale(Vector3 scale)
4652 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4653 if (NDalicPINVOKE.SWIGPendingException.Pending)
4654 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4657 internal void ScaleBy(Vector3 relativeScale)
4659 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4660 if (NDalicPINVOKE.SWIGPendingException.Pending)
4661 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4664 internal Vector3 GetCurrentScale()
4666 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
4667 if (NDalicPINVOKE.SWIGPendingException.Pending)
4668 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4672 internal Vector3 GetCurrentWorldScale()
4674 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
4675 if (NDalicPINVOKE.SWIGPendingException.Pending)
4676 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4680 internal void SetInheritScale(bool inherit)
4682 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
4683 if (NDalicPINVOKE.SWIGPendingException.Pending)
4684 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4687 internal bool IsScaleInherited()
4689 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
4690 if (NDalicPINVOKE.SWIGPendingException.Pending)
4691 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4695 internal Matrix GetCurrentWorldMatrix()
4697 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4698 if (NDalicPINVOKE.SWIGPendingException.Pending)
4699 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4703 internal void SetVisible(bool visible)
4705 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
4706 if (NDalicPINVOKE.SWIGPendingException.Pending)
4707 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4710 internal bool IsVisible()
4712 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
4713 if (NDalicPINVOKE.SWIGPendingException.Pending)
4714 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4718 internal void SetOpacity(float opacity)
4720 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
4721 if (NDalicPINVOKE.SWIGPendingException.Pending)
4722 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4725 internal float GetCurrentOpacity()
4727 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
4728 if (NDalicPINVOKE.SWIGPendingException.Pending)
4729 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4733 internal void SetColor(Vector4 color)
4735 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4736 if (NDalicPINVOKE.SWIGPendingException.Pending)
4737 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4740 internal Vector4 GetCurrentColor()
4742 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
4743 if (NDalicPINVOKE.SWIGPendingException.Pending)
4744 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4748 internal void SetColorMode(ColorMode colorMode)
4750 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
4751 if (NDalicPINVOKE.SWIGPendingException.Pending)
4752 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4755 internal ColorMode GetColorMode()
4757 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
4758 if (NDalicPINVOKE.SWIGPendingException.Pending)
4759 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4763 internal Vector4 GetCurrentWorldColor()
4765 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
4766 if (NDalicPINVOKE.SWIGPendingException.Pending)
4767 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4771 internal void SetDrawMode(DrawModeType drawMode)
4773 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4774 if (NDalicPINVOKE.SWIGPendingException.Pending)
4775 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4778 internal DrawModeType GetDrawMode()
4780 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
4781 if (NDalicPINVOKE.SWIGPendingException.Pending)
4782 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4786 internal void SetKeyboardFocusable(bool focusable)
4788 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4789 if (NDalicPINVOKE.SWIGPendingException.Pending)
4790 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4793 internal bool IsKeyboardFocusable()
4795 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
4796 if (NDalicPINVOKE.SWIGPendingException.Pending)
4797 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4801 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4803 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4804 if (NDalicPINVOKE.SWIGPendingException.Pending)
4805 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4808 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4810 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4811 if (NDalicPINVOKE.SWIGPendingException.Pending)
4812 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4816 internal Vector3 GetSizeModeFactor()
4818 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
4819 if (NDalicPINVOKE.SWIGPendingException.Pending)
4820 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4824 internal void SetMinimumSize(Vector2 size)
4826 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4827 if (NDalicPINVOKE.SWIGPendingException.Pending)
4828 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4831 internal Vector2 GetMinimumSize()
4833 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
4834 if (NDalicPINVOKE.SWIGPendingException.Pending)
4835 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4839 internal void SetMaximumSize(Vector2 size)
4841 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4842 if (NDalicPINVOKE.SWIGPendingException.Pending)
4843 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4846 internal Vector2 GetMaximumSize()
4848 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
4849 if (NDalicPINVOKE.SWIGPendingException.Pending)
4850 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4854 internal int GetHierarchyDepth()
4856 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
4857 if (NDalicPINVOKE.SWIGPendingException.Pending)
4858 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4862 internal uint GetRendererCount()
4864 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
4865 if (NDalicPINVOKE.SWIGPendingException.Pending)
4866 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4870 internal TouchDataSignal TouchSignal()
4872 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
4873 if (NDalicPINVOKE.SWIGPendingException.Pending)
4874 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4878 internal HoverSignal HoveredSignal()
4880 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
4881 if (NDalicPINVOKE.SWIGPendingException.Pending)
4882 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4886 internal WheelSignal WheelEventSignal()
4888 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
4889 if (NDalicPINVOKE.SWIGPendingException.Pending)
4890 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4894 internal ViewSignal OnWindowSignal()
4896 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
4897 if (NDalicPINVOKE.SWIGPendingException.Pending)
4898 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4902 internal ViewSignal OffWindowSignal()
4904 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
4905 if (NDalicPINVOKE.SWIGPendingException.Pending)
4906 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4910 internal ViewSignal OnRelayoutSignal()
4912 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
4913 if (NDalicPINVOKE.SWIGPendingException.Pending)
4914 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4918 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
4920 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
4921 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4925 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
4927 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
4928 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4932 internal ViewSignal ResourcesLoadedSignal()
4934 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
4935 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4939 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
4941 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
4944 internal bool IsTopLevelView()
4946 if (GetParent() is Layer)
4953 internal void SetKeyInputFocus()
4955 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
4956 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4959 internal void ClearKeyInputFocus()
4961 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
4962 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4965 internal PinchGestureDetector GetPinchGestureDetector()
4967 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
4968 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4972 internal PanGestureDetector GetPanGestureDetector()
4974 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
4975 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4979 internal TapGestureDetector GetTapGestureDetector()
4981 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
4982 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4986 internal LongPressGestureDetector GetLongPressGestureDetector()
4988 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
4989 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4993 internal void SetBackgroundColor(Vector4 color)
4995 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
4996 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4999 internal Vector4 GetBackgroundColor()
5001 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
5002 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5006 internal void SetBackgroundImage(Image image)
5008 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
5009 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5012 internal ControlKeySignal KeyEventSignal()
5014 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
5015 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5019 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
5021 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
5022 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5026 internal KeyInputFocusSignal KeyInputFocusLostSignal()
5028 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
5029 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5033 internal IntPtr GetPtrfromView()
5035 return (IntPtr)swigCPtr;
5038 internal void SetLayout(LayoutItem layout)
5040 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(layout));
5041 layout.LayoutChildren.Clear();
5042 foreach (View view in Children)
5044 layout.LayoutChildren.Add(view.Layout);
5048 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5050 return (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5054 /// you can override it to clean-up your own resources.
5056 /// <param name="type">DisposeTypes</param>
5057 /// <since_tizen> 3 </since_tizen>
5058 protected override void Dispose(DisposeTypes type)
5065 if (type == DisposeTypes.Explicit)
5068 //Release your own managed resources here.
5069 //You should release all of your own disposable objects here.
5072 //Release your own unmanaged resources here.
5073 //You should not access any managed member here except static instance.
5074 //because the execution order of Finalizes is non-deterministic.
5077 DisConnectFromSignals();
5080 if (swigCPtr.Handle != global::System.IntPtr.Zero)
5084 swigCMemOwn = false;
5085 NDalicPINVOKE.delete_View(swigCPtr);
5087 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5090 foreach (View view in Children)
5092 view.InternalParent = null;
5099 private void OnSize2DChanged(int width, int height)
5101 Size2D = new Size2D(width, height);
5104 private void OnPosition2DChanged(int x, int y)
5106 Position2D = new Position2D(x, y);
5109 private void DisConnectFromSignals()
5111 // Save current CPtr.
5112 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
5114 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
5115 swigCPtr = GetBaseHandleCPtrHandleRef;
5117 if (_onRelayoutEventCallback != null)
5119 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5122 if (_offWindowEventCallback != null)
5124 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5127 if (_onWindowEventCallback != null)
5129 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5132 if (_wheelEventCallback != null)
5134 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5137 if (_hoverEventCallback != null)
5139 this.HoveredSignal().Disconnect(_hoverEventCallback);
5142 if (_touchDataCallback != null)
5144 this.TouchSignal().Disconnect(_touchDataCallback);
5147 if (_ResourcesLoadedCallback != null)
5149 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
5152 if (_offWindowEventCallback != null)
5154 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5157 if (_onWindowEventCallback != null)
5159 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5162 if (_wheelEventCallback != null)
5164 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5167 if (_hoverEventCallback != null)
5169 this.HoveredSignal().Disconnect(_hoverEventCallback);
5172 if (_touchDataCallback != null)
5174 this.TouchSignal().Disconnect(_touchDataCallback);
5177 if (_onRelayoutEventCallback != null)
5179 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5182 if (_keyCallback != null)
5184 this.KeyEventSignal().Disconnect(_keyCallback);
5187 if (_keyInputFocusLostCallback != null)
5189 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
5192 if (_keyInputFocusGainedCallback != null)
5194 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
5197 if (_backgroundResourceLoadedCallback != null)
5199 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5202 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
5203 // Restore current CPtr.
5204 swigCPtr = currentCPtr;
5207 private void OnKeyInputFocusGained(IntPtr view)
5209 if (_keyInputFocusGainedEventHandler != null)
5211 _keyInputFocusGainedEventHandler(this, null);
5215 private void OnKeyInputFocusLost(IntPtr view)
5217 if (_keyInputFocusLostEventHandler != null)
5219 _keyInputFocusLostEventHandler(this, null);
5223 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
5225 if (keyEvent == global::System.IntPtr.Zero)
5227 NUILog.Error("keyEvent should not be null!");
5231 KeyEventArgs e = new KeyEventArgs();
5233 bool result = false;
5235 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
5237 if (_keyEventHandler != null)
5239 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
5241 // Oring the result of each callback.
5242 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
5244 result |= del(this, e);
5251 // Callback for View OnRelayout signal
5252 private void OnRelayout(IntPtr data)
5254 if (_onRelayoutEventHandler != null)
5256 _onRelayoutEventHandler(this, null);
5260 // Callback for View TouchSignal
5261 private bool OnTouch(IntPtr view, IntPtr touchData)
5263 if (touchData == global::System.IntPtr.Zero)
5265 NUILog.Error("touchData should not be null!");
5269 TouchEventArgs e = new TouchEventArgs();
5271 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
5273 if (_touchDataEventHandler != null)
5275 return _touchDataEventHandler(this, e);
5280 // Callback for View Hover signal
5281 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
5283 if (hoverEvent == global::System.IntPtr.Zero)
5285 NUILog.Error("hoverEvent should not be null!");
5289 HoverEventArgs e = new HoverEventArgs();
5291 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
5293 if (_hoverEventHandler != null)
5295 return _hoverEventHandler(this, e);
5300 // Callback for View Wheel signal
5301 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
5303 if (wheelEvent == global::System.IntPtr.Zero)
5305 NUILog.Error("wheelEvent should not be null!");
5309 WheelEventArgs e = new WheelEventArgs();
5311 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
5313 if (_wheelEventHandler != null)
5315 return _wheelEventHandler(this, e);
5320 // Callback for View OnWindow signal
5321 private void OnWindow(IntPtr data)
5323 if (_onWindowEventHandler != null)
5325 _onWindowEventHandler(this, null);
5329 // Callback for View OffWindow signal
5330 private void OffWindow(IntPtr data)
5332 if (_offWindowEventHandler != null)
5334 _offWindowEventHandler(this, null);
5338 // Callback for View visibility change signal
5339 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
5341 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
5344 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5346 e.Visibility = visibility;
5349 if (_visibilityChangedEventHandler != null)
5351 _visibilityChangedEventHandler(this, e);
5355 // Callback for View layout direction change signal
5356 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
5358 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
5361 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5365 if (_layoutDirectionChangedEventHandler != null)
5367 _layoutDirectionChangedEventHandler(this, e);
5371 private void OnResourcesLoaded(IntPtr view)
5373 if (_resourcesLoadedEventHandler != null)
5375 _resourcesLoadedEventHandler(this, null);
5379 private View ConvertIdToView(uint id)
5382 if (GetParent() is View)
5384 View parentView = GetParent() as View;
5385 view = parentView.FindChildById(id);
5390 view = Window.Instance.GetRootLayer().FindChildById(id);
5396 private void OnBackgroundResourceLoaded(IntPtr view)
5398 BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5399 e.Status = (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5401 if (_backgroundResourceLoadedEventHandler != null)
5403 _backgroundResourceLoadedEventHandler(this, e);
5408 /// Event argument passed through the ChildAdded event.
5410 /// <since_tizen> 5 </since_tizen>
5411 public class ChildAddedEventArgs : EventArgs
5414 /// Added child view at moment.
5416 /// <since_tizen> 5 </since_tizen>
5417 public View Added { get; set; }
5421 /// Event argument passed through the ChildRemoved event.
5423 /// <since_tizen> 5 </since_tizen>
5424 public class ChildRemovedEventArgs : EventArgs
5427 /// Removed child view at moment.
5429 /// <since_tizen> 5 </since_tizen>
5430 public View Removed { get; set; }
5434 /// Event arguments that passed via the KeyEvent signal.
5436 /// <since_tizen> 3 </since_tizen>
5437 public class KeyEventArgs : EventArgs
5442 /// Key - is the key sent to the view.
5444 /// <since_tizen> 3 </since_tizen>
5459 /// Event arguments that passed via the touch signal.
5461 /// <since_tizen> 3 </since_tizen>
5462 public class TouchEventArgs : EventArgs
5464 private Touch _touch;
5467 /// Touch - contains the information of touch points.
5469 /// <since_tizen> 3 </since_tizen>
5484 /// Event arguments that passed via the hover signal.
5486 /// <since_tizen> 3 </since_tizen>
5487 public class HoverEventArgs : EventArgs
5489 private Hover _hover;
5492 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
5494 /// <since_tizen> 3 </since_tizen>
5509 /// Event arguments that passed via the wheel signal.
5511 /// <since_tizen> 3 </since_tizen>
5512 public class WheelEventArgs : EventArgs
5514 private Wheel _wheel;
5517 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
5519 /// <since_tizen> 3 </since_tizen>
5534 /// Event arguments of visibility changed.
5536 /// <since_tizen> 3 </since_tizen>
5537 public class VisibilityChangedEventArgs : EventArgs
5540 private bool _visibility;
5541 private VisibilityChangeType _type;
5544 /// The view, or child of view, whose visibility has changed.
5546 /// <since_tizen> 3 </since_tizen>
5560 /// Whether the view is now visible or not.
5562 /// <since_tizen> 3 </since_tizen>
5563 public bool Visibility
5571 _visibility = value;
5576 /// Whether the view's visible property has changed or a parent's.
5578 /// <since_tizen> 3 </since_tizen>
5579 public VisibilityChangeType Type
5593 /// Event arguments of layout direction changed.
5595 /// <since_tizen> 4 </since_tizen>
5596 public class LayoutDirectionChangedEventArgs : EventArgs
5599 private ViewLayoutDirectionType _type;
5602 /// The view, or child of view, whose layout direction has changed.
5604 /// <since_tizen> 4 </since_tizen>
5618 /// Whether the view's layout direction property has changed or a parent's.
5620 /// <since_tizen> 4 </since_tizen>
5621 public ViewLayoutDirectionType Type
5634 internal class BackgroundResourceLoadedEventArgs : EventArgs
5636 private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5637 public ResourceLoadingStatusType Status
5650 internal class Property
5652 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
5653 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
5654 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
5655 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
5656 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
5657 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
5658 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
5659 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
5660 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
5661 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
5662 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
5663 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
5664 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
5665 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
5666 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
5667 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
5668 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
5669 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
5670 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
5671 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
5672 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
5673 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
5674 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
5675 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
5676 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
5677 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
5678 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
5679 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
5680 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
5681 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
5682 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
5683 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
5684 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
5685 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
5686 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
5687 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
5688 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
5689 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
5690 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
5691 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
5692 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
5693 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
5694 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
5695 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
5696 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
5697 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
5698 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
5699 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
5700 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
5701 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
5702 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
5703 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
5704 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
5705 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
5706 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
5707 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
5708 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
5709 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
5710 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
5711 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
5712 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
5713 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
5714 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();