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
30 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
31 [EditorBrowsable(EditorBrowsableState.Never)]
32 public bool IsResourcesCreated
36 return Application.Current.IsResourcesCreated;
40 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
41 [EditorBrowsable(EditorBrowsableState.Never)]
42 public ResourceDictionary XamlResources
46 return Application.Current.XamlResources;
50 Application.Current.XamlResources = value;
54 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
55 [EditorBrowsable(EditorBrowsableState.Never)]
56 public static readonly BindableProperty StyleNameProperty = BindableProperty.Create("StyleName", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
58 var view = (View)bindable;
61 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue));
64 defaultValueCreator:(bindable) =>
66 var view = (View)bindable;
68 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STYLE_NAME).Get(out temp);
71 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
72 [EditorBrowsable(EditorBrowsableState.Never)]
73 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), Color.Transparent, propertyChanged: (bindable, oldValue, newValue) =>
75 var view = (View)bindable;
78 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((Color)newValue));
81 defaultValueCreator:(bindable) =>
83 var view = (View)bindable;
84 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
86 Tizen.NUI.PropertyMap background = view.Background;
88 background.Find(Visual.Property.Type)?.Get(out visualType);
89 if (visualType == (int)Visual.Type.Color)
91 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
94 return backgroundColor;
96 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
97 [EditorBrowsable(EditorBrowsableState.Never)]
98 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
100 var view = (View)bindable;
101 if (newValue != null)
103 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((string)newValue));
106 defaultValueCreator:(bindable) =>
108 var view = (View)bindable;
109 string backgroundImage = "";
111 Tizen.NUI.PropertyMap background = view.Background;
113 background.Find(Visual.Property.Type)?.Get(out visualType);
114 if (visualType == (int)Visual.Type.Image)
116 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
119 return backgroundImage;
121 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
122 [EditorBrowsable(EditorBrowsableState.Never)]
123 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create("Background", typeof(PropertyMap), typeof(View), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
125 var view = (View)bindable;
126 if (newValue != null)
128 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
131 defaultValueCreator:(bindable) =>
133 var view = (View)bindable;
134 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
135 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
138 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
139 [EditorBrowsable(EditorBrowsableState.Never)]
140 public static readonly BindableProperty StateProperty = BindableProperty.Create("State", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
142 var view = (View)bindable;
143 if (newValue != null)
145 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
148 defaultValueCreator:(bindable) =>
150 var view = (View)bindable;
152 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
154 NUILog.Error("State get error!");
158 case 0: return States.Normal;
159 case 1: return States.Focused;
160 case 2: return States.Disabled;
161 default: return States.Normal;
164 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
165 [EditorBrowsable(EditorBrowsableState.Never)]
166 public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
168 var view = (View)bindable;
169 string valueToString = "";
170 if (newValue != null)
172 switch ((States)newValue)
174 case States.Normal: { valueToString = "NORMAL"; break; }
175 case States.Focused: { valueToString = "FOCUSED"; break; }
176 case States.Disabled: { valueToString = "DISABLED"; break; }
177 default: { valueToString = "NORMAL"; break; }
179 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
182 defaultValueCreator:(bindable) =>
184 var view = (View)bindable;
186 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
188 NUILog.Error("subState get error!");
192 case "NORMAL": return States.Normal;
193 case "FOCUSED": return States.Focused;
194 case "DISABLED": return States.Disabled;
195 default: return States.Normal;
198 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
199 [EditorBrowsable(EditorBrowsableState.Never)]
200 public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
202 var view = (View)bindable;
203 if (newValue != null)
205 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
208 defaultValueCreator:(bindable) =>
210 var view = (View)bindable;
211 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
212 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
215 // public static readonly BindableProperty TooltipTextProperty = BindableProperty.Create("TooltipText", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
217 // var view = (View)bindable;
218 // if (newValue != null)
220 // Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((string)newValue));
223 public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
225 var view = (View)bindable;
226 if (newValue != null)
228 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
231 defaultValueCreator:(bindable) =>
233 var view = (View)bindable;
235 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
238 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
239 [EditorBrowsable(EditorBrowsableState.Never)]
240 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
242 var view = (View)bindable;
243 if (newValue != null)
245 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
248 defaultValueCreator:(bindable) =>
250 var view = (View)bindable;
252 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
255 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
256 [EditorBrowsable(EditorBrowsableState.Never)]
257 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), Vector4.Zero, propertyChanged: (bindable, oldValue, newValue) =>
259 var view = (View)bindable;
260 if (newValue != null)
262 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
265 defaultValueCreator:(bindable) =>
267 var view = (View)bindable;
268 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
269 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
272 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
273 [EditorBrowsable(EditorBrowsableState.Never)]
274 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
276 var view = (View)bindable;
277 if (newValue != null)
279 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
282 defaultValueCreator:(bindable) =>
284 var view = (View)bindable;
285 Vector2 temp = new Vector2(0.0f, 0.0f);
286 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
289 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
290 [EditorBrowsable(EditorBrowsableState.Never)]
291 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
293 var view = (View)bindable;
294 if (newValue != null)
296 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
299 defaultValueCreator:(bindable) =>
301 var view = (View)bindable;
303 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
306 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
307 [EditorBrowsable(EditorBrowsableState.Never)]
308 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
310 var view = (View)bindable;
311 if (newValue != null)
313 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
316 defaultValueCreator:(bindable) =>
318 var view = (View)bindable;
320 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
323 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
324 [EditorBrowsable(EditorBrowsableState.Never)]
325 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
327 var view = (View)bindable;
328 string valueToString = "";
330 if (newValue != null)
332 switch ((HorizontalAlignmentType)newValue)
334 case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
335 case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
336 case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
337 default: { valueToString = "left"; break; }
339 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
342 defaultValueCreator:(bindable) =>
344 var view = (View)bindable;
346 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
348 NUILog.Error("CellHorizontalAlignment get error!");
353 case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
354 case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
355 case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
356 default: return Tizen.NUI.HorizontalAlignmentType.Left;
359 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
360 [EditorBrowsable(EditorBrowsableState.Never)]
361 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
363 var view = (View)bindable;
364 string valueToString = "";
366 if (newValue != null)
368 switch ((VerticalAlignmentType)newValue)
370 case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
371 case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
372 case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
373 default: { valueToString = "top"; break; }
375 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
378 defaultValueCreator:(bindable) =>
380 var view = (View)bindable;
382 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
384 NUILog.Error("CellVerticalAlignment get error!");
389 case "top": return Tizen.NUI.VerticalAlignmentType.Top;
390 case "center": return Tizen.NUI.VerticalAlignmentType.Center;
391 case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
392 default: return Tizen.NUI.VerticalAlignmentType.Top;
395 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
396 [EditorBrowsable(EditorBrowsableState.Never)]
397 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create("LeftFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
399 var view = (View)bindable;
400 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View).GetId(); }
401 else { view.LeftFocusableViewId = -1; }
403 defaultValueCreator:(bindable) =>
405 var view = (View)bindable;
406 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
409 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
410 [EditorBrowsable(EditorBrowsableState.Never)]
411 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create("RightFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
413 var view = (View)bindable;
414 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View).GetId(); }
415 else { view.RightFocusableViewId = -1; }
417 defaultValueCreator:(bindable) =>
419 var view = (View)bindable;
420 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
423 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
424 [EditorBrowsable(EditorBrowsableState.Never)]
425 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create("UpFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
427 var view = (View)bindable;
428 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View).GetId(); }
429 else { view.UpFocusableViewId = -1; }
431 defaultValueCreator:(bindable) =>
433 var view = (View)bindable;
434 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
437 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
438 [EditorBrowsable(EditorBrowsableState.Never)]
439 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create("DownFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
441 var view = (View)bindable;
442 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View).GetId(); }
443 else { view.DownFocusableViewId = -1; }
445 defaultValueCreator:(bindable) =>
447 var view = (View)bindable;
448 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
451 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
452 [EditorBrowsable(EditorBrowsableState.Never)]
453 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
455 var view = (View)bindable;
456 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
458 defaultValueCreator:(bindable) =>
460 var view = (View)bindable;
461 return view.IsKeyboardFocusable();
463 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
464 [EditorBrowsable(EditorBrowsableState.Never)]
465 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
467 var view = (View)bindable;
468 if (newValue != null)
470 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue( new Size((Size2D)newValue)));
473 defaultValueCreator:(bindable) =>
475 var view = (View)bindable;
476 Size temp = new Size(0.0f, 0.0f, 0.0f);
477 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
478 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
479 Console.WriteLine($"View Size2DProperty get width: {size.Width} height: {size.Height}");
482 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
483 [EditorBrowsable(EditorBrowsableState.Never)]
484 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
486 var view = (View)bindable;
487 if (newValue != null)
489 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
492 defaultValueCreator:(bindable) =>
494 var view = (View)bindable;
496 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
499 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
500 [EditorBrowsable(EditorBrowsableState.Never)]
501 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), new Position2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
503 var view = (View)bindable;
504 if (newValue != null)
506 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue( new Position((Position2D)newValue) ));
509 defaultValueCreator:(bindable) =>
511 var view = (View)bindable;
512 Position temp = new Position(0.0f, 0.0f, 0.0f);
513 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
514 return new Position2D(temp);
516 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
517 [EditorBrowsable(EditorBrowsableState.Never)]
518 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
520 var view = (View)bindable;
521 if (newValue != null)
523 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
525 Console.WriteLine("View PositionUsesPivotPointProperty changed: oldValue: " + oldValue + ", newValue: " + newValue);
527 defaultValueCreator:(bindable) =>
529 var view = (View)bindable;
531 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
534 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
535 [EditorBrowsable(EditorBrowsableState.Never)]
536 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
538 var view = (View)bindable;
540 if (newValue != null)
542 value = (int)newValue;
545 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
548 var siblings = view.GetParent()?.Children;
549 if (siblings != null)
551 int currentOrder = siblings.IndexOf(view);
552 if (value != currentOrder)
554 if (value == 0) { view.LowerToBottom(); }
555 else if (value < siblings.Count - 1)
557 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
558 else { view.LowerBelow(siblings[value]); }
560 else { view.RaiseToTop(); }
565 defaultValueCreator:(bindable) =>
567 var view = (View)bindable;
568 var parentChildren = view.GetParent()?.Children;
569 int currentOrder = 0;
570 if (parentChildren != null)
572 currentOrder = parentChildren.IndexOf(view);
574 if (currentOrder < 0) { return 0; }
575 else if (currentOrder < parentChildren.Count) { return currentOrder; }
580 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
581 [EditorBrowsable(EditorBrowsableState.Never)]
582 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), Position.ParentOriginTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
584 var view = (View)bindable;
585 if (newValue != null)
587 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
589 Console.WriteLine("View ParentOriginProperty changed: oldValue: " + oldValue + ", newValue: " + newValue);
591 defaultValueCreator:(bindable) =>
593 var view = (View)bindable;
594 Position temp = new Position(0.0f, 0.0f, 0.0f);
595 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
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 PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), Position.PivotPointTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
603 var view = (View)bindable;
604 if (newValue != null)
606 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
608 Console.WriteLine("View PivotPointProperty changed: oldValue: " + oldValue + ", newValue: " + newValue);
610 defaultValueCreator:(bindable) =>
612 var view = (View)bindable;
613 Position temp = new Position(0.0f, 0.0f, 0.0f);
614 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).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 SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
621 var view = (View)bindable;
622 if (newValue != null)
624 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
626 Console.WriteLine("View SizeWidthProperty changed: oldValue: " + oldValue + ", newValue: " + newValue);
628 defaultValueCreator:(bindable) =>
630 var view = (View)bindable;
632 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
633 Console.WriteLine($"View SizeWidthProperty get Value: {temp}");
636 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
637 [EditorBrowsable(EditorBrowsableState.Never)]
638 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
640 var view = (View)bindable;
641 if (newValue != null)
643 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
645 Console.WriteLine("View SizeHeightProperty changed: oldValue: " + oldValue + ", newValue: " + newValue);
647 defaultValueCreator:(bindable) =>
649 var view = (View)bindable;
651 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
652 Console.WriteLine($"View SizeHeightProperty get Value: {temp}");
655 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
656 [EditorBrowsable(EditorBrowsableState.Never)]
657 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), Position.Zero, propertyChanged: (bindable, oldValue, newValue) =>
659 var view = (View)bindable;
660 if (newValue != null)
662 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
665 defaultValueCreator:(bindable) =>
667 var view = (View)bindable;
668 Position temp = new Position(0.0f, 0.0f, 0.0f);
669 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
672 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
673 [EditorBrowsable(EditorBrowsableState.Never)]
674 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
676 var view = (View)bindable;
677 if (newValue != null)
679 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
682 defaultValueCreator:(bindable) =>
684 var view = (View)bindable;
686 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
689 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
690 [EditorBrowsable(EditorBrowsableState.Never)]
691 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
693 var view = (View)bindable;
694 if (newValue != null)
696 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
699 defaultValueCreator:(bindable) =>
701 var view = (View)bindable;
703 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
706 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
707 [EditorBrowsable(EditorBrowsableState.Never)]
708 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
710 var view = (View)bindable;
711 if (newValue != null)
713 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
716 defaultValueCreator:(bindable) =>
718 var view = (View)bindable;
720 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
723 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
724 [EditorBrowsable(EditorBrowsableState.Never)]
725 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), new Rotation(new Radian(0), Vector3.ZAxis), propertyChanged: (bindable, oldValue, newValue) =>
727 var view = (View)bindable;
728 if (newValue != null)
730 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
733 defaultValueCreator:(bindable) =>
735 var view = (View)bindable;
736 Rotation temp = new Rotation();
737 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
740 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
741 [EditorBrowsable(EditorBrowsableState.Never)]
742 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
744 var view = (View)bindable;
745 if (newValue != null)
747 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
750 defaultValueCreator:(bindable) =>
752 var view = (View)bindable;
753 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
754 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
757 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
758 [EditorBrowsable(EditorBrowsableState.Never)]
759 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
761 var view = (View)bindable;
762 if (newValue != null)
764 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
767 defaultValueCreator:(bindable) =>
769 var view = (View)bindable;
771 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
774 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
775 [EditorBrowsable(EditorBrowsableState.Never)]
776 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
778 var view = (View)bindable;
779 if (newValue != null)
781 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
784 defaultValueCreator:(bindable) =>
786 var view = (View)bindable;
788 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
791 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
792 [EditorBrowsable(EditorBrowsableState.Never)]
793 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
795 var view = (View)bindable;
796 if (newValue != null)
798 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
801 defaultValueCreator:(bindable) =>
803 var view = (View)bindable;
805 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
808 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
809 [EditorBrowsable(EditorBrowsableState.Never)]
810 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
812 var view = (View)bindable;
813 if (newValue != null)
815 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
818 defaultValueCreator:(bindable) =>
820 var view = (View)bindable;
822 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
825 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
826 [EditorBrowsable(EditorBrowsableState.Never)]
827 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
829 var view = (View)bindable;
830 if (newValue != null)
832 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
835 defaultValueCreator:(bindable) =>
837 var view = (View)bindable;
839 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
842 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
843 [EditorBrowsable(EditorBrowsableState.Never)]
844 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
846 var view = (View)bindable;
847 if (newValue != null)
849 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
852 defaultValueCreator:(bindable) =>
854 var view = (View)bindable;
856 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
859 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
860 [EditorBrowsable(EditorBrowsableState.Never)]
861 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
863 var view = (View)bindable;
864 if (newValue != null)
866 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
869 defaultValueCreator:(bindable) =>
871 var view = (View)bindable;
873 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
876 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
877 [EditorBrowsable(EditorBrowsableState.Never)]
878 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
880 var view = (View)bindable;
881 if (newValue != null)
883 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
886 defaultValueCreator:(bindable) =>
888 var view = (View)bindable;
890 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
893 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
894 [EditorBrowsable(EditorBrowsableState.Never)]
895 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
897 var view = (View)bindable;
898 if (newValue != null)
900 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
903 defaultValueCreator:(bindable) =>
905 var view = (View)bindable;
907 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
909 NUILog.Error("DrawMode get error!");
913 case "NORMAL": return DrawModeType.Normal;
914 case "OVERLAY_2D": return DrawModeType.Overlay2D;
915 case "STENCIL": return DrawModeType.Stencil;
916 default: return DrawModeType.Normal;
919 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
920 [EditorBrowsable(EditorBrowsableState.Never)]
921 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
923 var view = (View)bindable;
924 if (newValue != null)
926 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
929 defaultValueCreator:(bindable) =>
931 var view = (View)bindable;
932 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
933 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
936 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
937 [EditorBrowsable(EditorBrowsableState.Never)]
938 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
940 var view = (View)bindable;
941 if (newValue != null)
943 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
946 defaultValueCreator:(bindable) =>
948 var view = (View)bindable;
950 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
952 NUILog.Error("WidthResizePolicy get error!");
956 case "FIXED": return ResizePolicyType.Fixed;
957 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
958 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
959 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
960 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
961 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
962 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
963 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
964 default: return ResizePolicyType.Fixed;
967 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
968 [EditorBrowsable(EditorBrowsableState.Never)]
969 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
971 var view = (View)bindable;
972 if (newValue != null)
974 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
977 defaultValueCreator:(bindable) =>
979 var view = (View)bindable;
981 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
983 NUILog.Error("HeightResizePolicy get error!");
987 case "FIXED": return ResizePolicyType.Fixed;
988 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
989 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
990 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
991 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
992 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
993 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
994 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
995 default: return ResizePolicyType.Fixed;
998 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
999 [EditorBrowsable(EditorBrowsableState.Never)]
1000 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1002 var view = (View)bindable;
1003 string valueToString = "";
1004 if (newValue != null)
1006 switch ((SizeScalePolicyType)newValue)
1008 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1009 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1010 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1011 default: { valueToString = "USE_SIZE_SET"; break; }
1013 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1016 defaultValueCreator:(bindable) =>
1018 var view = (View)bindable;
1020 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1022 NUILog.Error("SizeScalePolicy get error!");
1026 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1027 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1028 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1029 default: return SizeScalePolicyType.UseSizeSet;
1032 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1033 [EditorBrowsable(EditorBrowsableState.Never)]
1034 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1036 var view = (View)bindable;
1037 if (newValue != null)
1039 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1042 defaultValueCreator:(bindable) =>
1044 var view = (View)bindable;
1046 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1049 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1050 [EditorBrowsable(EditorBrowsableState.Never)]
1051 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1053 var view = (View)bindable;
1054 if (newValue != null)
1056 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1059 defaultValueCreator:(bindable) =>
1061 var view = (View)bindable;
1063 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1066 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1067 [EditorBrowsable(EditorBrowsableState.Never)]
1068 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), new Extents(0,0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1070 var view = (View)bindable;
1071 if (newValue != null)
1073 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1076 defaultValueCreator:(bindable) =>
1078 var view = (View)bindable;
1079 Extents temp = new Extents(0, 0, 0, 0);
1080 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1083 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1084 [EditorBrowsable(EditorBrowsableState.Never)]
1085 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), new Size(0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1087 var view = (View)bindable;
1088 if (newValue != null)
1090 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1093 defaultValueCreator: (bindable) => {
1094 var view = (View)bindable;
1095 Size temp = new Size(0, 0, 0);
1096 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1099 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1100 [EditorBrowsable(EditorBrowsableState.Never)]
1101 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
1103 var view = (View)bindable;
1104 if (newValue != null)
1106 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1109 defaultValueCreator:(bindable) =>
1111 var view = (View)bindable;
1112 Size2D temp = new Size2D(0, 0);
1113 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1116 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1117 [EditorBrowsable(EditorBrowsableState.Never)]
1118 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
1120 var view = (View)bindable;
1121 if (newValue != null)
1123 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1126 defaultValueCreator:(bindable) =>
1128 var view = (View)bindable;
1129 Size2D temp = new Size2D(0, 0);
1130 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1133 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1134 [EditorBrowsable(EditorBrowsableState.Never)]
1135 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1137 var view = (View)bindable;
1138 if (newValue != null)
1140 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1143 defaultValueCreator:(bindable) =>
1145 var view = (View)bindable;
1147 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1150 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1151 [EditorBrowsable(EditorBrowsableState.Never)]
1152 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1154 var view = (View)bindable;
1155 if (newValue != null)
1157 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1160 defaultValueCreator:(bindable) =>
1162 var view = (View)bindable;
1164 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1166 NUILog.Error("ClippingMode get error!");
1170 case "DISABLED": return ClippingModeType.Disabled;
1171 case "CLIP_CHILDREN": return ClippingModeType.ClipChildren;
1172 case "CLIP_TO_BOUNDING_BOX": return ClippingModeType.ClipToBoundingBox;
1173 default: return ClippingModeType.Disabled;
1176 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1177 [EditorBrowsable(EditorBrowsableState.Never)]
1178 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1180 var view = (View)bindable;
1181 if (newValue != null)
1183 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1186 defaultValueCreator:(bindable) =>
1188 var view = (View)bindable;
1190 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1193 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1194 [EditorBrowsable(EditorBrowsableState.Never)]
1195 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1197 var view = (View)bindable;
1198 if (newValue != null)
1200 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1203 defaultValueCreator:(bindable) =>
1205 var view = (View)bindable;
1207 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1209 NUILog.Error("LAYOUT_DIRECTION get error!");
1211 return (ViewLayoutDirectionType)temp;
1213 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1214 [EditorBrowsable(EditorBrowsableState.Never)]
1215 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), new Extents(0,0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1217 var view = (View)bindable;
1218 if (newValue != null)
1220 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1223 defaultValueCreator:(bindable) =>
1225 var view = (View)bindable;
1226 Extents temp = new Extents(0, 0, 0, 0);
1227 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1230 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1231 [EditorBrowsable(EditorBrowsableState.Never)]
1232 public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style),
1233 propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1236 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1238 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
1240 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1243 PositionUsesPivotPoint = false;
1245 _mergedStyle = new MergedStyle(GetType(), this);
1248 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
1250 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1254 /// Event argument passed through ChildAdded event
1256 /// <since_tizen> 5 </since_tizen>
1257 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1258 [EditorBrowsable(EditorBrowsableState.Never)]
1259 public class ChildAddedEventArgs : EventArgs
1262 /// Added child View at moment
1264 /// <since_tizen> 5 </since_tizen>
1265 public View Added { get; set; }
1269 /// Event when a child is added
1271 /// <since_tizen> 5 </since_tizen>
1272 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1273 [EditorBrowsable(EditorBrowsableState.Never)]
1274 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1276 // From Container Base class
1278 /// Adds a child view to this view.
1280 /// <seealso cref="Container.Add" />
1281 /// <since_tizen> 4 </since_tizen>
1282 public override void Add(View child)
1284 Container oldParent = child.Parent;
1285 if (oldParent != this)
1287 if (oldParent != null)
1289 oldParent.Remove(child);
1292 if (child.Layout == null)
1294 LayoutItem layoutItem = new LayoutItem();
1295 child.Layout = layoutItem;
1300 Layout.LayoutChildren.Add(child.Layout);
1303 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
1304 if (NDalicPINVOKE.SWIGPendingException.Pending)
1305 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1306 Children.Add(child);
1308 if (ChildAdded != null)
1310 ChildAddedEventArgs e = new ChildAddedEventArgs
1314 ChildAdded(this, e);
1320 /// Event argument passed through ChildRemoved event
1322 /// <since_tizen> 5 </since_tizen>
1323 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1324 [EditorBrowsable(EditorBrowsableState.Never)]
1325 public class ChildRemovedEventArgs : EventArgs
1328 /// Removed child View at moment
1330 /// <since_tizen> 5 </since_tizen>
1331 public View Removed { get; set; }
1335 /// Event when a child is removed
1337 /// <since_tizen> 5 </since_tizen>
1338 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1339 [EditorBrowsable(EditorBrowsableState.Never)]
1340 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1344 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
1346 /// <seealso cref="Container.Remove" />
1347 /// <since_tizen> 4 </since_tizen>
1348 public override void Remove(View child)
1350 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
1351 if (NDalicPINVOKE.SWIGPendingException.Pending)
1352 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1354 Children.Remove(child);
1359 Layout.LayoutChildren.Remove(child.Layout);
1363 if (ChildRemoved != null)
1365 ChildRemovedEventArgs e = new ChildRemovedEventArgs
1369 ChildRemoved(this, e);
1374 /// Retrieves a child view by index.
1376 /// <seealso cref="Container.GetChildAt" />
1377 /// <since_tizen> 4 </since_tizen>
1378 public override View GetChildAt(uint index)
1380 if (index < Children.Count)
1382 return Children[Convert.ToInt32(index)];
1391 /// Retrieves the number of children held by the view.
1393 /// <seealso cref="Container.GetChildCount" />
1394 /// <since_tizen> 4 </since_tizen>
1395 public override uint GetChildCount()
1397 return Convert.ToUInt32(Children.Count);
1401 /// Gets the views parent.
1403 /// <seealso cref="Container.GetParent()" />
1404 /// <since_tizen> 4 </since_tizen>
1405 public override Container GetParent()
1407 //to fix memory leak issue, match the handle count with native side.
1408 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
1409 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1410 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
1411 NDalicPINVOKE.delete_BaseHandle(CPtr);
1412 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1414 if (NDalicPINVOKE.SWIGPendingException.Pending)
1415 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1417 return basehandle as Container;
1420 internal bool IsTopLevelView()
1422 if (GetParent() is Layer)
1430 /// you can override it to clean-up your own resources.
1432 /// <param name="type">DisposeTypes</param>
1433 /// <since_tizen> 3 </since_tizen>
1434 protected override void Dispose(DisposeTypes type)
1441 if (type == DisposeTypes.Explicit)
1444 //Release your own managed resources here.
1445 //You should release all of your own disposable objects here.
1448 //Release your own unmanaged resources here.
1449 //You should not access any managed member here except static instance.
1450 //because the execution order of Finalizes is non-deterministic.
1453 DisConnectFromSignals();
1456 if (swigCPtr.Handle != global::System.IntPtr.Zero)
1460 swigCMemOwn = false;
1461 NDalicPINVOKE.delete_View(swigCPtr);
1463 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1470 private void DisConnectFromSignals()
1472 // Save current CPtr.
1473 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
1475 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
1476 swigCPtr = GetBaseHandleCPtrHandleRef;
1478 if (_onRelayoutEventCallback != null)
1480 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1483 if (_offWindowEventCallback != null)
1485 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1488 if (_onWindowEventCallback != null)
1490 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1493 if (_wheelEventCallback != null)
1495 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1498 if (_hoverEventCallback != null)
1500 this.HoveredSignal().Disconnect(_hoverEventCallback);
1503 if (_touchDataCallback != null)
1505 this.TouchSignal().Disconnect(_touchDataCallback);
1508 if (_ResourcesLoadedCallback != null)
1510 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1513 if (_offWindowEventCallback != null)
1515 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1518 if (_onWindowEventCallback != null)
1520 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1523 if (_wheelEventCallback != null)
1525 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1528 if (_hoverEventCallback != null)
1530 this.HoveredSignal().Disconnect(_hoverEventCallback);
1533 if (_touchDataCallback != null)
1535 this.TouchSignal().Disconnect(_touchDataCallback);
1538 if (_onRelayoutEventCallback != null)
1540 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1543 if (_keyCallback != null)
1545 this.KeyEventSignal().Disconnect(_keyCallback);
1548 if (_keyInputFocusLostCallback != null)
1550 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1553 if (_keyInputFocusGainedCallback != null)
1555 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1558 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
1559 // Restore current CPtr.
1560 swigCPtr = currentCPtr;
1563 private EventHandler _keyInputFocusGainedEventHandler;
1564 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1565 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1566 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1569 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1570 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1572 /// <since_tizen> 3 </since_tizen>
1573 public event EventHandler FocusGained
1577 if (_keyInputFocusGainedEventHandler == null)
1579 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1580 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1583 _keyInputFocusGainedEventHandler += value;
1588 _keyInputFocusGainedEventHandler -= value;
1590 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1592 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1597 private void OnKeyInputFocusGained(IntPtr view)
1599 if (_keyInputFocusGainedEventHandler != null)
1601 _keyInputFocusGainedEventHandler(this, null);
1606 private EventHandler _keyInputFocusLostEventHandler;
1607 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1608 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1609 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1612 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1613 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1615 /// <since_tizen> 3 </since_tizen>
1616 public event EventHandler FocusLost
1620 if (_keyInputFocusLostEventHandler == null)
1622 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1623 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1626 _keyInputFocusLostEventHandler += value;
1631 _keyInputFocusLostEventHandler -= value;
1633 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1635 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1640 private void OnKeyInputFocusLost(IntPtr view)
1642 if (_keyInputFocusLostEventHandler != null)
1644 _keyInputFocusLostEventHandler(this, null);
1649 /// Event arguments that passed via the KeyEvent signal.
1651 /// <since_tizen> 3 </since_tizen>
1652 public class KeyEventArgs : EventArgs
1657 /// Key - is the key sent to the view.
1659 /// <since_tizen> 3 </since_tizen>
1673 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1674 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1675 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1676 private KeyCallbackType _keyCallback;
1679 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1680 /// The KeyPressed signal is emitted when the key event is received.<br />
1682 /// <since_tizen> 3 </since_tizen>
1683 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1687 if (_keyEventHandler == null)
1689 _keyCallback = OnKeyEvent;
1690 this.KeyEventSignal().Connect(_keyCallback);
1693 _keyEventHandler += value;
1698 _keyEventHandler -= value;
1700 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1702 this.KeyEventSignal().Disconnect(_keyCallback);
1707 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
1709 if (keyEvent == global::System.IntPtr.Zero)
1711 NUILog.Error("keyEvent should not be null!");
1715 KeyEventArgs e = new KeyEventArgs();
1717 bool result = false;
1719 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
1721 if (_keyEventHandler != null)
1723 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
1725 // Oring the result of each callback.
1726 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
1728 result |= del(this, e);
1735 private EventHandler _onRelayoutEventHandler;
1736 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1737 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1738 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1741 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1742 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1744 /// <since_tizen> 3 </since_tizen>
1745 public event EventHandler Relayout
1749 if (_onRelayoutEventHandler == null)
1751 _onRelayoutEventCallback = OnRelayout;
1752 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1755 _onRelayoutEventHandler += value;
1760 _onRelayoutEventHandler -= value;
1762 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1764 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1770 // Callback for View OnRelayout signal
1771 private void OnRelayout(IntPtr data)
1773 if (_onRelayoutEventHandler != null)
1775 _onRelayoutEventHandler(this, null);
1780 /// Event arguments that passed via the touch signal.
1782 /// <since_tizen> 3 </since_tizen>
1783 public class TouchEventArgs : EventArgs
1785 private Touch _touch;
1788 /// Touch - contains the information of touch points.
1790 /// <since_tizen> 3 </since_tizen>
1804 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1805 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1806 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1807 private TouchDataCallbackType _touchDataCallback;
1810 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1811 /// The touched signal is emitted when the touch input is received.<br />
1813 /// <since_tizen> 3 </since_tizen>
1814 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1818 if (_touchDataEventHandler == null)
1820 _touchDataCallback = OnTouch;
1821 this.TouchSignal().Connect(_touchDataCallback);
1824 _touchDataEventHandler += value;
1829 _touchDataEventHandler -= value;
1831 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1833 this.TouchSignal().Disconnect(_touchDataCallback);
1839 // Callback for View TouchSignal
1840 private bool OnTouch(IntPtr view, IntPtr touchData)
1842 if (touchData == global::System.IntPtr.Zero)
1844 NUILog.Error("touchData should not be null!");
1848 TouchEventArgs e = new TouchEventArgs();
1850 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
1852 if (_touchDataEventHandler != null)
1854 return _touchDataEventHandler(this, e);
1861 /// Event arguments that passed via the hover signal.
1863 /// <since_tizen> 3 </since_tizen>
1864 public class HoverEventArgs : EventArgs
1866 private Hover _hover;
1869 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
1871 /// <since_tizen> 3 </since_tizen>
1885 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1886 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1887 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1888 private HoverEventCallbackType _hoverEventCallback;
1891 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1892 /// The hovered signal is emitted when the hover input is received.<br />
1894 /// <since_tizen> 3 </since_tizen>
1895 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1899 if (_hoverEventHandler == null)
1901 _hoverEventCallback = OnHoverEvent;
1902 this.HoveredSignal().Connect(_hoverEventCallback);
1905 _hoverEventHandler += value;
1910 _hoverEventHandler -= value;
1912 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1914 this.HoveredSignal().Disconnect(_hoverEventCallback);
1920 // Callback for View Hover signal
1921 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
1923 if (hoverEvent == global::System.IntPtr.Zero)
1925 NUILog.Error("hoverEvent should not be null!");
1929 HoverEventArgs e = new HoverEventArgs();
1931 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
1933 if (_hoverEventHandler != null)
1935 return _hoverEventHandler(this, e);
1942 /// Event arguments that passed via the wheel signal.
1944 /// <since_tizen> 3 </since_tizen>
1945 public class WheelEventArgs : EventArgs
1947 private Wheel _wheel;
1950 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
1952 /// <since_tizen> 3 </since_tizen>
1966 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1967 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1968 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1969 private WheelEventCallbackType _wheelEventCallback;
1972 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1973 /// The WheelMoved signal is emitted when the wheel event is received.<br />
1975 /// <since_tizen> 3 </since_tizen>
1976 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1980 if (_wheelEventHandler == null)
1982 _wheelEventCallback = OnWheelEvent;
1983 this.WheelEventSignal().Connect(_wheelEventCallback);
1986 _wheelEventHandler += value;
1991 _wheelEventHandler -= value;
1993 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
1995 this.WheelEventSignal().Disconnect(_wheelEventCallback);
2001 // Callback for View Wheel signal
2002 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
2004 if (wheelEvent == global::System.IntPtr.Zero)
2006 NUILog.Error("wheelEvent should not be null!");
2010 WheelEventArgs e = new WheelEventArgs();
2012 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
2014 if (_wheelEventHandler != null)
2016 return _wheelEventHandler(this, e);
2022 private EventHandler _onWindowEventHandler;
2023 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2024 private delegate void OnWindowEventCallbackType(IntPtr control);
2025 private OnWindowEventCallbackType _onWindowEventCallback;
2028 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
2029 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
2031 /// <since_tizen> 3 </since_tizen>
2032 public event EventHandler AddedToWindow
2036 if (_onWindowEventHandler == null)
2038 _onWindowEventCallback = OnWindow;
2039 this.OnWindowSignal().Connect(_onWindowEventCallback);
2042 _onWindowEventHandler += value;
2047 _onWindowEventHandler -= value;
2049 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
2051 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
2056 // Callback for View OnWindow signal
2057 private void OnWindow(IntPtr data)
2059 if (_onWindowEventHandler != null)
2061 _onWindowEventHandler(this, null);
2066 private EventHandler _offWindowEventHandler;
2067 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2068 private delegate void OffWindowEventCallbackType(IntPtr control);
2069 private OffWindowEventCallbackType _offWindowEventCallback;
2072 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
2073 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
2075 /// <since_tizen> 3 </since_tizen>
2076 public event EventHandler RemovedFromWindow
2080 if (_offWindowEventHandler == null)
2082 _offWindowEventCallback = OffWindow;
2083 this.OffWindowSignal().Connect(_offWindowEventCallback);
2086 _offWindowEventHandler += value;
2091 _offWindowEventHandler -= value;
2093 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
2095 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
2100 // Callback for View OffWindow signal
2101 private void OffWindow(IntPtr data)
2103 if (_offWindowEventHandler != null)
2105 _offWindowEventHandler(this, null);
2110 /// Event arguments of visibility changed.
2112 /// <since_tizen> 3 </since_tizen>
2113 public class VisibilityChangedEventArgs : EventArgs
2116 private bool _visibility;
2117 private VisibilityChangeType _type;
2120 /// The view, or child of view, whose visibility has changed.
2122 /// <since_tizen> 3 </since_tizen>
2136 /// Whether the view is now visible or not.
2138 /// <since_tizen> 3 </since_tizen>
2139 public bool Visibility
2147 _visibility = value;
2152 /// Whether the view's visible property has changed or a parent's.
2154 /// <since_tizen> 3 </since_tizen>
2155 public VisibilityChangeType Type
2168 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
2169 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2170 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
2171 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
2174 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
2175 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
2177 /// <since_tizen> 3 </since_tizen>
2178 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
2182 if (_visibilityChangedEventHandler == null)
2184 _visibilityChangedEventCallback = OnVisibilityChanged;
2185 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
2188 _visibilityChangedEventHandler += value;
2193 _visibilityChangedEventHandler -= value;
2195 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
2197 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
2202 // Callback for View visibility change signal
2203 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
2205 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
2208 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2210 e.Visibility = visibility;
2213 if (_visibilityChangedEventHandler != null)
2215 _visibilityChangedEventHandler(this, e);
2221 /// Event arguments of layout direction changed.
2223 /// <since_tizen> 4 </since_tizen>
2224 public class LayoutDirectionChangedEventArgs : EventArgs
2227 private ViewLayoutDirectionType _type;
2230 /// The view, or child of view, whose layout direction has changed.
2232 /// <since_tizen> 4 </since_tizen>
2246 /// Whether the view's layout direction property has changed or a parent's.
2248 /// <since_tizen> 4 </since_tizen>
2249 public ViewLayoutDirectionType Type
2262 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
2263 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2264 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
2265 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
2268 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
2269 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
2271 /// <since_tizen> 4 </since_tizen>
2272 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
2276 if (_layoutDirectionChangedEventHandler == null)
2278 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
2279 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
2282 _layoutDirectionChangedEventHandler += value;
2287 _layoutDirectionChangedEventHandler -= value;
2289 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
2291 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
2296 // Callback for View layout direction change signal
2297 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
2299 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
2302 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2306 if (_layoutDirectionChangedEventHandler != null)
2308 _layoutDirectionChangedEventHandler(this, e);
2312 // Resource Ready Signal
2314 private EventHandler _resourcesLoadedEventHandler;
2315 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2316 private delegate void ResourcesLoadedCallbackType(IntPtr control);
2317 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
2320 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
2321 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
2323 /// <since_tizen> 3 </since_tizen>
2324 public event EventHandler ResourcesLoaded
2328 if (_resourcesLoadedEventHandler == null)
2330 _ResourcesLoadedCallback = OnResourcesLoaded;
2331 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
2334 _resourcesLoadedEventHandler += value;
2339 _resourcesLoadedEventHandler -= value;
2341 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
2343 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
2348 private void OnResourcesLoaded(IntPtr view)
2350 if (_resourcesLoadedEventHandler != null)
2352 _resourcesLoadedEventHandler(this, null);
2356 internal IntPtr GetPtrfromView()
2358 return (IntPtr)swigCPtr;
2361 internal class Property
2363 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
2364 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
2365 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
2366 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
2367 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
2368 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
2369 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
2370 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
2371 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
2372 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
2373 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
2374 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
2375 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
2376 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
2377 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
2378 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
2379 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
2380 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
2381 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
2382 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
2383 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
2384 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
2385 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
2386 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
2387 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
2388 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
2389 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
2390 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
2391 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
2392 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
2393 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
2394 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
2395 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
2396 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
2397 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
2398 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
2399 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
2400 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
2401 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
2402 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
2403 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
2404 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
2405 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
2406 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
2407 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
2408 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
2409 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
2410 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
2411 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
2412 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
2413 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
2414 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
2415 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
2416 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
2417 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
2418 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
2419 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
2420 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
2421 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
2422 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
2423 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
2424 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
2425 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();
2429 /// Describes the direction to move the focus towards.
2431 /// <since_tizen> 3 </since_tizen>
2432 public enum FocusDirection
2435 /// Move keyboard focus towards the left direction.
2437 /// <since_tizen> 3 </since_tizen>
2440 /// Move keyboard focus towards the right direction.
2442 /// <since_tizen> 3 </since_tizen>
2445 /// Move keyboard focus towards the up direction.
2447 /// <since_tizen> 3 </since_tizen>
2450 /// Move keyboard focus towards the down direction.
2452 /// <since_tizen> 3 </since_tizen>
2455 /// Move keyboard focus towards the previous page direction.
2457 /// <since_tizen> 3 </since_tizen>
2460 /// Move keyboard focus towards the next page direction.
2462 /// <since_tizen> 3 </since_tizen>
2466 protected void InitXamlResource()
2468 if (null != Application.Current)
2470 Application.AddResourceChangedCallback(this, OnResourcesChanged);
2475 /// Creates a new instance of a view.
2477 /// <since_tizen> 3 </since_tizen>
2478 public View() : this(NDalicPINVOKE.View_New(), true)
2481 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2483 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
2486 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2489 private View ConvertIdToView(uint id)
2492 if (GetParent() is View)
2494 View parentView = GetParent() as View;
2495 view = parentView.FindChildById(id);
2500 view = Window.Instance.GetRootLayer().FindChildById(id);
2506 internal void SetKeyInputFocus()
2508 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
2509 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2513 /// Queries whether the view has a focus.
2515 /// <returns>True if this view has a focus.</returns>
2516 /// <since_tizen> 3 </since_tizen>
2517 public bool HasFocus()
2519 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
2520 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2524 internal void ClearKeyInputFocus()
2526 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
2527 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2530 internal PinchGestureDetector GetPinchGestureDetector()
2532 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
2533 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2537 internal PanGestureDetector GetPanGestureDetector()
2539 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
2540 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2544 internal TapGestureDetector GetTapGestureDetector()
2546 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
2547 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2551 internal LongPressGestureDetector GetLongPressGestureDetector()
2553 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
2554 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2559 /// Sets the name of the style to be applied to the view.
2561 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
2562 /// <since_tizen> 3 </since_tizen>
2563 public void SetStyleName(string styleName)
2565 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
2566 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2570 /// Retrieves the name of the style to be applied to the view (if any).
2572 /// <returns>A string matching a style, or an empty string.</returns>
2573 /// <since_tizen> 3 </since_tizen>
2574 public string GetStyleName()
2576 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
2577 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2581 internal void SetBackgroundColor(Vector4 color)
2583 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
2584 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2587 internal Vector4 GetBackgroundColor()
2589 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
2590 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2594 internal void SetBackgroundImage(Image image)
2596 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
2597 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2601 /// Clears the background.
2603 /// <since_tizen> 3 </since_tizen>
2604 public void ClearBackground()
2606 NDalicPINVOKE.View_ClearBackground(swigCPtr);
2607 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2610 internal ControlKeySignal KeyEventSignal()
2612 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
2613 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2617 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
2619 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
2620 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2624 internal KeyInputFocusSignal KeyInputFocusLostSignal()
2626 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
2627 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2631 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
2633 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2636 internal enum PropertyRange
2638 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
2639 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
2640 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
2644 /// The StyleName, type string.
2646 /// <since_tizen> 3 </since_tizen>
2647 public string StyleName
2651 return (string)GetValue(StyleNameProperty);
2655 SetValue(StyleNameProperty, value);
2656 NotifyPropertyChanged();
2661 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
2663 /// <since_tizen> 3 </since_tizen>
2664 public Color BackgroundColor
2668 return (Color)GetValue(BackgroundColorProperty);
2672 SetValue(BackgroundColorProperty, value);
2673 NotifyPropertyChanged();
2678 /// Creates an animation to animate the background color visual. If there is no
2679 /// background visual, creates one with transparent black as it's mixColor.
2681 /// <since_tizen> 3 </since_tizen>
2682 public Animation AnimateBackgroundColor(object destinationValue,
2685 AlphaFunction.BuiltinFunctions? alphaFunction = null,
2686 object initialValue = null)
2688 Tizen.NUI.PropertyMap background = Background;
2690 if (background.Empty())
2692 // If there is no background yet, ensure there is a transparent
2694 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
2695 background = Background;
2697 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
2701 /// Creates an animation to animate the mixColor of the named visual.
2703 /// <since_tizen> 3 </since_tizen>
2704 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
2706 Animation animation = null;
2708 PropertyMap _animator = new PropertyMap();
2709 if (alphaFunction != null)
2711 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
2714 PropertyMap _timePeriod = new PropertyMap();
2715 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
2716 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
2717 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
2719 PropertyMap _transition = new PropertyMap();
2720 _transition.Add("animator", new PropertyValue(_animator));
2721 _transition.Add("target", new PropertyValue(targetVisual));
2722 _transition.Add("property", new PropertyValue("mixColor"));
2724 if (initialColor != null)
2726 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
2727 _transition.Add("initialValue", initValue);
2730 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
2731 _transition.Add("targetValue", destValue);
2732 TransitionData _transitionData = new TransitionData(_transition);
2734 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
2735 if (NDalicPINVOKE.SWIGPendingException.Pending)
2736 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2742 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
2744 /// <since_tizen> 3 </since_tizen>
2745 public string BackgroundImage
2749 return (string)GetValue(BackgroundImageProperty);
2753 SetValue(BackgroundImageProperty, value);
2754 NotifyPropertyChanged();
2759 /// The background of view.
2761 /// <since_tizen> 3 </since_tizen>
2762 public Tizen.NUI.PropertyMap Background
2766 return (PropertyMap)GetValue(BackgroundProperty);
2770 SetValue(BackgroundProperty, value);
2771 NotifyPropertyChanged();
2777 /// The current state of the view.
2779 /// <since_tizen> 3 </since_tizen>
2784 return (States)GetValue(StateProperty);
2788 SetValue(StateProperty, value);
2789 NotifyPropertyChanged();
2794 /// The current sub state of the view.
2796 /// <since_tizen> 3 </since_tizen>
2797 public States SubState
2801 return (States)GetValue(SubStateProperty);
2805 SetValue(SubStateProperty, value);
2806 NotifyPropertyChanged();
2811 /// Displays a tooltip
2813 /// <since_tizen> 3 </since_tizen>
2814 public Tizen.NUI.PropertyMap Tooltip
2818 return (PropertyMap)GetValue(TooltipProperty);
2822 SetValue(TooltipProperty, value);
2823 NotifyPropertyChanged();
2828 /// Displays a tooltip as a text.
2830 /// <since_tizen> 3 </since_tizen>
2831 public string TooltipText
2835 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
2836 NotifyPropertyChanged();
2840 private int LeftFocusableViewId
2845 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
2850 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2854 private int RightFocusableViewId
2859 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
2864 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2868 private int UpFocusableViewId
2873 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
2878 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2882 private int DownFocusableViewId
2887 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
2892 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2897 /// The Child property of FlexContainer.<br />
2898 /// The proportion of the free space in the container, the flex item will receive.<br />
2899 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
2901 /// <since_tizen> 3 </since_tizen>
2906 return (float)GetValue(FlexProperty);
2910 SetValue(FlexProperty, value);
2911 NotifyPropertyChanged();
2916 /// The Child property of FlexContainer.<br />
2917 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
2919 /// <since_tizen> 3 </since_tizen>
2920 public int AlignSelf
2924 return (int)GetValue(AlignSelfProperty);
2928 SetValue(AlignSelfProperty, value);
2929 NotifyPropertyChanged();
2934 /// The Child property of FlexContainer.<br />
2935 /// The space around the flex item.<br />
2937 /// <since_tizen> 3 </since_tizen>
2938 public Vector4 FlexMargin
2942 return (Vector4)GetValue(FlexMarginProperty);
2946 SetValue(FlexMarginProperty, value);
2947 NotifyPropertyChanged();
2952 /// The top-left cell this child occupies, if not set, the first available cell is used.
2954 /// <since_tizen> 3 </since_tizen>
2955 public Vector2 CellIndex
2959 return (Vector2)GetValue(CellIndexProperty);
2963 SetValue(CellIndexProperty, value);
2964 NotifyPropertyChanged();
2969 /// The number of rows this child occupies, if not set, the default value is 1.
2971 /// <since_tizen> 3 </since_tizen>
2972 public float RowSpan
2976 return (float)GetValue(RowSpanProperty);
2980 SetValue(RowSpanProperty, value);
2981 NotifyPropertyChanged();
2986 /// The number of columns this child occupies, if not set, the default value is 1.
2988 /// <since_tizen> 3 </since_tizen>
2989 public float ColumnSpan
2993 return (float)GetValue(ColumnSpanProperty);
2997 SetValue(ColumnSpanProperty, value);
2998 NotifyPropertyChanged();
3003 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
3005 /// <since_tizen> 3 </since_tizen>
3006 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
3010 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
3014 SetValue(CellHorizontalAlignmentProperty, value);
3015 NotifyPropertyChanged();
3020 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
3022 /// <since_tizen> 3 </since_tizen>
3023 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
3027 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
3031 SetValue(CellVerticalAlignmentProperty, value);
3032 NotifyPropertyChanged();
3037 /// The left focusable view.<br />
3038 /// This will return null if not set.<br />
3039 /// This will also return null if the specified left focusable view is not on a window.<br />
3041 /// <since_tizen> 3 </since_tizen>
3042 public View LeftFocusableView
3044 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3047 return (View)GetValue(LeftFocusableViewProperty);
3051 SetValue(LeftFocusableViewProperty, value);
3052 NotifyPropertyChanged();
3057 /// The right focusable view.<br />
3058 /// This will return null if not set.<br />
3059 /// This will also return null if the specified right focusable view is not on a window.<br />
3061 /// <since_tizen> 3 </since_tizen>
3062 public View RightFocusableView
3064 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3067 return (View)GetValue(RightFocusableViewProperty);
3071 SetValue(RightFocusableViewProperty, value);
3072 NotifyPropertyChanged();
3077 /// The up focusable view.<br />
3078 /// This will return null if not set.<br />
3079 /// This will also return null if the specified up focusable view is not on a window.<br />
3081 /// <since_tizen> 3 </since_tizen>
3082 public View UpFocusableView
3084 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3087 return (View)GetValue(UpFocusableViewProperty);
3091 SetValue(UpFocusableViewProperty, value);
3092 NotifyPropertyChanged();
3097 /// The down focusable view.<br />
3098 /// This will return null if not set.<br />
3099 /// This will also return null if the specified down focusable view is not on a window.<br />
3101 /// <since_tizen> 3 </since_tizen>
3102 public View DownFocusableView
3104 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3107 return (View)GetValue(DownFocusableViewProperty);
3111 SetValue(DownFocusableViewProperty, value);
3112 NotifyPropertyChanged();
3117 /// Whether the view should be focusable by keyboard navigation.
3119 /// <since_tizen> 3 </since_tizen>
3120 public bool Focusable
3124 SetValue(FocusableProperty, value);
3125 NotifyPropertyChanged();
3129 return (bool)GetValue(FocusableProperty);
3134 /// Enumeration for describing the states of the view.
3136 /// <since_tizen> 3 </since_tizen>
3140 /// The normal state.
3144 /// The focused state.
3148 /// The disabled state.
3154 /// Retrieves the position of the view.<br />
3155 /// The coordinates are relative to the view's parent.<br />
3157 /// <since_tizen> 3 </since_tizen>
3158 public Position CurrentPosition
3162 return GetCurrentPosition();
3167 /// Sets the size of a view for the width and the height.<br />
3168 /// Geometry can be scaled to fit within this area.<br />
3169 /// This does not interfere with the view's scale factor.<br />
3170 /// The views default depth is the minimum of width and height.<br />
3173 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
3174 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
3175 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
3176 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3177 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
3178 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
3180 /// <since_tizen> 3 </since_tizen>
3181 public Size2D Size2D
3185 Size2D temp = (Size2D)GetValue(Size2DProperty);
3186 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
3190 SetValue(Size2DProperty, value);
3191 NotifyPropertyChanged();
3195 private void OnSize2DChanged(int width, int height)
3197 Size2D = new Size2D(width, height);
3201 /// Retrieves the size of the view.<br />
3202 /// The coordinates are relative to the view's parent.<br />
3204 /// <since_tizen> 3 </since_tizen>
3205 public Size2D CurrentSize
3209 return GetCurrentSize();
3214 /// Retrieves and sets the view's opacity.<br />
3216 /// <since_tizen> 3 </since_tizen>
3217 public float Opacity
3221 return (float)GetValue(OpacityProperty);
3225 SetValue(OpacityProperty, value);
3226 NotifyPropertyChanged();
3231 /// Sets the position of the view for X and Y.<br />
3232 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
3233 /// If the position inheritance is disabled, sets the world position.<br />
3236 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
3237 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
3238 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
3239 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3240 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
3241 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
3243 /// <since_tizen> 3 </since_tizen>
3244 public Position2D Position2D
3248 Position2D temp = (Position2D)GetValue(Position2DProperty);
3249 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
3253 SetValue(Position2DProperty, value);
3254 NotifyPropertyChanged();
3258 private void OnPosition2DChanged(int x, int y)
3260 Position2D = new Position2D(x, y);
3264 /// Retrieves the screen postion of the view.<br />
3266 /// <since_tizen> 3 </since_tizen>
3267 public Vector2 ScreenPosition
3271 Vector2 temp = new Vector2(0.0f, 0.0f);
3272 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
3278 /// Determines whether the pivot point should be used to determine the position of the view.
3279 /// This is true by default.
3281 /// <remarks>If false, then the top-left of the view is used for the position.
3282 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
3284 /// <since_tizen> 3 </since_tizen>
3285 public bool PositionUsesPivotPoint
3289 return (bool)GetValue(PositionUsesPivotPointProperty);
3293 SetValue(PositionUsesPivotPointProperty, value);
3294 NotifyPropertyChanged();
3299 /// Please do not use! this will be deprecated.
3301 /// Please do not use! this will be deprecated!
3302 /// Instead please use PositionUsesPivotPoint.
3303 /// <since_tizen> 3 </since_tizen>
3304 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
3306 "View view = new View(); " +
3307 "view.PivotPoint = PivotPoint.Center; " +
3308 "view.PositionUsesPivotPoint = true;")]
3309 [EditorBrowsable(EditorBrowsableState.Never)]
3310 public bool PositionUsesAnchorPoint
3315 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
3320 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3321 NotifyPropertyChanged();
3325 internal bool FocusState
3329 return IsKeyboardFocusable();
3333 SetKeyboardFocusable(value);
3338 /// Queries whether the view is connected to the stage.<br />
3339 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
3341 /// <since_tizen> 3 </since_tizen>
3342 public bool IsOnWindow
3351 /// Gets the depth in the hierarchy for the view.
3353 /// <since_tizen> 3 </since_tizen>
3354 public int HierarchyDepth
3358 return GetHierarchyDepth();
3363 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
3366 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
3367 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
3368 /// The values set by this property will likely change.
3370 /// <since_tizen> 3 </since_tizen>
3371 public int SiblingOrder
3375 return (int)GetValue(SiblingOrderProperty);
3379 SetValue(SiblingOrderProperty, value);
3380 NotifyPropertyChanged();
3385 /// Returns the natural size of the view.
3388 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3390 /// /// Please do not use! this will be deprecated!
3391 /// Instead please use NaturalSize2D.
3392 /// <since_tizen> 3 </since_tizen>
3393 [Obsolete("Please do not use! This will be deprecated! Please use NaturalSize2D instead! " +
3395 "TextLabel label = new TextLabel(\"Hello World!\"); " +
3396 "Size2D size = label.NaturalSize2D;")]
3397 [EditorBrowsable(EditorBrowsableState.Never)]
3398 public Vector3 NaturalSize
3402 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3403 if (NDalicPINVOKE.SWIGPendingException.Pending)
3404 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3410 /// Returns the natural size (Size2D) of the view.
3413 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3415 /// <since_tizen> 4 </since_tizen>
3416 public Size2D NaturalSize2D
3420 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3421 if (NDalicPINVOKE.SWIGPendingException.Pending)
3422 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3424 return new Size2D((int)temp.Width, (int)temp.Height);
3429 /// Set the layout on this control.
3433 internal LayoutItem Layout
3437 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
3439 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3440 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3441 NDalicPINVOKE.delete_BaseHandle(CPtr);
3442 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3444 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3446 return basehandle as LayoutItem;
3450 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(value));
3451 value.LayoutChildren.Clear();
3452 foreach (View view in Children)
3454 value.LayoutChildren.Add(view.Layout);
3463 /// This is an asynchronous method.
3465 /// <since_tizen> 3 </since_tizen>
3475 /// This is an asynchronous method.
3476 /// If the view is hidden, then the view and its children will not be rendered.
3477 /// 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.
3479 /// <since_tizen> 3 </since_tizen>
3485 internal void Raise()
3487 var parentChildren = GetParent()?.Children;
3489 if (parentChildren != null)
3491 int currentIndex = parentChildren.IndexOf(this);
3493 // If the view is not already the last item in the list.
3494 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
3496 View temp = parentChildren[currentIndex + 1];
3497 parentChildren[currentIndex + 1] = this;
3498 parentChildren[currentIndex] = temp;
3500 NDalicPINVOKE.Raise(swigCPtr);
3501 if (NDalicPINVOKE.SWIGPendingException.Pending)
3502 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3508 internal void Lower()
3510 var parentChildren = GetParent()?.Children;
3512 if (parentChildren != null)
3514 int currentIndex = parentChildren.IndexOf(this);
3516 // If the view is not already the first item in the list.
3517 if (currentIndex > 0 && currentIndex < parentChildren.Count)
3519 View temp = parentChildren[currentIndex - 1];
3520 parentChildren[currentIndex - 1] = this;
3521 parentChildren[currentIndex] = temp;
3523 NDalicPINVOKE.Lower(swigCPtr);
3524 if (NDalicPINVOKE.SWIGPendingException.Pending)
3525 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3531 /// Raises the view above all other views.
3534 /// Sibling order of views within the parent will be updated automatically.
3535 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
3537 /// <since_tizen> 3 </since_tizen>
3538 public void RaiseToTop()
3540 var parentChildren = GetParent()?.Children;
3542 if (parentChildren != null)
3544 parentChildren.Remove(this);
3545 parentChildren.Add(this);
3547 NDalicPINVOKE.RaiseToTop(swigCPtr);
3548 if (NDalicPINVOKE.SWIGPendingException.Pending)
3549 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3555 /// Lowers the view to the bottom of all views.
3558 /// The sibling order of views within the parent will be updated automatically.
3559 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3561 /// <since_tizen> 3 </since_tizen>
3562 public void LowerToBottom()
3564 var parentChildren = GetParent()?.Children;
3566 if (parentChildren != null)
3568 parentChildren.Remove(this);
3569 parentChildren.Insert(0, this);
3571 NDalicPINVOKE.LowerToBottom(swigCPtr);
3572 if (NDalicPINVOKE.SWIGPendingException.Pending)
3573 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3578 /// Queries if all resources required by a view are loaded and ready.
3580 /// <remarks>Most resources are only loaded when the control is placed on the stage.
3582 /// <since_tizen> 3 </since_tizen>
3583 public bool IsResourceReady()
3585 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
3586 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3591 /// Raises the view to above the target view.
3593 /// <remarks>The sibling order of views within the parent will be updated automatically.
3594 /// Views on the level above the target view will still be shown above this view.
3595 /// Raising this view above views with the same sibling order as each other will raise this view above them.
3596 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3598 /// <param name="target">Will be raised above this view.</param>
3599 internal void RaiseAbove(View target)
3601 var parentChildren = GetParent()?.Children;
3603 if (parentChildren != null)
3605 int currentIndex = parentChildren.IndexOf(this);
3606 int targetIndex = parentChildren.IndexOf(target);
3608 if (currentIndex < 0 || targetIndex < 0 ||
3609 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3611 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3614 // If the currentIndex is less than the target index and the target has the same parent.
3615 if (currentIndex < targetIndex)
3617 parentChildren.Remove(this);
3618 parentChildren.Insert(targetIndex, this);
3620 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
3621 if (NDalicPINVOKE.SWIGPendingException.Pending)
3622 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3629 /// Lowers the view to below the target view.
3631 /// <remarks>The sibling order of views within the parent will be updated automatically.
3632 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
3633 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3635 /// <param name="target">Will be lowered below this view.</param>
3636 internal void LowerBelow(View target)
3638 var parentChildren = GetParent()?.Children;
3640 if (parentChildren != null)
3642 int currentIndex = parentChildren.IndexOf(this);
3643 int targetIndex = parentChildren.IndexOf(target);
3644 if (currentIndex < 0 || targetIndex < 0 ||
3645 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3647 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3651 // If the currentIndex is not already the 0th index and the target has the same parent.
3652 if ((currentIndex != 0) && (targetIndex != -1) &&
3653 (currentIndex > targetIndex))
3655 parentChildren.Remove(this);
3656 parentChildren.Insert(targetIndex, this);
3658 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
3659 if (NDalicPINVOKE.SWIGPendingException.Pending)
3660 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3666 internal string GetName()
3668 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
3669 if (NDalicPINVOKE.SWIGPendingException.Pending)
3670 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3674 internal void SetName(string name)
3676 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
3677 if (NDalicPINVOKE.SWIGPendingException.Pending)
3678 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3681 internal uint GetId()
3683 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
3684 if (NDalicPINVOKE.SWIGPendingException.Pending)
3685 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3689 internal bool IsRoot()
3691 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
3692 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3696 internal bool OnWindow()
3698 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
3699 if (NDalicPINVOKE.SWIGPendingException.Pending)
3700 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3705 /// Gets the parent layer of this view.If a view has no parent, this method does nothing.
3707 /// <pre>The view has been initialized. </pre>
3708 /// <returns>the parent layer of view </returns>
3709 /// <since_tizen> 5 </since_tizen>
3710 public Layer GetLayer()
3712 //to fix memory leak issue, match the handle count with native side.
3713 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
3714 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3715 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
3716 NDalicPINVOKE.delete_BaseHandle(CPtr);
3717 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3719 if (NDalicPINVOKE.SWIGPendingException.Pending)
3720 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3725 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
3727 /// <pre>The (child) view has been initialized. </pre>
3728 /// <since_tizen> 4 </since_tizen>
3729 public void Unparent()
3731 GetParent()?.Remove(this);
3735 /// Search through this view's hierarchy for a view with the given name.
3736 /// The view itself is also considered in the search.
3738 /// <pre>The view has been initialized.</pre>
3739 /// <param name="viewName">The name of the view to find.</param>
3740 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
3741 /// <since_tizen> 3 </since_tizen>
3742 public View FindChildByName(string viewName)
3744 //to fix memory leak issue, match the handle count with native side.
3745 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
3746 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3747 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3748 NDalicPINVOKE.delete_BaseHandle(CPtr);
3749 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3751 if (NDalicPINVOKE.SWIGPendingException.Pending)
3752 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3756 internal View FindChildById(uint id)
3758 //to fix memory leak issue, match the handle count with native side.
3759 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
3760 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3761 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3762 NDalicPINVOKE.delete_BaseHandle(CPtr);
3763 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3765 if (NDalicPINVOKE.SWIGPendingException.Pending)
3766 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3770 internal void SetParentOrigin(Vector3 origin)
3772 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
3773 if (NDalicPINVOKE.SWIGPendingException.Pending)
3774 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3777 internal Vector3 GetCurrentParentOrigin()
3779 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
3780 if (NDalicPINVOKE.SWIGPendingException.Pending)
3781 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3785 internal void SetAnchorPoint(Vector3 anchorPoint)
3787 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
3788 if (NDalicPINVOKE.SWIGPendingException.Pending)
3789 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3792 internal Vector3 GetCurrentAnchorPoint()
3794 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
3795 if (NDalicPINVOKE.SWIGPendingException.Pending)
3796 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3800 internal void SetSize(float width, float height)
3802 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
3803 if (NDalicPINVOKE.SWIGPendingException.Pending)
3804 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3807 internal void SetSize(float width, float height, float depth)
3809 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
3810 if (NDalicPINVOKE.SWIGPendingException.Pending)
3811 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3814 internal void SetSize(Vector2 size)
3816 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
3817 if (NDalicPINVOKE.SWIGPendingException.Pending)
3818 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3821 internal void SetSize(Vector3 size)
3823 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
3824 if (NDalicPINVOKE.SWIGPendingException.Pending)
3825 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3828 internal Vector3 GetTargetSize()
3830 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
3831 if (NDalicPINVOKE.SWIGPendingException.Pending)
3832 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3836 internal Size2D GetCurrentSize()
3838 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
3839 if (NDalicPINVOKE.SWIGPendingException.Pending)
3840 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3841 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
3845 internal Vector3 GetNaturalSize()
3847 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3848 if (NDalicPINVOKE.SWIGPendingException.Pending)
3849 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3853 internal void SetPosition(float x, float y)
3855 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
3856 if (NDalicPINVOKE.SWIGPendingException.Pending)
3857 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3860 internal void SetPosition(float x, float y, float z)
3862 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
3863 if (NDalicPINVOKE.SWIGPendingException.Pending)
3864 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3867 internal void SetPosition(Vector3 position)
3869 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
3870 if (NDalicPINVOKE.SWIGPendingException.Pending)
3871 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3874 internal void SetX(float x)
3876 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
3877 if (NDalicPINVOKE.SWIGPendingException.Pending)
3878 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3881 internal void SetY(float y)
3883 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
3884 if (NDalicPINVOKE.SWIGPendingException.Pending)
3885 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3888 internal void SetZ(float z)
3890 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
3891 if (NDalicPINVOKE.SWIGPendingException.Pending)
3892 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3895 internal void TranslateBy(Vector3 distance)
3897 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
3898 if (NDalicPINVOKE.SWIGPendingException.Pending)
3899 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3902 internal Position GetCurrentPosition()
3904 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
3905 if (NDalicPINVOKE.SWIGPendingException.Pending)
3906 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3910 internal Vector3 GetCurrentWorldPosition()
3912 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
3913 if (NDalicPINVOKE.SWIGPendingException.Pending)
3914 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3918 internal void SetInheritPosition(bool inherit)
3920 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
3921 if (NDalicPINVOKE.SWIGPendingException.Pending)
3922 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3925 internal bool IsPositionInherited()
3927 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
3928 if (NDalicPINVOKE.SWIGPendingException.Pending)
3929 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3933 internal void SetOrientation(Degree angle, Vector3 axis)
3935 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
3936 if (NDalicPINVOKE.SWIGPendingException.Pending)
3937 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3940 internal void SetOrientation(Radian angle, Vector3 axis)
3942 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
3943 if (NDalicPINVOKE.SWIGPendingException.Pending)
3944 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3947 internal void SetOrientation(Rotation orientation)
3949 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
3950 if (NDalicPINVOKE.SWIGPendingException.Pending)
3951 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3954 internal void RotateBy(Degree angle, Vector3 axis)
3956 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
3957 if (NDalicPINVOKE.SWIGPendingException.Pending)
3958 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3961 internal void RotateBy(Radian angle, Vector3 axis)
3963 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
3964 if (NDalicPINVOKE.SWIGPendingException.Pending)
3965 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3968 internal void RotateBy(Rotation relativeRotation)
3970 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
3971 if (NDalicPINVOKE.SWIGPendingException.Pending)
3972 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3975 internal Rotation GetCurrentOrientation()
3977 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
3978 if (NDalicPINVOKE.SWIGPendingException.Pending)
3979 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3983 internal void SetInheritOrientation(bool inherit)
3985 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
3986 if (NDalicPINVOKE.SWIGPendingException.Pending)
3987 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3990 internal bool IsOrientationInherited()
3992 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
3993 if (NDalicPINVOKE.SWIGPendingException.Pending)
3994 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3998 internal Rotation GetCurrentWorldOrientation()
4000 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4001 if (NDalicPINVOKE.SWIGPendingException.Pending)
4002 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4006 internal void SetScale(float scale)
4008 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
4009 if (NDalicPINVOKE.SWIGPendingException.Pending)
4010 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4013 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4015 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4016 if (NDalicPINVOKE.SWIGPendingException.Pending)
4017 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4020 internal void SetScale(Vector3 scale)
4022 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4023 if (NDalicPINVOKE.SWIGPendingException.Pending)
4024 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4027 internal void ScaleBy(Vector3 relativeScale)
4029 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4030 if (NDalicPINVOKE.SWIGPendingException.Pending)
4031 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4034 internal Vector3 GetCurrentScale()
4036 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
4037 if (NDalicPINVOKE.SWIGPendingException.Pending)
4038 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4042 internal Vector3 GetCurrentWorldScale()
4044 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
4045 if (NDalicPINVOKE.SWIGPendingException.Pending)
4046 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4050 internal void SetInheritScale(bool inherit)
4052 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
4053 if (NDalicPINVOKE.SWIGPendingException.Pending)
4054 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4057 internal bool IsScaleInherited()
4059 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
4060 if (NDalicPINVOKE.SWIGPendingException.Pending)
4061 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4065 internal Matrix GetCurrentWorldMatrix()
4067 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4068 if (NDalicPINVOKE.SWIGPendingException.Pending)
4069 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4073 internal void SetVisible(bool visible)
4075 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
4076 if (NDalicPINVOKE.SWIGPendingException.Pending)
4077 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4080 internal bool IsVisible()
4082 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
4083 if (NDalicPINVOKE.SWIGPendingException.Pending)
4084 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4088 internal void SetOpacity(float opacity)
4090 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
4091 if (NDalicPINVOKE.SWIGPendingException.Pending)
4092 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4095 internal float GetCurrentOpacity()
4097 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
4098 if (NDalicPINVOKE.SWIGPendingException.Pending)
4099 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4103 internal void SetColor(Vector4 color)
4105 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4106 if (NDalicPINVOKE.SWIGPendingException.Pending)
4107 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4110 internal Vector4 GetCurrentColor()
4112 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
4113 if (NDalicPINVOKE.SWIGPendingException.Pending)
4114 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4118 internal void SetColorMode(ColorMode colorMode)
4120 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
4121 if (NDalicPINVOKE.SWIGPendingException.Pending)
4122 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4125 internal ColorMode GetColorMode()
4127 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
4128 if (NDalicPINVOKE.SWIGPendingException.Pending)
4129 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4133 internal Vector4 GetCurrentWorldColor()
4135 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
4136 if (NDalicPINVOKE.SWIGPendingException.Pending)
4137 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4141 internal void SetDrawMode(DrawModeType drawMode)
4143 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4144 if (NDalicPINVOKE.SWIGPendingException.Pending)
4145 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4148 internal DrawModeType GetDrawMode()
4150 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
4151 if (NDalicPINVOKE.SWIGPendingException.Pending)
4152 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4157 /// Converts screen coordinates into the view's coordinate system using the default camera.
4159 /// <pre>The view has been initialized.</pre>
4160 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4161 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4162 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4163 /// <param name="screenX">The screen X-coordinate.</param>
4164 /// <param name="screenY">The screen Y-coordinate.</param>
4165 /// <returns>True if the conversion succeeded.</returns>
4166 /// <since_tizen> 3 </since_tizen>
4167 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4169 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4170 if (NDalicPINVOKE.SWIGPendingException.Pending)
4171 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4175 internal void SetKeyboardFocusable(bool focusable)
4177 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4178 if (NDalicPINVOKE.SWIGPendingException.Pending)
4179 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4182 internal bool IsKeyboardFocusable()
4184 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
4185 if (NDalicPINVOKE.SWIGPendingException.Pending)
4186 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4190 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4192 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4193 if (NDalicPINVOKE.SWIGPendingException.Pending)
4194 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4197 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4199 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4200 if (NDalicPINVOKE.SWIGPendingException.Pending)
4201 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4206 /// Sets the relative to parent size factor of the view.<br />
4207 /// This factor is only used when ResizePolicy is set to either:
4208 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4209 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4211 /// <pre>The view has been initialized.</pre>
4212 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4213 /// <since_tizen> 3 </since_tizen>
4214 public void SetSizeModeFactor(Vector3 factor)
4216 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4217 if (NDalicPINVOKE.SWIGPendingException.Pending)
4218 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4221 internal Vector3 GetSizeModeFactor()
4223 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
4224 if (NDalicPINVOKE.SWIGPendingException.Pending)
4225 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4230 /// Calculates the height of the view given a width.<br />
4231 /// The natural size is used for default calculation.<br />
4232 /// Size 0 is treated as aspect ratio 1:1.<br />
4234 /// <param name="width">The width to use.</param>
4235 /// <returns>The height based on the width.</returns>
4236 /// <since_tizen> 3 </since_tizen>
4237 public float GetHeightForWidth(float width)
4239 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
4240 if (NDalicPINVOKE.SWIGPendingException.Pending)
4241 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4246 /// Calculates the width of the view given a height.<br />
4247 /// The natural size is used for default calculation.<br />
4248 /// Size 0 is treated as aspect ratio 1:1.<br />
4250 /// <param name="height">The height to use.</param>
4251 /// <returns>The width based on the height.</returns>
4252 /// <since_tizen> 3 </since_tizen>
4253 public float GetWidthForHeight(float height)
4255 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
4256 if (NDalicPINVOKE.SWIGPendingException.Pending)
4257 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4262 /// Return the amount of size allocated for relayout.
4264 /// <param name="dimension">The dimension to retrieve.</param>
4265 /// <returns>Return the size.</returns>
4266 /// <since_tizen> 3 </since_tizen>
4267 public float GetRelayoutSize(DimensionType dimension)
4269 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4270 if (NDalicPINVOKE.SWIGPendingException.Pending)
4271 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4276 /// Set the padding for the view.
4278 /// <param name="padding">Padding for the view.</param>
4279 /// <since_tizen> 3 </since_tizen>
4280 public void SetPadding(PaddingType padding)
4282 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4283 if (NDalicPINVOKE.SWIGPendingException.Pending)
4284 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4288 /// Return the value of padding for the view.
4290 /// <param name="paddingOut">the value of padding for the view</param>
4291 /// <since_tizen> 3 </since_tizen>
4292 public void GetPadding(PaddingType paddingOut)
4294 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4295 if (NDalicPINVOKE.SWIGPendingException.Pending)
4296 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4299 internal void SetMinimumSize(Vector2 size)
4301 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4302 if (NDalicPINVOKE.SWIGPendingException.Pending)
4303 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4306 internal Vector2 GetMinimumSize()
4308 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
4309 if (NDalicPINVOKE.SWIGPendingException.Pending)
4310 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4314 internal void SetMaximumSize(Vector2 size)
4316 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4317 if (NDalicPINVOKE.SWIGPendingException.Pending)
4318 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4321 internal Vector2 GetMaximumSize()
4323 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
4324 if (NDalicPINVOKE.SWIGPendingException.Pending)
4325 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4329 internal int GetHierarchyDepth()
4331 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
4332 if (NDalicPINVOKE.SWIGPendingException.Pending)
4333 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4337 /// <since_tizen> 3 </since_tizen>
4338 public uint AddRenderer(Renderer renderer)
4340 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4341 if (NDalicPINVOKE.SWIGPendingException.Pending)
4342 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4346 internal uint GetRendererCount()
4348 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
4349 if (NDalicPINVOKE.SWIGPendingException.Pending)
4350 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4354 /// <since_tizen> 3 </since_tizen>
4355 public Renderer GetRendererAt(uint index)
4357 //to fix memory leak issue, match the handle count with native side.
4358 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
4359 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4360 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4361 NDalicPINVOKE.delete_BaseHandle(CPtr);
4362 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4364 if (NDalicPINVOKE.SWIGPendingException.Pending)
4365 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4369 /// <since_tizen> 3 </since_tizen>
4370 public void RemoveRenderer(Renderer renderer)
4372 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4373 if (NDalicPINVOKE.SWIGPendingException.Pending)
4374 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4377 /// <since_tizen> 3 </since_tizen>
4378 public void RemoveRenderer(uint index)
4380 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4381 if (NDalicPINVOKE.SWIGPendingException.Pending)
4382 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4385 internal TouchDataSignal TouchSignal()
4387 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
4388 if (NDalicPINVOKE.SWIGPendingException.Pending)
4389 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4393 internal HoverSignal HoveredSignal()
4395 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
4396 if (NDalicPINVOKE.SWIGPendingException.Pending)
4397 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4401 internal WheelSignal WheelEventSignal()
4403 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
4404 if (NDalicPINVOKE.SWIGPendingException.Pending)
4405 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4409 internal ViewSignal OnWindowSignal()
4411 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
4412 if (NDalicPINVOKE.SWIGPendingException.Pending)
4413 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4417 internal ViewSignal OffWindowSignal()
4419 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
4420 if (NDalicPINVOKE.SWIGPendingException.Pending)
4421 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4425 internal ViewSignal OnRelayoutSignal()
4427 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
4428 if (NDalicPINVOKE.SWIGPendingException.Pending)
4429 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4433 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
4435 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
4436 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4441 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
4443 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
4444 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4449 internal ViewSignal ResourcesLoadedSignal()
4451 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
4452 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4457 /// Gets or sets the origin of a view within its parent's area.<br />
4458 /// 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 />
4459 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
4460 /// A view's position is the distance between this origin and the view's anchor-point.<br />
4462 /// <pre>The view has been initialized.</pre>
4463 /// <since_tizen> 3 </since_tizen>
4464 public Position ParentOrigin
4468 return (Position)GetValue(ParentOriginProperty);
4472 SetValue(ParentOriginProperty, value);
4473 NotifyPropertyChanged();
4477 internal float ParentOriginX
4482 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
4487 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
4488 NotifyPropertyChanged();
4492 internal float ParentOriginY
4497 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
4502 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
4503 NotifyPropertyChanged();
4507 internal float ParentOriginZ
4512 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
4517 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
4518 NotifyPropertyChanged();
4523 /// Gets or sets the anchor-point of a view.<br />
4524 /// 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 />
4525 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
4526 /// A view position is the distance between its parent-origin and this anchor-point.<br />
4527 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
4528 /// <pre>The view has been initialized.</pre>
4530 /// <since_tizen> 3 </since_tizen>
4531 public Position PivotPoint
4535 return (Position)GetValue(PivotPointProperty);
4539 SetValue(PivotPointProperty, value);
4540 NotifyPropertyChanged();
4544 internal float PivotPointX
4549 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
4554 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
4558 internal float PivotPointY
4563 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
4568 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
4572 internal float PivotPointZ
4577 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
4582 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
4587 /// Gets or sets the size width of the view.
4589 /// <since_tizen> 3 </since_tizen>
4590 public float SizeWidth
4594 return (float)GetValue(SizeWidthProperty);
4598 SetValue(SizeWidthProperty, value);
4599 NotifyPropertyChanged();
4604 /// Gets or sets the size height of the view.
4606 /// <since_tizen> 3 </since_tizen>
4607 public float SizeHeight
4611 return (float)GetValue(SizeHeightProperty);
4615 SetValue(SizeHeightProperty, value);
4616 NotifyPropertyChanged();
4621 /// Gets or sets the position of the view.<br />
4622 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
4623 /// If the position inheritance is disabled, sets the world position.<br />
4625 /// <since_tizen> 3 </since_tizen>
4626 public Position Position
4630 return (Position)GetValue(PositionProperty);
4634 SetValue(PositionProperty, value);
4635 NotifyPropertyChanged();
4640 /// Gets or sets the position X of the view.
4642 /// <since_tizen> 3 </since_tizen>
4643 public float PositionX
4647 return (float)GetValue(PositionXProperty);
4651 SetValue(PositionXProperty, value);
4652 NotifyPropertyChanged();
4657 /// Gets or sets the position Y of the view.
4659 /// <since_tizen> 3 </since_tizen>
4660 public float PositionY
4664 return (float)GetValue(PositionYProperty);
4668 SetValue(PositionYProperty, value);
4669 NotifyPropertyChanged();
4674 /// Gets or sets the position Z of the view.
4676 /// <since_tizen> 3 </since_tizen>
4677 public float PositionZ
4681 return (float)GetValue(PositionZProperty);
4685 SetValue(PositionZProperty, value);
4686 NotifyPropertyChanged();
4691 /// Gets or sets the world position of the view.
4693 /// <since_tizen> 3 </since_tizen>
4694 public Vector3 WorldPosition
4698 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4699 GetProperty(View.Property.WORLD_POSITION).Get(temp);
4704 internal float WorldPositionX
4709 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
4714 internal float WorldPositionY
4719 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
4724 internal float WorldPositionZ
4729 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
4735 /// Gets or sets the orientation of the view.<br />
4736 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
4738 /// <remarks>This is an asynchronous method.</remarks>
4739 /// <since_tizen> 3 </since_tizen>
4740 public Rotation Orientation
4744 return (Rotation)GetValue(OrientationProperty);
4748 SetValue(OrientationProperty, value);
4749 NotifyPropertyChanged();
4754 /// Gets or sets the world orientation of the view.<br />
4756 /// <since_tizen> 3 </since_tizen>
4757 public Rotation WorldOrientation
4761 Rotation temp = new Rotation();
4762 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
4768 /// Gets or sets the scale factor applied to the view.<br />
4770 /// <since_tizen> 3 </since_tizen>
4771 public Vector3 Scale
4775 return (Vector3)GetValue(ScaleProperty);
4779 SetValue(ScaleProperty, value);
4780 NotifyPropertyChanged();
4785 /// Gets or sets the scale X factor applied to the view.
4787 /// <since_tizen> 3 </since_tizen>
4792 return (float)GetValue(ScaleXProperty);
4796 SetValue(ScaleXProperty, value);
4797 NotifyPropertyChanged();
4802 /// Gets or sets the scale Y factor applied to the view.
4804 /// <since_tizen> 3 </since_tizen>
4809 return (float)GetValue(ScaleYProperty);
4813 SetValue(ScaleYProperty, value);
4814 NotifyPropertyChanged();
4819 /// Gets or sets the scale Z factor applied to the view.
4821 /// <since_tizen> 3 </since_tizen>
4826 return (float)GetValue(ScaleZProperty);
4830 SetValue(ScaleZProperty, value);
4831 NotifyPropertyChanged();
4836 /// Gets the world scale of the view.
4838 /// <since_tizen> 3 </since_tizen>
4839 public Vector3 WorldScale
4843 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4844 GetProperty(View.Property.WORLD_SCALE).Get(temp);
4850 /// Retrieves the visibility flag of the view.
4853 /// If the view is not visible, then the view and its children will not be rendered.
4854 /// 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.
4856 /// <since_tizen> 3 </since_tizen>
4857 public bool Visibility
4862 GetProperty(View.Property.VISIBLE).Get(out temp);
4868 /// Gets the view's world color.
4870 /// <since_tizen> 3 </since_tizen>
4871 public Vector4 WorldColor
4875 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
4876 GetProperty(View.Property.WORLD_COLOR).Get(temp);
4881 internal Matrix WorldMatrix
4885 Matrix temp = new Matrix();
4886 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
4892 /// Gets or sets the view's name.
4894 /// <since_tizen> 3 </since_tizen>
4899 return (string)GetValue(NameProperty);
4903 SetValue(NameProperty, value);
4904 NotifyPropertyChanged();
4909 /// Get the number of children held by the view.
4911 /// <since_tizen> 3 </since_tizen>
4912 public new uint ChildCount
4916 return GetChildCount();
4921 /// Gets the view's ID.
4924 /// <since_tizen> 3 </since_tizen>
4934 /// Gets or sets the status of whether the view should emit touch or hover signals.
4936 /// <since_tizen> 3 </since_tizen>
4937 public bool Sensitive
4941 return (bool)GetValue(SensitiveProperty);
4945 SetValue(SensitiveProperty, value);
4946 NotifyPropertyChanged();
4951 /// 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.
4953 /// <since_tizen> 3 </since_tizen>
4954 public bool LeaveRequired
4958 return (bool)GetValue(LeaveRequiredProperty);
4962 SetValue(LeaveRequiredProperty, value);
4963 NotifyPropertyChanged();
4968 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
4970 /// <since_tizen> 3 </since_tizen>
4971 public bool InheritOrientation
4975 return (bool)GetValue(InheritOrientationProperty);
4979 SetValue(InheritOrientationProperty, value);
4980 NotifyPropertyChanged();
4985 /// Gets or sets the status of whether a child view inherits it's parent's scale.
4987 /// <since_tizen> 3 </since_tizen>
4988 public bool InheritScale
4992 return (bool)GetValue(InheritScaleProperty);
4996 SetValue(InheritScaleProperty, value);
4997 NotifyPropertyChanged();
5002 /// Gets or sets the status of how the view and its children should be drawn.<br />
5003 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
5004 /// 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 />
5005 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
5006 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
5007 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
5009 /// <since_tizen> 3 </since_tizen>
5010 public DrawModeType DrawMode
5014 return (DrawModeType)GetValue(DrawModeProperty);
5018 SetValue(DrawModeProperty, value);
5019 NotifyPropertyChanged();
5024 /// Gets or sets the relative to parent size factor of the view.<br />
5025 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
5026 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
5028 /// <since_tizen> 3 </since_tizen>
5029 public Vector3 SizeModeFactor
5033 return (Vector3)GetValue(SizeModeFactorProperty);
5037 SetValue(SizeModeFactorProperty, value);
5038 NotifyPropertyChanged();
5043 /// Gets or sets the width resize policy to be used.
5045 /// <since_tizen> 3 </since_tizen>
5046 public ResizePolicyType WidthResizePolicy
5050 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
5054 SetValue(WidthResizePolicyProperty, value);
5055 NotifyPropertyChanged();
5060 /// Gets or sets the height resize policy to be used.
5062 /// <since_tizen> 3 </since_tizen>
5063 public ResizePolicyType HeightResizePolicy
5067 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
5071 SetValue(HeightResizePolicyProperty, value);
5072 NotifyPropertyChanged();
5077 /// Gets or sets the policy to use when setting size with size negotiation.<br />
5078 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
5080 /// <since_tizen> 3 </since_tizen>
5081 public SizeScalePolicyType SizeScalePolicy
5085 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
5089 SetValue(SizeScalePolicyProperty, value);
5090 NotifyPropertyChanged();
5095 /// Gets or sets the status of whether the width size is dependent on the height size.
5097 /// <since_tizen> 3 </since_tizen>
5098 public bool WidthForHeight
5102 return (bool)GetValue(WidthForHeightProperty);
5106 SetValue(WidthForHeightProperty, value);
5107 NotifyPropertyChanged();
5112 /// Gets or sets the status of whether the height size is dependent on the width size.
5114 /// <since_tizen> 3 </since_tizen>
5115 public bool HeightForWidth
5119 return (bool)GetValue(HeightForWidthProperty);
5123 SetValue(HeightForWidthProperty, value);
5124 NotifyPropertyChanged();
5129 /// Gets or sets the padding for use in layout.
5131 /// <since_tizen> 5 </since_tizen>
5132 public Extents Padding
5136 return (Extents)GetValue(PaddingProperty);
5140 SetValue(PaddingProperty, value);
5141 NotifyPropertyChanged();
5146 /// Gets or sets the minimum size the view can be assigned in size negotiation.
5148 /// <since_tizen> 3 </since_tizen>
5149 public Size2D MinimumSize
5153 return (Size2D)GetValue(MinimumSizeProperty);
5157 SetValue(MinimumSizeProperty, value);
5158 NotifyPropertyChanged();
5163 /// Gets or sets the maximum size the view can be assigned in size negotiation.
5165 /// <since_tizen> 3 </since_tizen>
5166 public Size2D MaximumSize
5170 return (Size2D)GetValue(MaximumSizeProperty);
5174 SetValue(MaximumSizeProperty, value);
5175 NotifyPropertyChanged();
5180 /// Gets or sets whether a child view inherits it's parent's position.<br />
5181 /// Default is to inherit.<br />
5182 /// 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 />
5184 /// <since_tizen> 3 </since_tizen>
5185 public bool InheritPosition
5189 return (bool)GetValue(InheritPositionProperty);
5193 SetValue(InheritPositionProperty, value);
5194 NotifyPropertyChanged();
5199 /// Gets or sets the clipping behavior (mode) of it's children.
5201 /// <since_tizen> 3 </since_tizen>
5202 public ClippingModeType ClippingMode
5206 return (ClippingModeType)GetValue(ClippingModeProperty);
5210 SetValue(ClippingModeProperty, value);
5211 NotifyPropertyChanged();
5216 /// Gets the number of renderers held by the view.
5218 /// <since_tizen> 3 </since_tizen>
5219 public uint RendererCount
5223 return GetRendererCount();
5228 /// [Obsolete("Please do not use! this will be deprecated")]
5230 /// <since_tizen> 3 </since_tizen>
5231 /// Please do not use! this will be deprecated!
5232 /// Instead please use PivotPoint.
5233 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
5235 "View view = new View(); " +
5236 "view.PivotPoint = PivotPoint.Center; " +
5237 "view.PositionUsesPivotPoint = true;")]
5238 [EditorBrowsable(EditorBrowsableState.Never)]
5239 public Position AnchorPoint
5243 Position temp = new Position(0.0f, 0.0f, 0.0f);
5244 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
5249 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
5250 NotifyPropertyChanged();
5255 /// [Obsolete("Please do not use! this will be deprecated")]
5257 /// <since_tizen> 3 </since_tizen>
5258 [Obsolete("Please do not use! This will be deprecated! Please use Size2D instead! " +
5260 "View view = new View(); " +
5261 "view.Size2D = new Size2D(100, 100);")]
5262 [EditorBrowsable(EditorBrowsableState.Never)]
5267 return (Size)GetValue(SizeProperty);
5271 SetValue(SizeProperty, value);
5272 NotifyPropertyChanged();
5277 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
5279 /// <since_tizen> 3 </since_tizen>
5280 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
5282 "Container parent = view.GetParent(); " +
5283 "View view = parent as View;")]
5284 [EditorBrowsable(EditorBrowsableState.Never)]
5285 public new View Parent
5290 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
5291 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
5292 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
5294 if (basehandle is Layer layer)
5296 ret = new View(Layer.getCPtr(layer).Handle, false);
5297 NUILog.Error("This Parent property is deprecated, shoud do not be used");
5301 ret = basehandle as View;
5304 NDalicPINVOKE.delete_BaseHandle(CPtr);
5305 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5307 if (NDalicPINVOKE.SWIGPendingException.Pending)
5308 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5314 /// Gets/Sets whether inherit parent's the layout Direction.
5316 /// <since_tizen> 4 </since_tizen>
5317 public bool InheritLayoutDirection
5321 return (bool)GetValue(InheritLayoutDirectionProperty);
5325 SetValue(InheritLayoutDirectionProperty, value);
5326 NotifyPropertyChanged();
5331 /// Gets/Sets the layout Direction.
5333 /// <since_tizen> 4 </since_tizen>
5334 public ViewLayoutDirectionType LayoutDirection
5338 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
5342 SetValue(LayoutDirectionProperty, value);
5343 NotifyPropertyChanged();
5348 /// Gets or sets the Margin for use in layout.
5350 /// <since_tizen> 4 </since_tizen>
5351 public Extents Margin
5355 return (Extents)GetValue(MarginProperty);
5359 SetValue(MarginProperty, value);
5360 NotifyPropertyChanged();
5364 internal Style Style
5368 return (Style)GetValue(StyleProperty);
5372 SetValue(StyleProperty, value);
5377 /// [Obsolete("Please do not use! this will be deprecated")]
5379 /// Please do not use! this will be deprecated!
5380 /// Instead please use Padding.
5381 /// <since_tizen> 4 </since_tizen>
5382 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
5383 [EditorBrowsable(EditorBrowsableState.Never)]
5384 public Extents PaddingEX
5388 Extents temp = new Extents(0, 0, 0, 0);
5389 GetProperty(View.Property.PADDING).Get(temp);
5394 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
5395 NotifyPropertyChanged();
5400 /// Perform an action on a visual registered to this view. <br />
5401 /// Visuals will have actions, this API is used to perform one of these actions with the given attributes.
5403 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
5404 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find supported actions.</param>
5405 /// <param name="attributes">Optional attributes for the action.</param>
5406 /// <since_tizen> 5 </since_tizen>
5407 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
5409 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
5410 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5413 internal readonly MergedStyle _mergedStyle;
5416 /// Child property to specify desired width
5418 internal int LayoutWidthSpecificationFixed
5423 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5425 NUILog.Error("WidthSpecificationFixed get error!");
5431 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5436 /// Child property to specify desired height
5438 internal int LayoutHeightSpecificationFixed
5443 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5445 NUILog.Error("HeightSpecificationFixed get error!");
5451 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5456 /// Child property to specify desired width, use MatchParent/WrapContent)
5458 internal ChildLayoutData LayoutWidthSpecification
5463 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5465 NUILog.Error("WidthSpecificationFixed get error!");
5467 return (ChildLayoutData)tmp;
5471 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5476 /// Child property to specify desired height, use MatchParent/WrapContent)
5478 internal ChildLayoutData LayoutHeightSpecification
5483 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5485 NUILog.Error("HeightSpecificationFixed get error!");
5487 return (ChildLayoutData)tmp;
5491 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5498 /// The View layout Direction type.
5500 /// <since_tizen> 4 </since_tizen>
5501 public enum ViewLayoutDirectionType
5506 /// <since_tizen> 4 </since_tizen>
5511 /// <since_tizen> 4 </since_tizen>
5515 internal enum ChildLayoutData
5518 /// Constant which indicates child size should match parent size
5522 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size