2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.Collections.Generic;
19 using System.ComponentModel;
21 using System.Runtime.InteropServices;
22 using Tizen.NUI.Binding;
24 namespace Tizen.NUI.BaseComponents
27 /// The View layout Direction type.
29 /// <since_tizen> 4 </since_tizen>
30 public enum ViewLayoutDirectionType
35 /// <since_tizen> 4 </since_tizen>
40 /// <since_tizen> 4 </since_tizen>
45 /// [Draft] Available policies for layout parameters
47 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
48 [EditorBrowsable(EditorBrowsableState.Never)]
49 public static class LayoutParamPolicies
52 /// Constant which indicates child size should match parent size
54 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
55 [EditorBrowsable(EditorBrowsableState.Never)]
56 public const int MatchParent = -1;
58 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
60 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
61 [EditorBrowsable(EditorBrowsableState.Never)]
62 public const int WrapContent = -2;
66 /// [Draft] Replaced by LayoutParamPolicies, will be removed once occurrences replaced.
68 internal enum ChildLayoutData
71 /// Constant which indicates child size should match parent size
73 MatchParent = LayoutParamPolicies.MatchParent,
75 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
77 WrapContent = LayoutParamPolicies.WrapContent,
80 internal enum ResourceLoadingStatusType
89 /// View is the base class for all views.
91 /// <since_tizen> 3 </since_tizen>
92 public class View : Container
94 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
95 [EditorBrowsable(EditorBrowsableState.Never)]
96 public static readonly BindableProperty StyleNameProperty = BindableProperty.Create("StyleName", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
98 var view = (View)bindable;
101 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue));
104 defaultValueCreator: (bindable) =>
106 var view = (View)bindable;
108 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STYLE_NAME).Get(out temp);
111 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
112 [EditorBrowsable(EditorBrowsableState.Never)]
113 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
115 var view = (View)bindable;
116 if (newValue != null)
118 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((Color)newValue));
121 defaultValueCreator: (bindable) =>
123 var view = (View)bindable;
124 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
126 Tizen.NUI.PropertyMap background = view.Background;
128 background.Find(Visual.Property.Type)?.Get(out visualType);
129 if (visualType == (int)Visual.Type.Color)
131 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
134 return backgroundColor;
136 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
137 [EditorBrowsable(EditorBrowsableState.Never)]
138 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
140 var view = (View)bindable;
141 if (newValue != null)
143 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((string)newValue));
146 defaultValueCreator: (bindable) =>
148 var view = (View)bindable;
149 string backgroundImage = "";
151 Tizen.NUI.PropertyMap background = view.Background;
153 background.Find(Visual.Property.Type)?.Get(out visualType);
154 if (visualType == (int)Visual.Type.Image)
156 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
159 return backgroundImage;
161 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
162 [EditorBrowsable(EditorBrowsableState.Never)]
163 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create("Background", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
165 var view = (View)bindable;
166 if (newValue != null)
168 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
171 defaultValueCreator: (bindable) =>
173 var view = (View)bindable;
174 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
175 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
178 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
179 [EditorBrowsable(EditorBrowsableState.Never)]
180 public static readonly BindableProperty StateProperty = BindableProperty.Create("State", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
182 var view = (View)bindable;
183 if (newValue != null)
185 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
188 defaultValueCreator: (bindable) =>
190 var view = (View)bindable;
192 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
194 NUILog.Error("State get error!");
198 case 0: return States.Normal;
199 case 1: return States.Focused;
200 case 2: return States.Disabled;
201 default: return States.Normal;
204 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
205 [EditorBrowsable(EditorBrowsableState.Never)]
206 public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
208 var view = (View)bindable;
209 string valueToString = "";
210 if (newValue != null)
212 switch ((States)newValue)
214 case States.Normal: { valueToString = "NORMAL"; break; }
215 case States.Focused: { valueToString = "FOCUSED"; break; }
216 case States.Disabled: { valueToString = "DISABLED"; break; }
217 default: { valueToString = "NORMAL"; break; }
219 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
222 defaultValueCreator: (bindable) =>
224 var view = (View)bindable;
226 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
228 NUILog.Error("subState get error!");
232 case "NORMAL": return States.Normal;
233 case "FOCUSED": return States.Focused;
234 case "DISABLED": return States.Disabled;
235 default: return States.Normal;
238 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
239 [EditorBrowsable(EditorBrowsableState.Never)]
240 public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
242 var view = (View)bindable;
243 if (newValue != null)
245 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
248 defaultValueCreator: (bindable) =>
250 var view = (View)bindable;
251 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
252 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
256 /// Only for XAML property binding. This will be changed as Inhouse API by ACR later.
257 public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
259 var view = (View)bindable;
260 if (newValue != null)
262 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
265 defaultValueCreator: (bindable) =>
267 var view = (View)bindable;
269 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
273 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
274 [EditorBrowsable(EditorBrowsableState.Never)]
275 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
277 var view = (View)bindable;
278 if (newValue != null)
280 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
283 defaultValueCreator: (bindable) =>
285 var view = (View)bindable;
287 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
290 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
291 [EditorBrowsable(EditorBrowsableState.Never)]
292 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
294 var view = (View)bindable;
295 if (newValue != null)
297 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
300 defaultValueCreator: (bindable) =>
302 var view = (View)bindable;
303 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
304 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
307 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
308 [EditorBrowsable(EditorBrowsableState.Never)]
309 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
311 var view = (View)bindable;
312 if (newValue != null)
314 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
317 defaultValueCreator: (bindable) =>
319 var view = (View)bindable;
320 Vector2 temp = new Vector2(0.0f, 0.0f);
321 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
324 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
325 [EditorBrowsable(EditorBrowsableState.Never)]
326 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
328 var view = (View)bindable;
329 if (newValue != null)
331 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
334 defaultValueCreator: (bindable) =>
336 var view = (View)bindable;
338 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
341 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
342 [EditorBrowsable(EditorBrowsableState.Never)]
343 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
345 var view = (View)bindable;
346 if (newValue != null)
348 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
351 defaultValueCreator: (bindable) =>
353 var view = (View)bindable;
355 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
358 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
359 [EditorBrowsable(EditorBrowsableState.Never)]
360 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
362 var view = (View)bindable;
363 string valueToString = "";
365 if (newValue != null)
367 switch ((HorizontalAlignmentType)newValue)
369 case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
370 case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
371 case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
372 default: { valueToString = "left"; break; }
374 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
377 defaultValueCreator: (bindable) =>
379 var view = (View)bindable;
381 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
383 NUILog.Error("CellHorizontalAlignment get error!");
388 case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
389 case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
390 case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
391 default: return Tizen.NUI.HorizontalAlignmentType.Left;
394 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
395 [EditorBrowsable(EditorBrowsableState.Never)]
396 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
398 var view = (View)bindable;
399 string valueToString = "";
401 if (newValue != null)
403 switch ((VerticalAlignmentType)newValue)
405 case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
406 case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
407 case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
408 default: { valueToString = "top"; break; }
410 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
413 defaultValueCreator: (bindable) =>
415 var view = (View)bindable;
417 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
419 NUILog.Error("CellVerticalAlignment get error!");
424 case "top": return Tizen.NUI.VerticalAlignmentType.Top;
425 case "center": return Tizen.NUI.VerticalAlignmentType.Center;
426 case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
427 default: return Tizen.NUI.VerticalAlignmentType.Top;
432 /// "Please DO NOT use! This will be deprecated! Please use 'View Weight' instead of BindableProperty"
433 /// This needs to be hidden as inhouse API until all applications using it have been updated. Do not make public.
435 [EditorBrowsable(EditorBrowsableState.Never)]
436 public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
438 var view = (View)bindable;
439 if (newValue != null)
441 view.Weight = (float)newValue;
445 defaultValueCreator: (bindable) =>
447 var view = (View)bindable;
451 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
452 [EditorBrowsable(EditorBrowsableState.Never)]
453 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
455 var view = (View)bindable;
456 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
457 else { view.LeftFocusableViewId = -1; }
459 defaultValueCreator: (bindable) =>
461 var view = (View)bindable;
462 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
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 RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
469 var view = (View)bindable;
470 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
471 else { view.RightFocusableViewId = -1; }
473 defaultValueCreator: (bindable) =>
475 var view = (View)bindable;
476 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
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 UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
483 var view = (View)bindable;
484 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
485 else { view.UpFocusableViewId = -1; }
487 defaultValueCreator: (bindable) =>
489 var view = (View)bindable;
490 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
493 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
494 [EditorBrowsable(EditorBrowsableState.Never)]
495 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
497 var view = (View)bindable;
498 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
499 else { view.DownFocusableViewId = -1; }
501 defaultValueCreator: (bindable) =>
503 var view = (View)bindable;
504 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
507 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
508 [EditorBrowsable(EditorBrowsableState.Never)]
509 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
511 var view = (View)bindable;
512 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
514 defaultValueCreator: (bindable) =>
516 var view = (View)bindable;
517 return view.IsKeyboardFocusable();
519 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
520 [EditorBrowsable(EditorBrowsableState.Never)]
521 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
523 var view = (View)bindable;
524 if (newValue != null)
526 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size((Size2D)newValue)));
529 defaultValueCreator: (bindable) =>
531 var view = (View)bindable;
532 Size temp = new Size(0.0f, 0.0f, 0.0f);
533 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
534 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
537 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
538 [EditorBrowsable(EditorBrowsableState.Never)]
539 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
541 var view = (View)bindable;
542 if (newValue != null)
544 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
547 defaultValueCreator: (bindable) =>
549 var view = (View)bindable;
551 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
554 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
555 [EditorBrowsable(EditorBrowsableState.Never)]
556 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
558 var view = (View)bindable;
559 if (newValue != null)
561 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
564 defaultValueCreator: (bindable) =>
566 var view = (View)bindable;
567 Position temp = new Position(0.0f, 0.0f, 0.0f);
568 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
569 return new Position2D(temp);
571 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
572 [EditorBrowsable(EditorBrowsableState.Never)]
573 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
575 var view = (View)bindable;
576 if (newValue != null)
578 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
581 defaultValueCreator: (bindable) =>
583 var view = (View)bindable;
585 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
588 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
589 [EditorBrowsable(EditorBrowsableState.Never)]
590 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
592 var view = (View)bindable;
594 if (newValue != null)
596 value = (int)newValue;
599 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
602 var siblings = view.GetParent()?.Children;
603 if (siblings != null)
605 int currentOrder = siblings.IndexOf(view);
606 if (value != currentOrder)
608 if (value == 0) { view.LowerToBottom(); }
609 else if (value < siblings.Count - 1)
611 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
612 else { view.LowerBelow(siblings[value]); }
614 else { view.RaiseToTop(); }
619 defaultValueCreator: (bindable) =>
621 var view = (View)bindable;
622 var parentChildren = view.GetParent()?.Children;
623 int currentOrder = 0;
624 if (parentChildren != null)
626 currentOrder = parentChildren.IndexOf(view);
628 if (currentOrder < 0) { return 0; }
629 else if (currentOrder < parentChildren.Count) { return currentOrder; }
634 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
635 [EditorBrowsable(EditorBrowsableState.Never)]
636 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
638 var view = (View)bindable;
639 if (newValue != null)
641 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
644 defaultValueCreator: (bindable) =>
646 var view = (View)bindable;
647 Position temp = new Position(0.0f, 0.0f, 0.0f);
648 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
652 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
653 [EditorBrowsable(EditorBrowsableState.Never)]
654 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
656 var view = (View)bindable;
657 if (newValue != null)
659 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
662 defaultValueCreator: (bindable) =>
664 var view = (View)bindable;
665 Position temp = new Position(0.0f, 0.0f, 0.0f);
666 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
669 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
670 [EditorBrowsable(EditorBrowsableState.Never)]
671 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
673 var view = (View)bindable;
674 if (newValue != null)
676 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
679 defaultValueCreator: (bindable) =>
681 var view = (View)bindable;
683 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
686 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
687 [EditorBrowsable(EditorBrowsableState.Never)]
688 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
690 var view = (View)bindable;
691 if (newValue != null)
693 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
696 defaultValueCreator: (bindable) =>
698 var view = (View)bindable;
700 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
703 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
704 [EditorBrowsable(EditorBrowsableState.Never)]
705 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
707 var view = (View)bindable;
708 if (newValue != null)
710 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
713 defaultValueCreator: (bindable) =>
715 var view = (View)bindable;
716 Position temp = new Position(0.0f, 0.0f, 0.0f);
717 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
720 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
721 [EditorBrowsable(EditorBrowsableState.Never)]
722 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
724 var view = (View)bindable;
725 if (newValue != null)
727 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
730 defaultValueCreator: (bindable) =>
732 var view = (View)bindable;
734 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
737 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
738 [EditorBrowsable(EditorBrowsableState.Never)]
739 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
741 var view = (View)bindable;
742 if (newValue != null)
744 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
747 defaultValueCreator: (bindable) =>
749 var view = (View)bindable;
751 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
754 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
755 [EditorBrowsable(EditorBrowsableState.Never)]
756 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
758 var view = (View)bindable;
759 if (newValue != null)
761 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
764 defaultValueCreator: (bindable) =>
766 var view = (View)bindable;
768 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
771 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
772 [EditorBrowsable(EditorBrowsableState.Never)]
773 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
775 var view = (View)bindable;
776 if (newValue != null)
778 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
781 defaultValueCreator: (bindable) =>
783 var view = (View)bindable;
784 Rotation temp = new Rotation();
785 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
788 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
789 [EditorBrowsable(EditorBrowsableState.Never)]
790 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
792 var view = (View)bindable;
793 if (newValue != null)
795 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
798 defaultValueCreator: (bindable) =>
800 var view = (View)bindable;
801 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
802 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
805 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
806 [EditorBrowsable(EditorBrowsableState.Never)]
807 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
809 var view = (View)bindable;
810 if (newValue != null)
812 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
815 defaultValueCreator: (bindable) =>
817 var view = (View)bindable;
819 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
822 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
823 [EditorBrowsable(EditorBrowsableState.Never)]
824 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
826 var view = (View)bindable;
827 if (newValue != null)
829 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
832 defaultValueCreator: (bindable) =>
834 var view = (View)bindable;
836 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
839 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
840 [EditorBrowsable(EditorBrowsableState.Never)]
841 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
843 var view = (View)bindable;
844 if (newValue != null)
846 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
849 defaultValueCreator: (bindable) =>
851 var view = (View)bindable;
853 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
856 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
857 [EditorBrowsable(EditorBrowsableState.Never)]
858 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
860 var view = (View)bindable;
861 if (newValue != null)
863 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
866 defaultValueCreator: (bindable) =>
868 var view = (View)bindable;
870 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
873 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
874 [EditorBrowsable(EditorBrowsableState.Never)]
875 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
877 var view = (View)bindable;
878 if (newValue != null)
880 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
883 defaultValueCreator: (bindable) =>
885 var view = (View)bindable;
887 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
890 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
891 [EditorBrowsable(EditorBrowsableState.Never)]
892 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
894 var view = (View)bindable;
895 if (newValue != null)
897 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
900 defaultValueCreator: (bindable) =>
902 var view = (View)bindable;
904 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
907 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
908 [EditorBrowsable(EditorBrowsableState.Never)]
909 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
911 var view = (View)bindable;
912 if (newValue != null)
914 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
917 defaultValueCreator: (bindable) =>
919 var view = (View)bindable;
921 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
924 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
925 [EditorBrowsable(EditorBrowsableState.Never)]
926 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
928 var view = (View)bindable;
929 if (newValue != null)
931 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
934 defaultValueCreator: (bindable) =>
936 var view = (View)bindable;
938 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
941 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
942 [EditorBrowsable(EditorBrowsableState.Never)]
943 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
945 var view = (View)bindable;
946 if (newValue != null)
948 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
951 defaultValueCreator: (bindable) =>
953 var view = (View)bindable;
955 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
957 NUILog.Error("DrawMode get error!");
961 case "NORMAL": return DrawModeType.Normal;
962 case "OVERLAY_2D": return DrawModeType.Overlay2D;
963 #pragma warning disable CS0618 // Disable deprecated warning as we do need to use the deprecated API here.
964 case "STENCIL": return DrawModeType.Stencil;
965 #pragma warning restore CS0618
966 default: return DrawModeType.Normal;
969 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
970 [EditorBrowsable(EditorBrowsableState.Never)]
971 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
973 var view = (View)bindable;
974 if (newValue != null)
976 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
979 defaultValueCreator: (bindable) =>
981 var view = (View)bindable;
982 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
983 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
986 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
987 [EditorBrowsable(EditorBrowsableState.Never)]
988 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
990 var view = (View)bindable;
991 if (newValue != null)
993 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
996 defaultValueCreator: (bindable) =>
998 var view = (View)bindable;
1000 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
1002 NUILog.Error("WidthResizePolicy get error!");
1006 case "FIXED": return ResizePolicyType.Fixed;
1007 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1008 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1009 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1010 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1011 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1012 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1013 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1014 default: return ResizePolicyType.Fixed;
1017 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1018 [EditorBrowsable(EditorBrowsableState.Never)]
1019 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
1021 var view = (View)bindable;
1022 if (newValue != null)
1024 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
1027 defaultValueCreator: (bindable) =>
1029 var view = (View)bindable;
1031 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
1033 NUILog.Error("HeightResizePolicy get error!");
1037 case "FIXED": return ResizePolicyType.Fixed;
1038 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1039 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1040 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1041 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1042 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1043 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1044 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1045 default: return ResizePolicyType.Fixed;
1048 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1049 [EditorBrowsable(EditorBrowsableState.Never)]
1050 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1052 var view = (View)bindable;
1053 string valueToString = "";
1054 if (newValue != null)
1056 switch ((SizeScalePolicyType)newValue)
1058 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1059 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1060 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1061 default: { valueToString = "USE_SIZE_SET"; break; }
1063 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1066 defaultValueCreator: (bindable) =>
1068 var view = (View)bindable;
1070 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1072 NUILog.Error("SizeScalePolicy get error!");
1076 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1077 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1078 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1079 default: return SizeScalePolicyType.UseSizeSet;
1082 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1083 [EditorBrowsable(EditorBrowsableState.Never)]
1084 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1086 var view = (View)bindable;
1087 if (newValue != null)
1089 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1092 defaultValueCreator: (bindable) =>
1094 var view = (View)bindable;
1096 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1099 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1100 [EditorBrowsable(EditorBrowsableState.Never)]
1101 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1103 var view = (View)bindable;
1104 if (newValue != null)
1106 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1109 defaultValueCreator: (bindable) =>
1111 var view = (View)bindable;
1113 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1116 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1117 [EditorBrowsable(EditorBrowsableState.Never)]
1118 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1120 var view = (View)bindable;
1121 if (newValue != null)
1123 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1126 defaultValueCreator: (bindable) =>
1128 var view = (View)bindable;
1129 Extents temp = new Extents(0, 0, 0, 0);
1130 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1133 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1134 [EditorBrowsable(EditorBrowsableState.Never)]
1135 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1137 var view = (View)bindable;
1138 if (newValue != null)
1140 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1143 defaultValueCreator: (bindable) =>
1145 var view = (View)bindable;
1146 Size temp = new Size(0, 0, 0);
1147 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1150 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1151 [EditorBrowsable(EditorBrowsableState.Never)]
1152 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1154 var view = (View)bindable;
1155 if (newValue != null)
1157 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1160 defaultValueCreator: (bindable) =>
1162 var view = (View)bindable;
1163 Size2D temp = new Size2D(0, 0);
1164 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1167 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1168 [EditorBrowsable(EditorBrowsableState.Never)]
1169 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1171 var view = (View)bindable;
1172 if (newValue != null)
1174 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1177 defaultValueCreator: (bindable) =>
1179 var view = (View)bindable;
1180 Size2D temp = new Size2D(0, 0);
1181 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1184 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1185 [EditorBrowsable(EditorBrowsableState.Never)]
1186 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1188 var view = (View)bindable;
1189 if (newValue != null)
1191 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1194 defaultValueCreator: (bindable) =>
1196 var view = (View)bindable;
1198 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1201 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1202 [EditorBrowsable(EditorBrowsableState.Never)]
1203 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1205 var view = (View)bindable;
1206 if (newValue != null)
1208 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1211 defaultValueCreator: (bindable) =>
1213 var view = (View)bindable;
1215 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1217 NUILog.Error("ClippingMode get error!");
1219 return (ClippingModeType)temp;
1221 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1222 [EditorBrowsable(EditorBrowsableState.Never)]
1223 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1225 var view = (View)bindable;
1226 if (newValue != null)
1228 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1231 defaultValueCreator: (bindable) =>
1233 var view = (View)bindable;
1235 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1238 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1239 [EditorBrowsable(EditorBrowsableState.Never)]
1240 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1242 var view = (View)bindable;
1243 if (newValue != null)
1245 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1248 defaultValueCreator: (bindable) =>
1250 var view = (View)bindable;
1252 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1254 NUILog.Error("LAYOUT_DIRECTION get error!");
1256 return (ViewLayoutDirectionType)temp;
1258 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1259 [EditorBrowsable(EditorBrowsableState.Never)]
1260 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1262 var view = (View)bindable;
1263 if (newValue != null)
1265 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1268 defaultValueCreator: (bindable) =>
1270 var view = (View)bindable;
1271 Extents temp = new Extents(0, 0, 0, 0);
1272 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1277 /// Flag to indicate if layout set explicitly via API call or View was automatically given a Layout.
1279 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1280 [EditorBrowsable(EditorBrowsableState.Never)]
1281 public bool layoutSet = false;
1284 /// Flag to allow Layouting to be disabled for Views.
1285 /// Once a View has a Layout set then any children added to Views from then on will receive
1286 /// automatic Layouts.
1288 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1289 [EditorBrowsable(EditorBrowsableState.Never)]
1290 public static bool layoutingDisabled{get; set;} = true;
1292 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1293 private LayoutItem _layout; // Exclusive layout assigned to this View.
1294 private int _widthPolicy = LayoutParamPolicies.WrapContent; // Layout width policy
1295 private int _heightPolicy = LayoutParamPolicies.WrapContent; // Layout height policy
1296 private float _weight = 0.0f; // Weighting of child View in a Layout
1297 private MeasureSpecification _measureSpecificationWidth; // Layout width and internal Mode
1298 private MeasureSpecification _measureSpecificationHeight; // Layout height and internal Mode
1299 private bool _backgroundImageSynchronosLoading = false;
1300 private EventHandler _offWindowEventHandler;
1301 private OffWindowEventCallbackType _offWindowEventCallback;
1302 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1303 private WheelEventCallbackType _wheelEventCallback;
1304 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1305 private KeyCallbackType _keyCallback;
1306 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1307 private TouchDataCallbackType _touchDataCallback;
1308 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1309 private HoverEventCallbackType _hoverEventCallback;
1310 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
1311 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
1312 private EventHandler _keyInputFocusGainedEventHandler;
1313 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1314 private EventHandler _keyInputFocusLostEventHandler;
1315 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1316 private EventHandler _onRelayoutEventHandler;
1317 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1318 private EventHandler _onWindowEventHandler;
1319 private OnWindowEventCallbackType _onWindowEventCallback;
1320 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
1321 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
1322 // Resource Ready Signal
1323 private EventHandler _resourcesLoadedEventHandler;
1324 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
1325 private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
1326 private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
1328 private OnWindowEventCallbackType _onWindowSendEventCallback;
1330 private void SendViewAddedEventToWindow(IntPtr data)
1332 Window.Instance?.SendViewAdded(this);
1336 /// Creates a new instance of a view.
1338 /// <since_tizen> 3 </since_tizen>
1339 public View() : this(Interop.View.View_New(), true)
1341 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1343 internal View(View uiControl) : this(Interop.View.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1345 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1348 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.View.View_SWIGUpcast(cPtr), cMemoryOwn)
1350 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1353 PositionUsesPivotPoint = false;
1356 _onWindowSendEventCallback = SendViewAddedEventToWindow;
1357 this.OnWindowSignal().Connect(_onWindowSendEventCallback);
1360 internal View(ViewImpl implementation) : this(Interop.View.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1362 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1365 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1366 private delegate void OffWindowEventCallbackType(IntPtr control);
1367 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1368 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1369 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1370 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1371 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1372 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1373 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1374 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1375 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1376 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
1377 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1378 private delegate void ResourcesLoadedCallbackType(IntPtr control);
1379 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1380 private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
1381 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1382 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1383 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1384 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1385 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1386 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1387 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1388 private delegate void OnWindowEventCallbackType(IntPtr control);
1389 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1390 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
1393 /// Event when a child is removed.
1395 /// <since_tizen> 5 </since_tizen>
1396 public event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1398 /// Event when a child is added.
1400 /// <since_tizen> 5 </since_tizen>
1401 public event EventHandler<ChildAddedEventArgs> ChildAdded;
1404 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1405 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1407 /// <since_tizen> 3 </since_tizen>
1408 public event EventHandler FocusGained
1412 if (_keyInputFocusGainedEventHandler == null)
1414 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1415 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1418 _keyInputFocusGainedEventHandler += value;
1423 _keyInputFocusGainedEventHandler -= value;
1425 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1427 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1433 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1434 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1436 /// <since_tizen> 3 </since_tizen>
1437 public event EventHandler FocusLost
1441 if (_keyInputFocusLostEventHandler == null)
1443 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1444 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1447 _keyInputFocusLostEventHandler += value;
1452 _keyInputFocusLostEventHandler -= value;
1454 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1456 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1462 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1463 /// The KeyPressed signal is emitted when the key event is received.<br />
1465 /// <since_tizen> 3 </since_tizen>
1466 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1470 if (_keyEventHandler == null)
1472 _keyCallback = OnKeyEvent;
1473 this.KeyEventSignal().Connect(_keyCallback);
1476 _keyEventHandler += value;
1481 _keyEventHandler -= value;
1483 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1485 this.KeyEventSignal().Disconnect(_keyCallback);
1491 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1492 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1494 /// <since_tizen> 3 </since_tizen>
1495 public event EventHandler Relayout
1499 if (_onRelayoutEventHandler == null)
1501 _onRelayoutEventCallback = OnRelayout;
1502 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1505 _onRelayoutEventHandler += value;
1510 _onRelayoutEventHandler -= value;
1512 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1514 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1521 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1522 /// The touched signal is emitted when the touch input is received.<br />
1524 /// <since_tizen> 3 </since_tizen>
1525 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1529 if (_touchDataEventHandler == null)
1531 _touchDataCallback = OnTouch;
1532 this.TouchSignal().Connect(_touchDataCallback);
1535 _touchDataEventHandler += value;
1540 _touchDataEventHandler -= value;
1542 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1544 this.TouchSignal().Disconnect(_touchDataCallback);
1551 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1552 /// The hovered signal is emitted when the hover input is received.<br />
1554 /// <since_tizen> 3 </since_tizen>
1555 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1559 if (_hoverEventHandler == null)
1561 _hoverEventCallback = OnHoverEvent;
1562 this.HoveredSignal().Connect(_hoverEventCallback);
1565 _hoverEventHandler += value;
1570 _hoverEventHandler -= value;
1572 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1574 this.HoveredSignal().Disconnect(_hoverEventCallback);
1581 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1582 /// The WheelMoved signal is emitted when the wheel event is received.<br />
1584 /// <since_tizen> 3 </since_tizen>
1585 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1589 if (_wheelEventHandler == null)
1591 _wheelEventCallback = OnWheelEvent;
1592 this.WheelEventSignal().Connect(_wheelEventCallback);
1595 _wheelEventHandler += value;
1600 _wheelEventHandler -= value;
1602 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
1604 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1611 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
1612 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
1614 /// <since_tizen> 3 </since_tizen>
1615 public event EventHandler AddedToWindow
1619 if (_onWindowEventHandler == null)
1621 _onWindowEventCallback = OnWindow;
1622 this.OnWindowSignal().Connect(_onWindowEventCallback);
1625 _onWindowEventHandler += value;
1630 _onWindowEventHandler -= value;
1632 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
1634 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1640 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
1641 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
1643 /// <since_tizen> 3 </since_tizen>
1644 public event EventHandler RemovedFromWindow
1648 if (_offWindowEventHandler == null)
1650 _offWindowEventCallback = OffWindow;
1651 this.OffWindowSignal().Connect(_offWindowEventCallback);
1654 _offWindowEventHandler += value;
1659 _offWindowEventHandler -= value;
1661 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
1663 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1669 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
1670 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
1672 /// <since_tizen> 3 </since_tizen>
1673 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
1677 if (_visibilityChangedEventHandler == null)
1679 _visibilityChangedEventCallback = OnVisibilityChanged;
1680 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
1683 _visibilityChangedEventHandler += value;
1688 _visibilityChangedEventHandler -= value;
1690 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
1692 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
1698 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
1699 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
1701 /// <since_tizen> 4 </since_tizen>
1702 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
1706 if (_layoutDirectionChangedEventHandler == null)
1708 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
1709 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
1712 _layoutDirectionChangedEventHandler += value;
1717 _layoutDirectionChangedEventHandler -= value;
1719 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
1721 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
1727 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1728 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1730 /// <since_tizen> 3 </since_tizen>
1731 public event EventHandler ResourcesLoaded
1735 if (_resourcesLoadedEventHandler == null)
1737 _ResourcesLoadedCallback = OnResourcesLoaded;
1738 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1741 _resourcesLoadedEventHandler += value;
1746 _resourcesLoadedEventHandler -= value;
1748 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1750 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1755 internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
1759 if (_backgroundResourceLoadedEventHandler == null)
1761 _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
1762 this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
1765 _backgroundResourceLoadedEventHandler += value;
1769 _backgroundResourceLoadedEventHandler -= value;
1771 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1773 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1779 /// Enumeration for describing the states of the view.
1781 /// <since_tizen> 3 </since_tizen>
1785 /// The normal state.
1789 /// The focused state.
1793 /// The disabled state.
1799 /// Describes the direction to move the focus towards.
1801 /// <since_tizen> 3 </since_tizen>
1802 public enum FocusDirection
1805 /// Move keyboard focus towards the left direction.
1807 /// <since_tizen> 3 </since_tizen>
1810 /// Move keyboard focus towards the right direction.
1812 /// <since_tizen> 3 </since_tizen>
1815 /// Move keyboard focus towards the up direction.
1817 /// <since_tizen> 3 </since_tizen>
1820 /// Move keyboard focus towards the down direction.
1822 /// <since_tizen> 3 </since_tizen>
1825 /// Move keyboard focus towards the previous page direction.
1827 /// <since_tizen> 3 </since_tizen>
1830 /// Move keyboard focus towards the next page direction.
1832 /// <since_tizen> 3 </since_tizen>
1836 internal enum PropertyRange
1838 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1839 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1840 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1844 /// The StyleName, type string.
1846 /// <since_tizen> 3 </since_tizen>
1847 public string StyleName
1851 return (string)GetValue(StyleNameProperty);
1855 SetValue(StyleNameProperty, value);
1856 NotifyPropertyChanged();
1861 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1863 /// <since_tizen> 3 </since_tizen>
1864 public Color BackgroundColor
1868 return (Color)GetValue(BackgroundColorProperty);
1872 SetValue(BackgroundColorProperty, value);
1873 NotifyPropertyChanged();
1878 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1880 /// <since_tizen> 3 </since_tizen>
1881 public string BackgroundImage
1885 return (string)GetValue(BackgroundImageProperty);
1889 SetValue(BackgroundImageProperty, value);
1890 NotifyPropertyChanged();
1895 /// The background of view.
1897 /// <since_tizen> 3 </since_tizen>
1898 public Tizen.NUI.PropertyMap Background
1902 return (PropertyMap)GetValue(BackgroundProperty);
1906 SetValue(BackgroundProperty, value);
1907 NotifyPropertyChanged();
1913 /// The current state of the view.
1915 /// <since_tizen> 3 </since_tizen>
1920 return (States)GetValue(StateProperty);
1924 SetValue(StateProperty, value);
1925 NotifyPropertyChanged();
1930 /// The current sub state of the view.
1932 /// <since_tizen> 3 </since_tizen>
1933 public States SubState
1937 return (States)GetValue(SubStateProperty);
1941 SetValue(SubStateProperty, value);
1942 NotifyPropertyChanged();
1947 /// Displays a tooltip
1949 /// <since_tizen> 3 </since_tizen>
1950 public Tizen.NUI.PropertyMap Tooltip
1954 return (PropertyMap)GetValue(TooltipProperty);
1958 SetValue(TooltipProperty, value);
1959 NotifyPropertyChanged();
1964 /// Displays a tooltip as a text.
1966 /// <since_tizen> 3 </since_tizen>
1967 public string TooltipText
1971 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
1972 NotifyPropertyChanged();
1977 /// The Child property of FlexContainer.<br />
1978 /// The proportion of the free space in the container, the flex item will receive.<br />
1979 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1981 /// <since_tizen> 3 </since_tizen>
1986 return (float)GetValue(FlexProperty);
1990 SetValue(FlexProperty, value);
1991 NotifyPropertyChanged();
1996 /// The Child property of FlexContainer.<br />
1997 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
1999 /// <since_tizen> 3 </since_tizen>
2000 public int AlignSelf
2004 return (int)GetValue(AlignSelfProperty);
2008 SetValue(AlignSelfProperty, value);
2009 NotifyPropertyChanged();
2014 /// The Child property of FlexContainer.<br />
2015 /// The space around the flex item.<br />
2017 /// <since_tizen> 3 </since_tizen>
2018 public Vector4 FlexMargin
2022 return (Vector4)GetValue(FlexMarginProperty);
2026 SetValue(FlexMarginProperty, value);
2027 NotifyPropertyChanged();
2032 /// The top-left cell this child occupies, if not set, the first available cell is used.
2034 /// <since_tizen> 3 </since_tizen>
2035 public Vector2 CellIndex
2039 return (Vector2)GetValue(CellIndexProperty);
2043 SetValue(CellIndexProperty, value);
2044 NotifyPropertyChanged();
2049 /// The number of rows this child occupies, if not set, the default value is 1.
2051 /// <since_tizen> 3 </since_tizen>
2052 public float RowSpan
2056 return (float)GetValue(RowSpanProperty);
2060 SetValue(RowSpanProperty, value);
2061 NotifyPropertyChanged();
2066 /// The number of columns this child occupies, if not set, the default value is 1.
2068 /// <since_tizen> 3 </since_tizen>
2069 public float ColumnSpan
2073 return (float)GetValue(ColumnSpanProperty);
2077 SetValue(ColumnSpanProperty, value);
2078 NotifyPropertyChanged();
2083 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
2085 /// <since_tizen> 3 </since_tizen>
2086 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
2090 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
2094 SetValue(CellHorizontalAlignmentProperty, value);
2095 NotifyPropertyChanged();
2100 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
2102 /// <since_tizen> 3 </since_tizen>
2103 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
2107 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
2111 SetValue(CellVerticalAlignmentProperty, value);
2112 NotifyPropertyChanged();
2117 /// The left focusable view.<br />
2118 /// This will return null if not set.<br />
2119 /// This will also return null if the specified left focusable view is not on a window.<br />
2121 /// <since_tizen> 3 </since_tizen>
2122 public View LeftFocusableView
2124 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2127 return (View)GetValue(LeftFocusableViewProperty);
2131 SetValue(LeftFocusableViewProperty, value);
2132 NotifyPropertyChanged();
2137 /// The right focusable view.<br />
2138 /// This will return null if not set.<br />
2139 /// This will also return null if the specified right focusable view is not on a window.<br />
2141 /// <since_tizen> 3 </since_tizen>
2142 public View RightFocusableView
2144 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2147 return (View)GetValue(RightFocusableViewProperty);
2151 SetValue(RightFocusableViewProperty, value);
2152 NotifyPropertyChanged();
2157 /// The up focusable view.<br />
2158 /// This will return null if not set.<br />
2159 /// This will also return null if the specified up focusable view is not on a window.<br />
2161 /// <since_tizen> 3 </since_tizen>
2162 public View UpFocusableView
2164 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2167 return (View)GetValue(UpFocusableViewProperty);
2171 SetValue(UpFocusableViewProperty, value);
2172 NotifyPropertyChanged();
2177 /// The down focusable view.<br />
2178 /// This will return null if not set.<br />
2179 /// This will also return null if the specified down focusable view is not on a window.<br />
2181 /// <since_tizen> 3 </since_tizen>
2182 public View DownFocusableView
2184 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2187 return (View)GetValue(DownFocusableViewProperty);
2191 SetValue(DownFocusableViewProperty, value);
2192 NotifyPropertyChanged();
2197 /// Whether the view should be focusable by keyboard navigation.
2199 /// <since_tizen> 3 </since_tizen>
2200 public bool Focusable
2204 SetValue(FocusableProperty, value);
2205 NotifyPropertyChanged();
2209 return (bool)GetValue(FocusableProperty);
2214 /// Retrieves the position of the view.<br />
2215 /// The coordinates are relative to the view's parent.<br />
2217 /// <since_tizen> 3 </since_tizen>
2218 public Position CurrentPosition
2222 return GetCurrentPosition();
2227 /// Sets the size of a view for the width and the height.<br />
2228 /// Geometry can be scaled to fit within this area.<br />
2229 /// This does not interfere with the view's scale factor.<br />
2230 /// The views default depth is the minimum of width and height.<br />
2233 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
2234 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
2235 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
2236 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2237 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2238 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2239 /// 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 />
2241 /// <since_tizen> 3 </since_tizen>
2242 public Size2D Size2D
2246 Size2D temp = (Size2D)GetValue(Size2DProperty);
2247 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
2251 SetValue(Size2DProperty, value);
2252 // Set Specification so when layouts measure this View it matches the value set here.
2253 // All Views are currently Layouts.
2254 MeasureSpecificationWidth = new MeasureSpecification(new LayoutLength(value.Width), MeasureSpecification.ModeType.Exactly);
2255 MeasureSpecificationHeight = new MeasureSpecification(new LayoutLength(value.Height), MeasureSpecification.ModeType.Exactly);
2256 NotifyPropertyChanged();
2261 /// Retrieves the size of the view.<br />
2262 /// The coordinates are relative to the view's parent.<br />
2264 /// <since_tizen> 3 </since_tizen>
2265 public Size2D CurrentSize
2269 return GetCurrentSize();
2274 /// Retrieves and sets the view's opacity.<br />
2276 /// <since_tizen> 3 </since_tizen>
2277 public float Opacity
2281 return (float)GetValue(OpacityProperty);
2285 SetValue(OpacityProperty, value);
2286 NotifyPropertyChanged();
2291 /// Sets the position of the view for X and Y.<br />
2292 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2293 /// If the position inheritance is disabled, sets the world position.<br />
2296 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
2297 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
2298 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
2299 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2300 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2301 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2303 /// <since_tizen> 3 </since_tizen>
2304 public Position2D Position2D
2308 Position2D temp = (Position2D)GetValue(Position2DProperty);
2309 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
2313 SetValue(Position2DProperty, value);
2314 NotifyPropertyChanged();
2319 /// Retrieves the screen postion of the view.<br />
2321 /// <since_tizen> 3 </since_tizen>
2322 public Vector2 ScreenPosition
2326 Vector2 temp = new Vector2(0.0f, 0.0f);
2327 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2333 /// Determines whether the pivot point should be used to determine the position of the view.
2334 /// This is true by default.
2336 /// <remarks>If false, then the top-left of the view is used for the position.
2337 /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
2339 /// <since_tizen> 3 </since_tizen>
2340 public bool PositionUsesPivotPoint
2344 return (bool)GetValue(PositionUsesPivotPointProperty);
2348 SetValue(PositionUsesPivotPointProperty, value);
2349 NotifyPropertyChanged();
2354 /// Please do not use! this will be deprecated.
2356 /// Please do not use! this will be deprecated!
2357 /// Instead please use PositionUsesPivotPoint.
2358 /// <since_tizen> 3 </since_tizen>
2359 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2361 "View view = new View(); " +
2362 "view.PivotPoint = PivotPoint.Center; " +
2363 "view.PositionUsesPivotPoint = true;")]
2364 [EditorBrowsable(EditorBrowsableState.Never)]
2365 public bool PositionUsesAnchorPoint
2370 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2375 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2376 NotifyPropertyChanged();
2381 /// Queries whether the view is connected to the stage.<br />
2382 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2384 /// <since_tizen> 3 </since_tizen>
2385 public bool IsOnWindow
2394 /// Gets the depth in the hierarchy for the view.
2396 /// <since_tizen> 3 </since_tizen>
2397 public int HierarchyDepth
2401 return GetHierarchyDepth();
2406 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2409 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
2410 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2411 /// The values set by this property will likely change.
2413 /// <since_tizen> 3 </since_tizen>
2414 public int SiblingOrder
2418 return (int)GetValue(SiblingOrderProperty);
2422 SetValue(SiblingOrderProperty, value);
2423 NotifyPropertyChanged();
2428 /// Returns the natural size of the view.
2431 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2433 /// <since_tizen> 5 </since_tizen>
2434 public Vector3 NaturalSize
2438 Vector3 ret = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
2439 if (NDalicPINVOKE.SWIGPendingException.Pending)
2440 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2446 /// Returns the natural size (Size2D) of the view.
2449 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2451 /// <since_tizen> 4 </since_tizen>
2452 public Size2D NaturalSize2D
2456 Vector3 temp = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
2457 if (NDalicPINVOKE.SWIGPendingException.Pending)
2458 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2460 return new Size2D((int)temp.Width, (int)temp.Height);
2465 /// Gets or sets the origin of a view within its parent's area.<br />
2466 /// 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 />
2467 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
2468 /// A view's position is the distance between this origin and the view's anchor-point.<br />
2470 /// <pre>The view has been initialized.</pre>
2471 /// <since_tizen> 3 </since_tizen>
2472 public Position ParentOrigin
2476 return (Position)GetValue(ParentOriginProperty);
2480 SetValue(ParentOriginProperty, value);
2481 NotifyPropertyChanged();
2486 /// Gets or sets the anchor-point of a view.<br />
2487 /// 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 />
2488 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
2489 /// A view position is the distance between its parent-origin and this anchor-point.<br />
2490 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
2491 /// <pre>The view has been initialized.</pre>
2493 /// <since_tizen> 3 </since_tizen>
2494 public Position PivotPoint
2498 return (Position)GetValue(PivotPointProperty);
2502 SetValue(PivotPointProperty, value);
2503 NotifyPropertyChanged();
2508 /// Gets or sets the size width of the view.
2510 /// <since_tizen> 3 </since_tizen>
2511 public float SizeWidth
2515 return (float)GetValue(SizeWidthProperty);
2519 SetValue(SizeWidthProperty, value);
2520 WidthSpecification = (int)Math.Ceiling(value);
2521 NotifyPropertyChanged();
2526 /// Gets or sets the size height of the view.
2528 /// <since_tizen> 3 </since_tizen>
2529 public float SizeHeight
2533 return (float)GetValue(SizeHeightProperty);
2537 SetValue(SizeHeightProperty, value);
2538 HeightSpecification = (int)Math.Ceiling(value);
2539 NotifyPropertyChanged();
2544 /// Gets or sets the position of the view.<br />
2545 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
2546 /// If the position inheritance is disabled, sets the world position.<br />
2548 /// <since_tizen> 3 </since_tizen>
2549 public Position Position
2553 return (Position)GetValue(PositionProperty);
2557 SetValue(PositionProperty, value);
2558 NotifyPropertyChanged();
2563 /// Gets or sets the position X of the view.
2565 /// <since_tizen> 3 </since_tizen>
2566 public float PositionX
2570 return (float)GetValue(PositionXProperty);
2574 SetValue(PositionXProperty, value);
2575 NotifyPropertyChanged();
2580 /// Gets or sets the position Y of the view.
2582 /// <since_tizen> 3 </since_tizen>
2583 public float PositionY
2587 return (float)GetValue(PositionYProperty);
2591 SetValue(PositionYProperty, value);
2592 NotifyPropertyChanged();
2597 /// Gets or sets the position Z of the view.
2599 /// <since_tizen> 3 </since_tizen>
2600 public float PositionZ
2604 return (float)GetValue(PositionZProperty);
2608 SetValue(PositionZProperty, value);
2609 NotifyPropertyChanged();
2614 /// Gets or sets the world position of the view.
2616 /// <since_tizen> 3 </since_tizen>
2617 public Vector3 WorldPosition
2621 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2622 GetProperty(View.Property.WORLD_POSITION).Get(temp);
2628 /// Gets or sets the orientation of the view.<br />
2629 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
2631 /// <remarks>This is an asynchronous method.</remarks>
2632 /// <since_tizen> 3 </since_tizen>
2633 public Rotation Orientation
2637 return (Rotation)GetValue(OrientationProperty);
2641 SetValue(OrientationProperty, value);
2642 NotifyPropertyChanged();
2647 /// Gets or sets the world orientation of the view.<br />
2649 /// <since_tizen> 3 </since_tizen>
2650 public Rotation WorldOrientation
2654 Rotation temp = new Rotation();
2655 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
2661 /// Gets or sets the scale factor applied to the view.<br />
2663 /// <since_tizen> 3 </since_tizen>
2664 public Vector3 Scale
2668 return (Vector3)GetValue(ScaleProperty);
2672 SetValue(ScaleProperty, value);
2673 NotifyPropertyChanged();
2678 /// Gets or sets the scale X factor applied to the view.
2680 /// <since_tizen> 3 </since_tizen>
2685 return (float)GetValue(ScaleXProperty);
2689 SetValue(ScaleXProperty, value);
2690 NotifyPropertyChanged();
2695 /// Gets or sets the scale Y factor applied to the view.
2697 /// <since_tizen> 3 </since_tizen>
2702 return (float)GetValue(ScaleYProperty);
2706 SetValue(ScaleYProperty, value);
2707 NotifyPropertyChanged();
2712 /// Gets or sets the scale Z factor applied to the view.
2714 /// <since_tizen> 3 </since_tizen>
2719 return (float)GetValue(ScaleZProperty);
2723 SetValue(ScaleZProperty, value);
2724 NotifyPropertyChanged();
2729 /// Gets the world scale of the view.
2731 /// <since_tizen> 3 </since_tizen>
2732 public Vector3 WorldScale
2736 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2737 GetProperty(View.Property.WORLD_SCALE).Get(temp);
2743 /// Retrieves the visibility flag of the view.
2746 /// If the view is not visible, then the view and its children will not be rendered.
2747 /// 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.
2749 /// <since_tizen> 3 </since_tizen>
2750 public bool Visibility
2755 GetProperty(View.Property.VISIBLE).Get(out temp);
2761 /// Gets the view's world color.
2763 /// <since_tizen> 3 </since_tizen>
2764 public Vector4 WorldColor
2768 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2769 GetProperty(View.Property.WORLD_COLOR).Get(temp);
2775 /// Gets or sets the view's name.
2777 /// <since_tizen> 3 </since_tizen>
2782 return (string)GetValue(NameProperty);
2786 SetValue(NameProperty, value);
2787 NotifyPropertyChanged();
2792 /// Get the number of children held by the view.
2794 /// <since_tizen> 3 </since_tizen>
2795 public new uint ChildCount
2799 return GetChildCount();
2804 /// Gets the view's ID.
2807 /// <since_tizen> 3 </since_tizen>
2817 /// Gets or sets the status of whether the view should emit touch or hover signals.
2819 /// <since_tizen> 3 </since_tizen>
2820 public bool Sensitive
2824 return (bool)GetValue(SensitiveProperty);
2828 SetValue(SensitiveProperty, value);
2829 NotifyPropertyChanged();
2834 /// 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.
2836 /// <since_tizen> 3 </since_tizen>
2837 public bool LeaveRequired
2841 return (bool)GetValue(LeaveRequiredProperty);
2845 SetValue(LeaveRequiredProperty, value);
2846 NotifyPropertyChanged();
2851 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2853 /// <since_tizen> 3 </since_tizen>
2854 public bool InheritOrientation
2858 return (bool)GetValue(InheritOrientationProperty);
2862 SetValue(InheritOrientationProperty, value);
2863 NotifyPropertyChanged();
2868 /// Gets or sets the status of whether a child view inherits it's parent's scale.
2870 /// <since_tizen> 3 </since_tizen>
2871 public bool InheritScale
2875 return (bool)GetValue(InheritScaleProperty);
2879 SetValue(InheritScaleProperty, value);
2880 NotifyPropertyChanged();
2885 /// Gets or sets the status of how the view and its children should be drawn.<br />
2886 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2887 /// 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 />
2888 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2889 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2890 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2892 /// <since_tizen> 3 </since_tizen>
2893 public DrawModeType DrawMode
2897 return (DrawModeType)GetValue(DrawModeProperty);
2901 SetValue(DrawModeProperty, value);
2902 NotifyPropertyChanged();
2907 /// Gets or sets the relative to parent size factor of the view.<br />
2908 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2909 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2911 /// <since_tizen> 3 </since_tizen>
2912 public Vector3 SizeModeFactor
2916 return (Vector3)GetValue(SizeModeFactorProperty);
2920 SetValue(SizeModeFactorProperty, value);
2921 NotifyPropertyChanged();
2926 /// Gets or sets the width resize policy to be used.
2928 /// <since_tizen> 3 </since_tizen>
2929 public ResizePolicyType WidthResizePolicy
2933 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2937 SetValue(WidthResizePolicyProperty, value);
2938 // Match ResizePolicy to new Layouting.
2939 // Parent relative policies can not be mapped at this point as parent size unknown.
2942 case ResizePolicyType.UseNaturalSize:
2944 WidthSpecification = LayoutParamPolicies.WrapContent;
2947 case ResizePolicyType.FillToParent:
2949 WidthSpecification = LayoutParamPolicies.MatchParent;
2952 case ResizePolicyType.FitToChildren:
2954 WidthSpecification = LayoutParamPolicies.WrapContent;
2960 NotifyPropertyChanged();
2965 /// Gets or sets the height resize policy to be used.
2967 /// <since_tizen> 3 </since_tizen>
2968 public ResizePolicyType HeightResizePolicy
2972 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
2976 SetValue(HeightResizePolicyProperty, value);
2977 // Match ResizePolicy to new Layouting.
2978 // Parent relative policies can not be mapped at this point as parent size unknown.
2981 case ResizePolicyType.UseNaturalSize:
2983 HeightSpecification = LayoutParamPolicies.WrapContent;
2986 case ResizePolicyType.FillToParent:
2988 HeightSpecification = LayoutParamPolicies.MatchParent;
2991 case ResizePolicyType.FitToChildren:
2993 HeightSpecification = LayoutParamPolicies.WrapContent;
2999 NotifyPropertyChanged();
3004 /// Gets or sets the policy to use when setting size with size negotiation.<br />
3005 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
3007 /// <since_tizen> 3 </since_tizen>
3008 public SizeScalePolicyType SizeScalePolicy
3012 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
3016 SetValue(SizeScalePolicyProperty, value);
3017 NotifyPropertyChanged();
3022 /// Gets or sets the status of whether the width size is dependent on the height size.
3024 /// <since_tizen> 3 </since_tizen>
3025 public bool WidthForHeight
3029 return (bool)GetValue(WidthForHeightProperty);
3033 SetValue(WidthForHeightProperty, value);
3034 NotifyPropertyChanged();
3039 /// Gets or sets the status of whether the height size is dependent on the width size.
3041 /// <since_tizen> 3 </since_tizen>
3042 public bool HeightForWidth
3046 return (bool)GetValue(HeightForWidthProperty);
3050 SetValue(HeightForWidthProperty, value);
3051 NotifyPropertyChanged();
3056 /// Gets or sets the padding for use in layout.
3058 /// <since_tizen> 5 </since_tizen>
3059 public Extents Padding
3063 // If View has a Layout then padding in stored in the base Layout class
3066 return Layout.Padding;
3070 return (Extents)GetValue(PaddingProperty);
3072 // Two return points to prevent creating a zeroed Extent native object before assignment
3076 Extents padding = value;
3079 // Layout set so store Padding in LayoutItem instead of in View.
3080 // If View stores the Padding value then Legacy Size Negotiation will overwrite
3081 // the position and sizes measure in the Layouting.
3082 Layout.Padding = value;
3083 // If Layout is a LayoutItem then it could be a View that handles it's own padding.
3084 // Let the View keeps it's padding. Still store Padding in Layout to reduce code paths.
3085 if( Layout.GetType() != typeof(LayoutItem)) // If a Layout container of some kind.
3087 padding = new Extents(0,0,0,0); // Reset value stored in View.
3089 _layout?.RequestLayout();
3091 SetValue(PaddingProperty, padding);
3092 NotifyPropertyChanged();
3093 _layout?.RequestLayout();
3098 /// Gets or sets the minimum size the view can be assigned in size negotiation.
3100 /// <since_tizen> 3 </since_tizen>
3101 public Size2D MinimumSize
3105 return (Size2D)GetValue(MinimumSizeProperty);
3109 if (_layout != null)
3111 // Note: it only works if minimum size is >= than natural size.
3112 // To force the size it should be done through the width&height spec or Size2D.
3113 _layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
3114 _layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
3115 _layout.RequestLayout();
3117 SetValue(MinimumSizeProperty, value);
3118 NotifyPropertyChanged();
3123 /// Gets or sets the maximum size the view can be assigned in size negotiation.
3125 /// <since_tizen> 3 </since_tizen>
3126 public Size2D MaximumSize
3130 return (Size2D)GetValue(MaximumSizeProperty);
3134 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
3135 // MATCH_PARENT spec + parent container size can be used to limit
3136 if (_layout != null)
3138 // Note: it only works if minimum size is >= than natural size.
3139 // To force the size it should be done through the width&height spec or Size2D.
3140 _layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Width);
3141 _layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Height);
3142 _layout.RequestLayout();
3144 SetValue(MaximumSizeProperty, value);
3145 NotifyPropertyChanged();
3150 /// Gets or sets whether a child view inherits it's parent's position.<br />
3151 /// Default is to inherit.<br />
3152 /// 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 />
3154 /// <since_tizen> 3 </since_tizen>
3155 public bool InheritPosition
3159 return (bool)GetValue(InheritPositionProperty);
3163 SetValue(InheritPositionProperty, value);
3164 NotifyPropertyChanged();
3169 /// Gets or sets the clipping behavior (mode) of it's children.
3171 /// <since_tizen> 3 </since_tizen>
3172 public ClippingModeType ClippingMode
3176 return (ClippingModeType)GetValue(ClippingModeProperty);
3180 SetValue(ClippingModeProperty, value);
3181 NotifyPropertyChanged();
3186 /// Gets the number of renderers held by the view.
3188 /// <since_tizen> 3 </since_tizen>
3189 public uint RendererCount
3193 return GetRendererCount();
3198 /// [Obsolete("Please do not use! this will be deprecated")]
3200 /// <since_tizen> 3 </since_tizen>
3201 /// Please do not use! this will be deprecated!
3202 /// Instead please use PivotPoint.
3203 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
3205 "View view = new View(); " +
3206 "view.PivotPoint = PivotPoint.Center; " +
3207 "view.PositionUsesPivotPoint = true;")]
3208 [EditorBrowsable(EditorBrowsableState.Never)]
3209 public Position AnchorPoint
3213 Position temp = new Position(0.0f, 0.0f, 0.0f);
3214 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3219 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3220 NotifyPropertyChanged();
3225 /// Sets the size of a view for the width, the height and the depth.<br />
3226 /// Geometry can be scaled to fit within this area.<br />
3227 /// This does not interfere with the view's scale factor.<br />
3228 /// The views default depth is the minimum of width and height.<br />
3231 /// Please note that multi-cascade setting is not possible for this NUI object. <br />
3232 /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3233 /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
3234 /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
3235 /// 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 />
3237 /// <since_tizen> 5 </since_tizen>
3242 return (Size)GetValue(SizeProperty);
3246 SetValue(SizeProperty, value);
3247 // Set Specification so when layouts measure this View it matches the value set here.
3248 // All Views are currently Layouts.
3249 WidthSpecification = (int)Math.Ceiling(value.Width);
3250 HeightSpecification = (int)Math.Ceiling(value.Height);
3251 NotifyPropertyChanged();
3256 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
3258 /// <since_tizen> 3 </since_tizen>
3259 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
3261 "Container parent = view.GetParent(); " +
3262 "View view = parent as View;")]
3263 [EditorBrowsable(EditorBrowsableState.Never)]
3264 public new View Parent
3269 IntPtr cPtr = Interop.Actor.Actor_GetParent(swigCPtr);
3270 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3271 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3273 if (basehandle is Layer layer)
3275 ret = new View(Layer.getCPtr(layer).Handle, false);
3276 NUILog.Error("This Parent property is deprecated, shoud do not be used");
3280 ret = basehandle as View;
3283 Interop.BaseHandle.delete_BaseHandle(CPtr);
3284 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3286 if (NDalicPINVOKE.SWIGPendingException.Pending)
3287 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3293 /// Gets/Sets whether inherit parent's the layout Direction.
3295 /// <since_tizen> 4 </since_tizen>
3296 public bool InheritLayoutDirection
3300 return (bool)GetValue(InheritLayoutDirectionProperty);
3304 SetValue(InheritLayoutDirectionProperty, value);
3305 NotifyPropertyChanged();
3310 /// Gets/Sets the layout Direction.
3312 /// <since_tizen> 4 </since_tizen>
3313 public ViewLayoutDirectionType LayoutDirection
3317 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
3321 SetValue(LayoutDirectionProperty, value);
3322 NotifyPropertyChanged();
3323 _layout?.RequestLayout();
3328 /// Gets or sets the Margin for use in layout.
3331 /// Margin property is supported by Layout algorithms and containers.
3332 /// Please Set Layout if you want to use Margin property.
3334 /// <since_tizen> 4 </since_tizen>
3335 public Extents Margin
3339 // If View has a Layout then margin is stored in Layout.
3342 return Layout.Margin;
3346 // If Layout not set then return margin stored in View.
3347 return (Extents)GetValue(MarginProperty);
3349 // Two return points to prevent creating a zeroed Extent native object before assignment
3355 // Layout set so store Margin in LayoutItem instead of View.
3356 // If View stores the Margin too then the Legacy Size Negotiation will
3357 // overwrite the position and size values measured in the Layouting.
3358 Layout.Margin = value;
3359 SetValue(MarginProperty, new Extents(0,0,0,0));
3360 _layout?.RequestLayout();
3364 SetValue(MarginProperty, value);
3366 NotifyPropertyChanged();
3367 _layout?.RequestLayout();
3372 /// The required policy for this dimension, ChildLayoutData enum or exact value.
3374 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3375 [EditorBrowsable(EditorBrowsableState.Never)]
3376 public int WidthSpecification
3380 return _widthPolicy;
3384 _widthPolicy = value;
3385 if (_widthPolicy >= 0)
3387 _measureSpecificationWidth = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
3388 Size2D.Width = _widthPolicy;
3390 _layout?.RequestLayout();
3395 /// The required policy for this dimension, ChildLayoutData enum or exact value.
3397 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3398 [EditorBrowsable(EditorBrowsableState.Never)]
3399 public int HeightSpecification
3403 return _heightPolicy;
3407 _heightPolicy = value;
3408 if (_heightPolicy >= 0)
3410 _measureSpecificationHeight = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
3411 Size2D.Height = _heightPolicy;
3413 _layout?.RequestLayout();
3419 /// [Obsolete("Please do not use! this will be deprecated")]
3421 /// Please do not use! this will be deprecated!
3422 /// Instead please use Padding.
3423 /// <since_tizen> 4 </since_tizen>
3424 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
3425 [EditorBrowsable(EditorBrowsableState.Never)]
3426 public Extents PaddingEX
3430 Extents temp = new Extents(0, 0, 0, 0);
3431 GetProperty(View.Property.PADDING).Get(temp);
3436 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3437 NotifyPropertyChanged();
3438 _layout?.RequestLayout();
3443 /// Child property to specify desired width
3445 internal int LayoutWidthSpecificationFixed
3449 return _widthPolicy;
3453 _widthPolicy = value;
3454 _measureSpecificationWidth = new MeasureSpecification(new LayoutLength(value), MeasureSpecification.ModeType.Exactly);
3455 Size2D.Width = value;
3456 _layout?.RequestLayout();
3461 /// Child property to specify desired height
3463 internal int LayoutHeightSpecificationFixed
3467 return _heightPolicy;
3471 _heightPolicy = value;
3472 _measureSpecificationHeight = new MeasureSpecification(new LayoutLength(value), MeasureSpecification.ModeType.Exactly);
3473 Size2D.Height = value;
3474 _layout?.RequestLayout();
3479 /// Child property to specify desired width, use MatchParent/WrapContent)
3481 internal ChildLayoutData LayoutWidthSpecification
3485 return (ChildLayoutData)_widthPolicy;
3489 _widthPolicy = (int)value;
3494 /// Child property to specify desired height, use MatchParent/WrapContent)
3496 internal ChildLayoutData LayoutHeightSpecification
3500 return (ChildLayoutData)_heightPolicy;
3504 _heightPolicy = (int)value;
3508 internal float Weight
3517 _layout.RequestLayout();
3521 internal bool BackgroundImageSynchronosLoading
3525 return _backgroundImageSynchronosLoading;
3529 if (value != _backgroundImageSynchronosLoading)
3532 PropertyMap bgMap = this.Background;
3534 bgMap.Find(Visual.Property.Type)?.Get(out visualType);
3535 if (visualType == (int)Visual.Type.Image)
3537 bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
3539 if (bgUrl.Length != 0)
3541 _backgroundImageSynchronosLoading = value;
3542 bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
3543 this.Background = bgMap;
3549 internal float WorldPositionX
3554 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3559 internal float WorldPositionY
3564 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3569 internal float WorldPositionZ
3574 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3579 internal bool FocusState
3583 return IsKeyboardFocusable();
3587 SetKeyboardFocusable(value);
3592 /// Set the layout on this View. Replaces any existing Layout.
3596 internal LayoutItem Layout
3604 // Do nothing if layout provided is already set on this View.
3605 if (value == _layout)
3610 Log.Info("NUI", "Setting Layout on:" + Name + "\n");
3611 layoutingDisabled = false;
3614 // If new layout being set already has a owner then that owner receives a replacement default layout.
3615 // First check if the layout to be set already has a owner.
3616 if (value?.Owner != null)
3618 Log.Info("NUI", "Set layout already in use by another View: " + value.Owner.Name + "will get a LayoutGroup\n");
3619 // Previous owner of the layout gets a default layout as a replacement.
3620 value.Owner.Layout = new LayoutGroup();
3622 // Copy Margin and Padding to replacement LayoutGroup.
3623 value.Owner.Layout.Margin = value.Margin;
3624 value.Owner.Layout.Padding = value.Padding;
3627 // Copy Margin and Padding to new layout being set or restore padding and margin back to
3628 // View if no replacement. Previously margin and padding values would have been moved from
3629 // the View to the layout.
3630 if (_layout != null ) // Existing layout
3634 // Existing layout being replaced so copy over margin and padding values.
3635 value.Margin = _layout.Margin;
3636 value.Padding = _layout.Padding;
3640 // Layout not being replaced so restore margin and padding to View.
3641 SetValue(MarginProperty, _layout.Margin);
3642 SetValue(PaddingProperty, _layout.Padding);
3643 NotifyPropertyChanged();
3648 // First Layout to be added to the View hence copy
3650 // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
3653 if (Margin.Top != 0 || Margin.Bottom !=0 || Margin.Start !=0 || Margin.End != 0)
3655 // If View already has a margin set then store it in Layout instead.
3656 value.Margin = Margin;
3657 SetValue(MarginProperty, new Extents(0,0,0,0));
3658 NotifyPropertyChanged();
3661 if (Padding.Top != 0 || Padding.Bottom !=0 || Padding.Start !=0 || Padding.End != 0)
3663 // If View already has a padding set then store it in Layout instead.
3664 value.Padding = Padding;
3665 SetValue(PaddingProperty, new Extents(0,0,0,0));
3666 NotifyPropertyChanged();
3671 // Remove existing layout from it's parent layout group.
3672 _layout?.Unparent();
3674 // Set layout to this view
3679 internal void SetLayout(LayoutItem layout)
3682 _layout?.AttachToOwner(this);
3683 _layout?.RequestLayout();
3687 /// Stores the calculated width value and its ModeType. Width component.
3689 internal MeasureSpecification MeasureSpecificationWidth
3693 _measureSpecificationWidth = value;
3694 _layout?.RequestLayout();
3698 return _measureSpecificationWidth;
3703 /// Stores the calculated width value and its ModeType. Height component.
3705 internal MeasureSpecification MeasureSpecificationHeight
3709 _measureSpecificationHeight = value;
3710 _layout?.RequestLayout();
3714 return _measureSpecificationHeight;
3718 internal float ParentOriginX
3723 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3728 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3729 NotifyPropertyChanged();
3733 internal float ParentOriginY
3738 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3743 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3744 NotifyPropertyChanged();
3748 internal float ParentOriginZ
3753 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3758 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3759 NotifyPropertyChanged();
3763 internal float PivotPointX
3768 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3773 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3777 internal float PivotPointY
3782 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3787 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3791 internal float PivotPointZ
3796 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3801 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3805 internal Matrix WorldMatrix
3809 Matrix temp = new Matrix();
3810 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3815 private int LeftFocusableViewId
3820 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
3825 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3829 private int RightFocusableViewId
3834 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
3839 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3843 private int UpFocusableViewId
3848 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
3853 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3857 private int DownFocusableViewId
3862 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
3867 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3872 /// Perform an action on a visual registered to this view. <br />
3873 /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
3875 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
3876 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
3877 /// <param name="attributes">Optional attributes for the action.</param>
3878 /// <since_tizen> 5 </since_tizen>
3879 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
3881 Interop.View.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
3882 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3886 /// Creates an animation to animate the background color visual. If there is no
3887 /// background visual, creates one with transparent black as it's mixColor.
3889 /// <since_tizen> 3 </since_tizen>
3890 public Animation AnimateBackgroundColor(object destinationValue,
3893 AlphaFunction.BuiltinFunctions? alphaFunction = null,
3894 object initialValue = null)
3896 Tizen.NUI.PropertyMap background = Background;
3898 if (background.Empty())
3900 // If there is no background yet, ensure there is a transparent
3902 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
3903 background = Background;
3905 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
3909 /// Creates an animation to animate the mixColor of the named visual.
3911 /// <since_tizen> 3 </since_tizen>
3912 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
3914 Animation animation = null;
3916 PropertyMap _animator = new PropertyMap();
3917 if (alphaFunction != null)
3919 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
3922 PropertyMap _timePeriod = new PropertyMap();
3923 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
3924 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
3925 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
3927 PropertyMap _transition = new PropertyMap();
3928 _transition.Add("animator", new PropertyValue(_animator));
3929 _transition.Add("target", new PropertyValue(targetVisual));
3930 _transition.Add("property", new PropertyValue("mixColor"));
3932 if (initialColor != null)
3934 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
3935 _transition.Add("initialValue", initValue);
3938 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
3939 _transition.Add("targetValue", destValue);
3940 TransitionData _transitionData = new TransitionData(_transition);
3942 animation = new Animation(Interop.View.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
3943 if (NDalicPINVOKE.SWIGPendingException.Pending)
3944 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3949 // From Container Base class
3951 /// Adds a child view to this view.
3953 /// <seealso cref="Container.Add" />
3954 /// <since_tizen> 4 </since_tizen>
3955 public override void Add(View child)
3957 bool hasLayout = (_layout != null);
3958 Log.Info("NUI", "Add:" + child.Name + " to View:" + Name + "which has layout[" + hasLayout + "] + \n");
3962 Tizen.Log.Fatal("NUI", "Child is null");
3966 Container oldParent = child.GetParent();
3967 if (oldParent != this)
3969 // If child already has a parent then re-parent child
3970 if (oldParent != null)
3972 oldParent.Remove(child);
3974 child.InternalParent = this;
3976 Interop.Actor.Actor_Add(swigCPtr, View.getCPtr(child));
3978 if (NDalicPINVOKE.SWIGPendingException.Pending)
3979 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3980 Children.Add(child);
3982 if (ChildAdded != null)
3984 ChildAddedEventArgs e = new ChildAddedEventArgs
3988 ChildAdded(this, e);
3994 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
3996 /// <seealso cref="Container.Remove" />
3997 /// <since_tizen> 4 </since_tizen>
3998 public override void Remove(View child)
4000 bool hasLayout = (_layout != null);
4001 Log.Info("NUI","Removing View:" + child.Name + "layout[" + hasLayout.ToString() +"]\n");
4003 Interop.Actor.Actor_Remove(swigCPtr, View.getCPtr(child));
4004 if (NDalicPINVOKE.SWIGPendingException.Pending)
4005 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4007 Children.Remove(child);
4008 child.InternalParent = null;
4010 if (ChildRemoved != null)
4012 ChildRemovedEventArgs e = new ChildRemovedEventArgs
4016 ChildRemoved(this, e);
4021 /// Retrieves a child view by index.
4023 /// <seealso cref="Container.GetChildAt" />
4024 /// <since_tizen> 4 </since_tizen>
4025 public override View GetChildAt(uint index)
4027 if (index < Children.Count)
4029 return Children[Convert.ToInt32(index)];
4038 /// Retrieves the number of children held by the view.
4040 /// <seealso cref="Container.GetChildCount" />
4041 /// <since_tizen> 4 </since_tizen>
4042 public override uint GetChildCount()
4044 return Convert.ToUInt32(Children.Count);
4048 /// Gets the views parent.
4050 /// <seealso cref="Container.GetParent()" />
4051 /// <since_tizen> 4 </since_tizen>
4052 public override Container GetParent()
4054 return this.InternalParent as Container;
4058 /// Queries whether the view has a focus.
4060 /// <returns>True if this view has a focus.</returns>
4061 /// <since_tizen> 3 </since_tizen>
4062 public bool HasFocus()
4065 if (swigCPtr.Handle != global::System.IntPtr.Zero)
4067 ret = Interop.View.View_HasKeyInputFocus(swigCPtr);
4068 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4072 Tizen.Log.Error("NUI", "swigCPtr of view is aleady disposed.");
4078 /// Sets the name of the style to be applied to the view.
4080 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
4081 /// <since_tizen> 3 </since_tizen>
4082 public void SetStyleName(string styleName)
4084 Interop.View.View_SetStyleName(swigCPtr, styleName);
4085 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4089 /// Retrieves the name of the style to be applied to the view (if any).
4091 /// <returns>A string matching a style, or an empty string.</returns>
4092 /// <since_tizen> 3 </since_tizen>
4093 public string GetStyleName()
4095 string ret = Interop.View.View_GetStyleName(swigCPtr);
4096 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4101 /// Clears the background.
4103 /// <since_tizen> 3 </since_tizen>
4104 public void ClearBackground()
4106 Interop.View.View_ClearBackground(swigCPtr);
4107 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4114 /// This is an asynchronous method.
4116 /// <since_tizen> 3 </since_tizen>
4126 /// This is an asynchronous method.
4127 /// If the view is hidden, then the view and its children will not be rendered.
4128 /// 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.
4130 /// <since_tizen> 3 </since_tizen>
4137 /// Raises the view above all other views.
4140 /// Sibling order of views within the parent will be updated automatically.
4141 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
4143 /// <since_tizen> 3 </since_tizen>
4144 public void RaiseToTop()
4146 var parentChildren = GetParent()?.Children;
4148 if (parentChildren != null)
4150 parentChildren.Remove(this);
4151 parentChildren.Add(this);
4153 Interop.NDalic.RaiseToTop(swigCPtr);
4154 if (NDalicPINVOKE.SWIGPendingException.Pending)
4155 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4161 /// Lowers the view to the bottom of all views.
4164 /// The sibling order of views within the parent will be updated automatically.
4165 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4167 /// <since_tizen> 3 </since_tizen>
4168 public void LowerToBottom()
4170 var parentChildren = GetParent()?.Children;
4172 if (parentChildren != null)
4174 parentChildren.Remove(this);
4175 parentChildren.Insert(0, this);
4177 Interop.NDalic.LowerToBottom(swigCPtr);
4178 if (NDalicPINVOKE.SWIGPendingException.Pending)
4179 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4184 /// Queries if all resources required by a view are loaded and ready.
4186 /// <remarks>Most resources are only loaded when the control is placed on the stage.
4188 /// <since_tizen> 3 </since_tizen>
4189 public bool IsResourceReady()
4191 bool ret = Interop.View.IsResourceReady(swigCPtr);
4192 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4197 /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
4199 /// <pre>The view has been initialized. </pre>
4200 /// <returns>The parent layer of view </returns>
4201 /// <since_tizen> 5 </since_tizen>
4202 public Layer GetLayer()
4204 //to fix memory leak issue, match the handle count with native side.
4205 IntPtr cPtr = Interop.Actor.Actor_GetLayer(swigCPtr);
4206 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4207 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
4208 Interop.BaseHandle.delete_BaseHandle(CPtr);
4209 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4211 if (NDalicPINVOKE.SWIGPendingException.Pending)
4212 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4217 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
4219 /// <pre>The (child) view has been initialized. </pre>
4220 /// <since_tizen> 4 </since_tizen>
4221 public void Unparent()
4223 GetParent()?.Remove(this);
4227 /// Search through this view's hierarchy for a view with the given name.
4228 /// The view itself is also considered in the search.
4230 /// <pre>The view has been initialized.</pre>
4231 /// <param name="viewName">The name of the view to find.</param>
4232 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
4233 /// <since_tizen> 3 </since_tizen>
4234 public View FindChildByName(string viewName)
4236 //to fix memory leak issue, match the handle count with native side.
4237 IntPtr cPtr = Interop.Actor.Actor_FindChildByName(swigCPtr, viewName);
4238 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4239 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4240 Interop.BaseHandle.delete_BaseHandle(CPtr);
4241 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4243 if (NDalicPINVOKE.SWIGPendingException.Pending)
4244 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4249 /// Converts screen coordinates into the view's coordinate system using the default camera.
4251 /// <pre>The view has been initialized.</pre>
4252 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4253 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4254 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4255 /// <param name="screenX">The screen X-coordinate.</param>
4256 /// <param name="screenY">The screen Y-coordinate.</param>
4257 /// <returns>True if the conversion succeeded.</returns>
4258 /// <since_tizen> 3 </since_tizen>
4259 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4261 bool ret = Interop.Actor.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4262 if (NDalicPINVOKE.SWIGPendingException.Pending)
4263 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4268 /// Sets the relative to parent size factor of the view.<br />
4269 /// This factor is only used when ResizePolicy is set to either:
4270 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4271 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4273 /// <pre>The view has been initialized.</pre>
4274 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4275 /// <since_tizen> 3 </since_tizen>
4276 public void SetSizeModeFactor(Vector3 factor)
4278 Interop.Actor.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4279 if (NDalicPINVOKE.SWIGPendingException.Pending)
4280 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4283 /// Calculates the height of the view given a width.<br />
4284 /// The natural size is used for default calculation.<br />
4285 /// Size 0 is treated as aspect ratio 1:1.<br />
4287 /// <param name="width">The width to use.</param>
4288 /// <returns>The height based on the width.</returns>
4289 /// <since_tizen> 3 </since_tizen>
4290 public float GetHeightForWidth(float width)
4292 float ret = Interop.Actor.Actor_GetHeightForWidth(swigCPtr, width);
4293 if (NDalicPINVOKE.SWIGPendingException.Pending)
4294 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4299 /// Calculates the width of the view given a height.<br />
4300 /// The natural size is used for default calculation.<br />
4301 /// Size 0 is treated as aspect ratio 1:1.<br />
4303 /// <param name="height">The height to use.</param>
4304 /// <returns>The width based on the height.</returns>
4305 /// <since_tizen> 3 </since_tizen>
4306 public float GetWidthForHeight(float height)
4308 float ret = Interop.Actor.Actor_GetWidthForHeight(swigCPtr, height);
4309 if (NDalicPINVOKE.SWIGPendingException.Pending)
4310 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4315 /// Return the amount of size allocated for relayout.
4317 /// <param name="dimension">The dimension to retrieve.</param>
4318 /// <returns>Return the size.</returns>
4319 /// <since_tizen> 3 </since_tizen>
4320 public float GetRelayoutSize(DimensionType dimension)
4322 float ret = Interop.Actor.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4323 if (NDalicPINVOKE.SWIGPendingException.Pending)
4324 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4329 /// Set the padding for the view.
4331 /// <param name="padding">Padding for the view.</param>
4332 /// <since_tizen> 3 </since_tizen>
4333 public void SetPadding(PaddingType padding)
4335 Interop.Actor.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4336 if (NDalicPINVOKE.SWIGPendingException.Pending)
4337 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4341 /// Return the value of padding for the view.
4343 /// <param name="paddingOut">the value of padding for the view</param>
4344 /// <since_tizen> 3 </since_tizen>
4345 public void GetPadding(PaddingType paddingOut)
4347 Interop.Actor.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4348 if (NDalicPINVOKE.SWIGPendingException.Pending)
4349 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4352 /// <since_tizen> 3 </since_tizen>
4353 public uint AddRenderer(Renderer renderer)
4355 uint ret = Interop.Actor.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4356 if (NDalicPINVOKE.SWIGPendingException.Pending)
4357 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4361 /// <since_tizen> 3 </since_tizen>
4362 public Renderer GetRendererAt(uint index)
4364 //to fix memory leak issue, match the handle count with native side.
4365 IntPtr cPtr = Interop.Actor.Actor_GetRendererAt(swigCPtr, index);
4366 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4367 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4368 if (cPtr != null && ret == null)
4370 ret = new Renderer(cPtr, false);
4371 if (NDalicPINVOKE.SWIGPendingException.Pending)
4372 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4375 Interop.BaseHandle.delete_BaseHandle(CPtr);
4376 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4378 if (NDalicPINVOKE.SWIGPendingException.Pending)
4379 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4383 /// <since_tizen> 3 </since_tizen>
4384 public void RemoveRenderer(Renderer renderer)
4386 Interop.Actor.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4387 if (NDalicPINVOKE.SWIGPendingException.Pending)
4388 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4391 /// <since_tizen> 3 </since_tizen>
4392 public void RemoveRenderer(uint index)
4394 Interop.Actor.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4395 if (NDalicPINVOKE.SWIGPendingException.Pending)
4396 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4399 internal void Raise()
4401 var parentChildren = GetParent()?.Children;
4403 if (parentChildren != null)
4405 int currentIndex = parentChildren.IndexOf(this);
4407 // If the view is not already the last item in the list.
4408 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
4410 View temp = parentChildren[currentIndex + 1];
4411 parentChildren[currentIndex + 1] = this;
4412 parentChildren[currentIndex] = temp;
4414 Interop.NDalic.Raise(swigCPtr);
4415 if (NDalicPINVOKE.SWIGPendingException.Pending)
4416 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4421 internal void Lower()
4423 var parentChildren = GetParent()?.Children;
4425 if (parentChildren != null)
4427 int currentIndex = parentChildren.IndexOf(this);
4429 // If the view is not already the first item in the list.
4430 if (currentIndex > 0 && currentIndex < parentChildren.Count)
4432 View temp = parentChildren[currentIndex - 1];
4433 parentChildren[currentIndex - 1] = this;
4434 parentChildren[currentIndex] = temp;
4436 Interop.NDalic.Lower(swigCPtr);
4437 if (NDalicPINVOKE.SWIGPendingException.Pending)
4438 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4444 /// Raises the view to above the target view.
4446 /// <remarks>The sibling order of views within the parent will be updated automatically.
4447 /// Views on the level above the target view will still be shown above this view.
4448 /// Raising this view above views with the same sibling order as each other will raise this view above them.
4449 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4451 /// <param name="target">Will be raised above this view.</param>
4452 internal void RaiseAbove(View target)
4454 var parentChildren = GetParent()?.Children;
4456 if (parentChildren != null)
4458 int currentIndex = parentChildren.IndexOf(this);
4459 int targetIndex = parentChildren.IndexOf(target);
4461 if (currentIndex < 0 || targetIndex < 0 ||
4462 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4464 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4467 // If the currentIndex is less than the target index and the target has the same parent.
4468 if (currentIndex < targetIndex)
4470 parentChildren.Remove(this);
4471 parentChildren.Insert(targetIndex, this);
4473 Interop.NDalic.RaiseAbove(swigCPtr, View.getCPtr(target));
4474 if (NDalicPINVOKE.SWIGPendingException.Pending)
4475 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4482 /// Lowers the view to below the target view.
4484 /// <remarks>The sibling order of views within the parent will be updated automatically.
4485 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
4486 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4488 /// <param name="target">Will be lowered below this view.</param>
4489 internal void LowerBelow(View target)
4491 var parentChildren = GetParent()?.Children;
4493 if (parentChildren != null)
4495 int currentIndex = parentChildren.IndexOf(this);
4496 int targetIndex = parentChildren.IndexOf(target);
4497 if (currentIndex < 0 || targetIndex < 0 ||
4498 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4500 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4504 // If the currentIndex is not already the 0th index and the target has the same parent.
4505 if ((currentIndex != 0) && (targetIndex != -1) &&
4506 (currentIndex > targetIndex))
4508 parentChildren.Remove(this);
4509 parentChildren.Insert(targetIndex, this);
4511 Interop.NDalic.LowerBelow(swigCPtr, View.getCPtr(target));
4512 if (NDalicPINVOKE.SWIGPendingException.Pending)
4513 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4519 internal string GetName()
4521 string ret = Interop.Actor.Actor_GetName(swigCPtr);
4522 if (NDalicPINVOKE.SWIGPendingException.Pending)
4523 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4527 internal void SetName(string name)
4529 Interop.Actor.Actor_SetName(swigCPtr, name);
4530 if (NDalicPINVOKE.SWIGPendingException.Pending)
4531 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4534 internal uint GetId()
4536 uint ret = Interop.Actor.Actor_GetId(swigCPtr);
4537 if (NDalicPINVOKE.SWIGPendingException.Pending)
4538 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4542 internal bool IsRoot()
4544 bool ret = Interop.ActorInternal.Actor_IsRoot(swigCPtr);
4545 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4549 internal bool OnWindow()
4551 bool ret = Interop.Actor.Actor_OnStage(swigCPtr);
4552 if (NDalicPINVOKE.SWIGPendingException.Pending)
4553 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4557 internal View FindChildById(uint id)
4559 //to fix memory leak issue, match the handle count with native side.
4560 IntPtr cPtr = Interop.Actor.Actor_FindChildById(swigCPtr, id);
4561 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4562 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4563 Interop.BaseHandle.delete_BaseHandle(CPtr);
4564 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4566 if (NDalicPINVOKE.SWIGPendingException.Pending)
4567 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4571 internal void SetParentOrigin(Vector3 origin)
4573 Interop.ActorInternal.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
4574 if (NDalicPINVOKE.SWIGPendingException.Pending)
4575 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4578 internal Vector3 GetCurrentParentOrigin()
4580 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentParentOrigin(swigCPtr), true);
4581 if (NDalicPINVOKE.SWIGPendingException.Pending)
4582 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4586 internal void SetAnchorPoint(Vector3 anchorPoint)
4588 Interop.Actor.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
4589 if (NDalicPINVOKE.SWIGPendingException.Pending)
4590 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4593 internal Vector3 GetCurrentAnchorPoint()
4595 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentAnchorPoint(swigCPtr), true);
4596 if (NDalicPINVOKE.SWIGPendingException.Pending)
4597 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4601 internal void SetSize(float width, float height)
4603 Interop.ActorInternal.Actor_SetSize__SWIG_0(swigCPtr, width, height);
4604 if (NDalicPINVOKE.SWIGPendingException.Pending)
4605 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4608 internal void SetSize(float width, float height, float depth)
4610 Interop.ActorInternal.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
4611 if (NDalicPINVOKE.SWIGPendingException.Pending)
4612 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4615 internal void SetSize(Vector2 size)
4617 Interop.ActorInternal.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
4618 if (NDalicPINVOKE.SWIGPendingException.Pending)
4619 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4622 internal void SetSize(Vector3 size)
4624 Interop.ActorInternal.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
4625 if (NDalicPINVOKE.SWIGPendingException.Pending)
4626 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4629 internal Vector3 GetTargetSize()
4631 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetTargetSize(swigCPtr), true);
4632 if (NDalicPINVOKE.SWIGPendingException.Pending)
4633 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4637 internal Size2D GetCurrentSize()
4639 Size ret = new Size(Interop.Actor.Actor_GetCurrentSize(swigCPtr), true);
4640 if (NDalicPINVOKE.SWIGPendingException.Pending)
4641 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4642 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
4646 internal Vector3 GetNaturalSize()
4648 Vector3 ret = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
4649 if (NDalicPINVOKE.SWIGPendingException.Pending)
4650 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4654 internal void SetPosition(float x, float y)
4656 Interop.ActorInternal.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
4657 if (NDalicPINVOKE.SWIGPendingException.Pending)
4658 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4661 internal void SetPosition(float x, float y, float z)
4663 Interop.ActorInternal.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
4664 if (NDalicPINVOKE.SWIGPendingException.Pending)
4665 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4668 internal void SetPosition(Vector3 position)
4670 Interop.ActorInternal.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
4671 if (NDalicPINVOKE.SWIGPendingException.Pending)
4672 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4675 internal void SetX(float x)
4677 Interop.ActorInternal.Actor_SetX(swigCPtr, x);
4678 if (NDalicPINVOKE.SWIGPendingException.Pending)
4679 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4682 internal void SetY(float y)
4684 Interop.ActorInternal.Actor_SetY(swigCPtr, y);
4685 if (NDalicPINVOKE.SWIGPendingException.Pending)
4686 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4689 internal void SetZ(float z)
4691 Interop.ActorInternal.Actor_SetZ(swigCPtr, z);
4692 if (NDalicPINVOKE.SWIGPendingException.Pending)
4693 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4696 internal void TranslateBy(Vector3 distance)
4698 Interop.ActorInternal.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
4699 if (NDalicPINVOKE.SWIGPendingException.Pending)
4700 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4703 internal Position GetCurrentPosition()
4705 Position ret = new Position(Interop.Actor.Actor_GetCurrentPosition(swigCPtr), true);
4706 if (NDalicPINVOKE.SWIGPendingException.Pending)
4707 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4711 internal Vector3 GetCurrentWorldPosition()
4713 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentWorldPosition(swigCPtr), true);
4714 if (NDalicPINVOKE.SWIGPendingException.Pending)
4715 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4719 internal void SetInheritPosition(bool inherit)
4721 Interop.ActorInternal.Actor_SetInheritPosition(swigCPtr, inherit);
4722 if (NDalicPINVOKE.SWIGPendingException.Pending)
4723 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4726 internal bool IsPositionInherited()
4728 bool ret = Interop.ActorInternal.Actor_IsPositionInherited(swigCPtr);
4729 if (NDalicPINVOKE.SWIGPendingException.Pending)
4730 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4734 internal void SetOrientation(Degree angle, Vector3 axis)
4736 Interop.ActorInternal.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4737 if (NDalicPINVOKE.SWIGPendingException.Pending)
4738 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4741 internal void SetOrientation(Radian angle, Vector3 axis)
4743 Interop.ActorInternal.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4744 if (NDalicPINVOKE.SWIGPendingException.Pending)
4745 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4748 internal void SetOrientation(Rotation orientation)
4750 Interop.ActorInternal.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
4751 if (NDalicPINVOKE.SWIGPendingException.Pending)
4752 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4755 internal void RotateBy(Degree angle, Vector3 axis)
4757 Interop.ActorInternal.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4758 if (NDalicPINVOKE.SWIGPendingException.Pending)
4759 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4762 internal void RotateBy(Radian angle, Vector3 axis)
4764 Interop.ActorInternal.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4765 if (NDalicPINVOKE.SWIGPendingException.Pending)
4766 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4769 internal void RotateBy(Rotation relativeRotation)
4771 Interop.ActorInternal.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4772 if (NDalicPINVOKE.SWIGPendingException.Pending)
4773 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4776 internal Rotation GetCurrentOrientation()
4778 Rotation ret = new Rotation(Interop.ActorInternal.Actor_GetCurrentOrientation(swigCPtr), true);
4779 if (NDalicPINVOKE.SWIGPendingException.Pending)
4780 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4784 internal void SetInheritOrientation(bool inherit)
4786 Interop.ActorInternal.Actor_SetInheritOrientation(swigCPtr, inherit);
4787 if (NDalicPINVOKE.SWIGPendingException.Pending)
4788 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4791 internal bool IsOrientationInherited()
4793 bool ret = Interop.ActorInternal.Actor_IsOrientationInherited(swigCPtr);
4794 if (NDalicPINVOKE.SWIGPendingException.Pending)
4795 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4799 internal Rotation GetCurrentWorldOrientation()
4801 Rotation ret = new Rotation(Interop.ActorInternal.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4802 if (NDalicPINVOKE.SWIGPendingException.Pending)
4803 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4807 internal void SetScale(float scale)
4809 Interop.ActorInternal.Actor_SetScale__SWIG_0(swigCPtr, scale);
4810 if (NDalicPINVOKE.SWIGPendingException.Pending)
4811 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4814 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4816 Interop.ActorInternal.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4817 if (NDalicPINVOKE.SWIGPendingException.Pending)
4818 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4821 internal void SetScale(Vector3 scale)
4823 Interop.ActorInternal.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4824 if (NDalicPINVOKE.SWIGPendingException.Pending)
4825 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4828 internal void ScaleBy(Vector3 relativeScale)
4830 Interop.ActorInternal.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4831 if (NDalicPINVOKE.SWIGPendingException.Pending)
4832 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4835 internal Vector3 GetCurrentScale()
4837 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentScale(swigCPtr), true);
4838 if (NDalicPINVOKE.SWIGPendingException.Pending)
4839 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4843 internal Vector3 GetCurrentWorldScale()
4845 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentWorldScale(swigCPtr), true);
4846 if (NDalicPINVOKE.SWIGPendingException.Pending)
4847 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4851 internal void SetInheritScale(bool inherit)
4853 Interop.ActorInternal.Actor_SetInheritScale(swigCPtr, inherit);
4854 if (NDalicPINVOKE.SWIGPendingException.Pending)
4855 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4858 internal bool IsScaleInherited()
4860 bool ret = Interop.ActorInternal.Actor_IsScaleInherited(swigCPtr);
4861 if (NDalicPINVOKE.SWIGPendingException.Pending)
4862 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4866 internal Matrix GetCurrentWorldMatrix()
4868 Matrix ret = new Matrix(Interop.ActorInternal.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4869 if (NDalicPINVOKE.SWIGPendingException.Pending)
4870 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4874 internal void SetVisible(bool visible)
4876 Interop.Actor.Actor_SetVisible(swigCPtr, visible);
4877 if (NDalicPINVOKE.SWIGPendingException.Pending)
4878 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4881 internal bool IsVisible()
4883 bool ret = Interop.ActorInternal.Actor_IsVisible(swigCPtr);
4884 if (NDalicPINVOKE.SWIGPendingException.Pending)
4885 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4889 internal void SetOpacity(float opacity)
4891 Interop.ActorInternal.Actor_SetOpacity(swigCPtr, opacity);
4892 if (NDalicPINVOKE.SWIGPendingException.Pending)
4893 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4896 internal float GetCurrentOpacity()
4898 float ret = Interop.ActorInternal.Actor_GetCurrentOpacity(swigCPtr);
4899 if (NDalicPINVOKE.SWIGPendingException.Pending)
4900 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4904 internal void SetColor(Vector4 color)
4906 Interop.ActorInternal.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4907 if (NDalicPINVOKE.SWIGPendingException.Pending)
4908 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4911 internal Vector4 GetCurrentColor()
4913 Vector4 ret = new Vector4(Interop.ActorInternal.Actor_GetCurrentColor(swigCPtr), true);
4914 if (NDalicPINVOKE.SWIGPendingException.Pending)
4915 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4919 internal void SetColorMode(ColorMode colorMode)
4921 Interop.ActorInternal.Actor_SetColorMode(swigCPtr, (int)colorMode);
4922 if (NDalicPINVOKE.SWIGPendingException.Pending)
4923 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4926 internal ColorMode GetColorMode()
4928 ColorMode ret = (ColorMode)Interop.ActorInternal.Actor_GetColorMode(swigCPtr);
4929 if (NDalicPINVOKE.SWIGPendingException.Pending)
4930 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4934 internal Vector4 GetCurrentWorldColor()
4936 Vector4 ret = new Vector4(Interop.ActorInternal.Actor_GetCurrentWorldColor(swigCPtr), true);
4937 if (NDalicPINVOKE.SWIGPendingException.Pending)
4938 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4942 internal void SetDrawMode(DrawModeType drawMode)
4944 Interop.ActorInternal.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4945 if (NDalicPINVOKE.SWIGPendingException.Pending)
4946 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4949 internal DrawModeType GetDrawMode()
4951 DrawModeType ret = (DrawModeType)Interop.ActorInternal.Actor_GetDrawMode(swigCPtr);
4952 if (NDalicPINVOKE.SWIGPendingException.Pending)
4953 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4957 internal void SetKeyboardFocusable(bool focusable)
4959 Interop.ActorInternal.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4960 if (NDalicPINVOKE.SWIGPendingException.Pending)
4961 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4964 internal bool IsKeyboardFocusable()
4966 bool ret = Interop.ActorInternal.Actor_IsKeyboardFocusable(swigCPtr);
4967 if (NDalicPINVOKE.SWIGPendingException.Pending)
4968 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4972 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4974 Interop.Actor.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4975 if (NDalicPINVOKE.SWIGPendingException.Pending)
4976 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4979 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4981 ResizePolicyType ret = (ResizePolicyType)Interop.Actor.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4982 if (NDalicPINVOKE.SWIGPendingException.Pending)
4983 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4987 internal Vector3 GetSizeModeFactor()
4989 Vector3 ret = new Vector3(Interop.Actor.Actor_GetSizeModeFactor(swigCPtr), true);
4990 if (NDalicPINVOKE.SWIGPendingException.Pending)
4991 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4995 internal void SetMinimumSize(Vector2 size)
4997 Interop.ActorInternal.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4998 if (NDalicPINVOKE.SWIGPendingException.Pending)
4999 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5002 internal Vector2 GetMinimumSize()
5004 Vector2 ret = new Vector2(Interop.ActorInternal.Actor_GetMinimumSize(swigCPtr), true);
5005 if (NDalicPINVOKE.SWIGPendingException.Pending)
5006 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5010 internal void SetMaximumSize(Vector2 size)
5012 Interop.ActorInternal.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
5013 if (NDalicPINVOKE.SWIGPendingException.Pending)
5014 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5017 internal Vector2 GetMaximumSize()
5019 Vector2 ret = new Vector2(Interop.ActorInternal.Actor_GetMaximumSize(swigCPtr), true);
5020 if (NDalicPINVOKE.SWIGPendingException.Pending)
5021 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5025 internal int GetHierarchyDepth()
5027 int ret = Interop.Actor.Actor_GetHierarchyDepth(swigCPtr);
5028 if (NDalicPINVOKE.SWIGPendingException.Pending)
5029 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5033 internal uint GetRendererCount()
5035 uint ret = Interop.Actor.Actor_GetRendererCount(swigCPtr);
5036 if (NDalicPINVOKE.SWIGPendingException.Pending)
5037 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5041 internal TouchDataSignal TouchSignal()
5043 TouchDataSignal ret = new TouchDataSignal(Interop.ActorSignal.Actor_TouchSignal(swigCPtr), false);
5044 if (NDalicPINVOKE.SWIGPendingException.Pending)
5045 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5049 internal HoverSignal HoveredSignal()
5051 HoverSignal ret = new HoverSignal(Interop.ActorSignal.Actor_HoveredSignal(swigCPtr), false);
5052 if (NDalicPINVOKE.SWIGPendingException.Pending)
5053 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5057 internal WheelSignal WheelEventSignal()
5059 WheelSignal ret = new WheelSignal(Interop.ActorSignal.Actor_WheelEventSignal(swigCPtr), false);
5060 if (NDalicPINVOKE.SWIGPendingException.Pending)
5061 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5065 internal ViewSignal OnWindowSignal()
5067 ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnStageSignal(swigCPtr), false);
5068 if (NDalicPINVOKE.SWIGPendingException.Pending)
5069 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5073 internal ViewSignal OffWindowSignal()
5075 ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OffStageSignal(swigCPtr), false);
5076 if (NDalicPINVOKE.SWIGPendingException.Pending)
5077 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5081 internal ViewSignal OnRelayoutSignal()
5083 ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnRelayoutSignal(swigCPtr), false);
5084 if (NDalicPINVOKE.SWIGPendingException.Pending)
5085 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5089 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
5091 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(Interop.NDalic.VisibilityChangedSignal(View.getCPtr(view)), false);
5092 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5096 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
5098 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(Interop.Layout.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
5099 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5103 internal ViewSignal ResourcesLoadedSignal()
5105 ViewSignal ret = new ViewSignal(Interop.View.ResourceReadySignal(swigCPtr), false);
5106 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5110 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
5112 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
5115 internal bool IsTopLevelView()
5117 if (GetParent() is Layer)
5124 internal void SetKeyInputFocus()
5126 Interop.ViewInternal.View_SetKeyInputFocus(swigCPtr);
5127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5130 internal void ClearKeyInputFocus()
5132 Interop.ViewInternal.View_ClearKeyInputFocus(swigCPtr);
5133 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5136 internal PinchGestureDetector GetPinchGestureDetector()
5138 PinchGestureDetector ret = new PinchGestureDetector(Interop.ViewInternal.View_GetPinchGestureDetector(swigCPtr), true);
5139 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5143 internal PanGestureDetector GetPanGestureDetector()
5145 PanGestureDetector ret = new PanGestureDetector(Interop.ViewInternal.View_GetPanGestureDetector(swigCPtr), true);
5146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5150 internal TapGestureDetector GetTapGestureDetector()
5152 TapGestureDetector ret = new TapGestureDetector(Interop.ViewInternal.View_GetTapGestureDetector(swigCPtr), true);
5153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5157 internal LongPressGestureDetector GetLongPressGestureDetector()
5159 LongPressGestureDetector ret = new LongPressGestureDetector(Interop.ViewInternal.View_GetLongPressGestureDetector(swigCPtr), true);
5160 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5164 internal void SetBackgroundColor(Vector4 color)
5166 Interop.ViewInternal.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
5167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5170 internal Vector4 GetBackgroundColor()
5172 Vector4 ret = new Vector4(Interop.ViewInternal.View_GetBackgroundColor(swigCPtr), true);
5173 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5177 internal void SetBackgroundImage(Image image)
5179 Interop.ViewInternal.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
5180 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5183 internal ControlKeySignal KeyEventSignal()
5185 ControlKeySignal ret = new ControlKeySignal(Interop.ViewSignal.View_KeyEventSignal(swigCPtr), false);
5186 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5190 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
5192 KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusGainedSignal(swigCPtr), false);
5193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5197 internal KeyInputFocusSignal KeyInputFocusLostSignal()
5199 KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusLostSignal(swigCPtr), false);
5200 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5204 internal IntPtr GetPtrfromView()
5206 return (IntPtr)swigCPtr;
5210 /// Removes the layout from this View.
5212 internal void ResetLayout()
5217 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5219 return (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5223 /// you can override it to clean-up your own resources.
5225 /// <param name="type">DisposeTypes</param>
5226 /// <since_tizen> 3 </since_tizen>
5227 protected override void Dispose(DisposeTypes type)
5234 if (type == DisposeTypes.Explicit)
5237 //Release your own managed resources here.
5238 //You should release all of your own disposable objects here.
5241 //Release your own unmanaged resources here.
5242 //You should not access any managed member here except static instance.
5243 //because the execution order of Finalizes is non-deterministic.
5246 DisConnectFromSignals();
5249 if (swigCPtr.Handle != global::System.IntPtr.Zero)
5253 swigCMemOwn = false;
5254 Interop.View.delete_View(swigCPtr);
5256 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5259 foreach (View view in Children)
5261 view.InternalParent = null;
5268 private void OnSize2DChanged(int width, int height)
5270 Size2D = new Size2D(width, height);
5273 private void OnPosition2DChanged(int x, int y)
5275 Position2D = new Position2D(x, y);
5278 private void DisConnectFromSignals()
5280 // Save current CPtr.
5281 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
5283 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
5284 swigCPtr = GetBaseHandleCPtrHandleRef;
5286 if (_onRelayoutEventCallback != null)
5288 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5291 if (_offWindowEventCallback != null)
5293 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5296 if (_onWindowEventCallback != null)
5298 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5301 if (_wheelEventCallback != null)
5303 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5306 if (_hoverEventCallback != null)
5308 this.HoveredSignal().Disconnect(_hoverEventCallback);
5311 if (_touchDataCallback != null)
5313 this.TouchSignal().Disconnect(_touchDataCallback);
5316 if (_ResourcesLoadedCallback != null)
5318 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
5321 if (_offWindowEventCallback != null)
5323 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5326 if (_onWindowEventCallback != null)
5328 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5331 if (_wheelEventCallback != null)
5333 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5336 if (_hoverEventCallback != null)
5338 this.HoveredSignal().Disconnect(_hoverEventCallback);
5341 if (_touchDataCallback != null)
5343 this.TouchSignal().Disconnect(_touchDataCallback);
5346 if (_onRelayoutEventCallback != null)
5348 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5351 if (_keyCallback != null)
5353 this.KeyEventSignal().Disconnect(_keyCallback);
5356 if (_keyInputFocusLostCallback != null)
5358 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
5361 if (_keyInputFocusGainedCallback != null)
5363 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
5366 if (_backgroundResourceLoadedCallback != null)
5368 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5371 if (_onWindowSendEventCallback != null)
5373 this.OnWindowSignal().Disconnect(_onWindowSendEventCallback);
5376 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
5377 // Restore current CPtr.
5378 swigCPtr = currentCPtr;
5381 private void OnKeyInputFocusGained(IntPtr view)
5383 if (_keyInputFocusGainedEventHandler != null)
5385 _keyInputFocusGainedEventHandler(this, null);
5389 private void OnKeyInputFocusLost(IntPtr view)
5391 if (_keyInputFocusLostEventHandler != null)
5393 _keyInputFocusLostEventHandler(this, null);
5397 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
5399 if (keyEvent == global::System.IntPtr.Zero)
5401 NUILog.Error("keyEvent should not be null!");
5405 KeyEventArgs e = new KeyEventArgs();
5407 bool result = false;
5409 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
5411 if (_keyEventHandler != null)
5413 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
5415 // Oring the result of each callback.
5416 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
5418 result |= del(this, e);
5425 // Callback for View OnRelayout signal
5426 private void OnRelayout(IntPtr data)
5428 if (_onRelayoutEventHandler != null)
5430 _onRelayoutEventHandler(this, null);
5434 // Callback for View TouchSignal
5435 private bool OnTouch(IntPtr view, IntPtr touchData)
5437 if (touchData == global::System.IntPtr.Zero)
5439 NUILog.Error("touchData should not be null!");
5443 TouchEventArgs e = new TouchEventArgs();
5445 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
5447 if (_touchDataEventHandler != null)
5449 return _touchDataEventHandler(this, e);
5454 // Callback for View Hover signal
5455 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
5457 if (hoverEvent == global::System.IntPtr.Zero)
5459 NUILog.Error("hoverEvent should not be null!");
5463 HoverEventArgs e = new HoverEventArgs();
5465 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
5467 if (_hoverEventHandler != null)
5469 return _hoverEventHandler(this, e);
5474 // Callback for View Wheel signal
5475 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
5477 if (wheelEvent == global::System.IntPtr.Zero)
5479 NUILog.Error("wheelEvent should not be null!");
5483 WheelEventArgs e = new WheelEventArgs();
5485 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
5487 if (_wheelEventHandler != null)
5489 return _wheelEventHandler(this, e);
5494 // Callback for View OnWindow signal
5495 private void OnWindow(IntPtr data)
5497 if (_onWindowEventHandler != null)
5499 _onWindowEventHandler(this, null);
5503 // Callback for View OffWindow signal
5504 private void OffWindow(IntPtr data)
5506 if (_offWindowEventHandler != null)
5508 _offWindowEventHandler(this, null);
5512 // Callback for View visibility change signal
5513 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
5515 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
5518 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5520 e.Visibility = visibility;
5523 if (_visibilityChangedEventHandler != null)
5525 _visibilityChangedEventHandler(this, e);
5529 // Callback for View layout direction change signal
5530 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
5532 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
5535 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5539 if (_layoutDirectionChangedEventHandler != null)
5541 _layoutDirectionChangedEventHandler(this, e);
5545 private void OnResourcesLoaded(IntPtr view)
5547 if (_resourcesLoadedEventHandler != null)
5549 _resourcesLoadedEventHandler(this, null);
5553 private View ConvertIdToView(uint id)
5556 if (GetParent() is View)
5558 View parentView = GetParent() as View;
5559 view = parentView.FindChildById(id);
5564 view = Window.Instance.GetRootLayer().FindChildById(id);
5570 private void OnBackgroundResourceLoaded(IntPtr view)
5572 BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5573 e.Status = (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5575 if (_backgroundResourceLoadedEventHandler != null)
5577 _backgroundResourceLoadedEventHandler(this, e);
5582 /// Event argument passed through the ChildAdded event.
5584 /// <since_tizen> 5 </since_tizen>
5585 public class ChildAddedEventArgs : EventArgs
5588 /// Added child view at moment.
5590 /// <since_tizen> 5 </since_tizen>
5591 public View Added { get; set; }
5595 /// Event argument passed through the ChildRemoved event.
5597 /// <since_tizen> 5 </since_tizen>
5598 public class ChildRemovedEventArgs : EventArgs
5601 /// Removed child view at moment.
5603 /// <since_tizen> 5 </since_tizen>
5604 public View Removed { get; set; }
5608 /// Event arguments that passed via the KeyEvent signal.
5610 /// <since_tizen> 3 </since_tizen>
5611 public class KeyEventArgs : EventArgs
5616 /// Key - is the key sent to the view.
5618 /// <since_tizen> 3 </since_tizen>
5633 /// Event arguments that passed via the touch signal.
5635 /// <since_tizen> 3 </since_tizen>
5636 public class TouchEventArgs : EventArgs
5638 private Touch _touch;
5641 /// Touch - contains the information of touch points.
5643 /// <since_tizen> 3 </since_tizen>
5658 /// Event arguments that passed via the hover signal.
5660 /// <since_tizen> 3 </since_tizen>
5661 public class HoverEventArgs : EventArgs
5663 private Hover _hover;
5666 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
5668 /// <since_tizen> 3 </since_tizen>
5683 /// Event arguments that passed via the wheel signal.
5685 /// <since_tizen> 3 </since_tizen>
5686 public class WheelEventArgs : EventArgs
5688 private Wheel _wheel;
5691 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
5693 /// <since_tizen> 3 </since_tizen>
5708 /// Event arguments of visibility changed.
5710 /// <since_tizen> 3 </since_tizen>
5711 public class VisibilityChangedEventArgs : EventArgs
5714 private bool _visibility;
5715 private VisibilityChangeType _type;
5718 /// The view, or child of view, whose visibility has changed.
5720 /// <since_tizen> 3 </since_tizen>
5734 /// Whether the view is now visible or not.
5736 /// <since_tizen> 3 </since_tizen>
5737 public bool Visibility
5745 _visibility = value;
5750 /// Whether the view's visible property has changed or a parent's.
5752 /// <since_tizen> 3 </since_tizen>
5753 public VisibilityChangeType Type
5767 /// Event arguments of layout direction changed.
5769 /// <since_tizen> 4 </since_tizen>
5770 public class LayoutDirectionChangedEventArgs : EventArgs
5773 private ViewLayoutDirectionType _type;
5776 /// The view, or child of view, whose layout direction has changed.
5778 /// <since_tizen> 4 </since_tizen>
5792 /// Whether the view's layout direction property has changed or a parent's.
5794 /// <since_tizen> 4 </since_tizen>
5795 public ViewLayoutDirectionType Type
5808 internal class BackgroundResourceLoadedEventArgs : EventArgs
5810 private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5811 public ResourceLoadingStatusType Status
5824 internal class Property
5826 internal static readonly int TOOLTIP = Interop.ViewProperty.View_Property_TOOLTIP_get();
5827 internal static readonly int STATE = Interop.ViewProperty.View_Property_STATE_get();
5828 internal static readonly int SUB_STATE = Interop.ViewProperty.View_Property_SUB_STATE_get();
5829 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
5830 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
5831 internal static readonly int UP_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
5832 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
5833 internal static readonly int STYLE_NAME = Interop.ViewProperty.View_Property_STYLE_NAME_get();
5834 internal static readonly int BACKGROUND = Interop.ViewProperty.View_Property_BACKGROUND_get();
5835 internal static readonly int SIBLING_ORDER = Interop.ActorProperty.Actor_Property_SIBLING_ORDER_get();
5836 internal static readonly int OPACITY = Interop.ActorProperty.Actor_Property_OPACITY_get();
5837 internal static readonly int SCREEN_POSITION = Interop.ActorProperty.Actor_Property_SCREEN_POSITION_get();
5838 internal static readonly int POSITION_USES_ANCHOR_POINT = Interop.ActorProperty.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
5839 internal static readonly int PARENT_ORIGIN = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_get();
5840 internal static readonly int PARENT_ORIGIN_X = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_X_get();
5841 internal static readonly int PARENT_ORIGIN_Y = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_Y_get();
5842 internal static readonly int PARENT_ORIGIN_Z = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_Z_get();
5843 internal static readonly int ANCHOR_POINT = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_get();
5844 internal static readonly int ANCHOR_POINT_X = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_X_get();
5845 internal static readonly int ANCHOR_POINT_Y = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_Y_get();
5846 internal static readonly int ANCHOR_POINT_Z = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_Z_get();
5847 internal static readonly int SIZE = Interop.ActorProperty.Actor_Property_SIZE_get();
5848 internal static readonly int SIZE_WIDTH = Interop.ActorProperty.Actor_Property_SIZE_WIDTH_get();
5849 internal static readonly int SIZE_HEIGHT = Interop.ActorProperty.Actor_Property_SIZE_HEIGHT_get();
5850 internal static readonly int SIZE_DEPTH = Interop.ActorProperty.Actor_Property_SIZE_DEPTH_get();
5851 internal static readonly int POSITION = Interop.ActorProperty.Actor_Property_POSITION_get();
5852 internal static readonly int POSITION_X = Interop.ActorProperty.Actor_Property_POSITION_X_get();
5853 internal static readonly int POSITION_Y = Interop.ActorProperty.Actor_Property_POSITION_Y_get();
5854 internal static readonly int POSITION_Z = Interop.ActorProperty.Actor_Property_POSITION_Z_get();
5855 internal static readonly int WORLD_POSITION = Interop.ActorProperty.Actor_Property_WORLD_POSITION_get();
5856 internal static readonly int WORLD_POSITION_X = Interop.ActorProperty.Actor_Property_WORLD_POSITION_X_get();
5857 internal static readonly int WORLD_POSITION_Y = Interop.ActorProperty.Actor_Property_WORLD_POSITION_Y_get();
5858 internal static readonly int WORLD_POSITION_Z = Interop.ActorProperty.Actor_Property_WORLD_POSITION_Z_get();
5859 internal static readonly int ORIENTATION = Interop.ActorProperty.Actor_Property_ORIENTATION_get();
5860 internal static readonly int WORLD_ORIENTATION = Interop.ActorProperty.Actor_Property_WORLD_ORIENTATION_get();
5861 internal static readonly int SCALE = Interop.ActorProperty.Actor_Property_SCALE_get();
5862 internal static readonly int SCALE_X = Interop.ActorProperty.Actor_Property_SCALE_X_get();
5863 internal static readonly int SCALE_Y = Interop.ActorProperty.Actor_Property_SCALE_Y_get();
5864 internal static readonly int SCALE_Z = Interop.ActorProperty.Actor_Property_SCALE_Z_get();
5865 internal static readonly int WORLD_SCALE = Interop.ActorProperty.Actor_Property_WORLD_SCALE_get();
5866 internal static readonly int VISIBLE = Interop.ActorProperty.Actor_Property_VISIBLE_get();
5867 internal static readonly int WORLD_COLOR = Interop.ActorProperty.Actor_Property_WORLD_COLOR_get();
5868 internal static readonly int WORLD_MATRIX = Interop.ActorProperty.Actor_Property_WORLD_MATRIX_get();
5869 internal static readonly int NAME = Interop.ActorProperty.Actor_Property_NAME_get();
5870 internal static readonly int SENSITIVE = Interop.ActorProperty.Actor_Property_SENSITIVE_get();
5871 internal static readonly int LEAVE_REQUIRED = Interop.ActorProperty.Actor_Property_LEAVE_REQUIRED_get();
5872 internal static readonly int INHERIT_ORIENTATION = Interop.ActorProperty.Actor_Property_INHERIT_ORIENTATION_get();
5873 internal static readonly int INHERIT_SCALE = Interop.ActorProperty.Actor_Property_INHERIT_SCALE_get();
5874 internal static readonly int DRAW_MODE = Interop.ActorProperty.Actor_Property_DRAW_MODE_get();
5875 internal static readonly int SIZE_MODE_FACTOR = Interop.ActorProperty.Actor_Property_SIZE_MODE_FACTOR_get();
5876 internal static readonly int WIDTH_RESIZE_POLICY = Interop.ActorProperty.Actor_Property_WIDTH_RESIZE_POLICY_get();
5877 internal static readonly int HEIGHT_RESIZE_POLICY = Interop.ActorProperty.Actor_Property_HEIGHT_RESIZE_POLICY_get();
5878 internal static readonly int SIZE_SCALE_POLICY = Interop.ActorProperty.Actor_Property_SIZE_SCALE_POLICY_get();
5879 internal static readonly int WIDTH_FOR_HEIGHT = Interop.ActorProperty.Actor_Property_WIDTH_FOR_HEIGHT_get();
5880 internal static readonly int HEIGHT_FOR_WIDTH = Interop.ActorProperty.Actor_Property_HEIGHT_FOR_WIDTH_get();
5881 internal static readonly int MINIMUM_SIZE = Interop.ActorProperty.Actor_Property_MINIMUM_SIZE_get();
5882 internal static readonly int MAXIMUM_SIZE = Interop.ActorProperty.Actor_Property_MAXIMUM_SIZE_get();
5883 internal static readonly int INHERIT_POSITION = Interop.ActorProperty.Actor_Property_INHERIT_POSITION_get();
5884 internal static readonly int CLIPPING_MODE = Interop.ActorProperty.Actor_Property_CLIPPING_MODE_get();
5885 internal static readonly int INHERIT_LAYOUT_DIRECTION = Interop.ActorProperty.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
5886 internal static readonly int LAYOUT_DIRECTION = Interop.ActorProperty.Actor_Property_LAYOUT_DIRECTION_get();
5887 internal static readonly int MARGIN = Interop.ViewProperty.View_Property_MARGIN_get();
5888 internal static readonly int PADDING = Interop.ViewProperty.View_Property_PADDING_get();