2 * Copyright(c) 2018 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.ComponentModel;
19 using System.Runtime.InteropServices;
20 using Tizen.NUI.Binding;
22 namespace Tizen.NUI.BaseComponents
25 /// View is the base class for all views.
27 /// <since_tizen> 3 </since_tizen>
28 public class View : Container, IResourcesProvider
32 /// Flag to allow Layouting to be disabled for Views.
33 /// Once a View has a Layout set then any children added to Views from then on will receive
34 /// automatic Layouts.
36 private static bool layoutingDisabled = true;
38 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
39 [EditorBrowsable(EditorBrowsableState.Never)]
40 public bool IsResourcesCreated
44 return Application.Current.IsResourcesCreated;
48 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
49 [EditorBrowsable(EditorBrowsableState.Never)]
50 public ResourceDictionary XamlResources
54 return Application.Current.XamlResources;
58 Application.Current.XamlResources = value;
62 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
63 [EditorBrowsable(EditorBrowsableState.Never)]
64 public static readonly BindableProperty StyleNameProperty = BindableProperty.Create("StyleName", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
66 var view = (View)bindable;
69 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue));
72 defaultValueCreator:(bindable) =>
74 var view = (View)bindable;
76 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STYLE_NAME).Get(out temp);
79 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
80 [EditorBrowsable(EditorBrowsableState.Never)]
81 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), Color.Transparent, propertyChanged: (bindable, oldValue, newValue) =>
83 var view = (View)bindable;
86 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((Color)newValue));
89 defaultValueCreator:(bindable) =>
91 var view = (View)bindable;
92 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
94 Tizen.NUI.PropertyMap background = view.Background;
96 background.Find(Visual.Property.Type)?.Get(out visualType);
97 if (visualType == (int)Visual.Type.Color)
99 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
102 return backgroundColor;
104 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
105 [EditorBrowsable(EditorBrowsableState.Never)]
106 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
108 var view = (View)bindable;
109 if (newValue != null)
111 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((string)newValue));
114 defaultValueCreator:(bindable) =>
116 var view = (View)bindable;
117 string backgroundImage = "";
119 Tizen.NUI.PropertyMap background = view.Background;
121 background.Find(Visual.Property.Type)?.Get(out visualType);
122 if (visualType == (int)Visual.Type.Image)
124 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
127 return backgroundImage;
129 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
130 [EditorBrowsable(EditorBrowsableState.Never)]
131 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create("Background", typeof(PropertyMap), typeof(View), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
133 var view = (View)bindable;
134 if (newValue != null)
136 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
139 defaultValueCreator:(bindable) =>
141 var view = (View)bindable;
142 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
143 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
146 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
147 [EditorBrowsable(EditorBrowsableState.Never)]
148 public static readonly BindableProperty StateProperty = BindableProperty.Create("State", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
150 var view = (View)bindable;
151 if (newValue != null)
153 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
156 defaultValueCreator:(bindable) =>
158 var view = (View)bindable;
160 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
162 NUILog.Error("State get error!");
166 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
167 [EditorBrowsable(EditorBrowsableState.Never)]
168 public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
170 var view = (View)bindable;
171 string valueToString = "";
172 if (newValue != null)
174 switch ((States)newValue)
176 case States.Normal: { valueToString = "NORMAL"; break; }
177 case States.Focused: { valueToString = "FOCUSED"; break; }
178 case States.Disabled: { valueToString = "DISABLED"; break; }
179 default: { valueToString = "NORMAL"; break; }
181 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
184 defaultValueCreator:(bindable) =>
186 var view = (View)bindable;
188 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
190 NUILog.Error("subState get error!");
194 case "NORMAL": return States.Normal;
195 case "FOCUSED": return States.Focused;
196 case "DISABLED": return States.Disabled;
197 default: return States.Normal;
200 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
201 [EditorBrowsable(EditorBrowsableState.Never)]
202 public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
204 var view = (View)bindable;
205 if (newValue != null)
207 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
210 defaultValueCreator:(bindable) =>
212 var view = (View)bindable;
213 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
214 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
217 // public static readonly BindableProperty TooltipTextProperty = BindableProperty.Create("TooltipText", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
219 // var view = (View)bindable;
220 // if (newValue != null)
222 // Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((string)newValue));
225 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
226 [EditorBrowsable(EditorBrowsableState.Never)]
227 public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
229 var view = (View)bindable;
230 if (newValue != null)
232 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
235 defaultValueCreator:(bindable) =>
237 var view = (View)bindable;
239 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
242 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
243 [EditorBrowsable(EditorBrowsableState.Never)]
244 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
246 var view = (View)bindable;
247 if (newValue != null)
249 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
252 defaultValueCreator:(bindable) =>
254 var view = (View)bindable;
256 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
259 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
260 [EditorBrowsable(EditorBrowsableState.Never)]
261 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), Vector4.Zero, propertyChanged: (bindable, oldValue, newValue) =>
263 var view = (View)bindable;
264 if (newValue != null)
266 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
269 defaultValueCreator:(bindable) =>
271 var view = (View)bindable;
272 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
273 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
276 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
277 [EditorBrowsable(EditorBrowsableState.Never)]
278 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
280 var view = (View)bindable;
281 if (newValue != null)
283 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
286 defaultValueCreator:(bindable) =>
288 var view = (View)bindable;
289 Vector2 temp = new Vector2(0.0f, 0.0f);
290 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
293 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
294 [EditorBrowsable(EditorBrowsableState.Never)]
295 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
297 var view = (View)bindable;
298 if (newValue != null)
300 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
303 defaultValueCreator:(bindable) =>
305 var view = (View)bindable;
307 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
310 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
311 [EditorBrowsable(EditorBrowsableState.Never)]
312 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
314 var view = (View)bindable;
315 if (newValue != null)
317 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
320 defaultValueCreator:(bindable) =>
322 var view = (View)bindable;
324 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
327 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
328 [EditorBrowsable(EditorBrowsableState.Never)]
329 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
331 var view = (View)bindable;
332 string valueToString = "";
334 if (newValue != null)
336 switch ((HorizontalAlignmentType)newValue)
338 case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
339 case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
340 case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
341 default: { valueToString = "left"; break; }
343 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
346 defaultValueCreator:(bindable) =>
348 var view = (View)bindable;
350 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
352 NUILog.Error("CellHorizontalAlignment get error!");
357 case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
358 case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
359 case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
360 default: return Tizen.NUI.HorizontalAlignmentType.Left;
363 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
364 [EditorBrowsable(EditorBrowsableState.Never)]
365 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
367 var view = (View)bindable;
368 string valueToString = "";
370 if (newValue != null)
372 switch ((VerticalAlignmentType)newValue)
374 case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
375 case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
376 case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
377 default: { valueToString = "top"; break; }
379 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
382 defaultValueCreator:(bindable) =>
384 var view = (View)bindable;
386 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
388 NUILog.Error("CellVerticalAlignment get error!");
393 case "top": return Tizen.NUI.VerticalAlignmentType.Top;
394 case "center": return Tizen.NUI.VerticalAlignmentType.Center;
395 case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
396 default: return Tizen.NUI.VerticalAlignmentType.Top;
399 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
400 [EditorBrowsable(EditorBrowsableState.Never)]
401 public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
403 var view = (View)bindable;
404 if (newValue != null)
406 Tizen.NUI.Object.SetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
409 defaultValueCreator:(bindable) =>
411 var view = (View)bindable;
413 Tizen.NUI.Object.GetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT).Get(out temp);
416 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
417 [EditorBrowsable(EditorBrowsableState.Never)]
418 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create("LeftFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
420 var view = (View)bindable;
421 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View).GetId(); }
422 else { view.LeftFocusableViewId = -1; }
424 defaultValueCreator:(bindable) =>
426 var view = (View)bindable;
427 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
430 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
431 [EditorBrowsable(EditorBrowsableState.Never)]
432 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create("RightFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
434 var view = (View)bindable;
435 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View).GetId(); }
436 else { view.RightFocusableViewId = -1; }
438 defaultValueCreator:(bindable) =>
440 var view = (View)bindable;
441 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
444 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
445 [EditorBrowsable(EditorBrowsableState.Never)]
446 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create("UpFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
448 var view = (View)bindable;
449 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View).GetId(); }
450 else { view.UpFocusableViewId = -1; }
452 defaultValueCreator:(bindable) =>
454 var view = (View)bindable;
455 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
458 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
459 [EditorBrowsable(EditorBrowsableState.Never)]
460 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create("DownFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
462 var view = (View)bindable;
463 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View).GetId(); }
464 else { view.DownFocusableViewId = -1; }
466 defaultValueCreator:(bindable) =>
468 var view = (View)bindable;
469 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
472 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
473 [EditorBrowsable(EditorBrowsableState.Never)]
474 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
476 var view = (View)bindable;
477 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
479 defaultValueCreator:(bindable) =>
481 var view = (View)bindable;
482 return view.IsKeyboardFocusable();
484 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
485 [EditorBrowsable(EditorBrowsableState.Never)]
486 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
488 var view = (View)bindable;
489 if (newValue != null)
491 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue( new Size((Size2D)newValue)));
494 defaultValueCreator:(bindable) =>
496 var view = (View)bindable;
497 Size temp = new Size(0.0f, 0.0f, 0.0f);
498 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
499 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
502 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
503 [EditorBrowsable(EditorBrowsableState.Never)]
504 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
506 var view = (View)bindable;
507 if (newValue != null)
509 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
512 defaultValueCreator:(bindable) =>
514 var view = (View)bindable;
516 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
519 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
520 [EditorBrowsable(EditorBrowsableState.Never)]
521 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), new Position2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
523 var view = (View)bindable;
524 if (newValue != null)
526 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue( new Position((Position2D)newValue) ));
529 defaultValueCreator:(bindable) =>
531 var view = (View)bindable;
532 Position temp = new Position(0.0f, 0.0f, 0.0f);
533 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
534 return new Position2D(temp);
536 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
537 [EditorBrowsable(EditorBrowsableState.Never)]
538 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
540 var view = (View)bindable;
541 if (newValue != null)
543 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
546 defaultValueCreator:(bindable) =>
548 var view = (View)bindable;
550 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
553 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
554 [EditorBrowsable(EditorBrowsableState.Never)]
555 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
557 var view = (View)bindable;
559 if (newValue != null)
561 value = (int)newValue;
564 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
567 var siblings = view.GetParent()?.Children;
568 if (siblings != null)
570 int currentOrder = siblings.IndexOf(view);
571 if (value != currentOrder)
573 if (value == 0) { view.LowerToBottom(); }
574 else if (value < siblings.Count - 1)
576 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
577 else { view.LowerBelow(siblings[value]); }
579 else { view.RaiseToTop(); }
584 defaultValueCreator:(bindable) =>
586 var view = (View)bindable;
587 var parentChildren = view.GetParent()?.Children;
588 int currentOrder = 0;
589 if (parentChildren != null)
591 currentOrder = parentChildren.IndexOf(view);
593 if (currentOrder < 0) { return 0; }
594 else if (currentOrder < parentChildren.Count) { return currentOrder; }
599 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
600 [EditorBrowsable(EditorBrowsableState.Never)]
601 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), Position.ParentOriginTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
603 var view = (View)bindable;
604 if (newValue != null)
606 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
609 defaultValueCreator:(bindable) =>
611 var view = (View)bindable;
612 Position temp = new Position(0.0f, 0.0f, 0.0f);
613 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
617 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
618 [EditorBrowsable(EditorBrowsableState.Never)]
619 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), Position.PivotPointTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
621 var view = (View)bindable;
622 if (newValue != null)
624 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
627 defaultValueCreator:(bindable) =>
629 var view = (View)bindable;
630 Position temp = new Position(0.0f, 0.0f, 0.0f);
631 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
634 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
635 [EditorBrowsable(EditorBrowsableState.Never)]
636 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
638 var view = (View)bindable;
639 if (newValue != null)
641 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
644 defaultValueCreator:(bindable) =>
646 var view = (View)bindable;
648 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
651 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
652 [EditorBrowsable(EditorBrowsableState.Never)]
653 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
655 var view = (View)bindable;
656 if (newValue != null)
658 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
661 defaultValueCreator:(bindable) =>
663 var view = (View)bindable;
665 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
668 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
669 [EditorBrowsable(EditorBrowsableState.Never)]
670 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), Position.Zero, propertyChanged: (bindable, oldValue, newValue) =>
672 var view = (View)bindable;
673 if (newValue != null)
675 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
678 defaultValueCreator:(bindable) =>
680 var view = (View)bindable;
681 Position temp = new Position(0.0f, 0.0f, 0.0f);
682 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
685 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
686 [EditorBrowsable(EditorBrowsableState.Never)]
687 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
689 var view = (View)bindable;
690 if (newValue != null)
692 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
695 defaultValueCreator:(bindable) =>
697 var view = (View)bindable;
699 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
702 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
703 [EditorBrowsable(EditorBrowsableState.Never)]
704 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
706 var view = (View)bindable;
707 if (newValue != null)
709 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
712 defaultValueCreator:(bindable) =>
714 var view = (View)bindable;
716 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
719 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
720 [EditorBrowsable(EditorBrowsableState.Never)]
721 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
723 var view = (View)bindable;
724 if (newValue != null)
726 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
729 defaultValueCreator:(bindable) =>
731 var view = (View)bindable;
733 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
736 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
737 [EditorBrowsable(EditorBrowsableState.Never)]
738 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), new Rotation(new Radian(0), Vector3.ZAxis), propertyChanged: (bindable, oldValue, newValue) =>
740 var view = (View)bindable;
741 if (newValue != null)
743 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
746 defaultValueCreator:(bindable) =>
748 var view = (View)bindable;
749 Rotation temp = new Rotation();
750 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
753 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
754 [EditorBrowsable(EditorBrowsableState.Never)]
755 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
757 var view = (View)bindable;
758 if (newValue != null)
760 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
763 defaultValueCreator:(bindable) =>
765 var view = (View)bindable;
766 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
767 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
770 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
771 [EditorBrowsable(EditorBrowsableState.Never)]
772 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
774 var view = (View)bindable;
775 if (newValue != null)
777 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
780 defaultValueCreator:(bindable) =>
782 var view = (View)bindable;
784 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
787 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
788 [EditorBrowsable(EditorBrowsableState.Never)]
789 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
791 var view = (View)bindable;
792 if (newValue != null)
794 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
797 defaultValueCreator:(bindable) =>
799 var view = (View)bindable;
801 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
804 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
805 [EditorBrowsable(EditorBrowsableState.Never)]
806 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
808 var view = (View)bindable;
809 if (newValue != null)
811 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
814 defaultValueCreator:(bindable) =>
816 var view = (View)bindable;
818 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
821 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
822 [EditorBrowsable(EditorBrowsableState.Never)]
823 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
825 var view = (View)bindable;
826 if (newValue != null)
828 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
831 defaultValueCreator:(bindable) =>
833 var view = (View)bindable;
835 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
838 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
839 [EditorBrowsable(EditorBrowsableState.Never)]
840 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
842 var view = (View)bindable;
843 if (newValue != null)
845 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
848 defaultValueCreator:(bindable) =>
850 var view = (View)bindable;
852 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
855 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
856 [EditorBrowsable(EditorBrowsableState.Never)]
857 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
859 var view = (View)bindable;
860 if (newValue != null)
862 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
865 defaultValueCreator:(bindable) =>
867 var view = (View)bindable;
869 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
872 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
873 [EditorBrowsable(EditorBrowsableState.Never)]
874 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
876 var view = (View)bindable;
877 if (newValue != null)
879 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
882 defaultValueCreator:(bindable) =>
884 var view = (View)bindable;
886 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
889 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
890 [EditorBrowsable(EditorBrowsableState.Never)]
891 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
893 var view = (View)bindable;
894 if (newValue != null)
896 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
899 defaultValueCreator:(bindable) =>
901 var view = (View)bindable;
903 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
906 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
907 [EditorBrowsable(EditorBrowsableState.Never)]
908 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
910 var view = (View)bindable;
911 if (newValue != null)
913 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
916 defaultValueCreator:(bindable) =>
918 var view = (View)bindable;
920 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
922 NUILog.Error("DrawMode get error!");
926 case "NORMAL": return DrawModeType.Normal;
927 case "OVERLAY_2D": return DrawModeType.Overlay2D;
928 case "STENCIL": return DrawModeType.Stencil;
929 default: return DrawModeType.Normal;
932 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
933 [EditorBrowsable(EditorBrowsableState.Never)]
934 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
936 var view = (View)bindable;
937 if (newValue != null)
939 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
942 defaultValueCreator:(bindable) =>
944 var view = (View)bindable;
945 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
946 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
949 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
950 [EditorBrowsable(EditorBrowsableState.Never)]
951 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
953 var view = (View)bindable;
954 if (newValue != null)
956 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
959 defaultValueCreator:(bindable) =>
961 var view = (View)bindable;
963 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
965 NUILog.Error("WidthResizePolicy get error!");
969 case "FIXED": return ResizePolicyType.Fixed;
970 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
971 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
972 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
973 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
974 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
975 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
976 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
977 default: return ResizePolicyType.Fixed;
980 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
981 [EditorBrowsable(EditorBrowsableState.Never)]
982 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
984 var view = (View)bindable;
985 if (newValue != null)
987 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
990 defaultValueCreator:(bindable) =>
992 var view = (View)bindable;
994 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
996 NUILog.Error("HeightResizePolicy get error!");
1000 case "FIXED": return ResizePolicyType.Fixed;
1001 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1002 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1003 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1004 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1005 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1006 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1007 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1008 default: return ResizePolicyType.Fixed;
1011 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1012 [EditorBrowsable(EditorBrowsableState.Never)]
1013 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1015 var view = (View)bindable;
1016 string valueToString = "";
1017 if (newValue != null)
1019 switch ((SizeScalePolicyType)newValue)
1021 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1022 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1023 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1024 default: { valueToString = "USE_SIZE_SET"; break; }
1026 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1029 defaultValueCreator:(bindable) =>
1031 var view = (View)bindable;
1033 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1035 NUILog.Error("SizeScalePolicy get error!");
1039 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1040 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1041 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1042 default: return SizeScalePolicyType.UseSizeSet;
1045 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1046 [EditorBrowsable(EditorBrowsableState.Never)]
1047 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1049 var view = (View)bindable;
1050 if (newValue != null)
1052 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1055 defaultValueCreator:(bindable) =>
1057 var view = (View)bindable;
1059 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1062 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1063 [EditorBrowsable(EditorBrowsableState.Never)]
1064 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1066 var view = (View)bindable;
1067 if (newValue != null)
1069 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1072 defaultValueCreator:(bindable) =>
1074 var view = (View)bindable;
1076 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1079 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1080 [EditorBrowsable(EditorBrowsableState.Never)]
1081 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), new Extents(0,0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1083 var view = (View)bindable;
1084 if (newValue != null)
1086 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1089 defaultValueCreator:(bindable) =>
1091 var view = (View)bindable;
1092 Extents temp = new Extents(0, 0, 0, 0);
1093 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1096 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1097 [EditorBrowsable(EditorBrowsableState.Never)]
1098 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), new Size(0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1100 var view = (View)bindable;
1101 if (newValue != null)
1103 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1106 defaultValueCreator: (bindable) => {
1107 var view = (View)bindable;
1108 Size temp = new Size(0, 0, 0);
1109 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1112 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1113 [EditorBrowsable(EditorBrowsableState.Never)]
1114 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
1116 var view = (View)bindable;
1117 if (newValue != null)
1119 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1122 defaultValueCreator:(bindable) =>
1124 var view = (View)bindable;
1125 Size2D temp = new Size2D(0, 0);
1126 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1129 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1130 [EditorBrowsable(EditorBrowsableState.Never)]
1131 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
1133 var view = (View)bindable;
1134 if (newValue != null)
1136 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1139 defaultValueCreator:(bindable) =>
1141 var view = (View)bindable;
1142 Size2D temp = new Size2D(0, 0);
1143 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1146 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1147 [EditorBrowsable(EditorBrowsableState.Never)]
1148 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1150 var view = (View)bindable;
1151 if (newValue != null)
1153 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1156 defaultValueCreator:(bindable) =>
1158 var view = (View)bindable;
1160 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1163 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1164 [EditorBrowsable(EditorBrowsableState.Never)]
1165 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1167 var view = (View)bindable;
1168 if (newValue != null)
1170 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1173 defaultValueCreator:(bindable) =>
1175 var view = (View)bindable;
1177 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1179 NUILog.Error("ClippingMode get error!");
1181 return (ClippingModeType)temp;
1183 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1184 [EditorBrowsable(EditorBrowsableState.Never)]
1185 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1187 var view = (View)bindable;
1188 if (newValue != null)
1190 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1193 defaultValueCreator:(bindable) =>
1195 var view = (View)bindable;
1197 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1200 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1201 [EditorBrowsable(EditorBrowsableState.Never)]
1202 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1204 var view = (View)bindable;
1205 if (newValue != null)
1207 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1210 defaultValueCreator:(bindable) =>
1212 var view = (View)bindable;
1214 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1216 NUILog.Error("LAYOUT_DIRECTION get error!");
1218 return (ViewLayoutDirectionType)temp;
1220 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1221 [EditorBrowsable(EditorBrowsableState.Never)]
1222 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), new Extents(0,0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1224 var view = (View)bindable;
1225 if (newValue != null)
1227 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1230 defaultValueCreator:(bindable) =>
1232 var view = (View)bindable;
1233 Extents temp = new Extents(0, 0, 0, 0);
1234 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1237 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1238 [EditorBrowsable(EditorBrowsableState.Never)]
1239 public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style),
1240 propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1243 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1245 private bool layoutSet = false; // Flag to indicate if SetLayout was called or View was automatically given a Layout
1247 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
1249 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1252 PositionUsesPivotPoint = false;
1254 _mergedStyle = new MergedStyle(GetType(), this);
1257 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
1259 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1263 /// Event argument passed through the ChildAdded event.
1265 /// <since_tizen> 5 </since_tizen>
1266 public class ChildAddedEventArgs : EventArgs
1269 /// Added child view at moment.
1271 /// <since_tizen> 5 </since_tizen>
1272 public View Added { get; set; }
1276 /// Event when a child is added.
1278 /// <since_tizen> 5 </since_tizen>
1279 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1281 // From Container Base class
1283 /// Adds a child view to this view.
1285 /// <seealso cref="Container.Add" />
1286 /// <since_tizen> 4 </since_tizen>
1287 public override void Add(View child)
1291 Tizen.Log.Fatal("NUI", "Child is null");
1295 Log.Info("NUI", "Adding Child:" + child.Name + " to " + Name + "\n");
1297 Container oldParent = child.GetParent();
1298 if (oldParent != this)
1300 if (oldParent != null)
1302 oldParent.Remove(child);
1304 child.InternalParent = this;
1306 // Only give children a layout if their parent is an explicit container or a pure View.
1307 // Pure View meaning not derived from a View, e.g a Legacy container.
1308 // layoutSet flag is true when the View became a layout using the set Layout API opposed to automatically due to it's parent.
1309 // First time the set Layout API is used by any View the Window no longer has layoutingDisabled.
1310 if ((true == layoutSet || GetType() == typeof(View)) && null == child.Layout && false == layoutingDisabled )
1312 Log.Info("NUI", "Parent[" + Name + "] Layout set[" + layoutSet.ToString() + "] Pure View[" + (!layoutSet).ToString() + "]\n");
1313 // If child is a View or explicitly set to require layouting then set child as a LayoutGroup.
1314 // If the child is derived from a View then it may be a legacy or existing container hence will do layouting itself.
1315 if( child.GetType() == typeof(View) || true == child.LayoutingRequired )
1317 Log.Info("NUI", "Creating LayoutGroup for " + child.Name + " LayoutingRequired[" + child.LayoutingRequired.ToString() + "]\n");
1318 child.SetLayout( new LayoutGroup() );
1322 // Adding child as a leaf, layouting will not propagate past this child.
1323 // Legacy containers will be a LayoutItems too and layout their children how they wish.
1324 Log.Info("NUI", "Creating LayoutItem for " + child.Name + "\n");
1325 child.SetLayout( new LayoutItem() );
1331 Layout.LayoutChildren.Add(child.Layout);
1334 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
1335 if (NDalicPINVOKE.SWIGPendingException.Pending)
1336 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1337 Children.Add(child);
1339 if (ChildAdded != null)
1341 ChildAddedEventArgs e = new ChildAddedEventArgs
1345 ChildAdded(this, e);
1351 /// Event argument passed through the ChildRemoved event.
1353 /// <since_tizen> 5 </since_tizen>
1354 public class ChildRemovedEventArgs : EventArgs
1357 /// Removed child view at moment.
1359 /// <since_tizen> 5 </since_tizen>
1360 public View Removed { get; set; }
1364 /// Event when a child is removed.
1366 /// <since_tizen> 5 </since_tizen>
1367 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1371 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
1373 /// <seealso cref="Container.Remove" />
1374 /// <since_tizen> 4 </since_tizen>
1375 public override void Remove(View child)
1377 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
1378 if (NDalicPINVOKE.SWIGPendingException.Pending)
1379 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1381 Children.Remove(child);
1382 child.InternalParent = null;
1388 Layout.LayoutChildren.Remove(child.Layout);
1392 if (ChildRemoved != null)
1394 ChildRemovedEventArgs e = new ChildRemovedEventArgs
1398 ChildRemoved(this, e);
1403 /// Retrieves a child view by index.
1405 /// <seealso cref="Container.GetChildAt" />
1406 /// <since_tizen> 4 </since_tizen>
1407 public override View GetChildAt(uint index)
1409 if (index < Children.Count)
1411 return Children[Convert.ToInt32(index)];
1420 /// Retrieves the number of children held by the view.
1422 /// <seealso cref="Container.GetChildCount" />
1423 /// <since_tizen> 4 </since_tizen>
1424 public override uint GetChildCount()
1426 return Convert.ToUInt32(Children.Count);
1430 /// Gets the views parent.
1432 /// <seealso cref="Container.GetParent()" />
1433 /// <since_tizen> 4 </since_tizen>
1434 public override Container GetParent()
1436 return this.InternalParent as Container;
1439 internal bool IsTopLevelView()
1441 if (GetParent() is Layer)
1449 /// you can override it to clean-up your own resources.
1451 /// <param name="type">DisposeTypes</param>
1452 /// <since_tizen> 3 </since_tizen>
1453 protected override void Dispose(DisposeTypes type)
1460 if (type == DisposeTypes.Explicit)
1463 //Release your own managed resources here.
1464 //You should release all of your own disposable objects here.
1467 //Release your own unmanaged resources here.
1468 //You should not access any managed member here except static instance.
1469 //because the execution order of Finalizes is non-deterministic.
1472 DisConnectFromSignals();
1475 if (swigCPtr.Handle != global::System.IntPtr.Zero)
1479 swigCMemOwn = false;
1480 NDalicPINVOKE.delete_View(swigCPtr);
1482 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1485 foreach (View view in Children)
1487 view.InternalParent = null;
1494 private void DisConnectFromSignals()
1496 // Save current CPtr.
1497 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
1499 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
1500 swigCPtr = GetBaseHandleCPtrHandleRef;
1502 if (_onRelayoutEventCallback != null)
1504 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1507 if (_offWindowEventCallback != null)
1509 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1512 if (_onWindowEventCallback != null)
1514 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1517 if (_wheelEventCallback != null)
1519 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1522 if (_hoverEventCallback != null)
1524 this.HoveredSignal().Disconnect(_hoverEventCallback);
1527 if (_touchDataCallback != null)
1529 this.TouchSignal().Disconnect(_touchDataCallback);
1532 if (_ResourcesLoadedCallback != null)
1534 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1537 if (_offWindowEventCallback != null)
1539 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1542 if (_onWindowEventCallback != null)
1544 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1547 if (_wheelEventCallback != null)
1549 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1552 if (_hoverEventCallback != null)
1554 this.HoveredSignal().Disconnect(_hoverEventCallback);
1557 if (_touchDataCallback != null)
1559 this.TouchSignal().Disconnect(_touchDataCallback);
1562 if (_onRelayoutEventCallback != null)
1564 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1567 if (_keyCallback != null)
1569 this.KeyEventSignal().Disconnect(_keyCallback);
1572 if (_keyInputFocusLostCallback != null)
1574 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1577 if (_keyInputFocusGainedCallback != null)
1579 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1582 if (_backgroundResourceLoadedCallback != null)
1584 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1587 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
1588 // Restore current CPtr.
1589 swigCPtr = currentCPtr;
1592 private EventHandler _keyInputFocusGainedEventHandler;
1593 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1594 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1595 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1598 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1599 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1601 /// <since_tizen> 3 </since_tizen>
1602 public event EventHandler FocusGained
1606 if (_keyInputFocusGainedEventHandler == null)
1608 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1609 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1612 _keyInputFocusGainedEventHandler += value;
1617 _keyInputFocusGainedEventHandler -= value;
1619 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1621 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1626 private void OnKeyInputFocusGained(IntPtr view)
1628 if (_keyInputFocusGainedEventHandler != null)
1630 _keyInputFocusGainedEventHandler(this, null);
1635 private EventHandler _keyInputFocusLostEventHandler;
1636 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1637 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1638 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1641 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1642 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1644 /// <since_tizen> 3 </since_tizen>
1645 public event EventHandler FocusLost
1649 if (_keyInputFocusLostEventHandler == null)
1651 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1652 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1655 _keyInputFocusLostEventHandler += value;
1660 _keyInputFocusLostEventHandler -= value;
1662 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1664 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1669 private void OnKeyInputFocusLost(IntPtr view)
1671 if (_keyInputFocusLostEventHandler != null)
1673 _keyInputFocusLostEventHandler(this, null);
1678 /// Event arguments that passed via the KeyEvent signal.
1680 /// <since_tizen> 3 </since_tizen>
1681 public class KeyEventArgs : EventArgs
1686 /// Key - is the key sent to the view.
1688 /// <since_tizen> 3 </since_tizen>
1702 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1703 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1704 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1705 private KeyCallbackType _keyCallback;
1708 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1709 /// The KeyPressed signal is emitted when the key event is received.<br />
1711 /// <since_tizen> 3 </since_tizen>
1712 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1716 if (_keyEventHandler == null)
1718 _keyCallback = OnKeyEvent;
1719 this.KeyEventSignal().Connect(_keyCallback);
1722 _keyEventHandler += value;
1727 _keyEventHandler -= value;
1729 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1731 this.KeyEventSignal().Disconnect(_keyCallback);
1736 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
1738 if (keyEvent == global::System.IntPtr.Zero)
1740 NUILog.Error("keyEvent should not be null!");
1744 KeyEventArgs e = new KeyEventArgs();
1746 bool result = false;
1748 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
1750 if (_keyEventHandler != null)
1752 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
1754 // Oring the result of each callback.
1755 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
1757 result |= del(this, e);
1764 private EventHandler _onRelayoutEventHandler;
1765 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1766 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1767 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1770 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1771 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1773 /// <since_tizen> 3 </since_tizen>
1774 public event EventHandler Relayout
1778 if (_onRelayoutEventHandler == null)
1780 _onRelayoutEventCallback = OnRelayout;
1781 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1784 _onRelayoutEventHandler += value;
1789 _onRelayoutEventHandler -= value;
1791 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1793 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1799 // Callback for View OnRelayout signal
1800 private void OnRelayout(IntPtr data)
1802 if (_onRelayoutEventHandler != null)
1804 _onRelayoutEventHandler(this, null);
1809 /// Event arguments that passed via the touch signal.
1811 /// <since_tizen> 3 </since_tizen>
1812 public class TouchEventArgs : EventArgs
1814 private Touch _touch;
1817 /// Touch - contains the information of touch points.
1819 /// <since_tizen> 3 </since_tizen>
1833 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1834 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1835 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1836 private TouchDataCallbackType _touchDataCallback;
1839 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1840 /// The touched signal is emitted when the touch input is received.<br />
1842 /// <since_tizen> 3 </since_tizen>
1843 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1847 if (_touchDataEventHandler == null)
1849 _touchDataCallback = OnTouch;
1850 this.TouchSignal().Connect(_touchDataCallback);
1853 _touchDataEventHandler += value;
1858 _touchDataEventHandler -= value;
1860 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1862 this.TouchSignal().Disconnect(_touchDataCallback);
1868 // Callback for View TouchSignal
1869 private bool OnTouch(IntPtr view, IntPtr touchData)
1871 if (touchData == global::System.IntPtr.Zero)
1873 NUILog.Error("touchData should not be null!");
1877 TouchEventArgs e = new TouchEventArgs();
1879 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
1881 if (_touchDataEventHandler != null)
1883 return _touchDataEventHandler(this, e);
1890 /// Event arguments that passed via the hover signal.
1892 /// <since_tizen> 3 </since_tizen>
1893 public class HoverEventArgs : EventArgs
1895 private Hover _hover;
1898 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
1900 /// <since_tizen> 3 </since_tizen>
1914 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1915 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1916 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1917 private HoverEventCallbackType _hoverEventCallback;
1920 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1921 /// The hovered signal is emitted when the hover input is received.<br />
1923 /// <since_tizen> 3 </since_tizen>
1924 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1928 if (_hoverEventHandler == null)
1930 _hoverEventCallback = OnHoverEvent;
1931 this.HoveredSignal().Connect(_hoverEventCallback);
1934 _hoverEventHandler += value;
1939 _hoverEventHandler -= value;
1941 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1943 this.HoveredSignal().Disconnect(_hoverEventCallback);
1949 // Callback for View Hover signal
1950 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
1952 if (hoverEvent == global::System.IntPtr.Zero)
1954 NUILog.Error("hoverEvent should not be null!");
1958 HoverEventArgs e = new HoverEventArgs();
1960 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
1962 if (_hoverEventHandler != null)
1964 return _hoverEventHandler(this, e);
1971 /// Event arguments that passed via the wheel signal.
1973 /// <since_tizen> 3 </since_tizen>
1974 public class WheelEventArgs : EventArgs
1976 private Wheel _wheel;
1979 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
1981 /// <since_tizen> 3 </since_tizen>
1995 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1996 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1997 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1998 private WheelEventCallbackType _wheelEventCallback;
2001 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
2002 /// The WheelMoved signal is emitted when the wheel event is received.<br />
2004 /// <since_tizen> 3 </since_tizen>
2005 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
2009 if (_wheelEventHandler == null)
2011 _wheelEventCallback = OnWheelEvent;
2012 this.WheelEventSignal().Connect(_wheelEventCallback);
2015 _wheelEventHandler += value;
2020 _wheelEventHandler -= value;
2022 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
2024 this.WheelEventSignal().Disconnect(_wheelEventCallback);
2030 // Callback for View Wheel signal
2031 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
2033 if (wheelEvent == global::System.IntPtr.Zero)
2035 NUILog.Error("wheelEvent should not be null!");
2039 WheelEventArgs e = new WheelEventArgs();
2041 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
2043 if (_wheelEventHandler != null)
2045 return _wheelEventHandler(this, e);
2051 private EventHandler _onWindowEventHandler;
2052 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2053 private delegate void OnWindowEventCallbackType(IntPtr control);
2054 private OnWindowEventCallbackType _onWindowEventCallback;
2057 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
2058 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
2060 /// <since_tizen> 3 </since_tizen>
2061 public event EventHandler AddedToWindow
2065 if (_onWindowEventHandler == null)
2067 _onWindowEventCallback = OnWindow;
2068 this.OnWindowSignal().Connect(_onWindowEventCallback);
2071 _onWindowEventHandler += value;
2076 _onWindowEventHandler -= value;
2078 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
2080 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
2085 // Callback for View OnWindow signal
2086 private void OnWindow(IntPtr data)
2088 if (_onWindowEventHandler != null)
2090 _onWindowEventHandler(this, null);
2095 private EventHandler _offWindowEventHandler;
2096 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2097 private delegate void OffWindowEventCallbackType(IntPtr control);
2098 private OffWindowEventCallbackType _offWindowEventCallback;
2101 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
2102 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
2104 /// <since_tizen> 3 </since_tizen>
2105 public event EventHandler RemovedFromWindow
2109 if (_offWindowEventHandler == null)
2111 _offWindowEventCallback = OffWindow;
2112 this.OffWindowSignal().Connect(_offWindowEventCallback);
2115 _offWindowEventHandler += value;
2120 _offWindowEventHandler -= value;
2122 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
2124 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
2129 // Callback for View OffWindow signal
2130 private void OffWindow(IntPtr data)
2132 if (_offWindowEventHandler != null)
2134 _offWindowEventHandler(this, null);
2139 /// Event arguments of visibility changed.
2141 /// <since_tizen> 3 </since_tizen>
2142 public class VisibilityChangedEventArgs : EventArgs
2145 private bool _visibility;
2146 private VisibilityChangeType _type;
2149 /// The view, or child of view, whose visibility has changed.
2151 /// <since_tizen> 3 </since_tizen>
2165 /// Whether the view is now visible or not.
2167 /// <since_tizen> 3 </since_tizen>
2168 public bool Visibility
2176 _visibility = value;
2181 /// Whether the view's visible property has changed or a parent's.
2183 /// <since_tizen> 3 </since_tizen>
2184 public VisibilityChangeType Type
2197 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
2198 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2199 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
2200 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
2203 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
2204 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
2206 /// <since_tizen> 3 </since_tizen>
2207 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
2211 if (_visibilityChangedEventHandler == null)
2213 _visibilityChangedEventCallback = OnVisibilityChanged;
2214 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
2217 _visibilityChangedEventHandler += value;
2222 _visibilityChangedEventHandler -= value;
2224 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
2226 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
2231 // Callback for View visibility change signal
2232 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
2234 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
2237 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2239 e.Visibility = visibility;
2242 if (_visibilityChangedEventHandler != null)
2244 _visibilityChangedEventHandler(this, e);
2250 /// Event arguments of layout direction changed.
2252 /// <since_tizen> 4 </since_tizen>
2253 public class LayoutDirectionChangedEventArgs : EventArgs
2256 private ViewLayoutDirectionType _type;
2259 /// The view, or child of view, whose layout direction has changed.
2261 /// <since_tizen> 4 </since_tizen>
2275 /// Whether the view's layout direction property has changed or a parent's.
2277 /// <since_tizen> 4 </since_tizen>
2278 public ViewLayoutDirectionType Type
2291 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
2292 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2293 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
2294 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
2297 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
2298 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
2300 /// <since_tizen> 4 </since_tizen>
2301 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
2305 if (_layoutDirectionChangedEventHandler == null)
2307 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
2308 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
2311 _layoutDirectionChangedEventHandler += value;
2316 _layoutDirectionChangedEventHandler -= value;
2318 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
2320 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
2325 // Callback for View layout direction change signal
2326 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
2328 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
2331 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2335 if (_layoutDirectionChangedEventHandler != null)
2337 _layoutDirectionChangedEventHandler(this, e);
2341 // Resource Ready Signal
2343 private EventHandler _resourcesLoadedEventHandler;
2344 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2345 private delegate void ResourcesLoadedCallbackType(IntPtr control);
2346 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
2349 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
2350 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
2352 /// <since_tizen> 3 </since_tizen>
2353 public event EventHandler ResourcesLoaded
2357 if (_resourcesLoadedEventHandler == null)
2359 _ResourcesLoadedCallback = OnResourcesLoaded;
2360 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
2363 _resourcesLoadedEventHandler += value;
2368 _resourcesLoadedEventHandler -= value;
2370 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
2372 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
2377 private void OnResourcesLoaded(IntPtr view)
2379 if (_resourcesLoadedEventHandler != null)
2381 _resourcesLoadedEventHandler(this, null);
2385 internal IntPtr GetPtrfromView()
2387 return (IntPtr)swigCPtr;
2390 internal class Property
2392 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
2393 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
2394 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
2395 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
2396 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
2397 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
2398 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
2399 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
2400 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
2401 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
2402 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
2403 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
2404 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
2405 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
2406 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
2407 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
2408 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
2409 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
2410 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
2411 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
2412 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
2413 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
2414 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
2415 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
2416 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
2417 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
2418 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
2419 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
2420 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
2421 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
2422 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
2423 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
2424 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
2425 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
2426 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
2427 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
2428 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
2429 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
2430 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
2431 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
2432 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
2433 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
2434 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
2435 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
2436 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
2437 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
2438 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
2439 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
2440 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
2441 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
2442 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
2443 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
2444 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
2445 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
2446 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
2447 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
2448 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
2449 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
2450 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
2451 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
2452 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
2453 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
2454 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();
2458 /// Describes the direction to move the focus towards.
2460 /// <since_tizen> 3 </since_tizen>
2461 public enum FocusDirection
2464 /// Move keyboard focus towards the left direction.
2466 /// <since_tizen> 3 </since_tizen>
2469 /// Move keyboard focus towards the right direction.
2471 /// <since_tizen> 3 </since_tizen>
2474 /// Move keyboard focus towards the up direction.
2476 /// <since_tizen> 3 </since_tizen>
2479 /// Move keyboard focus towards the down direction.
2481 /// <since_tizen> 3 </since_tizen>
2484 /// Move keyboard focus towards the previous page direction.
2486 /// <since_tizen> 3 </since_tizen>
2489 /// Move keyboard focus towards the next page direction.
2491 /// <since_tizen> 3 </since_tizen>
2496 /// Creates a new instance of a view.
2498 /// <since_tizen> 3 </since_tizen>
2499 public View() : this(NDalicPINVOKE.View_New(), true)
2501 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2503 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
2505 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2508 private View ConvertIdToView(uint id)
2511 if (GetParent() is View)
2513 View parentView = GetParent() as View;
2514 view = parentView.FindChildById(id);
2519 view = Window.Instance.GetRootLayer().FindChildById(id);
2525 internal void SetKeyInputFocus()
2527 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
2528 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2532 /// Queries whether the view has a focus.
2534 /// <returns>True if this view has a focus.</returns>
2535 /// <since_tizen> 3 </since_tizen>
2536 public bool HasFocus()
2538 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
2539 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2543 internal void ClearKeyInputFocus()
2545 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
2546 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2549 internal PinchGestureDetector GetPinchGestureDetector()
2551 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
2552 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2556 internal PanGestureDetector GetPanGestureDetector()
2558 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
2559 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2563 internal TapGestureDetector GetTapGestureDetector()
2565 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
2566 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2570 internal LongPressGestureDetector GetLongPressGestureDetector()
2572 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
2573 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2578 /// Sets the name of the style to be applied to the view.
2580 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
2581 /// <since_tizen> 3 </since_tizen>
2582 public void SetStyleName(string styleName)
2584 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
2585 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2589 /// Retrieves the name of the style to be applied to the view (if any).
2591 /// <returns>A string matching a style, or an empty string.</returns>
2592 /// <since_tizen> 3 </since_tizen>
2593 public string GetStyleName()
2595 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
2596 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2600 internal void SetBackgroundColor(Vector4 color)
2602 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
2603 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2606 internal Vector4 GetBackgroundColor()
2608 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
2609 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2613 internal void SetBackgroundImage(Image image)
2615 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
2616 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2620 /// Clears the background.
2622 /// <since_tizen> 3 </since_tizen>
2623 public void ClearBackground()
2625 NDalicPINVOKE.View_ClearBackground(swigCPtr);
2626 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2629 internal ControlKeySignal KeyEventSignal()
2631 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
2632 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2636 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
2638 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
2639 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2643 internal KeyInputFocusSignal KeyInputFocusLostSignal()
2645 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
2646 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2650 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
2652 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2655 internal enum PropertyRange
2657 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
2658 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
2659 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
2663 /// The StyleName, type string.
2665 /// <since_tizen> 3 </since_tizen>
2666 public string StyleName
2670 return (string)GetValue(StyleNameProperty);
2674 SetValue(StyleNameProperty, value);
2675 NotifyPropertyChanged();
2680 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
2682 /// <since_tizen> 3 </since_tizen>
2683 public Color BackgroundColor
2687 return (Color)GetValue(BackgroundColorProperty);
2691 SetValue(BackgroundColorProperty, value);
2692 NotifyPropertyChanged();
2697 /// Creates an animation to animate the background color visual. If there is no
2698 /// background visual, creates one with transparent black as it's mixColor.
2700 /// <since_tizen> 3 </since_tizen>
2701 public Animation AnimateBackgroundColor(object destinationValue,
2704 AlphaFunction.BuiltinFunctions? alphaFunction = null,
2705 object initialValue = null)
2707 Tizen.NUI.PropertyMap background = Background;
2709 if (background.Empty())
2711 // If there is no background yet, ensure there is a transparent
2713 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
2714 background = Background;
2716 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
2720 /// Creates an animation to animate the mixColor of the named visual.
2722 /// <since_tizen> 3 </since_tizen>
2723 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
2725 Animation animation = null;
2727 PropertyMap _animator = new PropertyMap();
2728 if (alphaFunction != null)
2730 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
2733 PropertyMap _timePeriod = new PropertyMap();
2734 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
2735 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
2736 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
2738 PropertyMap _transition = new PropertyMap();
2739 _transition.Add("animator", new PropertyValue(_animator));
2740 _transition.Add("target", new PropertyValue(targetVisual));
2741 _transition.Add("property", new PropertyValue("mixColor"));
2743 if (initialColor != null)
2745 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
2746 _transition.Add("initialValue", initValue);
2749 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
2750 _transition.Add("targetValue", destValue);
2751 TransitionData _transitionData = new TransitionData(_transition);
2753 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
2754 if (NDalicPINVOKE.SWIGPendingException.Pending)
2755 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2761 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
2763 /// <since_tizen> 3 </since_tizen>
2764 public string BackgroundImage
2768 return (string)GetValue(BackgroundImageProperty);
2772 SetValue(BackgroundImageProperty, value);
2773 NotifyPropertyChanged();
2778 /// The background of view.
2780 /// <since_tizen> 3 </since_tizen>
2781 public Tizen.NUI.PropertyMap Background
2785 return (PropertyMap)GetValue(BackgroundProperty);
2789 SetValue(BackgroundProperty, value);
2790 NotifyPropertyChanged();
2796 /// The current state of the view.
2798 /// <since_tizen> 3 </since_tizen>
2803 return (States)GetValue(StateProperty);
2807 SetValue(StateProperty, value);
2808 NotifyPropertyChanged();
2813 /// The current sub state of the view.
2815 /// <since_tizen> 3 </since_tizen>
2816 public States SubState
2820 return (States)GetValue(SubStateProperty);
2824 SetValue(SubStateProperty, value);
2825 NotifyPropertyChanged();
2830 /// Displays a tooltip
2832 /// <since_tizen> 3 </since_tizen>
2833 public Tizen.NUI.PropertyMap Tooltip
2837 return (PropertyMap)GetValue(TooltipProperty);
2841 SetValue(TooltipProperty, value);
2842 NotifyPropertyChanged();
2847 /// Displays a tooltip as a text.
2849 /// <since_tizen> 3 </since_tizen>
2850 public string TooltipText
2854 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
2855 NotifyPropertyChanged();
2859 private int LeftFocusableViewId
2864 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
2869 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2873 private int RightFocusableViewId
2878 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
2883 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2887 private int UpFocusableViewId
2892 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
2897 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2901 private int DownFocusableViewId
2906 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
2911 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2916 /// The Child property of FlexContainer.<br />
2917 /// The proportion of the free space in the container, the flex item will receive.<br />
2918 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
2920 /// <since_tizen> 3 </since_tizen>
2925 return (float)GetValue(FlexProperty);
2929 SetValue(FlexProperty, value);
2930 NotifyPropertyChanged();
2935 /// The Child property of FlexContainer.<br />
2936 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
2938 /// <since_tizen> 3 </since_tizen>
2939 public int AlignSelf
2943 return (int)GetValue(AlignSelfProperty);
2947 SetValue(AlignSelfProperty, value);
2948 NotifyPropertyChanged();
2953 /// The Child property of FlexContainer.<br />
2954 /// The space around the flex item.<br />
2956 /// <since_tizen> 3 </since_tizen>
2957 public Vector4 FlexMargin
2961 return (Vector4)GetValue(FlexMarginProperty);
2965 SetValue(FlexMarginProperty, value);
2966 NotifyPropertyChanged();
2971 /// The top-left cell this child occupies, if not set, the first available cell is used.
2973 /// <since_tizen> 3 </since_tizen>
2974 public Vector2 CellIndex
2978 return (Vector2)GetValue(CellIndexProperty);
2982 SetValue(CellIndexProperty, value);
2983 NotifyPropertyChanged();
2988 /// The number of rows this child occupies, if not set, the default value is 1.
2990 /// <since_tizen> 3 </since_tizen>
2991 public float RowSpan
2995 return (float)GetValue(RowSpanProperty);
2999 SetValue(RowSpanProperty, value);
3000 NotifyPropertyChanged();
3005 /// The number of columns this child occupies, if not set, the default value is 1.
3007 /// <since_tizen> 3 </since_tizen>
3008 public float ColumnSpan
3012 return (float)GetValue(ColumnSpanProperty);
3016 SetValue(ColumnSpanProperty, value);
3017 NotifyPropertyChanged();
3022 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
3024 /// <since_tizen> 3 </since_tizen>
3025 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
3029 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
3033 SetValue(CellHorizontalAlignmentProperty, value);
3034 NotifyPropertyChanged();
3039 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
3041 /// <since_tizen> 3 </since_tizen>
3042 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
3046 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
3050 SetValue(CellVerticalAlignmentProperty, value);
3051 NotifyPropertyChanged();
3056 /// The left focusable view.<br />
3057 /// This will return null if not set.<br />
3058 /// This will also return null if the specified left focusable view is not on a window.<br />
3060 /// <since_tizen> 3 </since_tizen>
3061 public View LeftFocusableView
3063 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3066 return (View)GetValue(LeftFocusableViewProperty);
3070 SetValue(LeftFocusableViewProperty, value);
3071 NotifyPropertyChanged();
3076 /// The right focusable view.<br />
3077 /// This will return null if not set.<br />
3078 /// This will also return null if the specified right focusable view is not on a window.<br />
3080 /// <since_tizen> 3 </since_tizen>
3081 public View RightFocusableView
3083 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3086 return (View)GetValue(RightFocusableViewProperty);
3090 SetValue(RightFocusableViewProperty, value);
3091 NotifyPropertyChanged();
3096 /// The up focusable view.<br />
3097 /// This will return null if not set.<br />
3098 /// This will also return null if the specified up focusable view is not on a window.<br />
3100 /// <since_tizen> 3 </since_tizen>
3101 public View UpFocusableView
3103 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3106 return (View)GetValue(UpFocusableViewProperty);
3110 SetValue(UpFocusableViewProperty, value);
3111 NotifyPropertyChanged();
3116 /// The down focusable view.<br />
3117 /// This will return null if not set.<br />
3118 /// This will also return null if the specified down focusable view is not on a window.<br />
3120 /// <since_tizen> 3 </since_tizen>
3121 public View DownFocusableView
3123 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3126 return (View)GetValue(DownFocusableViewProperty);
3130 SetValue(DownFocusableViewProperty, value);
3131 NotifyPropertyChanged();
3136 /// Whether the view should be focusable by keyboard navigation.
3138 /// <since_tizen> 3 </since_tizen>
3139 public bool Focusable
3143 SetValue(FocusableProperty, value);
3144 NotifyPropertyChanged();
3148 return (bool)GetValue(FocusableProperty);
3153 /// Enumeration for describing the states of the view.
3155 /// <since_tizen> 3 </since_tizen>
3159 /// The normal state.
3163 /// The focused state.
3167 /// The disabled state.
3173 /// Retrieves the position of the view.<br />
3174 /// The coordinates are relative to the view's parent.<br />
3176 /// <since_tizen> 3 </since_tizen>
3177 public Position CurrentPosition
3181 return GetCurrentPosition();
3186 /// Sets the size of a view for the width and the height.<br />
3187 /// Geometry can be scaled to fit within this area.<br />
3188 /// This does not interfere with the view's scale factor.<br />
3189 /// The views default depth is the minimum of width and height.<br />
3192 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
3193 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
3194 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
3195 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3196 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
3197 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
3198 /// 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 />
3200 /// <since_tizen> 3 </since_tizen>
3201 public Size2D Size2D
3205 Size2D temp = (Size2D)GetValue(Size2DProperty);
3206 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
3210 SetValue(Size2DProperty, value);
3211 // Set Specification so when layouts measure this View it matches the value set here.
3212 // All Views are currently Layouts.
3213 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
3214 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
3215 NotifyPropertyChanged();
3219 private void OnSize2DChanged(int width, int height)
3221 Size2D = new Size2D(width, height);
3225 /// Retrieves the size of the view.<br />
3226 /// The coordinates are relative to the view's parent.<br />
3228 /// <since_tizen> 3 </since_tizen>
3229 public Size2D CurrentSize
3233 return GetCurrentSize();
3238 /// Retrieves and sets the view's opacity.<br />
3240 /// <since_tizen> 3 </since_tizen>
3241 public float Opacity
3245 return (float)GetValue(OpacityProperty);
3249 SetValue(OpacityProperty, value);
3250 NotifyPropertyChanged();
3255 /// Sets the position of the view for X and Y.<br />
3256 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
3257 /// If the position inheritance is disabled, sets the world position.<br />
3260 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
3261 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
3262 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
3263 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3264 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
3265 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
3267 /// <since_tizen> 3 </since_tizen>
3268 public Position2D Position2D
3272 Position2D temp = (Position2D)GetValue(Position2DProperty);
3273 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
3277 SetValue(Position2DProperty, value);
3278 NotifyPropertyChanged();
3282 private void OnPosition2DChanged(int x, int y)
3284 Position2D = new Position2D(x, y);
3288 /// Retrieves the screen postion of the view.<br />
3290 /// <since_tizen> 3 </since_tizen>
3291 public Vector2 ScreenPosition
3295 Vector2 temp = new Vector2(0.0f, 0.0f);
3296 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
3302 /// Determines whether the pivot point should be used to determine the position of the view.
3303 /// This is true by default.
3305 /// <remarks>If false, then the top-left of the view is used for the position.
3306 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
3308 /// <since_tizen> 3 </since_tizen>
3309 public bool PositionUsesPivotPoint
3313 return (bool)GetValue(PositionUsesPivotPointProperty);
3317 SetValue(PositionUsesPivotPointProperty, value);
3318 NotifyPropertyChanged();
3323 /// Please do not use! this will be deprecated.
3325 /// Please do not use! this will be deprecated!
3326 /// Instead please use PositionUsesPivotPoint.
3327 /// <since_tizen> 3 </since_tizen>
3328 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
3330 "View view = new View(); " +
3331 "view.PivotPoint = PivotPoint.Center; " +
3332 "view.PositionUsesPivotPoint = true;")]
3333 [EditorBrowsable(EditorBrowsableState.Never)]
3334 public bool PositionUsesAnchorPoint
3339 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
3344 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3345 NotifyPropertyChanged();
3349 internal bool FocusState
3353 return IsKeyboardFocusable();
3357 SetKeyboardFocusable(value);
3362 /// Queries whether the view is connected to the stage.<br />
3363 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
3365 /// <since_tizen> 3 </since_tizen>
3366 public bool IsOnWindow
3375 /// Gets the depth in the hierarchy for the view.
3377 /// <since_tizen> 3 </since_tizen>
3378 public int HierarchyDepth
3382 return GetHierarchyDepth();
3387 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
3390 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
3391 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
3392 /// The values set by this property will likely change.
3394 /// <since_tizen> 3 </since_tizen>
3395 public int SiblingOrder
3399 return (int)GetValue(SiblingOrderProperty);
3403 SetValue(SiblingOrderProperty, value);
3404 NotifyPropertyChanged();
3409 /// Returns the natural size of the view.
3412 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3414 /// <since_tizen> 5 </since_tizen>
3415 public Vector3 NaturalSize
3419 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3420 if (NDalicPINVOKE.SWIGPendingException.Pending)
3421 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3427 /// Returns the natural size (Size2D) of the view.
3430 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3432 /// <since_tizen> 4 </since_tizen>
3433 public Size2D NaturalSize2D
3437 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3438 if (NDalicPINVOKE.SWIGPendingException.Pending)
3439 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3441 return new Size2D((int)temp.Width, (int)temp.Height);
3446 /// Set the layout on this control.
3450 internal LayoutItem Layout
3454 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
3456 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3457 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3458 NDalicPINVOKE.delete_BaseHandle(CPtr);
3459 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3461 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3463 return basehandle as LayoutItem;
3467 Log.Info("NUI", "Set Layout on:" + Name + "\n");
3468 layoutingDisabled = false;
3474 internal void SetLayout( LayoutItem layout )
3476 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(layout) );
3477 layout.LayoutChildren.Clear();
3478 foreach (View view in Children)
3480 layout.LayoutChildren.Add(view.Layout);
3485 /// Set that layouting is required on this View. It will automatically receive a Layout.
3489 internal bool LayoutingRequired
3493 bool result = Tizen.NUI.NDalicManualPINVOKE.View_IsLayoutingRequired(View.getCPtr(this));
3494 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3499 Tizen.NUI.NDalicManualPINVOKE.View_SetLayoutingRequired(View.getCPtr(this), value);
3507 /// This is an asynchronous method.
3509 /// <since_tizen> 3 </since_tizen>
3519 /// This is an asynchronous method.
3520 /// If the view is hidden, then the view and its children will not be rendered.
3521 /// 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.
3523 /// <since_tizen> 3 </since_tizen>
3529 internal void Raise()
3531 var parentChildren = GetParent()?.Children;
3533 if (parentChildren != null)
3535 int currentIndex = parentChildren.IndexOf(this);
3537 // If the view is not already the last item in the list.
3538 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
3540 View temp = parentChildren[currentIndex + 1];
3541 parentChildren[currentIndex + 1] = this;
3542 parentChildren[currentIndex] = temp;
3544 NDalicPINVOKE.Raise(swigCPtr);
3545 if (NDalicPINVOKE.SWIGPendingException.Pending)
3546 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3552 internal void Lower()
3554 var parentChildren = GetParent()?.Children;
3556 if (parentChildren != null)
3558 int currentIndex = parentChildren.IndexOf(this);
3560 // If the view is not already the first item in the list.
3561 if (currentIndex > 0 && currentIndex < parentChildren.Count)
3563 View temp = parentChildren[currentIndex - 1];
3564 parentChildren[currentIndex - 1] = this;
3565 parentChildren[currentIndex] = temp;
3567 NDalicPINVOKE.Lower(swigCPtr);
3568 if (NDalicPINVOKE.SWIGPendingException.Pending)
3569 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3575 /// Raises the view above all other views.
3578 /// Sibling order of views within the parent will be updated automatically.
3579 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
3581 /// <since_tizen> 3 </since_tizen>
3582 public void RaiseToTop()
3584 var parentChildren = GetParent()?.Children;
3586 if (parentChildren != null)
3588 parentChildren.Remove(this);
3589 parentChildren.Add(this);
3591 NDalicPINVOKE.RaiseToTop(swigCPtr);
3592 if (NDalicPINVOKE.SWIGPendingException.Pending)
3593 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3599 /// Lowers the view to the bottom of all views.
3602 /// The sibling order of views within the parent will be updated automatically.
3603 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3605 /// <since_tizen> 3 </since_tizen>
3606 public void LowerToBottom()
3608 var parentChildren = GetParent()?.Children;
3610 if (parentChildren != null)
3612 parentChildren.Remove(this);
3613 parentChildren.Insert(0, this);
3615 NDalicPINVOKE.LowerToBottom(swigCPtr);
3616 if (NDalicPINVOKE.SWIGPendingException.Pending)
3617 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3622 /// Queries if all resources required by a view are loaded and ready.
3624 /// <remarks>Most resources are only loaded when the control is placed on the stage.
3626 /// <since_tizen> 3 </since_tizen>
3627 public bool IsResourceReady()
3629 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
3630 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3635 /// Raises the view to above the target view.
3637 /// <remarks>The sibling order of views within the parent will be updated automatically.
3638 /// Views on the level above the target view will still be shown above this view.
3639 /// Raising this view above views with the same sibling order as each other will raise this view above them.
3640 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3642 /// <param name="target">Will be raised above this view.</param>
3643 internal void RaiseAbove(View target)
3645 var parentChildren = GetParent()?.Children;
3647 if (parentChildren != null)
3649 int currentIndex = parentChildren.IndexOf(this);
3650 int targetIndex = parentChildren.IndexOf(target);
3652 if (currentIndex < 0 || targetIndex < 0 ||
3653 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3655 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3658 // If the currentIndex is less than the target index and the target has the same parent.
3659 if (currentIndex < targetIndex)
3661 parentChildren.Remove(this);
3662 parentChildren.Insert(targetIndex, this);
3664 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
3665 if (NDalicPINVOKE.SWIGPendingException.Pending)
3666 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3673 /// Lowers the view to below the target view.
3675 /// <remarks>The sibling order of views within the parent will be updated automatically.
3676 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
3677 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3679 /// <param name="target">Will be lowered below this view.</param>
3680 internal void LowerBelow(View target)
3682 var parentChildren = GetParent()?.Children;
3684 if (parentChildren != null)
3686 int currentIndex = parentChildren.IndexOf(this);
3687 int targetIndex = parentChildren.IndexOf(target);
3688 if (currentIndex < 0 || targetIndex < 0 ||
3689 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3691 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3695 // If the currentIndex is not already the 0th index and the target has the same parent.
3696 if ((currentIndex != 0) && (targetIndex != -1) &&
3697 (currentIndex > targetIndex))
3699 parentChildren.Remove(this);
3700 parentChildren.Insert(targetIndex, this);
3702 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
3703 if (NDalicPINVOKE.SWIGPendingException.Pending)
3704 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3710 internal string GetName()
3712 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
3713 if (NDalicPINVOKE.SWIGPendingException.Pending)
3714 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3718 internal void SetName(string name)
3720 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
3721 if (NDalicPINVOKE.SWIGPendingException.Pending)
3722 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3725 internal uint GetId()
3727 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
3728 if (NDalicPINVOKE.SWIGPendingException.Pending)
3729 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3733 internal bool IsRoot()
3735 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
3736 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3740 internal bool OnWindow()
3742 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
3743 if (NDalicPINVOKE.SWIGPendingException.Pending)
3744 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3749 /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
3751 /// <pre>The view has been initialized. </pre>
3752 /// <returns>The parent layer of view </returns>
3753 /// <since_tizen> 5 </since_tizen>
3754 public Layer GetLayer()
3756 //to fix memory leak issue, match the handle count with native side.
3757 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
3758 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3759 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
3760 NDalicPINVOKE.delete_BaseHandle(CPtr);
3761 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3763 if (NDalicPINVOKE.SWIGPendingException.Pending)
3764 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3769 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
3771 /// <pre>The (child) view has been initialized. </pre>
3772 /// <since_tizen> 4 </since_tizen>
3773 public void Unparent()
3775 GetParent()?.Remove(this);
3779 /// Search through this view's hierarchy for a view with the given name.
3780 /// The view itself is also considered in the search.
3782 /// <pre>The view has been initialized.</pre>
3783 /// <param name="viewName">The name of the view to find.</param>
3784 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
3785 /// <since_tizen> 3 </since_tizen>
3786 public View FindChildByName(string viewName)
3788 //to fix memory leak issue, match the handle count with native side.
3789 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
3790 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3791 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3792 NDalicPINVOKE.delete_BaseHandle(CPtr);
3793 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3795 if (NDalicPINVOKE.SWIGPendingException.Pending)
3796 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3800 internal View FindChildById(uint id)
3802 //to fix memory leak issue, match the handle count with native side.
3803 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
3804 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3805 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3806 NDalicPINVOKE.delete_BaseHandle(CPtr);
3807 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3809 if (NDalicPINVOKE.SWIGPendingException.Pending)
3810 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3814 internal void SetParentOrigin(Vector3 origin)
3816 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
3817 if (NDalicPINVOKE.SWIGPendingException.Pending)
3818 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3821 internal Vector3 GetCurrentParentOrigin()
3823 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
3824 if (NDalicPINVOKE.SWIGPendingException.Pending)
3825 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3829 internal void SetAnchorPoint(Vector3 anchorPoint)
3831 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
3832 if (NDalicPINVOKE.SWIGPendingException.Pending)
3833 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3836 internal Vector3 GetCurrentAnchorPoint()
3838 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
3839 if (NDalicPINVOKE.SWIGPendingException.Pending)
3840 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3844 internal void SetSize(float width, float height)
3846 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
3847 if (NDalicPINVOKE.SWIGPendingException.Pending)
3848 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3851 internal void SetSize(float width, float height, float depth)
3853 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
3854 if (NDalicPINVOKE.SWIGPendingException.Pending)
3855 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3858 internal void SetSize(Vector2 size)
3860 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
3861 if (NDalicPINVOKE.SWIGPendingException.Pending)
3862 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3865 internal void SetSize(Vector3 size)
3867 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
3868 if (NDalicPINVOKE.SWIGPendingException.Pending)
3869 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3872 internal Vector3 GetTargetSize()
3874 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
3875 if (NDalicPINVOKE.SWIGPendingException.Pending)
3876 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3880 internal Size2D GetCurrentSize()
3882 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
3883 if (NDalicPINVOKE.SWIGPendingException.Pending)
3884 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3885 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
3889 internal Vector3 GetNaturalSize()
3891 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3892 if (NDalicPINVOKE.SWIGPendingException.Pending)
3893 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3897 internal void SetPosition(float x, float y)
3899 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
3900 if (NDalicPINVOKE.SWIGPendingException.Pending)
3901 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3904 internal void SetPosition(float x, float y, float z)
3906 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
3907 if (NDalicPINVOKE.SWIGPendingException.Pending)
3908 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3911 internal void SetPosition(Vector3 position)
3913 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
3914 if (NDalicPINVOKE.SWIGPendingException.Pending)
3915 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3918 internal void SetX(float x)
3920 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
3921 if (NDalicPINVOKE.SWIGPendingException.Pending)
3922 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3925 internal void SetY(float y)
3927 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
3928 if (NDalicPINVOKE.SWIGPendingException.Pending)
3929 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3932 internal void SetZ(float z)
3934 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
3935 if (NDalicPINVOKE.SWIGPendingException.Pending)
3936 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3939 internal void TranslateBy(Vector3 distance)
3941 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
3942 if (NDalicPINVOKE.SWIGPendingException.Pending)
3943 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3946 internal Position GetCurrentPosition()
3948 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
3949 if (NDalicPINVOKE.SWIGPendingException.Pending)
3950 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3954 internal Vector3 GetCurrentWorldPosition()
3956 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
3957 if (NDalicPINVOKE.SWIGPendingException.Pending)
3958 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3962 internal void SetInheritPosition(bool inherit)
3964 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
3965 if (NDalicPINVOKE.SWIGPendingException.Pending)
3966 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3969 internal bool IsPositionInherited()
3971 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
3972 if (NDalicPINVOKE.SWIGPendingException.Pending)
3973 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3977 internal void SetOrientation(Degree angle, Vector3 axis)
3979 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
3980 if (NDalicPINVOKE.SWIGPendingException.Pending)
3981 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3984 internal void SetOrientation(Radian angle, Vector3 axis)
3986 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
3987 if (NDalicPINVOKE.SWIGPendingException.Pending)
3988 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3991 internal void SetOrientation(Rotation orientation)
3993 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
3994 if (NDalicPINVOKE.SWIGPendingException.Pending)
3995 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3998 internal void RotateBy(Degree angle, Vector3 axis)
4000 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4001 if (NDalicPINVOKE.SWIGPendingException.Pending)
4002 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4005 internal void RotateBy(Radian angle, Vector3 axis)
4007 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4008 if (NDalicPINVOKE.SWIGPendingException.Pending)
4009 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4012 internal void RotateBy(Rotation relativeRotation)
4014 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4015 if (NDalicPINVOKE.SWIGPendingException.Pending)
4016 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4019 internal Rotation GetCurrentOrientation()
4021 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
4022 if (NDalicPINVOKE.SWIGPendingException.Pending)
4023 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4027 internal void SetInheritOrientation(bool inherit)
4029 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
4030 if (NDalicPINVOKE.SWIGPendingException.Pending)
4031 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4034 internal bool IsOrientationInherited()
4036 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
4037 if (NDalicPINVOKE.SWIGPendingException.Pending)
4038 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4042 internal Rotation GetCurrentWorldOrientation()
4044 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4045 if (NDalicPINVOKE.SWIGPendingException.Pending)
4046 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4050 internal void SetScale(float scale)
4052 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
4053 if (NDalicPINVOKE.SWIGPendingException.Pending)
4054 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4057 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4059 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4060 if (NDalicPINVOKE.SWIGPendingException.Pending)
4061 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4064 internal void SetScale(Vector3 scale)
4066 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4067 if (NDalicPINVOKE.SWIGPendingException.Pending)
4068 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4071 internal void ScaleBy(Vector3 relativeScale)
4073 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4074 if (NDalicPINVOKE.SWIGPendingException.Pending)
4075 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4078 internal Vector3 GetCurrentScale()
4080 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
4081 if (NDalicPINVOKE.SWIGPendingException.Pending)
4082 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4086 internal Vector3 GetCurrentWorldScale()
4088 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
4089 if (NDalicPINVOKE.SWIGPendingException.Pending)
4090 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4094 internal void SetInheritScale(bool inherit)
4096 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
4097 if (NDalicPINVOKE.SWIGPendingException.Pending)
4098 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4101 internal bool IsScaleInherited()
4103 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
4104 if (NDalicPINVOKE.SWIGPendingException.Pending)
4105 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4109 internal Matrix GetCurrentWorldMatrix()
4111 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4112 if (NDalicPINVOKE.SWIGPendingException.Pending)
4113 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4117 internal void SetVisible(bool visible)
4119 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
4120 if (NDalicPINVOKE.SWIGPendingException.Pending)
4121 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4124 internal bool IsVisible()
4126 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
4127 if (NDalicPINVOKE.SWIGPendingException.Pending)
4128 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4132 internal void SetOpacity(float opacity)
4134 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
4135 if (NDalicPINVOKE.SWIGPendingException.Pending)
4136 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4139 internal float GetCurrentOpacity()
4141 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
4142 if (NDalicPINVOKE.SWIGPendingException.Pending)
4143 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4147 internal void SetColor(Vector4 color)
4149 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4150 if (NDalicPINVOKE.SWIGPendingException.Pending)
4151 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4154 internal Vector4 GetCurrentColor()
4156 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
4157 if (NDalicPINVOKE.SWIGPendingException.Pending)
4158 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4162 internal void SetColorMode(ColorMode colorMode)
4164 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
4165 if (NDalicPINVOKE.SWIGPendingException.Pending)
4166 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4169 internal ColorMode GetColorMode()
4171 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
4172 if (NDalicPINVOKE.SWIGPendingException.Pending)
4173 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4177 internal Vector4 GetCurrentWorldColor()
4179 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
4180 if (NDalicPINVOKE.SWIGPendingException.Pending)
4181 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4185 internal void SetDrawMode(DrawModeType drawMode)
4187 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4188 if (NDalicPINVOKE.SWIGPendingException.Pending)
4189 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4192 internal DrawModeType GetDrawMode()
4194 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
4195 if (NDalicPINVOKE.SWIGPendingException.Pending)
4196 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4201 /// Converts screen coordinates into the view's coordinate system using the default camera.
4203 /// <pre>The view has been initialized.</pre>
4204 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4205 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4206 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4207 /// <param name="screenX">The screen X-coordinate.</param>
4208 /// <param name="screenY">The screen Y-coordinate.</param>
4209 /// <returns>True if the conversion succeeded.</returns>
4210 /// <since_tizen> 3 </since_tizen>
4211 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4213 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4214 if (NDalicPINVOKE.SWIGPendingException.Pending)
4215 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4219 internal void SetKeyboardFocusable(bool focusable)
4221 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4222 if (NDalicPINVOKE.SWIGPendingException.Pending)
4223 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4226 internal bool IsKeyboardFocusable()
4228 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
4229 if (NDalicPINVOKE.SWIGPendingException.Pending)
4230 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4234 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4236 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4237 if (NDalicPINVOKE.SWIGPendingException.Pending)
4238 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4241 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4243 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4244 if (NDalicPINVOKE.SWIGPendingException.Pending)
4245 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4250 /// Sets the relative to parent size factor of the view.<br />
4251 /// This factor is only used when ResizePolicy is set to either:
4252 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4253 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4255 /// <pre>The view has been initialized.</pre>
4256 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4257 /// <since_tizen> 3 </since_tizen>
4258 public void SetSizeModeFactor(Vector3 factor)
4260 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4261 if (NDalicPINVOKE.SWIGPendingException.Pending)
4262 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4265 internal Vector3 GetSizeModeFactor()
4267 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
4268 if (NDalicPINVOKE.SWIGPendingException.Pending)
4269 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4274 /// Calculates the height of the view given a width.<br />
4275 /// The natural size is used for default calculation.<br />
4276 /// Size 0 is treated as aspect ratio 1:1.<br />
4278 /// <param name="width">The width to use.</param>
4279 /// <returns>The height based on the width.</returns>
4280 /// <since_tizen> 3 </since_tizen>
4281 public float GetHeightForWidth(float width)
4283 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
4284 if (NDalicPINVOKE.SWIGPendingException.Pending)
4285 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4290 /// Calculates the width of the view given a height.<br />
4291 /// The natural size is used for default calculation.<br />
4292 /// Size 0 is treated as aspect ratio 1:1.<br />
4294 /// <param name="height">The height to use.</param>
4295 /// <returns>The width based on the height.</returns>
4296 /// <since_tizen> 3 </since_tizen>
4297 public float GetWidthForHeight(float height)
4299 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
4300 if (NDalicPINVOKE.SWIGPendingException.Pending)
4301 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4306 /// Return the amount of size allocated for relayout.
4308 /// <param name="dimension">The dimension to retrieve.</param>
4309 /// <returns>Return the size.</returns>
4310 /// <since_tizen> 3 </since_tizen>
4311 public float GetRelayoutSize(DimensionType dimension)
4313 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4314 if (NDalicPINVOKE.SWIGPendingException.Pending)
4315 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4320 /// Set the padding for the view.
4322 /// <param name="padding">Padding for the view.</param>
4323 /// <since_tizen> 3 </since_tizen>
4324 public void SetPadding(PaddingType padding)
4326 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4327 if (NDalicPINVOKE.SWIGPendingException.Pending)
4328 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4332 /// Return the value of padding for the view.
4334 /// <param name="paddingOut">the value of padding for the view</param>
4335 /// <since_tizen> 3 </since_tizen>
4336 public void GetPadding(PaddingType paddingOut)
4338 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4339 if (NDalicPINVOKE.SWIGPendingException.Pending)
4340 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4343 internal void SetMinimumSize(Vector2 size)
4345 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4346 if (NDalicPINVOKE.SWIGPendingException.Pending)
4347 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4350 internal Vector2 GetMinimumSize()
4352 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
4353 if (NDalicPINVOKE.SWIGPendingException.Pending)
4354 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4358 internal void SetMaximumSize(Vector2 size)
4360 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4361 if (NDalicPINVOKE.SWIGPendingException.Pending)
4362 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4365 internal Vector2 GetMaximumSize()
4367 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
4368 if (NDalicPINVOKE.SWIGPendingException.Pending)
4369 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4373 internal int GetHierarchyDepth()
4375 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
4376 if (NDalicPINVOKE.SWIGPendingException.Pending)
4377 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4381 /// <since_tizen> 3 </since_tizen>
4382 public uint AddRenderer(Renderer renderer)
4384 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4385 if (NDalicPINVOKE.SWIGPendingException.Pending)
4386 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4390 internal uint GetRendererCount()
4392 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
4393 if (NDalicPINVOKE.SWIGPendingException.Pending)
4394 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4398 /// <since_tizen> 3 </since_tizen>
4399 public Renderer GetRendererAt(uint index)
4401 //to fix memory leak issue, match the handle count with native side.
4402 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
4403 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4404 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4405 NDalicPINVOKE.delete_BaseHandle(CPtr);
4406 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4408 if (NDalicPINVOKE.SWIGPendingException.Pending)
4409 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4413 /// <since_tizen> 3 </since_tizen>
4414 public void RemoveRenderer(Renderer renderer)
4416 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4417 if (NDalicPINVOKE.SWIGPendingException.Pending)
4418 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4421 /// <since_tizen> 3 </since_tizen>
4422 public void RemoveRenderer(uint index)
4424 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4425 if (NDalicPINVOKE.SWIGPendingException.Pending)
4426 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4429 internal TouchDataSignal TouchSignal()
4431 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
4432 if (NDalicPINVOKE.SWIGPendingException.Pending)
4433 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4437 internal HoverSignal HoveredSignal()
4439 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
4440 if (NDalicPINVOKE.SWIGPendingException.Pending)
4441 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4445 internal WheelSignal WheelEventSignal()
4447 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
4448 if (NDalicPINVOKE.SWIGPendingException.Pending)
4449 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4453 internal ViewSignal OnWindowSignal()
4455 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
4456 if (NDalicPINVOKE.SWIGPendingException.Pending)
4457 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4461 internal ViewSignal OffWindowSignal()
4463 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
4464 if (NDalicPINVOKE.SWIGPendingException.Pending)
4465 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4469 internal ViewSignal OnRelayoutSignal()
4471 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
4472 if (NDalicPINVOKE.SWIGPendingException.Pending)
4473 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4477 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
4479 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
4480 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4485 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
4487 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
4488 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4493 internal ViewSignal ResourcesLoadedSignal()
4495 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
4496 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4501 /// Gets or sets the origin of a view within its parent's area.<br />
4502 /// 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 />
4503 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
4504 /// A view's position is the distance between this origin and the view's anchor-point.<br />
4506 /// <pre>The view has been initialized.</pre>
4507 /// <since_tizen> 3 </since_tizen>
4508 public Position ParentOrigin
4512 return (Position)GetValue(ParentOriginProperty);
4516 SetValue(ParentOriginProperty, value);
4517 NotifyPropertyChanged();
4521 internal float ParentOriginX
4526 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
4531 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
4532 NotifyPropertyChanged();
4536 internal float ParentOriginY
4541 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
4546 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
4547 NotifyPropertyChanged();
4551 internal float ParentOriginZ
4556 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
4561 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
4562 NotifyPropertyChanged();
4567 /// Gets or sets the anchor-point of a view.<br />
4568 /// 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 />
4569 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
4570 /// A view position is the distance between its parent-origin and this anchor-point.<br />
4571 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
4572 /// <pre>The view has been initialized.</pre>
4574 /// <since_tizen> 3 </since_tizen>
4575 public Position PivotPoint
4579 return (Position)GetValue(PivotPointProperty);
4583 SetValue(PivotPointProperty, value);
4584 NotifyPropertyChanged();
4588 internal float PivotPointX
4593 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
4598 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
4602 internal float PivotPointY
4607 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
4612 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
4616 internal float PivotPointZ
4621 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
4626 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
4631 /// Gets or sets the size width of the view.
4633 /// <since_tizen> 3 </since_tizen>
4634 public float SizeWidth
4638 return (float)GetValue(SizeWidthProperty);
4642 SetValue(SizeWidthProperty, value);
4643 NotifyPropertyChanged();
4648 /// Gets or sets the size height of the view.
4650 /// <since_tizen> 3 </since_tizen>
4651 public float SizeHeight
4655 return (float)GetValue(SizeHeightProperty);
4659 SetValue(SizeHeightProperty, value);
4660 NotifyPropertyChanged();
4665 /// Gets or sets the position of the view.<br />
4666 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
4667 /// If the position inheritance is disabled, sets the world position.<br />
4669 /// <since_tizen> 3 </since_tizen>
4670 public Position Position
4674 return (Position)GetValue(PositionProperty);
4678 SetValue(PositionProperty, value);
4679 NotifyPropertyChanged();
4684 /// Gets or sets the position X of the view.
4686 /// <since_tizen> 3 </since_tizen>
4687 public float PositionX
4691 return (float)GetValue(PositionXProperty);
4695 SetValue(PositionXProperty, value);
4696 NotifyPropertyChanged();
4701 /// Gets or sets the position Y of the view.
4703 /// <since_tizen> 3 </since_tizen>
4704 public float PositionY
4708 return (float)GetValue(PositionYProperty);
4712 SetValue(PositionYProperty, value);
4713 NotifyPropertyChanged();
4718 /// Gets or sets the position Z of the view.
4720 /// <since_tizen> 3 </since_tizen>
4721 public float PositionZ
4725 return (float)GetValue(PositionZProperty);
4729 SetValue(PositionZProperty, value);
4730 NotifyPropertyChanged();
4735 /// Gets or sets the world position of the view.
4737 /// <since_tizen> 3 </since_tizen>
4738 public Vector3 WorldPosition
4742 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4743 GetProperty(View.Property.WORLD_POSITION).Get(temp);
4748 internal float WorldPositionX
4753 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
4758 internal float WorldPositionY
4763 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
4768 internal float WorldPositionZ
4773 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
4779 /// Gets or sets the orientation of the view.<br />
4780 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
4782 /// <remarks>This is an asynchronous method.</remarks>
4783 /// <since_tizen> 3 </since_tizen>
4784 public Rotation Orientation
4788 return (Rotation)GetValue(OrientationProperty);
4792 SetValue(OrientationProperty, value);
4793 NotifyPropertyChanged();
4798 /// Gets or sets the world orientation of the view.<br />
4800 /// <since_tizen> 3 </since_tizen>
4801 public Rotation WorldOrientation
4805 Rotation temp = new Rotation();
4806 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
4812 /// Gets or sets the scale factor applied to the view.<br />
4814 /// <since_tizen> 3 </since_tizen>
4815 public Vector3 Scale
4819 return (Vector3)GetValue(ScaleProperty);
4823 SetValue(ScaleProperty, value);
4824 NotifyPropertyChanged();
4829 /// Gets or sets the scale X factor applied to the view.
4831 /// <since_tizen> 3 </since_tizen>
4836 return (float)GetValue(ScaleXProperty);
4840 SetValue(ScaleXProperty, value);
4841 NotifyPropertyChanged();
4846 /// Gets or sets the scale Y factor applied to the view.
4848 /// <since_tizen> 3 </since_tizen>
4853 return (float)GetValue(ScaleYProperty);
4857 SetValue(ScaleYProperty, value);
4858 NotifyPropertyChanged();
4863 /// Gets or sets the scale Z factor applied to the view.
4865 /// <since_tizen> 3 </since_tizen>
4870 return (float)GetValue(ScaleZProperty);
4874 SetValue(ScaleZProperty, value);
4875 NotifyPropertyChanged();
4880 /// Gets the world scale of the view.
4882 /// <since_tizen> 3 </since_tizen>
4883 public Vector3 WorldScale
4887 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4888 GetProperty(View.Property.WORLD_SCALE).Get(temp);
4894 /// Retrieves the visibility flag of the view.
4897 /// If the view is not visible, then the view and its children will not be rendered.
4898 /// 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.
4900 /// <since_tizen> 3 </since_tizen>
4901 public bool Visibility
4906 GetProperty(View.Property.VISIBLE).Get(out temp);
4912 /// Gets the view's world color.
4914 /// <since_tizen> 3 </since_tizen>
4915 public Vector4 WorldColor
4919 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
4920 GetProperty(View.Property.WORLD_COLOR).Get(temp);
4925 internal Matrix WorldMatrix
4929 Matrix temp = new Matrix();
4930 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
4936 /// Gets or sets the view's name.
4938 /// <since_tizen> 3 </since_tizen>
4943 return (string)GetValue(NameProperty);
4947 SetValue(NameProperty, value);
4948 NotifyPropertyChanged();
4953 /// Get the number of children held by the view.
4955 /// <since_tizen> 3 </since_tizen>
4956 public new uint ChildCount
4960 return GetChildCount();
4965 /// Gets the view's ID.
4968 /// <since_tizen> 3 </since_tizen>
4978 /// Gets or sets the status of whether the view should emit touch or hover signals.
4980 /// <since_tizen> 3 </since_tizen>
4981 public bool Sensitive
4985 return (bool)GetValue(SensitiveProperty);
4989 SetValue(SensitiveProperty, value);
4990 NotifyPropertyChanged();
4995 /// 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.
4997 /// <since_tizen> 3 </since_tizen>
4998 public bool LeaveRequired
5002 return (bool)GetValue(LeaveRequiredProperty);
5006 SetValue(LeaveRequiredProperty, value);
5007 NotifyPropertyChanged();
5012 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
5014 /// <since_tizen> 3 </since_tizen>
5015 public bool InheritOrientation
5019 return (bool)GetValue(InheritOrientationProperty);
5023 SetValue(InheritOrientationProperty, value);
5024 NotifyPropertyChanged();
5029 /// Gets or sets the status of whether a child view inherits it's parent's scale.
5031 /// <since_tizen> 3 </since_tizen>
5032 public bool InheritScale
5036 return (bool)GetValue(InheritScaleProperty);
5040 SetValue(InheritScaleProperty, value);
5041 NotifyPropertyChanged();
5046 /// Gets or sets the status of how the view and its children should be drawn.<br />
5047 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
5048 /// 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 />
5049 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
5050 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
5051 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
5053 /// <since_tizen> 3 </since_tizen>
5054 public DrawModeType DrawMode
5058 return (DrawModeType)GetValue(DrawModeProperty);
5062 SetValue(DrawModeProperty, value);
5063 NotifyPropertyChanged();
5068 /// Gets or sets the relative to parent size factor of the view.<br />
5069 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
5070 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
5072 /// <since_tizen> 3 </since_tizen>
5073 public Vector3 SizeModeFactor
5077 return (Vector3)GetValue(SizeModeFactorProperty);
5081 SetValue(SizeModeFactorProperty, value);
5082 NotifyPropertyChanged();
5087 /// Gets or sets the width resize policy to be used.
5089 /// <since_tizen> 3 </since_tizen>
5090 public ResizePolicyType WidthResizePolicy
5094 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
5098 SetValue(WidthResizePolicyProperty, value);
5099 // Match ResizePolicy to new Layouting.
5100 // Parent relative policies can not be mapped at this point as parent size unknown.
5103 case ResizePolicyType.UseNaturalSize :
5105 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( NaturalSize.Width) );
5108 case ResizePolicyType.FillToParent :
5110 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.MatchParent ) );
5113 case ResizePolicyType.FitToChildren :
5115 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
5121 NotifyPropertyChanged();
5126 /// Gets or sets the height resize policy to be used.
5128 /// <since_tizen> 3 </since_tizen>
5129 public ResizePolicyType HeightResizePolicy
5133 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
5137 SetValue(HeightResizePolicyProperty, value);
5138 // Match ResizePolicy to new Layouting.
5139 // Parent relative policies can not be mapped at this point as parent size unknown.
5142 case ResizePolicyType.UseNaturalSize :
5144 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( NaturalSize.Height) );
5147 case ResizePolicyType.FillToParent :
5149 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.MatchParent ) );
5152 case ResizePolicyType.FitToChildren :
5154 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
5160 NotifyPropertyChanged();
5165 /// Gets or sets the policy to use when setting size with size negotiation.<br />
5166 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
5168 /// <since_tizen> 3 </since_tizen>
5169 public SizeScalePolicyType SizeScalePolicy
5173 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
5177 SetValue(SizeScalePolicyProperty, value);
5178 NotifyPropertyChanged();
5183 /// Gets or sets the status of whether the width size is dependent on the height size.
5185 /// <since_tizen> 3 </since_tizen>
5186 public bool WidthForHeight
5190 return (bool)GetValue(WidthForHeightProperty);
5194 SetValue(WidthForHeightProperty, value);
5195 NotifyPropertyChanged();
5200 /// Gets or sets the status of whether the height size is dependent on the width size.
5202 /// <since_tizen> 3 </since_tizen>
5203 public bool HeightForWidth
5207 return (bool)GetValue(HeightForWidthProperty);
5211 SetValue(HeightForWidthProperty, value);
5212 NotifyPropertyChanged();
5217 /// Gets or sets the padding for use in layout.
5219 /// <since_tizen> 5 </since_tizen>
5220 public Extents Padding
5224 return (Extents)GetValue(PaddingProperty);
5228 SetValue(PaddingProperty, value);
5229 NotifyPropertyChanged();
5234 /// Gets or sets the minimum size the view can be assigned in size negotiation.
5236 /// <since_tizen> 3 </since_tizen>
5237 public Size2D MinimumSize
5241 return (Size2D)GetValue(MinimumSizeProperty);
5247 // Note: it only works if minimum size is >= than natural size.
5248 // To force the size it should be done through the width&height spec or Size2D.
5249 Layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
5250 Layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
5252 SetValue(MinimumSizeProperty, value);
5253 NotifyPropertyChanged();
5258 /// Gets or sets the maximum size the view can be assigned in size negotiation.
5260 /// <since_tizen> 3 </since_tizen>
5261 public Size2D MaximumSize
5265 return (Size2D)GetValue(MaximumSizeProperty);
5269 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
5270 // MATCH_PARENT spec + parent container size can be used to limit
5271 SetValue(MaximumSizeProperty, value);
5272 NotifyPropertyChanged();
5277 /// Gets or sets whether a child view inherits it's parent's position.<br />
5278 /// Default is to inherit.<br />
5279 /// 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 />
5281 /// <since_tizen> 3 </since_tizen>
5282 public bool InheritPosition
5286 return (bool)GetValue(InheritPositionProperty);
5290 SetValue(InheritPositionProperty, value);
5291 NotifyPropertyChanged();
5296 /// Gets or sets the clipping behavior (mode) of it's children.
5298 /// <since_tizen> 3 </since_tizen>
5299 public ClippingModeType ClippingMode
5303 return (ClippingModeType)GetValue(ClippingModeProperty);
5307 SetValue(ClippingModeProperty, value);
5308 NotifyPropertyChanged();
5313 /// Gets the number of renderers held by the view.
5315 /// <since_tizen> 3 </since_tizen>
5316 public uint RendererCount
5320 return GetRendererCount();
5325 /// [Obsolete("Please do not use! this will be deprecated")]
5327 /// <since_tizen> 3 </since_tizen>
5328 /// Please do not use! this will be deprecated!
5329 /// Instead please use PivotPoint.
5330 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
5332 "View view = new View(); " +
5333 "view.PivotPoint = PivotPoint.Center; " +
5334 "view.PositionUsesPivotPoint = true;")]
5335 [EditorBrowsable(EditorBrowsableState.Never)]
5336 public Position AnchorPoint
5340 Position temp = new Position(0.0f, 0.0f, 0.0f);
5341 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
5346 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
5347 NotifyPropertyChanged();
5352 /// Sets the size of a view for the width, the height and the depth.<br />
5353 /// Geometry can be scaled to fit within this area.<br />
5354 /// This does not interfere with the view's scale factor.<br />
5355 /// The views default depth is the minimum of width and height.<br />
5358 /// Please note that multi-cascade setting is not possible for this NUI object. <br />
5359 /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
5360 /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
5361 /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
5362 /// 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 />
5364 /// <since_tizen> 5 </since_tizen>
5369 return (Size)GetValue(SizeProperty);
5373 SetValue(SizeProperty, value);
5374 // Set Specification so when layouts measure this View it matches the value set here.
5375 // All Views are currently Layouts.
5376 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
5377 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
5378 NotifyPropertyChanged();
5383 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
5385 /// <since_tizen> 3 </since_tizen>
5386 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
5388 "Container parent = view.GetParent(); " +
5389 "View view = parent as View;")]
5390 [EditorBrowsable(EditorBrowsableState.Never)]
5391 public new View Parent
5396 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
5397 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
5398 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
5400 if (basehandle is Layer layer)
5402 ret = new View(Layer.getCPtr(layer).Handle, false);
5403 NUILog.Error("This Parent property is deprecated, shoud do not be used");
5407 ret = basehandle as View;
5410 NDalicPINVOKE.delete_BaseHandle(CPtr);
5411 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5413 if (NDalicPINVOKE.SWIGPendingException.Pending)
5414 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5420 /// Gets/Sets whether inherit parent's the layout Direction.
5422 /// <since_tizen> 4 </since_tizen>
5423 public bool InheritLayoutDirection
5427 return (bool)GetValue(InheritLayoutDirectionProperty);
5431 SetValue(InheritLayoutDirectionProperty, value);
5432 NotifyPropertyChanged();
5437 /// Gets/Sets the layout Direction.
5439 /// <since_tizen> 4 </since_tizen>
5440 public ViewLayoutDirectionType LayoutDirection
5444 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
5448 SetValue(LayoutDirectionProperty, value);
5449 NotifyPropertyChanged();
5454 /// Gets or sets the Margin for use in layout.
5457 /// Margin property is supported by Layout algorithms and containers.
5458 /// Please Set Layout if you want to use Margin property.
5460 /// <since_tizen> 4 </since_tizen>
5461 public Extents Margin
5465 return (Extents)GetValue(MarginProperty);
5469 SetValue(MarginProperty, value);
5470 NotifyPropertyChanged();
5474 internal Style Style
5478 return (Style)GetValue(StyleProperty);
5482 SetValue(StyleProperty, value);
5487 /// [Obsolete("Please do not use! this will be deprecated")]
5489 /// Please do not use! this will be deprecated!
5490 /// Instead please use Padding.
5491 /// <since_tizen> 4 </since_tizen>
5492 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
5493 [EditorBrowsable(EditorBrowsableState.Never)]
5494 public Extents PaddingEX
5498 Extents temp = new Extents(0, 0, 0, 0);
5499 GetProperty(View.Property.PADDING).Get(temp);
5504 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
5505 NotifyPropertyChanged();
5510 /// Perform an action on a visual registered to this view. <br />
5511 /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
5513 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
5514 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
5515 /// <param name="attributes">Optional attributes for the action.</param>
5516 /// <since_tizen> 5 </since_tizen>
5517 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
5519 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
5520 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5523 internal readonly MergedStyle _mergedStyle;
5526 /// Child property to specify desired width
5528 internal int LayoutWidthSpecificationFixed
5533 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5535 NUILog.Error("WidthSpecificationFixed get error!");
5541 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5546 /// Child property to specify desired height
5548 internal int LayoutHeightSpecificationFixed
5553 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5555 NUILog.Error("HeightSpecificationFixed get error!");
5561 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5566 /// Child property to specify desired width, use MatchParent/WrapContent)
5568 internal ChildLayoutData LayoutWidthSpecification
5573 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5575 NUILog.Error("WidthSpecificationFixed get error!");
5577 return (ChildLayoutData)tmp;
5581 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5586 /// Child property to specify desired height, use MatchParent/WrapContent)
5588 internal ChildLayoutData LayoutHeightSpecification
5593 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5595 NUILog.Error("HeightSpecificationFixed get error!");
5597 return (ChildLayoutData)tmp;
5601 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5605 internal float Weight
5609 return (float)GetValue(WeightProperty);
5613 SetValue(WeightProperty, value);
5614 NotifyPropertyChanged();
5618 private bool _backgroundImageSynchronosLoading = false;
5619 internal bool BackgroundImageSynchronosLoading
5623 return _backgroundImageSynchronosLoading;
5627 if (value != _backgroundImageSynchronosLoading)
5630 PropertyMap bgMap = this.Background;
5632 bgMap.Find(Visual.Property.Type)?.Get(out visualType);
5633 if (visualType == (int)Visual.Type.Image)
5635 bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
5637 if (bgUrl.Length != 0)
5639 _backgroundImageSynchronosLoading = value;
5640 bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
5641 this.Background = bgMap;
5647 internal class BackgroundResourceLoadedEventArgs : EventArgs
5649 private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5650 public ResourceLoadingStatusType Status
5663 private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
5664 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
5665 private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
5666 private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
5668 internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
5672 if (_backgroundResourceLoadedEventHandler == null)
5674 _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
5675 this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
5678 _backgroundResourceLoadedEventHandler += value;
5682 _backgroundResourceLoadedEventHandler -= value;
5684 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
5686 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5691 private void OnBackgroundResourceLoaded(IntPtr view)
5693 BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5694 e.Status = (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5696 if (_backgroundResourceLoadedEventHandler != null)
5698 _backgroundResourceLoadedEventHandler(this, e);
5702 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5704 return (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5711 /// The View layout Direction type.
5713 /// <since_tizen> 4 </since_tizen>
5714 public enum ViewLayoutDirectionType
5719 /// <since_tizen> 4 </since_tizen>
5724 /// <since_tizen> 4 </since_tizen>
5728 internal enum ChildLayoutData
5731 /// Constant which indicates child size should match parent size
5735 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
5740 internal enum ResourceLoadingStatusType