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;
25 namespace Tizen.NUI.BaseComponents
28 /// The View layout Direction type.
30 /// <since_tizen> 4 </since_tizen>
31 public enum ViewLayoutDirectionType
36 /// <since_tizen> 4 </since_tizen>
41 /// <since_tizen> 4 </since_tizen>
46 /// [Draft] Available policies for layout parameters
48 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
49 [EditorBrowsable(EditorBrowsableState.Never)]
50 public static class LayoutParamPolicies
53 /// Constant which indicates child size should match parent size
55 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
56 [EditorBrowsable(EditorBrowsableState.Never)]
57 public const int MatchParent = -1;
59 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
61 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
62 [EditorBrowsable(EditorBrowsableState.Never)]
63 public const int WrapContent = -2;
67 /// [Draft] Replaced by LayoutParamPolicies, will be removed once occurrences replaced.
69 internal enum ChildLayoutData
72 /// Constant which indicates child size should match parent size
74 MatchParent = LayoutParamPolicies.MatchParent,
76 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
78 WrapContent = LayoutParamPolicies.WrapContent,
81 internal enum ResourceLoadingStatusType
90 /// View is the base class for all views.
92 /// <since_tizen> 3 </since_tizen>
93 public class View : Container, IResourcesProvider
95 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
96 [EditorBrowsable(EditorBrowsableState.Never)]
97 public static readonly BindableProperty StyleNameProperty = BindableProperty.Create("StyleName", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
99 var view = (View)bindable;
100 if (newValue != null)
102 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue));
105 defaultValueCreator: (bindable) =>
107 var view = (View)bindable;
109 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STYLE_NAME).Get(out temp);
112 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
113 [EditorBrowsable(EditorBrowsableState.Never)]
114 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
116 var view = (View)bindable;
117 if (newValue != null)
119 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((Color)newValue));
122 defaultValueCreator: (bindable) =>
124 var view = (View)bindable;
125 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
127 Tizen.NUI.PropertyMap background = view.Background;
129 background.Find(Visual.Property.Type)?.Get(out visualType);
130 if (visualType == (int)Visual.Type.Color)
132 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
135 return backgroundColor;
137 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
138 [EditorBrowsable(EditorBrowsableState.Never)]
139 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
141 var view = (View)bindable;
142 if (newValue != null)
144 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((string)newValue));
147 defaultValueCreator: (bindable) =>
149 var view = (View)bindable;
150 string backgroundImage = "";
152 Tizen.NUI.PropertyMap background = view.Background;
154 background.Find(Visual.Property.Type)?.Get(out visualType);
155 if (visualType == (int)Visual.Type.Image)
157 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
160 return backgroundImage;
162 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
163 [EditorBrowsable(EditorBrowsableState.Never)]
164 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create("Background", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
166 var view = (View)bindable;
167 if (newValue != null)
169 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
172 defaultValueCreator: (bindable) =>
174 var view = (View)bindable;
175 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
176 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
179 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
180 [EditorBrowsable(EditorBrowsableState.Never)]
181 public static readonly BindableProperty StateProperty = BindableProperty.Create("State", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
183 var view = (View)bindable;
184 if (newValue != null)
186 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
189 defaultValueCreator: (bindable) =>
191 var view = (View)bindable;
193 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
195 NUILog.Error("State get error!");
199 case 0: return States.Normal;
200 case 1: return States.Focused;
201 case 2: return States.Disabled;
202 default: return States.Normal;
205 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
206 [EditorBrowsable(EditorBrowsableState.Never)]
207 public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
209 var view = (View)bindable;
210 string valueToString = "";
211 if (newValue != null)
213 switch ((States)newValue)
215 case States.Normal: { valueToString = "NORMAL"; break; }
216 case States.Focused: { valueToString = "FOCUSED"; break; }
217 case States.Disabled: { valueToString = "DISABLED"; break; }
218 default: { valueToString = "NORMAL"; break; }
220 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
223 defaultValueCreator: (bindable) =>
225 var view = (View)bindable;
227 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
229 NUILog.Error("subState get error!");
233 case "NORMAL": return States.Normal;
234 case "FOCUSED": return States.Focused;
235 case "DISABLED": return States.Disabled;
236 default: return States.Normal;
239 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
240 [EditorBrowsable(EditorBrowsableState.Never)]
241 public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
243 var view = (View)bindable;
244 if (newValue != null)
246 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
249 defaultValueCreator: (bindable) =>
251 var view = (View)bindable;
252 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
253 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
257 /// Only for XAML property binding. This will be changed as Inhouse API by ACR later.
258 public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
260 var view = (View)bindable;
261 if (newValue != null)
263 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
266 defaultValueCreator: (bindable) =>
268 var view = (View)bindable;
270 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
274 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
275 [EditorBrowsable(EditorBrowsableState.Never)]
276 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
278 var view = (View)bindable;
279 if (newValue != null)
281 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
284 defaultValueCreator: (bindable) =>
286 var view = (View)bindable;
288 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
291 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
292 [EditorBrowsable(EditorBrowsableState.Never)]
293 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
295 var view = (View)bindable;
296 if (newValue != null)
298 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
301 defaultValueCreator: (bindable) =>
303 var view = (View)bindable;
304 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
305 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
308 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
309 [EditorBrowsable(EditorBrowsableState.Never)]
310 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
312 var view = (View)bindable;
313 if (newValue != null)
315 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
318 defaultValueCreator: (bindable) =>
320 var view = (View)bindable;
321 Vector2 temp = new Vector2(0.0f, 0.0f);
322 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
325 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
326 [EditorBrowsable(EditorBrowsableState.Never)]
327 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
329 var view = (View)bindable;
330 if (newValue != null)
332 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
335 defaultValueCreator: (bindable) =>
337 var view = (View)bindable;
339 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
342 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
343 [EditorBrowsable(EditorBrowsableState.Never)]
344 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
346 var view = (View)bindable;
347 if (newValue != null)
349 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
352 defaultValueCreator: (bindable) =>
354 var view = (View)bindable;
356 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
359 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
360 [EditorBrowsable(EditorBrowsableState.Never)]
361 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
363 var view = (View)bindable;
364 string valueToString = "";
366 if (newValue != null)
368 switch ((HorizontalAlignmentType)newValue)
370 case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
371 case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
372 case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
373 default: { valueToString = "left"; break; }
375 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
378 defaultValueCreator: (bindable) =>
380 var view = (View)bindable;
382 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
384 NUILog.Error("CellHorizontalAlignment get error!");
389 case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
390 case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
391 case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
392 default: return Tizen.NUI.HorizontalAlignmentType.Left;
395 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
396 [EditorBrowsable(EditorBrowsableState.Never)]
397 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
399 var view = (View)bindable;
400 string valueToString = "";
402 if (newValue != null)
404 switch ((VerticalAlignmentType)newValue)
406 case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
407 case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
408 case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
409 default: { valueToString = "top"; break; }
411 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
414 defaultValueCreator: (bindable) =>
416 var view = (View)bindable;
418 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
420 NUILog.Error("CellVerticalAlignment get error!");
425 case "top": return Tizen.NUI.VerticalAlignmentType.Top;
426 case "center": return Tizen.NUI.VerticalAlignmentType.Center;
427 case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
428 default: return Tizen.NUI.VerticalAlignmentType.Top;
433 /// "Please DO NOT use! This will be deprecated! Please use 'View Weight' instead of BindableProperty"
434 /// This needs to be hidden as inhouse API until all applications using it have been updated. Do not make public.
436 [EditorBrowsable(EditorBrowsableState.Never)]
437 public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
439 var view = (View)bindable;
440 if (newValue != null)
442 view.Weight = (float)newValue;
446 defaultValueCreator: (bindable) =>
448 var view = (View)bindable;
452 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
453 [EditorBrowsable(EditorBrowsableState.Never)]
454 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
456 var view = (View)bindable;
457 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
458 else { view.LeftFocusableViewId = -1; }
460 defaultValueCreator: (bindable) =>
462 var view = (View)bindable;
463 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
466 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
467 [EditorBrowsable(EditorBrowsableState.Never)]
468 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
470 var view = (View)bindable;
471 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
472 else { view.RightFocusableViewId = -1; }
474 defaultValueCreator: (bindable) =>
476 var view = (View)bindable;
477 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
480 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
481 [EditorBrowsable(EditorBrowsableState.Never)]
482 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
484 var view = (View)bindable;
485 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
486 else { view.UpFocusableViewId = -1; }
488 defaultValueCreator: (bindable) =>
490 var view = (View)bindable;
491 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
494 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
495 [EditorBrowsable(EditorBrowsableState.Never)]
496 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
498 var view = (View)bindable;
499 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
500 else { view.DownFocusableViewId = -1; }
502 defaultValueCreator: (bindable) =>
504 var view = (View)bindable;
505 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
508 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
509 [EditorBrowsable(EditorBrowsableState.Never)]
510 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
512 var view = (View)bindable;
513 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
515 defaultValueCreator: (bindable) =>
517 var view = (View)bindable;
518 return view.IsKeyboardFocusable();
520 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
521 [EditorBrowsable(EditorBrowsableState.Never)]
522 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
524 var view = (View)bindable;
525 if (newValue != null)
527 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size((Size2D)newValue)));
530 defaultValueCreator: (bindable) =>
532 var view = (View)bindable;
533 Size temp = new Size(0.0f, 0.0f, 0.0f);
534 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
535 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
538 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
539 [EditorBrowsable(EditorBrowsableState.Never)]
540 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
542 var view = (View)bindable;
543 if (newValue != null)
545 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
548 defaultValueCreator: (bindable) =>
550 var view = (View)bindable;
552 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
555 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
556 [EditorBrowsable(EditorBrowsableState.Never)]
557 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
559 var view = (View)bindable;
560 if (newValue != null)
562 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
565 defaultValueCreator: (bindable) =>
567 var view = (View)bindable;
568 Position temp = new Position(0.0f, 0.0f, 0.0f);
569 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
570 return new Position2D(temp);
572 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
573 [EditorBrowsable(EditorBrowsableState.Never)]
574 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
576 var view = (View)bindable;
577 if (newValue != null)
579 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
582 defaultValueCreator: (bindable) =>
584 var view = (View)bindable;
586 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
589 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
590 [EditorBrowsable(EditorBrowsableState.Never)]
591 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
593 var view = (View)bindable;
595 if (newValue != null)
597 value = (int)newValue;
600 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
603 var siblings = view.GetParent()?.Children;
604 if (siblings != null)
606 int currentOrder = siblings.IndexOf(view);
607 if (value != currentOrder)
609 if (value == 0) { view.LowerToBottom(); }
610 else if (value < siblings.Count - 1)
612 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
613 else { view.LowerBelow(siblings[value]); }
615 else { view.RaiseToTop(); }
620 defaultValueCreator: (bindable) =>
622 var view = (View)bindable;
623 var parentChildren = view.GetParent()?.Children;
624 int currentOrder = 0;
625 if (parentChildren != null)
627 currentOrder = parentChildren.IndexOf(view);
629 if (currentOrder < 0) { return 0; }
630 else if (currentOrder < parentChildren.Count) { return currentOrder; }
635 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
636 [EditorBrowsable(EditorBrowsableState.Never)]
637 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
639 var view = (View)bindable;
640 if (newValue != null)
642 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
645 defaultValueCreator: (bindable) =>
647 var view = (View)bindable;
648 Position temp = new Position(0.0f, 0.0f, 0.0f);
649 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
653 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
654 [EditorBrowsable(EditorBrowsableState.Never)]
655 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
657 var view = (View)bindable;
658 if (newValue != null)
660 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
663 defaultValueCreator: (bindable) =>
665 var view = (View)bindable;
666 Position temp = new Position(0.0f, 0.0f, 0.0f);
667 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
670 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
671 [EditorBrowsable(EditorBrowsableState.Never)]
672 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
674 var view = (View)bindable;
675 if (newValue != null)
677 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
680 defaultValueCreator: (bindable) =>
682 var view = (View)bindable;
684 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
687 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
688 [EditorBrowsable(EditorBrowsableState.Never)]
689 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
691 var view = (View)bindable;
692 if (newValue != null)
694 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
697 defaultValueCreator: (bindable) =>
699 var view = (View)bindable;
701 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
704 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
705 [EditorBrowsable(EditorBrowsableState.Never)]
706 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
708 var view = (View)bindable;
709 if (newValue != null)
711 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
714 defaultValueCreator: (bindable) =>
716 var view = (View)bindable;
717 Position temp = new Position(0.0f, 0.0f, 0.0f);
718 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
721 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
722 [EditorBrowsable(EditorBrowsableState.Never)]
723 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
725 var view = (View)bindable;
726 if (newValue != null)
728 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
731 defaultValueCreator: (bindable) =>
733 var view = (View)bindable;
735 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
738 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
739 [EditorBrowsable(EditorBrowsableState.Never)]
740 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
742 var view = (View)bindable;
743 if (newValue != null)
745 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
748 defaultValueCreator: (bindable) =>
750 var view = (View)bindable;
752 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
755 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
756 [EditorBrowsable(EditorBrowsableState.Never)]
757 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
759 var view = (View)bindable;
760 if (newValue != null)
762 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
765 defaultValueCreator: (bindable) =>
767 var view = (View)bindable;
769 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
772 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
773 [EditorBrowsable(EditorBrowsableState.Never)]
774 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
776 var view = (View)bindable;
777 if (newValue != null)
779 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
782 defaultValueCreator: (bindable) =>
784 var view = (View)bindable;
785 Rotation temp = new Rotation();
786 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
789 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
790 [EditorBrowsable(EditorBrowsableState.Never)]
791 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
793 var view = (View)bindable;
794 if (newValue != null)
796 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
799 defaultValueCreator: (bindable) =>
801 var view = (View)bindable;
802 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
803 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
806 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
807 [EditorBrowsable(EditorBrowsableState.Never)]
808 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
810 var view = (View)bindable;
811 if (newValue != null)
813 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
816 defaultValueCreator: (bindable) =>
818 var view = (View)bindable;
820 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
823 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
824 [EditorBrowsable(EditorBrowsableState.Never)]
825 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
827 var view = (View)bindable;
828 if (newValue != null)
830 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
833 defaultValueCreator: (bindable) =>
835 var view = (View)bindable;
837 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
840 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
841 [EditorBrowsable(EditorBrowsableState.Never)]
842 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
844 var view = (View)bindable;
845 if (newValue != null)
847 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
850 defaultValueCreator: (bindable) =>
852 var view = (View)bindable;
854 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
857 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
858 [EditorBrowsable(EditorBrowsableState.Never)]
859 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
861 var view = (View)bindable;
862 if (newValue != null)
864 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
867 defaultValueCreator: (bindable) =>
869 var view = (View)bindable;
871 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
874 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
875 [EditorBrowsable(EditorBrowsableState.Never)]
876 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
878 var view = (View)bindable;
879 if (newValue != null)
881 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
884 defaultValueCreator: (bindable) =>
886 var view = (View)bindable;
888 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
891 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
892 [EditorBrowsable(EditorBrowsableState.Never)]
893 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
895 var view = (View)bindable;
896 if (newValue != null)
898 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
901 defaultValueCreator: (bindable) =>
903 var view = (View)bindable;
905 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
908 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
909 [EditorBrowsable(EditorBrowsableState.Never)]
910 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
912 var view = (View)bindable;
913 if (newValue != null)
915 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
918 defaultValueCreator: (bindable) =>
920 var view = (View)bindable;
922 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
925 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
926 [EditorBrowsable(EditorBrowsableState.Never)]
927 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
929 var view = (View)bindable;
930 if (newValue != null)
932 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
935 defaultValueCreator: (bindable) =>
937 var view = (View)bindable;
939 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
942 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
943 [EditorBrowsable(EditorBrowsableState.Never)]
944 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
946 var view = (View)bindable;
947 if (newValue != null)
949 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
952 defaultValueCreator: (bindable) =>
954 var view = (View)bindable;
956 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
958 NUILog.Error("DrawMode get error!");
962 case "NORMAL": return DrawModeType.Normal;
963 case "OVERLAY_2D": return DrawModeType.Overlay2D;
964 #pragma warning disable CS0618 // Disable deprecated warning as we do need to use the deprecated API here.
965 case "STENCIL": return DrawModeType.Stencil;
966 #pragma warning restore CS0618
967 default: return DrawModeType.Normal;
970 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
971 [EditorBrowsable(EditorBrowsableState.Never)]
972 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
974 var view = (View)bindable;
975 if (newValue != null)
977 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
980 defaultValueCreator: (bindable) =>
982 var view = (View)bindable;
983 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
984 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
987 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
988 [EditorBrowsable(EditorBrowsableState.Never)]
989 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
991 var view = (View)bindable;
992 if (newValue != null)
994 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
997 defaultValueCreator: (bindable) =>
999 var view = (View)bindable;
1001 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
1003 NUILog.Error("WidthResizePolicy get error!");
1007 case "FIXED": return ResizePolicyType.Fixed;
1008 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1009 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1010 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1011 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1012 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1013 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1014 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1015 default: return ResizePolicyType.Fixed;
1018 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1019 [EditorBrowsable(EditorBrowsableState.Never)]
1020 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
1022 var view = (View)bindable;
1023 if (newValue != null)
1025 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
1028 defaultValueCreator: (bindable) =>
1030 var view = (View)bindable;
1032 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
1034 NUILog.Error("HeightResizePolicy get error!");
1038 case "FIXED": return ResizePolicyType.Fixed;
1039 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1040 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1041 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1042 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1043 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1044 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1045 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1046 default: return ResizePolicyType.Fixed;
1049 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1050 [EditorBrowsable(EditorBrowsableState.Never)]
1051 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1053 var view = (View)bindable;
1054 string valueToString = "";
1055 if (newValue != null)
1057 switch ((SizeScalePolicyType)newValue)
1059 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1060 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1061 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1062 default: { valueToString = "USE_SIZE_SET"; break; }
1064 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1067 defaultValueCreator: (bindable) =>
1069 var view = (View)bindable;
1071 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1073 NUILog.Error("SizeScalePolicy get error!");
1077 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1078 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1079 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1080 default: return SizeScalePolicyType.UseSizeSet;
1083 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1084 [EditorBrowsable(EditorBrowsableState.Never)]
1085 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1087 var view = (View)bindable;
1088 if (newValue != null)
1090 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1093 defaultValueCreator: (bindable) =>
1095 var view = (View)bindable;
1097 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1100 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1101 [EditorBrowsable(EditorBrowsableState.Never)]
1102 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1104 var view = (View)bindable;
1105 if (newValue != null)
1107 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1110 defaultValueCreator: (bindable) =>
1112 var view = (View)bindable;
1114 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1117 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1118 [EditorBrowsable(EditorBrowsableState.Never)]
1119 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1121 var view = (View)bindable;
1122 if (newValue != null)
1124 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1127 defaultValueCreator: (bindable) =>
1129 var view = (View)bindable;
1130 Extents temp = new Extents(0, 0, 0, 0);
1131 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1134 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1135 [EditorBrowsable(EditorBrowsableState.Never)]
1136 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1138 var view = (View)bindable;
1139 if (newValue != null)
1141 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1144 defaultValueCreator: (bindable) =>
1146 var view = (View)bindable;
1147 Size temp = new Size(0, 0, 0);
1148 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1151 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1152 [EditorBrowsable(EditorBrowsableState.Never)]
1153 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1155 var view = (View)bindable;
1156 if (newValue != null)
1158 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1161 defaultValueCreator: (bindable) =>
1163 var view = (View)bindable;
1164 Size2D temp = new Size2D(0, 0);
1165 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1168 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1169 [EditorBrowsable(EditorBrowsableState.Never)]
1170 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1172 var view = (View)bindable;
1173 if (newValue != null)
1175 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1178 defaultValueCreator: (bindable) =>
1180 var view = (View)bindable;
1181 Size2D temp = new Size2D(0, 0);
1182 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1185 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1186 [EditorBrowsable(EditorBrowsableState.Never)]
1187 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1189 var view = (View)bindable;
1190 if (newValue != null)
1192 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1195 defaultValueCreator: (bindable) =>
1197 var view = (View)bindable;
1199 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1202 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1203 [EditorBrowsable(EditorBrowsableState.Never)]
1204 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1206 var view = (View)bindable;
1207 if (newValue != null)
1209 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1212 defaultValueCreator: (bindable) =>
1214 var view = (View)bindable;
1216 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1218 NUILog.Error("ClippingMode get error!");
1220 return (ClippingModeType)temp;
1222 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1223 [EditorBrowsable(EditorBrowsableState.Never)]
1224 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1226 var view = (View)bindable;
1227 if (newValue != null)
1229 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1232 defaultValueCreator: (bindable) =>
1234 var view = (View)bindable;
1236 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1239 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1240 [EditorBrowsable(EditorBrowsableState.Never)]
1241 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1243 var view = (View)bindable;
1244 if (newValue != null)
1246 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1249 defaultValueCreator: (bindable) =>
1251 var view = (View)bindable;
1253 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1255 NUILog.Error("LAYOUT_DIRECTION get error!");
1257 return (ViewLayoutDirectionType)temp;
1259 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1260 [EditorBrowsable(EditorBrowsableState.Never)]
1261 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1263 var view = (View)bindable;
1264 if (newValue != null)
1266 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1269 defaultValueCreator: (bindable) =>
1271 var view = (View)bindable;
1272 Extents temp = new Extents(0, 0, 0, 0);
1273 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1276 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1277 [EditorBrowsable(EditorBrowsableState.Never)]
1278 public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style), propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1281 /// Flag to indicate if layout set explicitly via API call or View was automatically given a Layout.
1283 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1284 [EditorBrowsable(EditorBrowsableState.Never)]
1285 public bool layoutSet = false;
1288 /// Flag to allow Layouting to be disabled for Views.
1289 /// Once a View has a Layout set then any children added to Views from then on will receive
1290 /// automatic Layouts.
1292 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1293 [EditorBrowsable(EditorBrowsableState.Never)]
1294 public static bool layoutingDisabled{get; set;} = true;
1296 internal readonly MergedStyle _mergedStyle;
1297 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1298 private LayoutItem _layout; // Exclusive layout assigned to this View.
1299 private int _widthPolicy = LayoutParamPolicies.WrapContent; // Layout width policy
1300 private int _heightPolicy = LayoutParamPolicies.WrapContent; // Layout height policy
1301 private float _weight = 0.0f; // Weighting of child View in a Layout
1302 private MeasureSpecification _measureSpecificationWidth; // Layout width and internal Mode
1303 private MeasureSpecification _measureSpecificationHeight; // Layout height and internal Mode
1304 private bool _backgroundImageSynchronosLoading = false;
1305 private EventHandler _offWindowEventHandler;
1306 private OffWindowEventCallbackType _offWindowEventCallback;
1307 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1308 private WheelEventCallbackType _wheelEventCallback;
1309 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1310 private KeyCallbackType _keyCallback;
1311 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1312 private TouchDataCallbackType _touchDataCallback;
1313 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1314 private HoverEventCallbackType _hoverEventCallback;
1315 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
1316 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
1317 private EventHandler _keyInputFocusGainedEventHandler;
1318 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1319 private EventHandler _keyInputFocusLostEventHandler;
1320 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1321 private EventHandler _onRelayoutEventHandler;
1322 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1323 private EventHandler _onWindowEventHandler;
1324 private OnWindowEventCallbackType _onWindowEventCallback;
1325 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
1326 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
1327 // Resource Ready Signal
1328 private EventHandler _resourcesLoadedEventHandler;
1329 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
1330 private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
1331 private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
1333 private OnWindowEventCallbackType _onWindowSendEventCallback;
1335 private void SendViewAddedEventToWindow(IntPtr data)
1337 Window.Instance?.SendViewAdded(this);
1341 /// Creates a new instance of a view.
1343 /// <since_tizen> 3 </since_tizen>
1344 public View() : this(Interop.View.View_New(), true)
1346 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1348 internal View(View uiControl) : this(Interop.View.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1350 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1353 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.View.View_SWIGUpcast(cPtr), cMemoryOwn)
1355 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1358 PositionUsesPivotPoint = false;
1360 _mergedStyle = new MergedStyle(GetType(), this);
1362 _onWindowSendEventCallback = SendViewAddedEventToWindow;
1363 this.OnWindowSignal().Connect(_onWindowSendEventCallback);
1366 internal View(ViewImpl implementation) : this(Interop.View.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1368 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1371 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1372 private delegate void OffWindowEventCallbackType(IntPtr control);
1373 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1374 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1375 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1376 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1377 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1378 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1379 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1380 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1381 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1382 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
1383 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1384 private delegate void ResourcesLoadedCallbackType(IntPtr control);
1385 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1386 private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
1387 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1388 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1389 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1390 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1391 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1392 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1393 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1394 private delegate void OnWindowEventCallbackType(IntPtr control);
1395 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1396 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
1399 /// Event when a child is removed.
1401 /// <since_tizen> 5 </since_tizen>
1402 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1404 /// Event when a child is added.
1406 /// <since_tizen> 5 </since_tizen>
1407 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1410 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1411 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1413 /// <since_tizen> 3 </since_tizen>
1414 public event EventHandler FocusGained
1418 if (_keyInputFocusGainedEventHandler == null)
1420 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1421 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1424 _keyInputFocusGainedEventHandler += value;
1429 _keyInputFocusGainedEventHandler -= value;
1431 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1433 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1439 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1440 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1442 /// <since_tizen> 3 </since_tizen>
1443 public event EventHandler FocusLost
1447 if (_keyInputFocusLostEventHandler == null)
1449 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1450 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1453 _keyInputFocusLostEventHandler += value;
1458 _keyInputFocusLostEventHandler -= value;
1460 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1462 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1468 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1469 /// The KeyPressed signal is emitted when the key event is received.<br />
1471 /// <since_tizen> 3 </since_tizen>
1472 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1476 if (_keyEventHandler == null)
1478 _keyCallback = OnKeyEvent;
1479 this.KeyEventSignal().Connect(_keyCallback);
1482 _keyEventHandler += value;
1487 _keyEventHandler -= value;
1489 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1491 this.KeyEventSignal().Disconnect(_keyCallback);
1497 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1498 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1500 /// <since_tizen> 3 </since_tizen>
1501 public event EventHandler Relayout
1505 if (_onRelayoutEventHandler == null)
1507 _onRelayoutEventCallback = OnRelayout;
1508 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1511 _onRelayoutEventHandler += value;
1516 _onRelayoutEventHandler -= value;
1518 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1520 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1527 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1528 /// The touched signal is emitted when the touch input is received.<br />
1530 /// <since_tizen> 3 </since_tizen>
1531 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1535 if (_touchDataEventHandler == null)
1537 _touchDataCallback = OnTouch;
1538 this.TouchSignal().Connect(_touchDataCallback);
1541 _touchDataEventHandler += value;
1546 _touchDataEventHandler -= value;
1548 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1550 this.TouchSignal().Disconnect(_touchDataCallback);
1557 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1558 /// The hovered signal is emitted when the hover input is received.<br />
1560 /// <since_tizen> 3 </since_tizen>
1561 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1565 if (_hoverEventHandler == null)
1567 _hoverEventCallback = OnHoverEvent;
1568 this.HoveredSignal().Connect(_hoverEventCallback);
1571 _hoverEventHandler += value;
1576 _hoverEventHandler -= value;
1578 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1580 this.HoveredSignal().Disconnect(_hoverEventCallback);
1587 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1588 /// The WheelMoved signal is emitted when the wheel event is received.<br />
1590 /// <since_tizen> 3 </since_tizen>
1591 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1595 if (_wheelEventHandler == null)
1597 _wheelEventCallback = OnWheelEvent;
1598 this.WheelEventSignal().Connect(_wheelEventCallback);
1601 _wheelEventHandler += value;
1606 _wheelEventHandler -= value;
1608 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
1610 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1617 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
1618 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
1620 /// <since_tizen> 3 </since_tizen>
1621 public event EventHandler AddedToWindow
1625 if (_onWindowEventHandler == null)
1627 _onWindowEventCallback = OnWindow;
1628 this.OnWindowSignal().Connect(_onWindowEventCallback);
1631 _onWindowEventHandler += value;
1636 _onWindowEventHandler -= value;
1638 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
1640 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1646 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
1647 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
1649 /// <since_tizen> 3 </since_tizen>
1650 public event EventHandler RemovedFromWindow
1654 if (_offWindowEventHandler == null)
1656 _offWindowEventCallback = OffWindow;
1657 this.OffWindowSignal().Connect(_offWindowEventCallback);
1660 _offWindowEventHandler += value;
1665 _offWindowEventHandler -= value;
1667 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
1669 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1675 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
1676 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
1678 /// <since_tizen> 3 </since_tizen>
1679 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
1683 if (_visibilityChangedEventHandler == null)
1685 _visibilityChangedEventCallback = OnVisibilityChanged;
1686 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
1689 _visibilityChangedEventHandler += value;
1694 _visibilityChangedEventHandler -= value;
1696 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
1698 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
1704 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
1705 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
1707 /// <since_tizen> 4 </since_tizen>
1708 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
1712 if (_layoutDirectionChangedEventHandler == null)
1714 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
1715 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
1718 _layoutDirectionChangedEventHandler += value;
1723 _layoutDirectionChangedEventHandler -= value;
1725 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
1727 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
1733 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1734 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1736 /// <since_tizen> 3 </since_tizen>
1737 public event EventHandler ResourcesLoaded
1741 if (_resourcesLoadedEventHandler == null)
1743 _ResourcesLoadedCallback = OnResourcesLoaded;
1744 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1747 _resourcesLoadedEventHandler += value;
1752 _resourcesLoadedEventHandler -= value;
1754 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1756 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1761 internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
1765 if (_backgroundResourceLoadedEventHandler == null)
1767 _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
1768 this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
1771 _backgroundResourceLoadedEventHandler += value;
1775 _backgroundResourceLoadedEventHandler -= value;
1777 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1779 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1785 /// Enumeration for describing the states of the view.
1787 /// <since_tizen> 3 </since_tizen>
1791 /// The normal state.
1795 /// The focused state.
1799 /// The disabled state.
1805 /// Describes the direction to move the focus towards.
1807 /// <since_tizen> 3 </since_tizen>
1808 public enum FocusDirection
1811 /// Move keyboard focus towards the left direction.
1813 /// <since_tizen> 3 </since_tizen>
1816 /// Move keyboard focus towards the right direction.
1818 /// <since_tizen> 3 </since_tizen>
1821 /// Move keyboard focus towards the up direction.
1823 /// <since_tizen> 3 </since_tizen>
1826 /// Move keyboard focus towards the down direction.
1828 /// <since_tizen> 3 </since_tizen>
1831 /// Move keyboard focus towards the previous page direction.
1833 /// <since_tizen> 3 </since_tizen>
1836 /// Move keyboard focus towards the next page direction.
1838 /// <since_tizen> 3 </since_tizen>
1842 internal enum PropertyRange
1844 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1845 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1846 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1849 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1850 [EditorBrowsable(EditorBrowsableState.Never)]
1851 public bool IsResourcesCreated
1855 return Application.Current.IsResourcesCreated;
1859 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1860 [EditorBrowsable(EditorBrowsableState.Never)]
1861 public ResourceDictionary XamlResources
1865 return Application.Current.XamlResources;
1869 Application.Current.XamlResources = value;
1874 /// The StyleName, type string.
1876 /// <since_tizen> 3 </since_tizen>
1877 public string StyleName
1881 return (string)GetValue(StyleNameProperty);
1885 SetValue(StyleNameProperty, value);
1886 NotifyPropertyChanged();
1891 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1893 /// <since_tizen> 3 </since_tizen>
1894 public Color BackgroundColor
1898 return (Color)GetValue(BackgroundColorProperty);
1902 SetValue(BackgroundColorProperty, value);
1903 NotifyPropertyChanged();
1908 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1910 /// <since_tizen> 3 </since_tizen>
1911 public string BackgroundImage
1915 return (string)GetValue(BackgroundImageProperty);
1919 SetValue(BackgroundImageProperty, value);
1920 NotifyPropertyChanged();
1925 /// The background of view.
1927 /// <since_tizen> 3 </since_tizen>
1928 public Tizen.NUI.PropertyMap Background
1932 return (PropertyMap)GetValue(BackgroundProperty);
1936 SetValue(BackgroundProperty, value);
1937 NotifyPropertyChanged();
1943 /// The current state of the view.
1945 /// <since_tizen> 3 </since_tizen>
1950 return (States)GetValue(StateProperty);
1954 SetValue(StateProperty, value);
1955 NotifyPropertyChanged();
1960 /// The current sub state of the view.
1962 /// <since_tizen> 3 </since_tizen>
1963 public States SubState
1967 return (States)GetValue(SubStateProperty);
1971 SetValue(SubStateProperty, value);
1972 NotifyPropertyChanged();
1977 /// Displays a tooltip
1979 /// <since_tizen> 3 </since_tizen>
1980 public Tizen.NUI.PropertyMap Tooltip
1984 return (PropertyMap)GetValue(TooltipProperty);
1988 SetValue(TooltipProperty, value);
1989 NotifyPropertyChanged();
1994 /// Displays a tooltip as a text.
1996 /// <since_tizen> 3 </since_tizen>
1997 public string TooltipText
2001 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
2002 NotifyPropertyChanged();
2007 /// The Child property of FlexContainer.<br />
2008 /// The proportion of the free space in the container, the flex item will receive.<br />
2009 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
2011 /// <since_tizen> 3 </since_tizen>
2016 return (float)GetValue(FlexProperty);
2020 SetValue(FlexProperty, value);
2021 NotifyPropertyChanged();
2026 /// The Child property of FlexContainer.<br />
2027 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
2029 /// <since_tizen> 3 </since_tizen>
2030 public int AlignSelf
2034 return (int)GetValue(AlignSelfProperty);
2038 SetValue(AlignSelfProperty, value);
2039 NotifyPropertyChanged();
2044 /// The Child property of FlexContainer.<br />
2045 /// The space around the flex item.<br />
2047 /// <since_tizen> 3 </since_tizen>
2048 public Vector4 FlexMargin
2052 return (Vector4)GetValue(FlexMarginProperty);
2056 SetValue(FlexMarginProperty, value);
2057 NotifyPropertyChanged();
2062 /// The top-left cell this child occupies, if not set, the first available cell is used.
2064 /// <since_tizen> 3 </since_tizen>
2065 public Vector2 CellIndex
2069 return (Vector2)GetValue(CellIndexProperty);
2073 SetValue(CellIndexProperty, value);
2074 NotifyPropertyChanged();
2079 /// The number of rows this child occupies, if not set, the default value is 1.
2081 /// <since_tizen> 3 </since_tizen>
2082 public float RowSpan
2086 return (float)GetValue(RowSpanProperty);
2090 SetValue(RowSpanProperty, value);
2091 NotifyPropertyChanged();
2096 /// The number of columns this child occupies, if not set, the default value is 1.
2098 /// <since_tizen> 3 </since_tizen>
2099 public float ColumnSpan
2103 return (float)GetValue(ColumnSpanProperty);
2107 SetValue(ColumnSpanProperty, value);
2108 NotifyPropertyChanged();
2113 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
2115 /// <since_tizen> 3 </since_tizen>
2116 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
2120 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
2124 SetValue(CellHorizontalAlignmentProperty, value);
2125 NotifyPropertyChanged();
2130 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
2132 /// <since_tizen> 3 </since_tizen>
2133 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
2137 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
2141 SetValue(CellVerticalAlignmentProperty, value);
2142 NotifyPropertyChanged();
2147 /// The left focusable view.<br />
2148 /// This will return null if not set.<br />
2149 /// This will also return null if the specified left focusable view is not on a window.<br />
2151 /// <since_tizen> 3 </since_tizen>
2152 public View LeftFocusableView
2154 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2157 return (View)GetValue(LeftFocusableViewProperty);
2161 SetValue(LeftFocusableViewProperty, value);
2162 NotifyPropertyChanged();
2167 /// The right focusable view.<br />
2168 /// This will return null if not set.<br />
2169 /// This will also return null if the specified right focusable view is not on a window.<br />
2171 /// <since_tizen> 3 </since_tizen>
2172 public View RightFocusableView
2174 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2177 return (View)GetValue(RightFocusableViewProperty);
2181 SetValue(RightFocusableViewProperty, value);
2182 NotifyPropertyChanged();
2187 /// The up focusable view.<br />
2188 /// This will return null if not set.<br />
2189 /// This will also return null if the specified up focusable view is not on a window.<br />
2191 /// <since_tizen> 3 </since_tizen>
2192 public View UpFocusableView
2194 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2197 return (View)GetValue(UpFocusableViewProperty);
2201 SetValue(UpFocusableViewProperty, value);
2202 NotifyPropertyChanged();
2207 /// The down focusable view.<br />
2208 /// This will return null if not set.<br />
2209 /// This will also return null if the specified down focusable view is not on a window.<br />
2211 /// <since_tizen> 3 </since_tizen>
2212 public View DownFocusableView
2214 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2217 return (View)GetValue(DownFocusableViewProperty);
2221 SetValue(DownFocusableViewProperty, value);
2222 NotifyPropertyChanged();
2227 /// Whether the view should be focusable by keyboard navigation.
2229 /// <since_tizen> 3 </since_tizen>
2230 public bool Focusable
2234 SetValue(FocusableProperty, value);
2235 NotifyPropertyChanged();
2239 return (bool)GetValue(FocusableProperty);
2244 /// Retrieves the position of the view.<br />
2245 /// The coordinates are relative to the view's parent.<br />
2247 /// <since_tizen> 3 </since_tizen>
2248 public Position CurrentPosition
2252 return GetCurrentPosition();
2257 /// Sets the size of a view for the width and the height.<br />
2258 /// Geometry can be scaled to fit within this area.<br />
2259 /// This does not interfere with the view's scale factor.<br />
2260 /// The views default depth is the minimum of width and height.<br />
2263 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
2264 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
2265 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
2266 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2267 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2268 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2269 /// 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 />
2271 /// <since_tizen> 3 </since_tizen>
2272 public Size2D Size2D
2276 Size2D temp = (Size2D)GetValue(Size2DProperty);
2277 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
2281 SetValue(Size2DProperty, value);
2282 // Set Specification so when layouts measure this View it matches the value set here.
2283 // All Views are currently Layouts.
2284 MeasureSpecificationWidth = new MeasureSpecification(new LayoutLength(value.Width), MeasureSpecification.ModeType.Exactly);
2285 MeasureSpecificationHeight = new MeasureSpecification(new LayoutLength(value.Height), MeasureSpecification.ModeType.Exactly);
2286 NotifyPropertyChanged();
2291 /// Retrieves the size of the view.<br />
2292 /// The coordinates are relative to the view's parent.<br />
2294 /// <since_tizen> 3 </since_tizen>
2295 public Size2D CurrentSize
2299 return GetCurrentSize();
2304 /// Retrieves and sets the view's opacity.<br />
2306 /// <since_tizen> 3 </since_tizen>
2307 public float Opacity
2311 return (float)GetValue(OpacityProperty);
2315 SetValue(OpacityProperty, value);
2316 NotifyPropertyChanged();
2321 /// Sets the position of the view for X and Y.<br />
2322 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2323 /// If the position inheritance is disabled, sets the world position.<br />
2326 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
2327 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
2328 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
2329 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2330 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2331 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2333 /// <since_tizen> 3 </since_tizen>
2334 public Position2D Position2D
2338 Position2D temp = (Position2D)GetValue(Position2DProperty);
2339 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
2343 SetValue(Position2DProperty, value);
2344 NotifyPropertyChanged();
2349 /// Retrieves the screen postion of the view.<br />
2351 /// <since_tizen> 3 </since_tizen>
2352 public Vector2 ScreenPosition
2356 Vector2 temp = new Vector2(0.0f, 0.0f);
2357 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2363 /// Determines whether the pivot point should be used to determine the position of the view.
2364 /// This is true by default.
2366 /// <remarks>If false, then the top-left of the view is used for the position.
2367 /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
2369 /// <since_tizen> 3 </since_tizen>
2370 public bool PositionUsesPivotPoint
2374 return (bool)GetValue(PositionUsesPivotPointProperty);
2378 SetValue(PositionUsesPivotPointProperty, value);
2379 NotifyPropertyChanged();
2384 /// Please do not use! this will be deprecated.
2386 /// Please do not use! this will be deprecated!
2387 /// Instead please use PositionUsesPivotPoint.
2388 /// <since_tizen> 3 </since_tizen>
2389 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2391 "View view = new View(); " +
2392 "view.PivotPoint = PivotPoint.Center; " +
2393 "view.PositionUsesPivotPoint = true;")]
2394 [EditorBrowsable(EditorBrowsableState.Never)]
2395 public bool PositionUsesAnchorPoint
2400 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2405 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2406 NotifyPropertyChanged();
2411 /// Queries whether the view is connected to the stage.<br />
2412 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2414 /// <since_tizen> 3 </since_tizen>
2415 public bool IsOnWindow
2424 /// Gets the depth in the hierarchy for the view.
2426 /// <since_tizen> 3 </since_tizen>
2427 public int HierarchyDepth
2431 return GetHierarchyDepth();
2436 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2439 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
2440 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2441 /// The values set by this property will likely change.
2443 /// <since_tizen> 3 </since_tizen>
2444 public int SiblingOrder
2448 return (int)GetValue(SiblingOrderProperty);
2452 SetValue(SiblingOrderProperty, value);
2453 NotifyPropertyChanged();
2458 /// Returns the natural size of the view.
2461 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2463 /// <since_tizen> 5 </since_tizen>
2464 public Vector3 NaturalSize
2468 Vector3 ret = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
2469 if (NDalicPINVOKE.SWIGPendingException.Pending)
2470 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2476 /// Returns the natural size (Size2D) of the view.
2479 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2481 /// <since_tizen> 4 </since_tizen>
2482 public Size2D NaturalSize2D
2486 Vector3 temp = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
2487 if (NDalicPINVOKE.SWIGPendingException.Pending)
2488 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2490 return new Size2D((int)temp.Width, (int)temp.Height);
2495 /// Gets or sets the origin of a view within its parent's area.<br />
2496 /// 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 />
2497 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
2498 /// A view's position is the distance between this origin and the view's anchor-point.<br />
2500 /// <pre>The view has been initialized.</pre>
2501 /// <since_tizen> 3 </since_tizen>
2502 public Position ParentOrigin
2506 return (Position)GetValue(ParentOriginProperty);
2510 SetValue(ParentOriginProperty, value);
2511 NotifyPropertyChanged();
2516 /// Gets or sets the anchor-point of a view.<br />
2517 /// 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 />
2518 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
2519 /// A view position is the distance between its parent-origin and this anchor-point.<br />
2520 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
2521 /// <pre>The view has been initialized.</pre>
2523 /// <since_tizen> 3 </since_tizen>
2524 public Position PivotPoint
2528 return (Position)GetValue(PivotPointProperty);
2532 SetValue(PivotPointProperty, value);
2533 NotifyPropertyChanged();
2538 /// Gets or sets the size width of the view.
2540 /// <since_tizen> 3 </since_tizen>
2541 public float SizeWidth
2545 return (float)GetValue(SizeWidthProperty);
2549 SetValue(SizeWidthProperty, value);
2550 WidthSpecification = (int)Math.Ceiling(value);
2551 NotifyPropertyChanged();
2556 /// Gets or sets the size height of the view.
2558 /// <since_tizen> 3 </since_tizen>
2559 public float SizeHeight
2563 return (float)GetValue(SizeHeightProperty);
2567 SetValue(SizeHeightProperty, value);
2568 HeightSpecification = (int)Math.Ceiling(value);
2569 NotifyPropertyChanged();
2574 /// Gets or sets the position of the view.<br />
2575 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
2576 /// If the position inheritance is disabled, sets the world position.<br />
2578 /// <since_tizen> 3 </since_tizen>
2579 public Position Position
2583 return (Position)GetValue(PositionProperty);
2587 SetValue(PositionProperty, value);
2588 NotifyPropertyChanged();
2593 /// Gets or sets the position X of the view.
2595 /// <since_tizen> 3 </since_tizen>
2596 public float PositionX
2600 return (float)GetValue(PositionXProperty);
2604 SetValue(PositionXProperty, value);
2605 NotifyPropertyChanged();
2610 /// Gets or sets the position Y of the view.
2612 /// <since_tizen> 3 </since_tizen>
2613 public float PositionY
2617 return (float)GetValue(PositionYProperty);
2621 SetValue(PositionYProperty, value);
2622 NotifyPropertyChanged();
2627 /// Gets or sets the position Z of the view.
2629 /// <since_tizen> 3 </since_tizen>
2630 public float PositionZ
2634 return (float)GetValue(PositionZProperty);
2638 SetValue(PositionZProperty, value);
2639 NotifyPropertyChanged();
2644 /// Gets or sets the world position of the view.
2646 /// <since_tizen> 3 </since_tizen>
2647 public Vector3 WorldPosition
2651 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2652 GetProperty(View.Property.WORLD_POSITION).Get(temp);
2658 /// Gets or sets the orientation of the view.<br />
2659 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
2661 /// <remarks>This is an asynchronous method.</remarks>
2662 /// <since_tizen> 3 </since_tizen>
2663 public Rotation Orientation
2667 return (Rotation)GetValue(OrientationProperty);
2671 SetValue(OrientationProperty, value);
2672 NotifyPropertyChanged();
2677 /// Gets or sets the world orientation of the view.<br />
2679 /// <since_tizen> 3 </since_tizen>
2680 public Rotation WorldOrientation
2684 Rotation temp = new Rotation();
2685 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
2691 /// Gets or sets the scale factor applied to the view.<br />
2693 /// <since_tizen> 3 </since_tizen>
2694 public Vector3 Scale
2698 return (Vector3)GetValue(ScaleProperty);
2702 SetValue(ScaleProperty, value);
2703 NotifyPropertyChanged();
2708 /// Gets or sets the scale X factor applied to the view.
2710 /// <since_tizen> 3 </since_tizen>
2715 return (float)GetValue(ScaleXProperty);
2719 SetValue(ScaleXProperty, value);
2720 NotifyPropertyChanged();
2725 /// Gets or sets the scale Y factor applied to the view.
2727 /// <since_tizen> 3 </since_tizen>
2732 return (float)GetValue(ScaleYProperty);
2736 SetValue(ScaleYProperty, value);
2737 NotifyPropertyChanged();
2742 /// Gets or sets the scale Z factor applied to the view.
2744 /// <since_tizen> 3 </since_tizen>
2749 return (float)GetValue(ScaleZProperty);
2753 SetValue(ScaleZProperty, value);
2754 NotifyPropertyChanged();
2759 /// Gets the world scale of the view.
2761 /// <since_tizen> 3 </since_tizen>
2762 public Vector3 WorldScale
2766 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2767 GetProperty(View.Property.WORLD_SCALE).Get(temp);
2773 /// Retrieves the visibility flag of the view.
2776 /// If the view is not visible, then the view and its children will not be rendered.
2777 /// 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.
2779 /// <since_tizen> 3 </since_tizen>
2780 public bool Visibility
2785 GetProperty(View.Property.VISIBLE).Get(out temp);
2791 /// Gets the view's world color.
2793 /// <since_tizen> 3 </since_tizen>
2794 public Vector4 WorldColor
2798 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2799 GetProperty(View.Property.WORLD_COLOR).Get(temp);
2805 /// Gets or sets the view's name.
2807 /// <since_tizen> 3 </since_tizen>
2812 return (string)GetValue(NameProperty);
2816 SetValue(NameProperty, value);
2817 NotifyPropertyChanged();
2822 /// Get the number of children held by the view.
2824 /// <since_tizen> 3 </since_tizen>
2825 public new uint ChildCount
2829 return GetChildCount();
2834 /// Gets the view's ID.
2837 /// <since_tizen> 3 </since_tizen>
2847 /// Gets or sets the status of whether the view should emit touch or hover signals.
2849 /// <since_tizen> 3 </since_tizen>
2850 public bool Sensitive
2854 return (bool)GetValue(SensitiveProperty);
2858 SetValue(SensitiveProperty, value);
2859 NotifyPropertyChanged();
2864 /// 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.
2866 /// <since_tizen> 3 </since_tizen>
2867 public bool LeaveRequired
2871 return (bool)GetValue(LeaveRequiredProperty);
2875 SetValue(LeaveRequiredProperty, value);
2876 NotifyPropertyChanged();
2881 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2883 /// <since_tizen> 3 </since_tizen>
2884 public bool InheritOrientation
2888 return (bool)GetValue(InheritOrientationProperty);
2892 SetValue(InheritOrientationProperty, value);
2893 NotifyPropertyChanged();
2898 /// Gets or sets the status of whether a child view inherits it's parent's scale.
2900 /// <since_tizen> 3 </since_tizen>
2901 public bool InheritScale
2905 return (bool)GetValue(InheritScaleProperty);
2909 SetValue(InheritScaleProperty, value);
2910 NotifyPropertyChanged();
2915 /// Gets or sets the status of how the view and its children should be drawn.<br />
2916 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2917 /// 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 />
2918 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2919 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2920 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2922 /// <since_tizen> 3 </since_tizen>
2923 public DrawModeType DrawMode
2927 return (DrawModeType)GetValue(DrawModeProperty);
2931 SetValue(DrawModeProperty, value);
2932 NotifyPropertyChanged();
2937 /// Gets or sets the relative to parent size factor of the view.<br />
2938 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2939 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2941 /// <since_tizen> 3 </since_tizen>
2942 public Vector3 SizeModeFactor
2946 return (Vector3)GetValue(SizeModeFactorProperty);
2950 SetValue(SizeModeFactorProperty, value);
2951 NotifyPropertyChanged();
2956 /// Gets or sets the width resize policy to be used.
2958 /// <since_tizen> 3 </since_tizen>
2959 public ResizePolicyType WidthResizePolicy
2963 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2967 SetValue(WidthResizePolicyProperty, value);
2968 // Match ResizePolicy to new Layouting.
2969 // Parent relative policies can not be mapped at this point as parent size unknown.
2972 case ResizePolicyType.UseNaturalSize:
2974 WidthSpecification = LayoutParamPolicies.WrapContent;
2977 case ResizePolicyType.FillToParent:
2979 WidthSpecification = LayoutParamPolicies.MatchParent;
2982 case ResizePolicyType.FitToChildren:
2984 WidthSpecification = LayoutParamPolicies.WrapContent;
2990 NotifyPropertyChanged();
2995 /// Gets or sets the height resize policy to be used.
2997 /// <since_tizen> 3 </since_tizen>
2998 public ResizePolicyType HeightResizePolicy
3002 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
3006 SetValue(HeightResizePolicyProperty, value);
3007 // Match ResizePolicy to new Layouting.
3008 // Parent relative policies can not be mapped at this point as parent size unknown.
3011 case ResizePolicyType.UseNaturalSize:
3013 HeightSpecification = LayoutParamPolicies.WrapContent;
3016 case ResizePolicyType.FillToParent:
3018 HeightSpecification = LayoutParamPolicies.MatchParent;
3021 case ResizePolicyType.FitToChildren:
3023 HeightSpecification = LayoutParamPolicies.WrapContent;
3029 NotifyPropertyChanged();
3034 /// Gets or sets the policy to use when setting size with size negotiation.<br />
3035 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
3037 /// <since_tizen> 3 </since_tizen>
3038 public SizeScalePolicyType SizeScalePolicy
3042 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
3046 SetValue(SizeScalePolicyProperty, value);
3047 NotifyPropertyChanged();
3052 /// Gets or sets the status of whether the width size is dependent on the height size.
3054 /// <since_tizen> 3 </since_tizen>
3055 public bool WidthForHeight
3059 return (bool)GetValue(WidthForHeightProperty);
3063 SetValue(WidthForHeightProperty, value);
3064 NotifyPropertyChanged();
3069 /// Gets or sets the status of whether the height size is dependent on the width size.
3071 /// <since_tizen> 3 </since_tizen>
3072 public bool HeightForWidth
3076 return (bool)GetValue(HeightForWidthProperty);
3080 SetValue(HeightForWidthProperty, value);
3081 NotifyPropertyChanged();
3086 /// Gets or sets the padding for use in layout.
3088 /// <since_tizen> 5 </since_tizen>
3089 public Extents Padding
3093 return (Extents)GetValue(PaddingProperty);
3097 SetValue(PaddingProperty, value);
3098 NotifyPropertyChanged();
3099 _layout?.RequestLayout();
3104 /// Gets or sets the minimum size the view can be assigned in size negotiation.
3106 /// <since_tizen> 3 </since_tizen>
3107 public Size2D MinimumSize
3111 return (Size2D)GetValue(MinimumSizeProperty);
3115 if (_layout != null)
3117 // Note: it only works if minimum size is >= than natural size.
3118 // To force the size it should be done through the width&height spec or Size2D.
3119 _layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
3120 _layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
3121 _layout.RequestLayout();
3123 SetValue(MinimumSizeProperty, value);
3124 NotifyPropertyChanged();
3129 /// Gets or sets the maximum size the view can be assigned in size negotiation.
3131 /// <since_tizen> 3 </since_tizen>
3132 public Size2D MaximumSize
3136 return (Size2D)GetValue(MaximumSizeProperty);
3140 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
3141 // MATCH_PARENT spec + parent container size can be used to limit
3142 if (_layout != null)
3144 // Note: it only works if minimum size is >= than natural size.
3145 // To force the size it should be done through the width&height spec or Size2D.
3146 _layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Width);
3147 _layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Height);
3148 _layout.RequestLayout();
3150 SetValue(MaximumSizeProperty, value);
3151 NotifyPropertyChanged();
3156 /// Gets or sets whether a child view inherits it's parent's position.<br />
3157 /// Default is to inherit.<br />
3158 /// 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 />
3160 /// <since_tizen> 3 </since_tizen>
3161 public bool InheritPosition
3165 return (bool)GetValue(InheritPositionProperty);
3169 SetValue(InheritPositionProperty, value);
3170 NotifyPropertyChanged();
3175 /// Gets or sets the clipping behavior (mode) of it's children.
3177 /// <since_tizen> 3 </since_tizen>
3178 public ClippingModeType ClippingMode
3182 return (ClippingModeType)GetValue(ClippingModeProperty);
3186 SetValue(ClippingModeProperty, value);
3187 NotifyPropertyChanged();
3192 /// Gets the number of renderers held by the view.
3194 /// <since_tizen> 3 </since_tizen>
3195 public uint RendererCount
3199 return GetRendererCount();
3204 /// [Obsolete("Please do not use! this will be deprecated")]
3206 /// <since_tizen> 3 </since_tizen>
3207 /// Please do not use! this will be deprecated!
3208 /// Instead please use PivotPoint.
3209 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
3211 "View view = new View(); " +
3212 "view.PivotPoint = PivotPoint.Center; " +
3213 "view.PositionUsesPivotPoint = true;")]
3214 [EditorBrowsable(EditorBrowsableState.Never)]
3215 public Position AnchorPoint
3219 Position temp = new Position(0.0f, 0.0f, 0.0f);
3220 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3225 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3226 NotifyPropertyChanged();
3231 /// Sets the size of a view for the width, the height and the depth.<br />
3232 /// Geometry can be scaled to fit within this area.<br />
3233 /// This does not interfere with the view's scale factor.<br />
3234 /// The views default depth is the minimum of width and height.<br />
3237 /// Please note that multi-cascade setting is not possible for this NUI object. <br />
3238 /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3239 /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
3240 /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
3241 /// 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 />
3243 /// <since_tizen> 5 </since_tizen>
3248 return (Size)GetValue(SizeProperty);
3252 SetValue(SizeProperty, value);
3253 // Set Specification so when layouts measure this View it matches the value set here.
3254 // All Views are currently Layouts.
3255 WidthSpecification = (int)Math.Ceiling(value.Width);
3256 HeightSpecification = (int)Math.Ceiling(value.Height);
3257 NotifyPropertyChanged();
3262 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
3264 /// <since_tizen> 3 </since_tizen>
3265 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
3267 "Container parent = view.GetParent(); " +
3268 "View view = parent as View;")]
3269 [EditorBrowsable(EditorBrowsableState.Never)]
3270 public new View Parent
3275 IntPtr cPtr = Interop.Actor.Actor_GetParent(swigCPtr);
3276 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3277 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3279 if (basehandle is Layer layer)
3281 ret = new View(Layer.getCPtr(layer).Handle, false);
3282 NUILog.Error("This Parent property is deprecated, shoud do not be used");
3286 ret = basehandle as View;
3289 Interop.BaseHandle.delete_BaseHandle(CPtr);
3290 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3292 if (NDalicPINVOKE.SWIGPendingException.Pending)
3293 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3299 /// Gets/Sets whether inherit parent's the layout Direction.
3301 /// <since_tizen> 4 </since_tizen>
3302 public bool InheritLayoutDirection
3306 return (bool)GetValue(InheritLayoutDirectionProperty);
3310 SetValue(InheritLayoutDirectionProperty, value);
3311 NotifyPropertyChanged();
3316 /// Gets/Sets the layout Direction.
3318 /// <since_tizen> 4 </since_tizen>
3319 public ViewLayoutDirectionType LayoutDirection
3323 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
3327 SetValue(LayoutDirectionProperty, value);
3328 NotifyPropertyChanged();
3329 _layout?.RequestLayout();
3334 /// Gets or sets the Margin for use in layout.
3337 /// Margin property is supported by Layout algorithms and containers.
3338 /// Please Set Layout if you want to use Margin property.
3340 /// <since_tizen> 4 </since_tizen>
3341 public Extents Margin
3345 return (Extents)GetValue(MarginProperty);
3349 SetValue(MarginProperty, value);
3350 NotifyPropertyChanged();
3351 _layout?.RequestLayout();
3356 /// The required policy for this dimension, ChildLayoutData enum or exact value.
3358 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3359 [EditorBrowsable(EditorBrowsableState.Never)]
3360 public int WidthSpecification
3364 return _widthPolicy;
3368 _widthPolicy = value;
3369 if (_widthPolicy >= 0)
3371 _measureSpecificationWidth = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
3372 Size2D.Width = _widthPolicy;
3374 _layout?.RequestLayout();
3379 /// The required policy for this dimension, ChildLayoutData enum or exact value.
3381 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3382 [EditorBrowsable(EditorBrowsableState.Never)]
3383 public int HeightSpecification
3387 return _heightPolicy;
3391 _heightPolicy = value;
3392 if (_heightPolicy >= 0)
3394 _measureSpecificationHeight = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
3395 Size2D.Height = _heightPolicy;
3397 _layout?.RequestLayout();
3402 /// [Obsolete("Please do not use! this will be deprecated")]
3404 /// Please do not use! this will be deprecated!
3405 /// Instead please use Padding.
3406 /// <since_tizen> 4 </since_tizen>
3407 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
3408 [EditorBrowsable(EditorBrowsableState.Never)]
3409 public Extents PaddingEX
3413 Extents temp = new Extents(0, 0, 0, 0);
3414 GetProperty(View.Property.PADDING).Get(temp);
3419 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3420 NotifyPropertyChanged();
3421 _layout?.RequestLayout();
3425 internal Style Style
3429 return (Style)GetValue(StyleProperty);
3433 SetValue(StyleProperty, value);
3438 /// Child property to specify desired width
3440 internal int LayoutWidthSpecificationFixed
3444 return _widthPolicy;
3448 _widthPolicy = value;
3449 _measureSpecificationWidth = new MeasureSpecification(new LayoutLength(value), MeasureSpecification.ModeType.Exactly);
3450 Size2D.Width = value;
3451 _layout?.RequestLayout();
3456 /// Child property to specify desired height
3458 internal int LayoutHeightSpecificationFixed
3462 return _heightPolicy;
3466 _heightPolicy = value;
3467 _measureSpecificationHeight = new MeasureSpecification(new LayoutLength(value), MeasureSpecification.ModeType.Exactly);
3468 Size2D.Height = value;
3469 _layout?.RequestLayout();
3474 /// Child property to specify desired width, use MatchParent/WrapContent)
3476 internal ChildLayoutData LayoutWidthSpecification
3480 return (ChildLayoutData)_widthPolicy;
3484 _widthPolicy = (int)value;
3489 /// Child property to specify desired height, use MatchParent/WrapContent)
3491 internal ChildLayoutData LayoutHeightSpecification
3495 return (ChildLayoutData)_heightPolicy;
3499 _heightPolicy = (int)value;
3503 internal float Weight
3512 _layout.RequestLayout();
3516 internal bool BackgroundImageSynchronosLoading
3520 return _backgroundImageSynchronosLoading;
3524 if (value != _backgroundImageSynchronosLoading)
3527 PropertyMap bgMap = this.Background;
3529 bgMap.Find(Visual.Property.Type)?.Get(out visualType);
3530 if (visualType == (int)Visual.Type.Image)
3532 bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
3534 if (bgUrl.Length != 0)
3536 _backgroundImageSynchronosLoading = value;
3537 bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
3538 this.Background = bgMap;
3544 internal float WorldPositionX
3549 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3554 internal float WorldPositionY
3559 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3564 internal float WorldPositionZ
3569 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3574 internal bool FocusState
3578 return IsKeyboardFocusable();
3582 SetKeyboardFocusable(value);
3587 /// Set the layout on this View. Replaces any existing Layout.
3591 internal LayoutItem Layout
3599 // Do nothing if layout provided is already set on this View.
3600 if (value == _layout)
3605 Log.Info("NUI", "Setting Layout on:" + Name + "\n");
3606 layoutingDisabled = false;
3609 // If new layout being set already has a owner then that owner receives a replacement default layout.
3610 // First check if the layout to be set already has a owner.
3611 if ( value.Owner != null )
3613 Log.Info("NUI", "Set layout already in use by another View: " + value.Owner.Name + "will get a LayoutGroup\n");
3614 // Previous owner of the layout gets a default layout as a replacement.
3615 value.Owner.Layout = new LayoutGroup();
3618 // Remove existing layout from it's parent layout group.
3619 _layout?.Unparent();
3621 // Set layout to this view
3626 internal void SetLayout(LayoutItem layout)
3629 _layout.AttachToOwner(this);
3630 _layout.RequestLayout();
3634 /// Stores the calculated width value and its ModeType. Width component.
3636 internal MeasureSpecification MeasureSpecificationWidth
3640 _measureSpecificationWidth = value;
3641 _layout?.RequestLayout();
3645 return _measureSpecificationWidth;
3650 /// Stores the calculated width value and its ModeType. Height component.
3652 internal MeasureSpecification MeasureSpecificationHeight
3656 _measureSpecificationHeight = value;
3657 _layout?.RequestLayout();
3661 return _measureSpecificationHeight;
3665 internal float ParentOriginX
3670 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3675 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3676 NotifyPropertyChanged();
3680 internal float ParentOriginY
3685 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3690 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3691 NotifyPropertyChanged();
3695 internal float ParentOriginZ
3700 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3705 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3706 NotifyPropertyChanged();
3710 internal float PivotPointX
3715 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3720 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3724 internal float PivotPointY
3729 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3734 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3738 internal float PivotPointZ
3743 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3748 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3752 internal Matrix WorldMatrix
3756 Matrix temp = new Matrix();
3757 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3762 private int LeftFocusableViewId
3767 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
3772 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3776 private int RightFocusableViewId
3781 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
3786 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3790 private int UpFocusableViewId
3795 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
3800 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3804 private int DownFocusableViewId
3809 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
3814 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3819 /// Perform an action on a visual registered to this view. <br />
3820 /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
3822 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
3823 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
3824 /// <param name="attributes">Optional attributes for the action.</param>
3825 /// <since_tizen> 5 </since_tizen>
3826 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
3828 Interop.View.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
3829 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3833 /// Creates an animation to animate the background color visual. If there is no
3834 /// background visual, creates one with transparent black as it's mixColor.
3836 /// <since_tizen> 3 </since_tizen>
3837 public Animation AnimateBackgroundColor(object destinationValue,
3840 AlphaFunction.BuiltinFunctions? alphaFunction = null,
3841 object initialValue = null)
3843 Tizen.NUI.PropertyMap background = Background;
3845 if (background.Empty())
3847 // If there is no background yet, ensure there is a transparent
3849 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
3850 background = Background;
3852 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
3856 /// Creates an animation to animate the mixColor of the named visual.
3858 /// <since_tizen> 3 </since_tizen>
3859 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
3861 Animation animation = null;
3863 PropertyMap _animator = new PropertyMap();
3864 if (alphaFunction != null)
3866 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
3869 PropertyMap _timePeriod = new PropertyMap();
3870 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
3871 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
3872 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
3874 PropertyMap _transition = new PropertyMap();
3875 _transition.Add("animator", new PropertyValue(_animator));
3876 _transition.Add("target", new PropertyValue(targetVisual));
3877 _transition.Add("property", new PropertyValue("mixColor"));
3879 if (initialColor != null)
3881 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
3882 _transition.Add("initialValue", initValue);
3885 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
3886 _transition.Add("targetValue", destValue);
3887 TransitionData _transitionData = new TransitionData(_transition);
3889 animation = new Animation(Interop.View.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
3890 if (NDalicPINVOKE.SWIGPendingException.Pending)
3891 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3896 // From Container Base class
3898 /// Adds a child view to this view.
3900 /// <seealso cref="Container.Add" />
3901 /// <since_tizen> 4 </since_tizen>
3902 public override void Add(View child)
3904 bool hasLayout = (_layout != null);
3905 Log.Info("NUI", "Add:" + child.Name + " to View:" + Name + "which has layout[" + hasLayout + "] + \n");
3909 Tizen.Log.Fatal("NUI", "Child is null");
3913 Container oldParent = child.GetParent();
3914 if (oldParent != this)
3916 // If child already has a parent then re-parent child
3917 if (oldParent != null)
3919 oldParent.Remove(child);
3921 child.InternalParent = this;
3923 Interop.Actor.Actor_Add(swigCPtr, View.getCPtr(child));
3925 if (NDalicPINVOKE.SWIGPendingException.Pending)
3926 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3927 Children.Add(child);
3929 if (ChildAdded != null)
3931 ChildAddedEventArgs e = new ChildAddedEventArgs
3935 ChildAdded(this, e);
3941 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
3943 /// <seealso cref="Container.Remove" />
3944 /// <since_tizen> 4 </since_tizen>
3945 public override void Remove(View child)
3947 bool hasLayout = (_layout != null);
3948 Log.Info("NUI","Removing View:" + child.Name + "layout[" + hasLayout.ToString() +"]\n");
3950 Interop.Actor.Actor_Remove(swigCPtr, View.getCPtr(child));
3951 if (NDalicPINVOKE.SWIGPendingException.Pending)
3952 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3954 Children.Remove(child);
3955 child.InternalParent = null;
3957 if (ChildRemoved != null)
3959 ChildRemovedEventArgs e = new ChildRemovedEventArgs
3963 ChildRemoved(this, e);
3968 /// Retrieves a child view by index.
3970 /// <seealso cref="Container.GetChildAt" />
3971 /// <since_tizen> 4 </since_tizen>
3972 public override View GetChildAt(uint index)
3974 if (index < Children.Count)
3976 return Children[Convert.ToInt32(index)];
3985 /// Retrieves the number of children held by the view.
3987 /// <seealso cref="Container.GetChildCount" />
3988 /// <since_tizen> 4 </since_tizen>
3989 public override uint GetChildCount()
3991 return Convert.ToUInt32(Children.Count);
3995 /// Gets the views parent.
3997 /// <seealso cref="Container.GetParent()" />
3998 /// <since_tizen> 4 </since_tizen>
3999 public override Container GetParent()
4001 return this.InternalParent as Container;
4005 /// Queries whether the view has a focus.
4007 /// <returns>True if this view has a focus.</returns>
4008 /// <since_tizen> 3 </since_tizen>
4009 public bool HasFocus()
4011 bool ret = Interop.View.View_HasKeyInputFocus(swigCPtr);
4012 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4017 /// Sets the name of the style to be applied to the view.
4019 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
4020 /// <since_tizen> 3 </since_tizen>
4021 public void SetStyleName(string styleName)
4023 Interop.View.View_SetStyleName(swigCPtr, styleName);
4024 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4028 /// Retrieves the name of the style to be applied to the view (if any).
4030 /// <returns>A string matching a style, or an empty string.</returns>
4031 /// <since_tizen> 3 </since_tizen>
4032 public string GetStyleName()
4034 string ret = Interop.View.View_GetStyleName(swigCPtr);
4035 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4040 /// Clears the background.
4042 /// <since_tizen> 3 </since_tizen>
4043 public void ClearBackground()
4045 Interop.View.View_ClearBackground(swigCPtr);
4046 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4053 /// This is an asynchronous method.
4055 /// <since_tizen> 3 </since_tizen>
4065 /// This is an asynchronous method.
4066 /// If the view is hidden, then the view and its children will not be rendered.
4067 /// 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.
4069 /// <since_tizen> 3 </since_tizen>
4076 /// Raises the view above all other views.
4079 /// Sibling order of views within the parent will be updated automatically.
4080 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
4082 /// <since_tizen> 3 </since_tizen>
4083 public void RaiseToTop()
4085 var parentChildren = GetParent()?.Children;
4087 if (parentChildren != null)
4089 parentChildren.Remove(this);
4090 parentChildren.Add(this);
4092 Interop.NDalic.RaiseToTop(swigCPtr);
4093 if (NDalicPINVOKE.SWIGPendingException.Pending)
4094 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4100 /// Lowers the view to the bottom of all views.
4103 /// The sibling order of views within the parent will be updated automatically.
4104 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4106 /// <since_tizen> 3 </since_tizen>
4107 public void LowerToBottom()
4109 var parentChildren = GetParent()?.Children;
4111 if (parentChildren != null)
4113 parentChildren.Remove(this);
4114 parentChildren.Insert(0, this);
4116 Interop.NDalic.LowerToBottom(swigCPtr);
4117 if (NDalicPINVOKE.SWIGPendingException.Pending)
4118 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4123 /// Queries if all resources required by a view are loaded and ready.
4125 /// <remarks>Most resources are only loaded when the control is placed on the stage.
4127 /// <since_tizen> 3 </since_tizen>
4128 public bool IsResourceReady()
4130 bool ret = Interop.View.IsResourceReady(swigCPtr);
4131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4136 /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
4138 /// <pre>The view has been initialized. </pre>
4139 /// <returns>The parent layer of view </returns>
4140 /// <since_tizen> 5 </since_tizen>
4141 public Layer GetLayer()
4143 //to fix memory leak issue, match the handle count with native side.
4144 IntPtr cPtr = Interop.Actor.Actor_GetLayer(swigCPtr);
4145 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4146 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
4147 Interop.BaseHandle.delete_BaseHandle(CPtr);
4148 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4150 if (NDalicPINVOKE.SWIGPendingException.Pending)
4151 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4156 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
4158 /// <pre>The (child) view has been initialized. </pre>
4159 /// <since_tizen> 4 </since_tizen>
4160 public void Unparent()
4162 GetParent()?.Remove(this);
4166 /// Search through this view's hierarchy for a view with the given name.
4167 /// The view itself is also considered in the search.
4169 /// <pre>The view has been initialized.</pre>
4170 /// <param name="viewName">The name of the view to find.</param>
4171 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
4172 /// <since_tizen> 3 </since_tizen>
4173 public View FindChildByName(string viewName)
4175 //to fix memory leak issue, match the handle count with native side.
4176 IntPtr cPtr = Interop.Actor.Actor_FindChildByName(swigCPtr, viewName);
4177 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4178 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4179 Interop.BaseHandle.delete_BaseHandle(CPtr);
4180 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4182 if (NDalicPINVOKE.SWIGPendingException.Pending)
4183 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4188 /// Converts screen coordinates into the view's coordinate system using the default camera.
4190 /// <pre>The view has been initialized.</pre>
4191 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4192 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4193 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4194 /// <param name="screenX">The screen X-coordinate.</param>
4195 /// <param name="screenY">The screen Y-coordinate.</param>
4196 /// <returns>True if the conversion succeeded.</returns>
4197 /// <since_tizen> 3 </since_tizen>
4198 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4200 bool ret = Interop.Actor.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4201 if (NDalicPINVOKE.SWIGPendingException.Pending)
4202 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4207 /// Sets the relative to parent size factor of the view.<br />
4208 /// This factor is only used when ResizePolicy is set to either:
4209 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4210 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4212 /// <pre>The view has been initialized.</pre>
4213 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4214 /// <since_tizen> 3 </since_tizen>
4215 public void SetSizeModeFactor(Vector3 factor)
4217 Interop.Actor.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4218 if (NDalicPINVOKE.SWIGPendingException.Pending)
4219 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4222 /// Calculates the height of the view given a width.<br />
4223 /// The natural size is used for default calculation.<br />
4224 /// Size 0 is treated as aspect ratio 1:1.<br />
4226 /// <param name="width">The width to use.</param>
4227 /// <returns>The height based on the width.</returns>
4228 /// <since_tizen> 3 </since_tizen>
4229 public float GetHeightForWidth(float width)
4231 float ret = Interop.Actor.Actor_GetHeightForWidth(swigCPtr, width);
4232 if (NDalicPINVOKE.SWIGPendingException.Pending)
4233 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4238 /// Calculates the width of the view given a height.<br />
4239 /// The natural size is used for default calculation.<br />
4240 /// Size 0 is treated as aspect ratio 1:1.<br />
4242 /// <param name="height">The height to use.</param>
4243 /// <returns>The width based on the height.</returns>
4244 /// <since_tizen> 3 </since_tizen>
4245 public float GetWidthForHeight(float height)
4247 float ret = Interop.Actor.Actor_GetWidthForHeight(swigCPtr, height);
4248 if (NDalicPINVOKE.SWIGPendingException.Pending)
4249 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4254 /// Return the amount of size allocated for relayout.
4256 /// <param name="dimension">The dimension to retrieve.</param>
4257 /// <returns>Return the size.</returns>
4258 /// <since_tizen> 3 </since_tizen>
4259 public float GetRelayoutSize(DimensionType dimension)
4261 float ret = Interop.Actor.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4262 if (NDalicPINVOKE.SWIGPendingException.Pending)
4263 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4268 /// Set the padding for the view.
4270 /// <param name="padding">Padding for the view.</param>
4271 /// <since_tizen> 3 </since_tizen>
4272 public void SetPadding(PaddingType padding)
4274 Interop.Actor.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4275 if (NDalicPINVOKE.SWIGPendingException.Pending)
4276 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4280 /// Return the value of padding for the view.
4282 /// <param name="paddingOut">the value of padding for the view</param>
4283 /// <since_tizen> 3 </since_tizen>
4284 public void GetPadding(PaddingType paddingOut)
4286 Interop.Actor.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4287 if (NDalicPINVOKE.SWIGPendingException.Pending)
4288 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4291 /// <since_tizen> 3 </since_tizen>
4292 public uint AddRenderer(Renderer renderer)
4294 uint ret = Interop.Actor.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4295 if (NDalicPINVOKE.SWIGPendingException.Pending)
4296 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4300 /// <since_tizen> 3 </since_tizen>
4301 public Renderer GetRendererAt(uint index)
4303 //to fix memory leak issue, match the handle count with native side.
4304 IntPtr cPtr = Interop.Actor.Actor_GetRendererAt(swigCPtr, index);
4305 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4306 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4307 if (cPtr != null && ret == null)
4309 ret = new Renderer(cPtr, false);
4310 if (NDalicPINVOKE.SWIGPendingException.Pending)
4311 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4314 Interop.BaseHandle.delete_BaseHandle(CPtr);
4315 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4317 if (NDalicPINVOKE.SWIGPendingException.Pending)
4318 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4322 /// <since_tizen> 3 </since_tizen>
4323 public void RemoveRenderer(Renderer renderer)
4325 Interop.Actor.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4326 if (NDalicPINVOKE.SWIGPendingException.Pending)
4327 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4330 /// <since_tizen> 3 </since_tizen>
4331 public void RemoveRenderer(uint index)
4333 Interop.Actor.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4334 if (NDalicPINVOKE.SWIGPendingException.Pending)
4335 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4338 internal void Raise()
4340 var parentChildren = GetParent()?.Children;
4342 if (parentChildren != null)
4344 int currentIndex = parentChildren.IndexOf(this);
4346 // If the view is not already the last item in the list.
4347 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
4349 View temp = parentChildren[currentIndex + 1];
4350 parentChildren[currentIndex + 1] = this;
4351 parentChildren[currentIndex] = temp;
4353 Interop.NDalic.Raise(swigCPtr);
4354 if (NDalicPINVOKE.SWIGPendingException.Pending)
4355 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4360 internal void Lower()
4362 var parentChildren = GetParent()?.Children;
4364 if (parentChildren != null)
4366 int currentIndex = parentChildren.IndexOf(this);
4368 // If the view is not already the first item in the list.
4369 if (currentIndex > 0 && currentIndex < parentChildren.Count)
4371 View temp = parentChildren[currentIndex - 1];
4372 parentChildren[currentIndex - 1] = this;
4373 parentChildren[currentIndex] = temp;
4375 Interop.NDalic.Lower(swigCPtr);
4376 if (NDalicPINVOKE.SWIGPendingException.Pending)
4377 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4383 /// Raises the view to above the target view.
4385 /// <remarks>The sibling order of views within the parent will be updated automatically.
4386 /// Views on the level above the target view will still be shown above this view.
4387 /// Raising this view above views with the same sibling order as each other will raise this view above them.
4388 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4390 /// <param name="target">Will be raised above this view.</param>
4391 internal void RaiseAbove(View target)
4393 var parentChildren = GetParent()?.Children;
4395 if (parentChildren != null)
4397 int currentIndex = parentChildren.IndexOf(this);
4398 int targetIndex = parentChildren.IndexOf(target);
4400 if (currentIndex < 0 || targetIndex < 0 ||
4401 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4403 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4406 // If the currentIndex is less than the target index and the target has the same parent.
4407 if (currentIndex < targetIndex)
4409 parentChildren.Remove(this);
4410 parentChildren.Insert(targetIndex, this);
4412 Interop.NDalic.RaiseAbove(swigCPtr, View.getCPtr(target));
4413 if (NDalicPINVOKE.SWIGPendingException.Pending)
4414 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4421 /// Lowers the view to below the target view.
4423 /// <remarks>The sibling order of views within the parent will be updated automatically.
4424 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
4425 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4427 /// <param name="target">Will be lowered below this view.</param>
4428 internal void LowerBelow(View target)
4430 var parentChildren = GetParent()?.Children;
4432 if (parentChildren != null)
4434 int currentIndex = parentChildren.IndexOf(this);
4435 int targetIndex = parentChildren.IndexOf(target);
4436 if (currentIndex < 0 || targetIndex < 0 ||
4437 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4439 NUILog.Error("index should be bigger than 0 and less than children of layer count");
4443 // If the currentIndex is not already the 0th index and the target has the same parent.
4444 if ((currentIndex != 0) && (targetIndex != -1) &&
4445 (currentIndex > targetIndex))
4447 parentChildren.Remove(this);
4448 parentChildren.Insert(targetIndex, this);
4450 Interop.NDalic.LowerBelow(swigCPtr, View.getCPtr(target));
4451 if (NDalicPINVOKE.SWIGPendingException.Pending)
4452 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4458 internal string GetName()
4460 string ret = Interop.Actor.Actor_GetName(swigCPtr);
4461 if (NDalicPINVOKE.SWIGPendingException.Pending)
4462 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4466 internal void SetName(string name)
4468 Interop.Actor.Actor_SetName(swigCPtr, name);
4469 if (NDalicPINVOKE.SWIGPendingException.Pending)
4470 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4473 internal uint GetId()
4475 uint ret = Interop.Actor.Actor_GetId(swigCPtr);
4476 if (NDalicPINVOKE.SWIGPendingException.Pending)
4477 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4481 internal bool IsRoot()
4483 bool ret = Interop.ActorInternal.Actor_IsRoot(swigCPtr);
4484 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4488 internal bool OnWindow()
4490 bool ret = Interop.Actor.Actor_OnStage(swigCPtr);
4491 if (NDalicPINVOKE.SWIGPendingException.Pending)
4492 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4496 internal View FindChildById(uint id)
4498 //to fix memory leak issue, match the handle count with native side.
4499 IntPtr cPtr = Interop.Actor.Actor_FindChildById(swigCPtr, id);
4500 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4501 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4502 Interop.BaseHandle.delete_BaseHandle(CPtr);
4503 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4505 if (NDalicPINVOKE.SWIGPendingException.Pending)
4506 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4510 internal void SetParentOrigin(Vector3 origin)
4512 Interop.ActorInternal.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
4513 if (NDalicPINVOKE.SWIGPendingException.Pending)
4514 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4517 internal Vector3 GetCurrentParentOrigin()
4519 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentParentOrigin(swigCPtr), true);
4520 if (NDalicPINVOKE.SWIGPendingException.Pending)
4521 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4525 internal void SetAnchorPoint(Vector3 anchorPoint)
4527 Interop.Actor.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
4528 if (NDalicPINVOKE.SWIGPendingException.Pending)
4529 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4532 internal Vector3 GetCurrentAnchorPoint()
4534 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentAnchorPoint(swigCPtr), true);
4535 if (NDalicPINVOKE.SWIGPendingException.Pending)
4536 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4540 internal void SetSize(float width, float height)
4542 Interop.ActorInternal.Actor_SetSize__SWIG_0(swigCPtr, width, height);
4543 if (NDalicPINVOKE.SWIGPendingException.Pending)
4544 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4547 internal void SetSize(float width, float height, float depth)
4549 Interop.ActorInternal.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
4550 if (NDalicPINVOKE.SWIGPendingException.Pending)
4551 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4554 internal void SetSize(Vector2 size)
4556 Interop.ActorInternal.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
4557 if (NDalicPINVOKE.SWIGPendingException.Pending)
4558 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4561 internal void SetSize(Vector3 size)
4563 Interop.ActorInternal.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
4564 if (NDalicPINVOKE.SWIGPendingException.Pending)
4565 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4568 internal Vector3 GetTargetSize()
4570 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetTargetSize(swigCPtr), true);
4571 if (NDalicPINVOKE.SWIGPendingException.Pending)
4572 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4576 internal Size2D GetCurrentSize()
4578 Size ret = new Size(Interop.Actor.Actor_GetCurrentSize(swigCPtr), true);
4579 if (NDalicPINVOKE.SWIGPendingException.Pending)
4580 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4581 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
4585 internal Vector3 GetNaturalSize()
4587 Vector3 ret = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
4588 if (NDalicPINVOKE.SWIGPendingException.Pending)
4589 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4593 internal void SetPosition(float x, float y)
4595 Interop.ActorInternal.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
4596 if (NDalicPINVOKE.SWIGPendingException.Pending)
4597 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4600 internal void SetPosition(float x, float y, float z)
4602 Interop.ActorInternal.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
4603 if (NDalicPINVOKE.SWIGPendingException.Pending)
4604 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4607 internal void SetPosition(Vector3 position)
4609 Interop.ActorInternal.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
4610 if (NDalicPINVOKE.SWIGPendingException.Pending)
4611 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4614 internal void SetX(float x)
4616 Interop.ActorInternal.Actor_SetX(swigCPtr, x);
4617 if (NDalicPINVOKE.SWIGPendingException.Pending)
4618 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4621 internal void SetY(float y)
4623 Interop.ActorInternal.Actor_SetY(swigCPtr, y);
4624 if (NDalicPINVOKE.SWIGPendingException.Pending)
4625 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4628 internal void SetZ(float z)
4630 Interop.ActorInternal.Actor_SetZ(swigCPtr, z);
4631 if (NDalicPINVOKE.SWIGPendingException.Pending)
4632 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4635 internal void TranslateBy(Vector3 distance)
4637 Interop.ActorInternal.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
4638 if (NDalicPINVOKE.SWIGPendingException.Pending)
4639 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4642 internal Position GetCurrentPosition()
4644 Position ret = new Position(Interop.Actor.Actor_GetCurrentPosition(swigCPtr), true);
4645 if (NDalicPINVOKE.SWIGPendingException.Pending)
4646 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4650 internal Vector3 GetCurrentWorldPosition()
4652 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentWorldPosition(swigCPtr), true);
4653 if (NDalicPINVOKE.SWIGPendingException.Pending)
4654 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4658 internal void SetInheritPosition(bool inherit)
4660 Interop.ActorInternal.Actor_SetInheritPosition(swigCPtr, inherit);
4661 if (NDalicPINVOKE.SWIGPendingException.Pending)
4662 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4665 internal bool IsPositionInherited()
4667 bool ret = Interop.ActorInternal.Actor_IsPositionInherited(swigCPtr);
4668 if (NDalicPINVOKE.SWIGPendingException.Pending)
4669 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4673 internal void SetOrientation(Degree angle, Vector3 axis)
4675 Interop.ActorInternal.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4676 if (NDalicPINVOKE.SWIGPendingException.Pending)
4677 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4680 internal void SetOrientation(Radian angle, Vector3 axis)
4682 Interop.ActorInternal.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4683 if (NDalicPINVOKE.SWIGPendingException.Pending)
4684 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4687 internal void SetOrientation(Rotation orientation)
4689 Interop.ActorInternal.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
4690 if (NDalicPINVOKE.SWIGPendingException.Pending)
4691 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4694 internal void RotateBy(Degree angle, Vector3 axis)
4696 Interop.ActorInternal.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4697 if (NDalicPINVOKE.SWIGPendingException.Pending)
4698 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4701 internal void RotateBy(Radian angle, Vector3 axis)
4703 Interop.ActorInternal.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4704 if (NDalicPINVOKE.SWIGPendingException.Pending)
4705 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4708 internal void RotateBy(Rotation relativeRotation)
4710 Interop.ActorInternal.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4711 if (NDalicPINVOKE.SWIGPendingException.Pending)
4712 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4715 internal Rotation GetCurrentOrientation()
4717 Rotation ret = new Rotation(Interop.ActorInternal.Actor_GetCurrentOrientation(swigCPtr), true);
4718 if (NDalicPINVOKE.SWIGPendingException.Pending)
4719 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4723 internal void SetInheritOrientation(bool inherit)
4725 Interop.ActorInternal.Actor_SetInheritOrientation(swigCPtr, inherit);
4726 if (NDalicPINVOKE.SWIGPendingException.Pending)
4727 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4730 internal bool IsOrientationInherited()
4732 bool ret = Interop.ActorInternal.Actor_IsOrientationInherited(swigCPtr);
4733 if (NDalicPINVOKE.SWIGPendingException.Pending)
4734 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4738 internal Rotation GetCurrentWorldOrientation()
4740 Rotation ret = new Rotation(Interop.ActorInternal.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4741 if (NDalicPINVOKE.SWIGPendingException.Pending)
4742 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4746 internal void SetScale(float scale)
4748 Interop.ActorInternal.Actor_SetScale__SWIG_0(swigCPtr, scale);
4749 if (NDalicPINVOKE.SWIGPendingException.Pending)
4750 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4753 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4755 Interop.ActorInternal.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4756 if (NDalicPINVOKE.SWIGPendingException.Pending)
4757 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4760 internal void SetScale(Vector3 scale)
4762 Interop.ActorInternal.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4763 if (NDalicPINVOKE.SWIGPendingException.Pending)
4764 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4767 internal void ScaleBy(Vector3 relativeScale)
4769 Interop.ActorInternal.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4770 if (NDalicPINVOKE.SWIGPendingException.Pending)
4771 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4774 internal Vector3 GetCurrentScale()
4776 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentScale(swigCPtr), true);
4777 if (NDalicPINVOKE.SWIGPendingException.Pending)
4778 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4782 internal Vector3 GetCurrentWorldScale()
4784 Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentWorldScale(swigCPtr), true);
4785 if (NDalicPINVOKE.SWIGPendingException.Pending)
4786 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4790 internal void SetInheritScale(bool inherit)
4792 Interop.ActorInternal.Actor_SetInheritScale(swigCPtr, inherit);
4793 if (NDalicPINVOKE.SWIGPendingException.Pending)
4794 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4797 internal bool IsScaleInherited()
4799 bool ret = Interop.ActorInternal.Actor_IsScaleInherited(swigCPtr);
4800 if (NDalicPINVOKE.SWIGPendingException.Pending)
4801 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4805 internal Matrix GetCurrentWorldMatrix()
4807 Matrix ret = new Matrix(Interop.ActorInternal.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4808 if (NDalicPINVOKE.SWIGPendingException.Pending)
4809 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4813 internal void SetVisible(bool visible)
4815 Interop.Actor.Actor_SetVisible(swigCPtr, visible);
4816 if (NDalicPINVOKE.SWIGPendingException.Pending)
4817 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4820 internal bool IsVisible()
4822 bool ret = Interop.ActorInternal.Actor_IsVisible(swigCPtr);
4823 if (NDalicPINVOKE.SWIGPendingException.Pending)
4824 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4828 internal void SetOpacity(float opacity)
4830 Interop.ActorInternal.Actor_SetOpacity(swigCPtr, opacity);
4831 if (NDalicPINVOKE.SWIGPendingException.Pending)
4832 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4835 internal float GetCurrentOpacity()
4837 float ret = Interop.ActorInternal.Actor_GetCurrentOpacity(swigCPtr);
4838 if (NDalicPINVOKE.SWIGPendingException.Pending)
4839 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4843 internal void SetColor(Vector4 color)
4845 Interop.ActorInternal.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4846 if (NDalicPINVOKE.SWIGPendingException.Pending)
4847 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4850 internal Vector4 GetCurrentColor()
4852 Vector4 ret = new Vector4(Interop.ActorInternal.Actor_GetCurrentColor(swigCPtr), true);
4853 if (NDalicPINVOKE.SWIGPendingException.Pending)
4854 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4858 internal void SetColorMode(ColorMode colorMode)
4860 Interop.ActorInternal.Actor_SetColorMode(swigCPtr, (int)colorMode);
4861 if (NDalicPINVOKE.SWIGPendingException.Pending)
4862 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4865 internal ColorMode GetColorMode()
4867 ColorMode ret = (ColorMode)Interop.ActorInternal.Actor_GetColorMode(swigCPtr);
4868 if (NDalicPINVOKE.SWIGPendingException.Pending)
4869 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4873 internal Vector4 GetCurrentWorldColor()
4875 Vector4 ret = new Vector4(Interop.ActorInternal.Actor_GetCurrentWorldColor(swigCPtr), true);
4876 if (NDalicPINVOKE.SWIGPendingException.Pending)
4877 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4881 internal void SetDrawMode(DrawModeType drawMode)
4883 Interop.ActorInternal.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4884 if (NDalicPINVOKE.SWIGPendingException.Pending)
4885 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4888 internal DrawModeType GetDrawMode()
4890 DrawModeType ret = (DrawModeType)Interop.ActorInternal.Actor_GetDrawMode(swigCPtr);
4891 if (NDalicPINVOKE.SWIGPendingException.Pending)
4892 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4896 internal void SetKeyboardFocusable(bool focusable)
4898 Interop.ActorInternal.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4899 if (NDalicPINVOKE.SWIGPendingException.Pending)
4900 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4903 internal bool IsKeyboardFocusable()
4905 bool ret = Interop.ActorInternal.Actor_IsKeyboardFocusable(swigCPtr);
4906 if (NDalicPINVOKE.SWIGPendingException.Pending)
4907 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4911 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4913 Interop.Actor.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4914 if (NDalicPINVOKE.SWIGPendingException.Pending)
4915 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4918 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4920 ResizePolicyType ret = (ResizePolicyType)Interop.Actor.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4921 if (NDalicPINVOKE.SWIGPendingException.Pending)
4922 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4926 internal Vector3 GetSizeModeFactor()
4928 Vector3 ret = new Vector3(Interop.Actor.Actor_GetSizeModeFactor(swigCPtr), true);
4929 if (NDalicPINVOKE.SWIGPendingException.Pending)
4930 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4934 internal void SetMinimumSize(Vector2 size)
4936 Interop.ActorInternal.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4937 if (NDalicPINVOKE.SWIGPendingException.Pending)
4938 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4941 internal Vector2 GetMinimumSize()
4943 Vector2 ret = new Vector2(Interop.ActorInternal.Actor_GetMinimumSize(swigCPtr), true);
4944 if (NDalicPINVOKE.SWIGPendingException.Pending)
4945 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4949 internal void SetMaximumSize(Vector2 size)
4951 Interop.ActorInternal.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4952 if (NDalicPINVOKE.SWIGPendingException.Pending)
4953 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4956 internal Vector2 GetMaximumSize()
4958 Vector2 ret = new Vector2(Interop.ActorInternal.Actor_GetMaximumSize(swigCPtr), true);
4959 if (NDalicPINVOKE.SWIGPendingException.Pending)
4960 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4964 internal int GetHierarchyDepth()
4966 int ret = Interop.Actor.Actor_GetHierarchyDepth(swigCPtr);
4967 if (NDalicPINVOKE.SWIGPendingException.Pending)
4968 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4972 internal uint GetRendererCount()
4974 uint ret = Interop.Actor.Actor_GetRendererCount(swigCPtr);
4975 if (NDalicPINVOKE.SWIGPendingException.Pending)
4976 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4980 internal TouchDataSignal TouchSignal()
4982 TouchDataSignal ret = new TouchDataSignal(Interop.ActorSignal.Actor_TouchSignal(swigCPtr), false);
4983 if (NDalicPINVOKE.SWIGPendingException.Pending)
4984 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4988 internal HoverSignal HoveredSignal()
4990 HoverSignal ret = new HoverSignal(Interop.ActorSignal.Actor_HoveredSignal(swigCPtr), false);
4991 if (NDalicPINVOKE.SWIGPendingException.Pending)
4992 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4996 internal WheelSignal WheelEventSignal()
4998 WheelSignal ret = new WheelSignal(Interop.ActorSignal.Actor_WheelEventSignal(swigCPtr), false);
4999 if (NDalicPINVOKE.SWIGPendingException.Pending)
5000 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5004 internal ViewSignal OnWindowSignal()
5006 ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnStageSignal(swigCPtr), false);
5007 if (NDalicPINVOKE.SWIGPendingException.Pending)
5008 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5012 internal ViewSignal OffWindowSignal()
5014 ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OffStageSignal(swigCPtr), false);
5015 if (NDalicPINVOKE.SWIGPendingException.Pending)
5016 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5020 internal ViewSignal OnRelayoutSignal()
5022 ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnRelayoutSignal(swigCPtr), false);
5023 if (NDalicPINVOKE.SWIGPendingException.Pending)
5024 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5028 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
5030 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(Interop.NDalic.VisibilityChangedSignal(View.getCPtr(view)), false);
5031 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5035 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
5037 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(Interop.Layout.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
5038 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5042 internal ViewSignal ResourcesLoadedSignal()
5044 ViewSignal ret = new ViewSignal(Interop.View.ResourceReadySignal(swigCPtr), false);
5045 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5049 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
5051 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
5054 internal bool IsTopLevelView()
5056 if (GetParent() is Layer)
5063 internal void SetKeyInputFocus()
5065 Interop.ViewInternal.View_SetKeyInputFocus(swigCPtr);
5066 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5069 internal void ClearKeyInputFocus()
5071 Interop.ViewInternal.View_ClearKeyInputFocus(swigCPtr);
5072 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5075 internal PinchGestureDetector GetPinchGestureDetector()
5077 PinchGestureDetector ret = new PinchGestureDetector(Interop.ViewInternal.View_GetPinchGestureDetector(swigCPtr), true);
5078 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5082 internal PanGestureDetector GetPanGestureDetector()
5084 PanGestureDetector ret = new PanGestureDetector(Interop.ViewInternal.View_GetPanGestureDetector(swigCPtr), true);
5085 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5089 internal TapGestureDetector GetTapGestureDetector()
5091 TapGestureDetector ret = new TapGestureDetector(Interop.ViewInternal.View_GetTapGestureDetector(swigCPtr), true);
5092 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5096 internal LongPressGestureDetector GetLongPressGestureDetector()
5098 LongPressGestureDetector ret = new LongPressGestureDetector(Interop.ViewInternal.View_GetLongPressGestureDetector(swigCPtr), true);
5099 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5103 internal void SetBackgroundColor(Vector4 color)
5105 Interop.ViewInternal.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
5106 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5109 internal Vector4 GetBackgroundColor()
5111 Vector4 ret = new Vector4(Interop.ViewInternal.View_GetBackgroundColor(swigCPtr), true);
5112 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5116 internal void SetBackgroundImage(Image image)
5118 Interop.ViewInternal.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
5119 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5122 internal ControlKeySignal KeyEventSignal()
5124 ControlKeySignal ret = new ControlKeySignal(Interop.ViewSignal.View_KeyEventSignal(swigCPtr), false);
5125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5129 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
5131 KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusGainedSignal(swigCPtr), false);
5132 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5136 internal KeyInputFocusSignal KeyInputFocusLostSignal()
5138 KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusLostSignal(swigCPtr), false);
5139 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5143 internal IntPtr GetPtrfromView()
5145 return (IntPtr)swigCPtr;
5149 /// Removes the layout from this View.
5151 internal void ResetLayout()
5156 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5158 return (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5162 /// you can override it to clean-up your own resources.
5164 /// <param name="type">DisposeTypes</param>
5165 /// <since_tizen> 3 </since_tizen>
5166 protected override void Dispose(DisposeTypes type)
5173 if (type == DisposeTypes.Explicit)
5176 //Release your own managed resources here.
5177 //You should release all of your own disposable objects here.
5180 //Release your own unmanaged resources here.
5181 //You should not access any managed member here except static instance.
5182 //because the execution order of Finalizes is non-deterministic.
5185 DisConnectFromSignals();
5188 if (swigCPtr.Handle != global::System.IntPtr.Zero)
5192 swigCMemOwn = false;
5193 Interop.View.delete_View(swigCPtr);
5195 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5198 foreach (View view in Children)
5200 view.InternalParent = null;
5207 private void OnSize2DChanged(int width, int height)
5209 Size2D = new Size2D(width, height);
5212 private void OnPosition2DChanged(int x, int y)
5214 Position2D = new Position2D(x, y);
5217 private void DisConnectFromSignals()
5219 // Save current CPtr.
5220 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
5222 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
5223 swigCPtr = GetBaseHandleCPtrHandleRef;
5225 if (_onRelayoutEventCallback != null)
5227 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5230 if (_offWindowEventCallback != null)
5232 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5235 if (_onWindowEventCallback != null)
5237 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5240 if (_wheelEventCallback != null)
5242 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5245 if (_hoverEventCallback != null)
5247 this.HoveredSignal().Disconnect(_hoverEventCallback);
5250 if (_touchDataCallback != null)
5252 this.TouchSignal().Disconnect(_touchDataCallback);
5255 if (_ResourcesLoadedCallback != null)
5257 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
5260 if (_offWindowEventCallback != null)
5262 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5265 if (_onWindowEventCallback != null)
5267 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5270 if (_wheelEventCallback != null)
5272 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5275 if (_hoverEventCallback != null)
5277 this.HoveredSignal().Disconnect(_hoverEventCallback);
5280 if (_touchDataCallback != null)
5282 this.TouchSignal().Disconnect(_touchDataCallback);
5285 if (_onRelayoutEventCallback != null)
5287 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5290 if (_keyCallback != null)
5292 this.KeyEventSignal().Disconnect(_keyCallback);
5295 if (_keyInputFocusLostCallback != null)
5297 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
5300 if (_keyInputFocusGainedCallback != null)
5302 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
5305 if (_backgroundResourceLoadedCallback != null)
5307 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5310 if (_onWindowSendEventCallback != null)
5312 this.OnWindowSignal().Disconnect(_onWindowSendEventCallback);
5315 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
5316 // Restore current CPtr.
5317 swigCPtr = currentCPtr;
5320 private void OnKeyInputFocusGained(IntPtr view)
5322 if (_keyInputFocusGainedEventHandler != null)
5324 _keyInputFocusGainedEventHandler(this, null);
5328 private void OnKeyInputFocusLost(IntPtr view)
5330 if (_keyInputFocusLostEventHandler != null)
5332 _keyInputFocusLostEventHandler(this, null);
5336 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
5338 if (keyEvent == global::System.IntPtr.Zero)
5340 NUILog.Error("keyEvent should not be null!");
5344 KeyEventArgs e = new KeyEventArgs();
5346 bool result = false;
5348 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
5350 if (_keyEventHandler != null)
5352 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
5354 // Oring the result of each callback.
5355 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
5357 result |= del(this, e);
5364 // Callback for View OnRelayout signal
5365 private void OnRelayout(IntPtr data)
5367 if (_onRelayoutEventHandler != null)
5369 _onRelayoutEventHandler(this, null);
5373 // Callback for View TouchSignal
5374 private bool OnTouch(IntPtr view, IntPtr touchData)
5376 if (touchData == global::System.IntPtr.Zero)
5378 NUILog.Error("touchData should not be null!");
5382 TouchEventArgs e = new TouchEventArgs();
5384 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
5386 if (_touchDataEventHandler != null)
5388 return _touchDataEventHandler(this, e);
5393 // Callback for View Hover signal
5394 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
5396 if (hoverEvent == global::System.IntPtr.Zero)
5398 NUILog.Error("hoverEvent should not be null!");
5402 HoverEventArgs e = new HoverEventArgs();
5404 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
5406 if (_hoverEventHandler != null)
5408 return _hoverEventHandler(this, e);
5413 // Callback for View Wheel signal
5414 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
5416 if (wheelEvent == global::System.IntPtr.Zero)
5418 NUILog.Error("wheelEvent should not be null!");
5422 WheelEventArgs e = new WheelEventArgs();
5424 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
5426 if (_wheelEventHandler != null)
5428 return _wheelEventHandler(this, e);
5433 // Callback for View OnWindow signal
5434 private void OnWindow(IntPtr data)
5436 if (_onWindowEventHandler != null)
5438 _onWindowEventHandler(this, null);
5442 // Callback for View OffWindow signal
5443 private void OffWindow(IntPtr data)
5445 if (_offWindowEventHandler != null)
5447 _offWindowEventHandler(this, null);
5451 // Callback for View visibility change signal
5452 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
5454 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
5457 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5459 e.Visibility = visibility;
5462 if (_visibilityChangedEventHandler != null)
5464 _visibilityChangedEventHandler(this, e);
5468 // Callback for View layout direction change signal
5469 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
5471 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
5474 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5478 if (_layoutDirectionChangedEventHandler != null)
5480 _layoutDirectionChangedEventHandler(this, e);
5484 private void OnResourcesLoaded(IntPtr view)
5486 if (_resourcesLoadedEventHandler != null)
5488 _resourcesLoadedEventHandler(this, null);
5492 private View ConvertIdToView(uint id)
5495 if (GetParent() is View)
5497 View parentView = GetParent() as View;
5498 view = parentView.FindChildById(id);
5503 view = Window.Instance.GetRootLayer().FindChildById(id);
5509 private void OnBackgroundResourceLoaded(IntPtr view)
5511 BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5512 e.Status = (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5514 if (_backgroundResourceLoadedEventHandler != null)
5516 _backgroundResourceLoadedEventHandler(this, e);
5521 /// Event argument passed through the ChildAdded event.
5523 /// <since_tizen> 5 </since_tizen>
5524 public class ChildAddedEventArgs : EventArgs
5527 /// Added child view at moment.
5529 /// <since_tizen> 5 </since_tizen>
5530 public View Added { get; set; }
5534 /// Event argument passed through the ChildRemoved event.
5536 /// <since_tizen> 5 </since_tizen>
5537 public class ChildRemovedEventArgs : EventArgs
5540 /// Removed child view at moment.
5542 /// <since_tizen> 5 </since_tizen>
5543 public View Removed { get; set; }
5547 /// Event arguments that passed via the KeyEvent signal.
5549 /// <since_tizen> 3 </since_tizen>
5550 public class KeyEventArgs : EventArgs
5555 /// Key - is the key sent to the view.
5557 /// <since_tizen> 3 </since_tizen>
5572 /// Event arguments that passed via the touch signal.
5574 /// <since_tizen> 3 </since_tizen>
5575 public class TouchEventArgs : EventArgs
5577 private Touch _touch;
5580 /// Touch - contains the information of touch points.
5582 /// <since_tizen> 3 </since_tizen>
5597 /// Event arguments that passed via the hover signal.
5599 /// <since_tizen> 3 </since_tizen>
5600 public class HoverEventArgs : EventArgs
5602 private Hover _hover;
5605 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
5607 /// <since_tizen> 3 </since_tizen>
5622 /// Event arguments that passed via the wheel signal.
5624 /// <since_tizen> 3 </since_tizen>
5625 public class WheelEventArgs : EventArgs
5627 private Wheel _wheel;
5630 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
5632 /// <since_tizen> 3 </since_tizen>
5647 /// Event arguments of visibility changed.
5649 /// <since_tizen> 3 </since_tizen>
5650 public class VisibilityChangedEventArgs : EventArgs
5653 private bool _visibility;
5654 private VisibilityChangeType _type;
5657 /// The view, or child of view, whose visibility has changed.
5659 /// <since_tizen> 3 </since_tizen>
5673 /// Whether the view is now visible or not.
5675 /// <since_tizen> 3 </since_tizen>
5676 public bool Visibility
5684 _visibility = value;
5689 /// Whether the view's visible property has changed or a parent's.
5691 /// <since_tizen> 3 </since_tizen>
5692 public VisibilityChangeType Type
5706 /// Event arguments of layout direction changed.
5708 /// <since_tizen> 4 </since_tizen>
5709 public class LayoutDirectionChangedEventArgs : EventArgs
5712 private ViewLayoutDirectionType _type;
5715 /// The view, or child of view, whose layout direction has changed.
5717 /// <since_tizen> 4 </since_tizen>
5731 /// Whether the view's layout direction property has changed or a parent's.
5733 /// <since_tizen> 4 </since_tizen>
5734 public ViewLayoutDirectionType Type
5748 private Dictionary<string, Transition> transDictionary = new Dictionary<string, Transition>();
5750 /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
5751 [EditorBrowsable(EditorBrowsableState.Never)]
5752 public Transition GetTransition(string transitionName)
5754 Transition trans = null;
5755 transDictionary.TryGetValue(transitionName, out trans);
5759 private void LoadTransitions()
5761 foreach (string str in transitionNames)
5763 string resourceName = str + ".xaml";
5764 Transition trans = null;
5766 string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
5768 string likelyResourcePath = resource + "animation/" + resourceName;
5770 if (File.Exists(likelyResourcePath))
5772 trans = Extensions.LoadObject<Transition>(likelyResourcePath);
5776 transDictionary.Add(trans.Name, trans);
5781 /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
5782 [EditorBrowsable(EditorBrowsableState.Never)]
5783 public string[] TransitionNames
5787 return transitionNames;
5791 transitionNames = value;
5795 private string[] transitionNames;
5797 internal class BackgroundResourceLoadedEventArgs : EventArgs
5799 private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5800 public ResourceLoadingStatusType Status
5813 internal class Property
5815 internal static readonly int TOOLTIP = Interop.ViewProperty.View_Property_TOOLTIP_get();
5816 internal static readonly int STATE = Interop.ViewProperty.View_Property_STATE_get();
5817 internal static readonly int SUB_STATE = Interop.ViewProperty.View_Property_SUB_STATE_get();
5818 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
5819 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
5820 internal static readonly int UP_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
5821 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
5822 internal static readonly int STYLE_NAME = Interop.ViewProperty.View_Property_STYLE_NAME_get();
5823 internal static readonly int BACKGROUND = Interop.ViewProperty.View_Property_BACKGROUND_get();
5824 internal static readonly int SIBLING_ORDER = Interop.ActorProperty.Actor_Property_SIBLING_ORDER_get();
5825 internal static readonly int OPACITY = Interop.ActorProperty.Actor_Property_OPACITY_get();
5826 internal static readonly int SCREEN_POSITION = Interop.ActorProperty.Actor_Property_SCREEN_POSITION_get();
5827 internal static readonly int POSITION_USES_ANCHOR_POINT = Interop.ActorProperty.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
5828 internal static readonly int PARENT_ORIGIN = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_get();
5829 internal static readonly int PARENT_ORIGIN_X = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_X_get();
5830 internal static readonly int PARENT_ORIGIN_Y = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_Y_get();
5831 internal static readonly int PARENT_ORIGIN_Z = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_Z_get();
5832 internal static readonly int ANCHOR_POINT = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_get();
5833 internal static readonly int ANCHOR_POINT_X = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_X_get();
5834 internal static readonly int ANCHOR_POINT_Y = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_Y_get();
5835 internal static readonly int ANCHOR_POINT_Z = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_Z_get();
5836 internal static readonly int SIZE = Interop.ActorProperty.Actor_Property_SIZE_get();
5837 internal static readonly int SIZE_WIDTH = Interop.ActorProperty.Actor_Property_SIZE_WIDTH_get();
5838 internal static readonly int SIZE_HEIGHT = Interop.ActorProperty.Actor_Property_SIZE_HEIGHT_get();
5839 internal static readonly int SIZE_DEPTH = Interop.ActorProperty.Actor_Property_SIZE_DEPTH_get();
5840 internal static readonly int POSITION = Interop.ActorProperty.Actor_Property_POSITION_get();
5841 internal static readonly int POSITION_X = Interop.ActorProperty.Actor_Property_POSITION_X_get();
5842 internal static readonly int POSITION_Y = Interop.ActorProperty.Actor_Property_POSITION_Y_get();
5843 internal static readonly int POSITION_Z = Interop.ActorProperty.Actor_Property_POSITION_Z_get();
5844 internal static readonly int WORLD_POSITION = Interop.ActorProperty.Actor_Property_WORLD_POSITION_get();
5845 internal static readonly int WORLD_POSITION_X = Interop.ActorProperty.Actor_Property_WORLD_POSITION_X_get();
5846 internal static readonly int WORLD_POSITION_Y = Interop.ActorProperty.Actor_Property_WORLD_POSITION_Y_get();
5847 internal static readonly int WORLD_POSITION_Z = Interop.ActorProperty.Actor_Property_WORLD_POSITION_Z_get();
5848 internal static readonly int ORIENTATION = Interop.ActorProperty.Actor_Property_ORIENTATION_get();
5849 internal static readonly int WORLD_ORIENTATION = Interop.ActorProperty.Actor_Property_WORLD_ORIENTATION_get();
5850 internal static readonly int SCALE = Interop.ActorProperty.Actor_Property_SCALE_get();
5851 internal static readonly int SCALE_X = Interop.ActorProperty.Actor_Property_SCALE_X_get();
5852 internal static readonly int SCALE_Y = Interop.ActorProperty.Actor_Property_SCALE_Y_get();
5853 internal static readonly int SCALE_Z = Interop.ActorProperty.Actor_Property_SCALE_Z_get();
5854 internal static readonly int WORLD_SCALE = Interop.ActorProperty.Actor_Property_WORLD_SCALE_get();
5855 internal static readonly int VISIBLE = Interop.ActorProperty.Actor_Property_VISIBLE_get();
5856 internal static readonly int WORLD_COLOR = Interop.ActorProperty.Actor_Property_WORLD_COLOR_get();
5857 internal static readonly int WORLD_MATRIX = Interop.ActorProperty.Actor_Property_WORLD_MATRIX_get();
5858 internal static readonly int NAME = Interop.ActorProperty.Actor_Property_NAME_get();
5859 internal static readonly int SENSITIVE = Interop.ActorProperty.Actor_Property_SENSITIVE_get();
5860 internal static readonly int LEAVE_REQUIRED = Interop.ActorProperty.Actor_Property_LEAVE_REQUIRED_get();
5861 internal static readonly int INHERIT_ORIENTATION = Interop.ActorProperty.Actor_Property_INHERIT_ORIENTATION_get();
5862 internal static readonly int INHERIT_SCALE = Interop.ActorProperty.Actor_Property_INHERIT_SCALE_get();
5863 internal static readonly int DRAW_MODE = Interop.ActorProperty.Actor_Property_DRAW_MODE_get();
5864 internal static readonly int SIZE_MODE_FACTOR = Interop.ActorProperty.Actor_Property_SIZE_MODE_FACTOR_get();
5865 internal static readonly int WIDTH_RESIZE_POLICY = Interop.ActorProperty.Actor_Property_WIDTH_RESIZE_POLICY_get();
5866 internal static readonly int HEIGHT_RESIZE_POLICY = Interop.ActorProperty.Actor_Property_HEIGHT_RESIZE_POLICY_get();
5867 internal static readonly int SIZE_SCALE_POLICY = Interop.ActorProperty.Actor_Property_SIZE_SCALE_POLICY_get();
5868 internal static readonly int WIDTH_FOR_HEIGHT = Interop.ActorProperty.Actor_Property_WIDTH_FOR_HEIGHT_get();
5869 internal static readonly int HEIGHT_FOR_WIDTH = Interop.ActorProperty.Actor_Property_HEIGHT_FOR_WIDTH_get();
5870 internal static readonly int MINIMUM_SIZE = Interop.ActorProperty.Actor_Property_MINIMUM_SIZE_get();
5871 internal static readonly int MAXIMUM_SIZE = Interop.ActorProperty.Actor_Property_MAXIMUM_SIZE_get();
5872 internal static readonly int INHERIT_POSITION = Interop.ActorProperty.Actor_Property_INHERIT_POSITION_get();
5873 internal static readonly int CLIPPING_MODE = Interop.ActorProperty.Actor_Property_CLIPPING_MODE_get();
5874 internal static readonly int INHERIT_LAYOUT_DIRECTION = Interop.ActorProperty.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
5875 internal static readonly int LAYOUT_DIRECTION = Interop.ActorProperty.Actor_Property_LAYOUT_DIRECTION_get();
5876 internal static readonly int MARGIN = Interop.ViewProperty.View_Property_MARGIN_get();
5877 internal static readonly int PADDING = Interop.ViewProperty.View_Property_PADDING_get();