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);
481 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
482 [EditorBrowsable(EditorBrowsableState.Never)]
483 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
485 var view = (View)bindable;
486 if (newValue != null)
488 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
491 defaultValueCreator:(bindable) =>
493 var view = (View)bindable;
495 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
498 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
499 [EditorBrowsable(EditorBrowsableState.Never)]
500 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), new Position2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
502 var view = (View)bindable;
503 if (newValue != null)
505 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue( new Position((Position2D)newValue) ));
508 defaultValueCreator:(bindable) =>
510 var view = (View)bindable;
511 Position temp = new Position(0.0f, 0.0f, 0.0f);
512 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
513 return new Position2D(temp);
515 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
516 [EditorBrowsable(EditorBrowsableState.Never)]
517 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
519 var view = (View)bindable;
520 if (newValue != null)
522 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
525 defaultValueCreator:(bindable) =>
527 var view = (View)bindable;
529 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
532 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
533 [EditorBrowsable(EditorBrowsableState.Never)]
534 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
536 var view = (View)bindable;
538 if (newValue != null)
540 value = (int)newValue;
543 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
546 var siblings = view.GetParent()?.Children;
547 if (siblings != null)
549 int currentOrder = siblings.IndexOf(view);
550 if (value != currentOrder)
552 if (value == 0) { view.LowerToBottom(); }
553 else if (value < siblings.Count - 1)
555 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
556 else { view.LowerBelow(siblings[value]); }
558 else { view.RaiseToTop(); }
563 defaultValueCreator:(bindable) =>
565 var view = (View)bindable;
566 var parentChildren = view.GetParent()?.Children;
567 int currentOrder = 0;
568 if (parentChildren != null)
570 currentOrder = parentChildren.IndexOf(view);
572 if (currentOrder < 0) { return 0; }
573 else if (currentOrder < parentChildren.Count) { return currentOrder; }
578 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
579 [EditorBrowsable(EditorBrowsableState.Never)]
580 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), Position.ParentOriginTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
582 var view = (View)bindable;
583 if (newValue != null)
585 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
588 defaultValueCreator:(bindable) =>
590 var view = (View)bindable;
591 Position temp = new Position(0.0f, 0.0f, 0.0f);
592 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
596 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
597 [EditorBrowsable(EditorBrowsableState.Never)]
598 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), Position.PivotPointTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
600 var view = (View)bindable;
601 if (newValue != null)
603 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
606 defaultValueCreator:(bindable) =>
608 var view = (View)bindable;
609 Position temp = new Position(0.0f, 0.0f, 0.0f);
610 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
613 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
614 [EditorBrowsable(EditorBrowsableState.Never)]
615 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
617 var view = (View)bindable;
618 if (newValue != null)
620 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
623 defaultValueCreator:(bindable) =>
625 var view = (View)bindable;
627 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
630 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
631 [EditorBrowsable(EditorBrowsableState.Never)]
632 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
634 var view = (View)bindable;
635 if (newValue != null)
637 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
640 defaultValueCreator:(bindable) =>
642 var view = (View)bindable;
644 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
647 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
648 [EditorBrowsable(EditorBrowsableState.Never)]
649 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), Position.Zero, propertyChanged: (bindable, oldValue, newValue) =>
651 var view = (View)bindable;
652 if (newValue != null)
654 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
657 defaultValueCreator:(bindable) =>
659 var view = (View)bindable;
660 Position temp = new Position(0.0f, 0.0f, 0.0f);
661 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
664 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
665 [EditorBrowsable(EditorBrowsableState.Never)]
666 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
668 var view = (View)bindable;
669 if (newValue != null)
671 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
674 defaultValueCreator:(bindable) =>
676 var view = (View)bindable;
678 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
681 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
682 [EditorBrowsable(EditorBrowsableState.Never)]
683 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
685 var view = (View)bindable;
686 if (newValue != null)
688 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
691 defaultValueCreator:(bindable) =>
693 var view = (View)bindable;
695 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
698 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
699 [EditorBrowsable(EditorBrowsableState.Never)]
700 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
702 var view = (View)bindable;
703 if (newValue != null)
705 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
708 defaultValueCreator:(bindable) =>
710 var view = (View)bindable;
712 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
715 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
716 [EditorBrowsable(EditorBrowsableState.Never)]
717 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), new Rotation(new Radian(0), Vector3.ZAxis), propertyChanged: (bindable, oldValue, newValue) =>
719 var view = (View)bindable;
720 if (newValue != null)
722 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
725 defaultValueCreator:(bindable) =>
727 var view = (View)bindable;
728 Rotation temp = new Rotation();
729 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
732 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
733 [EditorBrowsable(EditorBrowsableState.Never)]
734 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
736 var view = (View)bindable;
737 if (newValue != null)
739 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
742 defaultValueCreator:(bindable) =>
744 var view = (View)bindable;
745 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
746 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
749 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
750 [EditorBrowsable(EditorBrowsableState.Never)]
751 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
753 var view = (View)bindable;
754 if (newValue != null)
756 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
759 defaultValueCreator:(bindable) =>
761 var view = (View)bindable;
763 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
766 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
767 [EditorBrowsable(EditorBrowsableState.Never)]
768 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
770 var view = (View)bindable;
771 if (newValue != null)
773 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
776 defaultValueCreator:(bindable) =>
778 var view = (View)bindable;
780 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
783 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
784 [EditorBrowsable(EditorBrowsableState.Never)]
785 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
787 var view = (View)bindable;
788 if (newValue != null)
790 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
793 defaultValueCreator:(bindable) =>
795 var view = (View)bindable;
797 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
800 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
801 [EditorBrowsable(EditorBrowsableState.Never)]
802 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
804 var view = (View)bindable;
805 if (newValue != null)
807 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
810 defaultValueCreator:(bindable) =>
812 var view = (View)bindable;
814 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
817 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
818 [EditorBrowsable(EditorBrowsableState.Never)]
819 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
821 var view = (View)bindable;
822 if (newValue != null)
824 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
827 defaultValueCreator:(bindable) =>
829 var view = (View)bindable;
831 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
834 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
835 [EditorBrowsable(EditorBrowsableState.Never)]
836 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
838 var view = (View)bindable;
839 if (newValue != null)
841 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
844 defaultValueCreator:(bindable) =>
846 var view = (View)bindable;
848 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
851 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
852 [EditorBrowsable(EditorBrowsableState.Never)]
853 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
855 var view = (View)bindable;
856 if (newValue != null)
858 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
861 defaultValueCreator:(bindable) =>
863 var view = (View)bindable;
865 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
868 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
869 [EditorBrowsable(EditorBrowsableState.Never)]
870 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
872 var view = (View)bindable;
873 if (newValue != null)
875 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
878 defaultValueCreator:(bindable) =>
880 var view = (View)bindable;
882 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
885 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
886 [EditorBrowsable(EditorBrowsableState.Never)]
887 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
889 var view = (View)bindable;
890 if (newValue != null)
892 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
895 defaultValueCreator:(bindable) =>
897 var view = (View)bindable;
899 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
901 NUILog.Error("DrawMode get error!");
905 case "NORMAL": return DrawModeType.Normal;
906 case "OVERLAY_2D": return DrawModeType.Overlay2D;
907 case "STENCIL": return DrawModeType.Stencil;
908 default: return DrawModeType.Normal;
911 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
912 [EditorBrowsable(EditorBrowsableState.Never)]
913 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
915 var view = (View)bindable;
916 if (newValue != null)
918 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
921 defaultValueCreator:(bindable) =>
923 var view = (View)bindable;
924 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
925 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
928 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
929 [EditorBrowsable(EditorBrowsableState.Never)]
930 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
932 var view = (View)bindable;
933 if (newValue != null)
935 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
938 defaultValueCreator:(bindable) =>
940 var view = (View)bindable;
942 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
944 NUILog.Error("WidthResizePolicy get error!");
948 case "FIXED": return ResizePolicyType.Fixed;
949 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
950 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
951 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
952 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
953 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
954 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
955 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
956 default: return ResizePolicyType.Fixed;
959 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
960 [EditorBrowsable(EditorBrowsableState.Never)]
961 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
963 var view = (View)bindable;
964 if (newValue != null)
966 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
969 defaultValueCreator:(bindable) =>
971 var view = (View)bindable;
973 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
975 NUILog.Error("HeightResizePolicy get error!");
979 case "FIXED": return ResizePolicyType.Fixed;
980 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
981 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
982 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
983 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
984 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
985 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
986 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
987 default: return ResizePolicyType.Fixed;
990 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
991 [EditorBrowsable(EditorBrowsableState.Never)]
992 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
994 var view = (View)bindable;
995 string valueToString = "";
996 if (newValue != null)
998 switch ((SizeScalePolicyType)newValue)
1000 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1001 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1002 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1003 default: { valueToString = "USE_SIZE_SET"; break; }
1005 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1008 defaultValueCreator:(bindable) =>
1010 var view = (View)bindable;
1012 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1014 NUILog.Error("SizeScalePolicy get error!");
1018 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1019 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1020 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1021 default: return SizeScalePolicyType.UseSizeSet;
1024 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1025 [EditorBrowsable(EditorBrowsableState.Never)]
1026 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1028 var view = (View)bindable;
1029 if (newValue != null)
1031 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1034 defaultValueCreator:(bindable) =>
1036 var view = (View)bindable;
1038 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1041 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1042 [EditorBrowsable(EditorBrowsableState.Never)]
1043 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1045 var view = (View)bindable;
1046 if (newValue != null)
1048 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1051 defaultValueCreator:(bindable) =>
1053 var view = (View)bindable;
1055 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1058 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1059 [EditorBrowsable(EditorBrowsableState.Never)]
1060 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), new Extents(0,0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1062 var view = (View)bindable;
1063 if (newValue != null)
1065 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1068 defaultValueCreator:(bindable) =>
1070 var view = (View)bindable;
1071 Extents temp = new Extents(0, 0, 0, 0);
1072 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1075 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1076 [EditorBrowsable(EditorBrowsableState.Never)]
1077 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), new Size(0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1079 var view = (View)bindable;
1080 if (newValue != null)
1082 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1085 defaultValueCreator: (bindable) => {
1086 var view = (View)bindable;
1087 Size temp = new Size(0, 0, 0);
1088 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1091 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1092 [EditorBrowsable(EditorBrowsableState.Never)]
1093 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
1095 var view = (View)bindable;
1096 if (newValue != null)
1098 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1101 defaultValueCreator:(bindable) =>
1103 var view = (View)bindable;
1104 Size2D temp = new Size2D(0, 0);
1105 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1108 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1109 [EditorBrowsable(EditorBrowsableState.Never)]
1110 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
1112 var view = (View)bindable;
1113 if (newValue != null)
1115 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1118 defaultValueCreator:(bindable) =>
1120 var view = (View)bindable;
1121 Size2D temp = new Size2D(0, 0);
1122 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1125 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1126 [EditorBrowsable(EditorBrowsableState.Never)]
1127 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1129 var view = (View)bindable;
1130 if (newValue != null)
1132 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1135 defaultValueCreator:(bindable) =>
1137 var view = (View)bindable;
1139 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1142 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1143 [EditorBrowsable(EditorBrowsableState.Never)]
1144 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1146 var view = (View)bindable;
1147 if (newValue != null)
1149 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1152 defaultValueCreator:(bindable) =>
1154 var view = (View)bindable;
1156 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1158 NUILog.Error("ClippingMode get error!");
1160 return (ClippingModeType)temp;
1162 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1163 [EditorBrowsable(EditorBrowsableState.Never)]
1164 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1166 var view = (View)bindable;
1167 if (newValue != null)
1169 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1172 defaultValueCreator:(bindable) =>
1174 var view = (View)bindable;
1176 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1179 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1180 [EditorBrowsable(EditorBrowsableState.Never)]
1181 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1183 var view = (View)bindable;
1184 if (newValue != null)
1186 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1189 defaultValueCreator:(bindable) =>
1191 var view = (View)bindable;
1193 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1195 NUILog.Error("LAYOUT_DIRECTION get error!");
1197 return (ViewLayoutDirectionType)temp;
1199 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1200 [EditorBrowsable(EditorBrowsableState.Never)]
1201 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), new Extents(0,0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1203 var view = (View)bindable;
1204 if (newValue != null)
1206 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1209 defaultValueCreator:(bindable) =>
1211 var view = (View)bindable;
1212 Extents temp = new Extents(0, 0, 0, 0);
1213 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1216 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1217 [EditorBrowsable(EditorBrowsableState.Never)]
1218 public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style),
1219 propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1222 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1224 private bool layoutSet = false; // Flag to indicate if SetLayout was called or View was automatically given a Layout
1226 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
1228 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1231 PositionUsesPivotPoint = false;
1233 _mergedStyle = new MergedStyle(GetType(), this);
1236 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
1238 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1242 /// Event argument passed through ChildAdded event
1244 /// <since_tizen> 5 </since_tizen>
1245 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1246 [EditorBrowsable(EditorBrowsableState.Never)]
1247 public class ChildAddedEventArgs : EventArgs
1250 /// Added child View at moment
1252 /// <since_tizen> 5 </since_tizen>
1253 public View Added { get; set; }
1257 /// Event when a child is added
1259 /// <since_tizen> 5 </since_tizen>
1260 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1261 [EditorBrowsable(EditorBrowsableState.Never)]
1262 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1264 // From Container Base class
1266 /// Adds a child view to this view.
1268 /// <seealso cref="Container.Add" />
1269 /// <since_tizen> 4 </since_tizen>
1270 public override void Add(View child)
1274 Tizen.Log.Fatal("NUI", "Child is null");
1278 Container oldParent = child.GetParent();
1279 if (oldParent != this)
1281 if (oldParent != null)
1283 oldParent.Remove(child);
1287 child.InternalParent = this;
1290 if (layoutSet == true && child.Layout == null) // Only give children a layout if parent an explicit container
1292 LayoutItem layoutItem = new LayoutItem();
1293 child.Layout = layoutItem;
1298 Layout.LayoutChildren.Add(child.Layout);
1301 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
1302 if (NDalicPINVOKE.SWIGPendingException.Pending)
1303 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1304 Children.Add(child);
1306 if (ChildAdded != null)
1308 ChildAddedEventArgs e = new ChildAddedEventArgs
1312 ChildAdded(this, e);
1318 /// Event argument passed through ChildRemoved event
1320 /// <since_tizen> 5 </since_tizen>
1321 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1322 [EditorBrowsable(EditorBrowsableState.Never)]
1323 public class ChildRemovedEventArgs : EventArgs
1326 /// Removed child View at moment
1328 /// <since_tizen> 5 </since_tizen>
1329 public View Removed { get; set; }
1333 /// Event when a child is removed
1335 /// <since_tizen> 5 </since_tizen>
1336 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1337 [EditorBrowsable(EditorBrowsableState.Never)]
1338 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1342 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
1344 /// <seealso cref="Container.Remove" />
1345 /// <since_tizen> 4 </since_tizen>
1346 public override void Remove(View child)
1348 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
1349 if (NDalicPINVOKE.SWIGPendingException.Pending)
1350 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1352 Children.Remove(child);
1353 child.InternalParent = null;
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 return this.InternalParent as Container;
1410 internal bool IsTopLevelView()
1412 if (GetParent() is Layer)
1420 /// you can override it to clean-up your own resources.
1422 /// <param name="type">DisposeTypes</param>
1423 /// <since_tizen> 3 </since_tizen>
1424 protected override void Dispose(DisposeTypes type)
1431 if (type == DisposeTypes.Explicit)
1434 //Release your own managed resources here.
1435 //You should release all of your own disposable objects here.
1438 //Release your own unmanaged resources here.
1439 //You should not access any managed member here except static instance.
1440 //because the execution order of Finalizes is non-deterministic.
1443 DisConnectFromSignals();
1446 if (swigCPtr.Handle != global::System.IntPtr.Zero)
1450 swigCMemOwn = false;
1451 NDalicPINVOKE.delete_View(swigCPtr);
1453 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1460 private void DisConnectFromSignals()
1462 // Save current CPtr.
1463 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
1465 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
1466 swigCPtr = GetBaseHandleCPtrHandleRef;
1468 if (_onRelayoutEventCallback != null)
1470 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1473 if (_offWindowEventCallback != null)
1475 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1478 if (_onWindowEventCallback != null)
1480 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1483 if (_wheelEventCallback != null)
1485 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1488 if (_hoverEventCallback != null)
1490 this.HoveredSignal().Disconnect(_hoverEventCallback);
1493 if (_touchDataCallback != null)
1495 this.TouchSignal().Disconnect(_touchDataCallback);
1498 if (_ResourcesLoadedCallback != null)
1500 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1503 if (_offWindowEventCallback != null)
1505 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1508 if (_onWindowEventCallback != null)
1510 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1513 if (_wheelEventCallback != null)
1515 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1518 if (_hoverEventCallback != null)
1520 this.HoveredSignal().Disconnect(_hoverEventCallback);
1523 if (_touchDataCallback != null)
1525 this.TouchSignal().Disconnect(_touchDataCallback);
1528 if (_onRelayoutEventCallback != null)
1530 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1533 if (_keyCallback != null)
1535 this.KeyEventSignal().Disconnect(_keyCallback);
1538 if (_keyInputFocusLostCallback != null)
1540 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1543 if (_keyInputFocusGainedCallback != null)
1545 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1548 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
1549 // Restore current CPtr.
1550 swigCPtr = currentCPtr;
1553 private EventHandler _keyInputFocusGainedEventHandler;
1554 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1555 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1556 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1559 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1560 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1562 /// <since_tizen> 3 </since_tizen>
1563 public event EventHandler FocusGained
1567 if (_keyInputFocusGainedEventHandler == null)
1569 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1570 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1573 _keyInputFocusGainedEventHandler += value;
1578 _keyInputFocusGainedEventHandler -= value;
1580 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1582 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1587 private void OnKeyInputFocusGained(IntPtr view)
1589 if (_keyInputFocusGainedEventHandler != null)
1591 _keyInputFocusGainedEventHandler(this, null);
1596 private EventHandler _keyInputFocusLostEventHandler;
1597 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1598 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1599 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1602 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1603 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1605 /// <since_tizen> 3 </since_tizen>
1606 public event EventHandler FocusLost
1610 if (_keyInputFocusLostEventHandler == null)
1612 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1613 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1616 _keyInputFocusLostEventHandler += value;
1621 _keyInputFocusLostEventHandler -= value;
1623 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1625 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1630 private void OnKeyInputFocusLost(IntPtr view)
1632 if (_keyInputFocusLostEventHandler != null)
1634 _keyInputFocusLostEventHandler(this, null);
1639 /// Event arguments that passed via the KeyEvent signal.
1641 /// <since_tizen> 3 </since_tizen>
1642 public class KeyEventArgs : EventArgs
1647 /// Key - is the key sent to the view.
1649 /// <since_tizen> 3 </since_tizen>
1663 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1664 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1665 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1666 private KeyCallbackType _keyCallback;
1669 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1670 /// The KeyPressed signal is emitted when the key event is received.<br />
1672 /// <since_tizen> 3 </since_tizen>
1673 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1677 if (_keyEventHandler == null)
1679 _keyCallback = OnKeyEvent;
1680 this.KeyEventSignal().Connect(_keyCallback);
1683 _keyEventHandler += value;
1688 _keyEventHandler -= value;
1690 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1692 this.KeyEventSignal().Disconnect(_keyCallback);
1697 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
1699 if (keyEvent == global::System.IntPtr.Zero)
1701 NUILog.Error("keyEvent should not be null!");
1705 KeyEventArgs e = new KeyEventArgs();
1707 bool result = false;
1709 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
1711 if (_keyEventHandler != null)
1713 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
1715 // Oring the result of each callback.
1716 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
1718 result |= del(this, e);
1725 private EventHandler _onRelayoutEventHandler;
1726 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1727 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1728 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1731 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1732 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1734 /// <since_tizen> 3 </since_tizen>
1735 public event EventHandler Relayout
1739 if (_onRelayoutEventHandler == null)
1741 _onRelayoutEventCallback = OnRelayout;
1742 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1745 _onRelayoutEventHandler += value;
1750 _onRelayoutEventHandler -= value;
1752 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1754 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1760 // Callback for View OnRelayout signal
1761 private void OnRelayout(IntPtr data)
1763 if (_onRelayoutEventHandler != null)
1765 _onRelayoutEventHandler(this, null);
1770 /// Event arguments that passed via the touch signal.
1772 /// <since_tizen> 3 </since_tizen>
1773 public class TouchEventArgs : EventArgs
1775 private Touch _touch;
1778 /// Touch - contains the information of touch points.
1780 /// <since_tizen> 3 </since_tizen>
1794 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1795 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1796 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1797 private TouchDataCallbackType _touchDataCallback;
1800 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1801 /// The touched signal is emitted when the touch input is received.<br />
1803 /// <since_tizen> 3 </since_tizen>
1804 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1808 if (_touchDataEventHandler == null)
1810 _touchDataCallback = OnTouch;
1811 this.TouchSignal().Connect(_touchDataCallback);
1814 _touchDataEventHandler += value;
1819 _touchDataEventHandler -= value;
1821 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1823 this.TouchSignal().Disconnect(_touchDataCallback);
1829 // Callback for View TouchSignal
1830 private bool OnTouch(IntPtr view, IntPtr touchData)
1832 if (touchData == global::System.IntPtr.Zero)
1834 NUILog.Error("touchData should not be null!");
1838 TouchEventArgs e = new TouchEventArgs();
1840 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
1842 if (_touchDataEventHandler != null)
1844 return _touchDataEventHandler(this, e);
1851 /// Event arguments that passed via the hover signal.
1853 /// <since_tizen> 3 </since_tizen>
1854 public class HoverEventArgs : EventArgs
1856 private Hover _hover;
1859 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
1861 /// <since_tizen> 3 </since_tizen>
1875 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1876 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1877 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1878 private HoverEventCallbackType _hoverEventCallback;
1881 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1882 /// The hovered signal is emitted when the hover input is received.<br />
1884 /// <since_tizen> 3 </since_tizen>
1885 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1889 if (_hoverEventHandler == null)
1891 _hoverEventCallback = OnHoverEvent;
1892 this.HoveredSignal().Connect(_hoverEventCallback);
1895 _hoverEventHandler += value;
1900 _hoverEventHandler -= value;
1902 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1904 this.HoveredSignal().Disconnect(_hoverEventCallback);
1910 // Callback for View Hover signal
1911 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
1913 if (hoverEvent == global::System.IntPtr.Zero)
1915 NUILog.Error("hoverEvent should not be null!");
1919 HoverEventArgs e = new HoverEventArgs();
1921 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
1923 if (_hoverEventHandler != null)
1925 return _hoverEventHandler(this, e);
1932 /// Event arguments that passed via the wheel signal.
1934 /// <since_tizen> 3 </since_tizen>
1935 public class WheelEventArgs : EventArgs
1937 private Wheel _wheel;
1940 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
1942 /// <since_tizen> 3 </since_tizen>
1956 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1957 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1958 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1959 private WheelEventCallbackType _wheelEventCallback;
1962 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1963 /// The WheelMoved signal is emitted when the wheel event is received.<br />
1965 /// <since_tizen> 3 </since_tizen>
1966 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1970 if (_wheelEventHandler == null)
1972 _wheelEventCallback = OnWheelEvent;
1973 this.WheelEventSignal().Connect(_wheelEventCallback);
1976 _wheelEventHandler += value;
1981 _wheelEventHandler -= value;
1983 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
1985 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1991 // Callback for View Wheel signal
1992 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
1994 if (wheelEvent == global::System.IntPtr.Zero)
1996 NUILog.Error("wheelEvent should not be null!");
2000 WheelEventArgs e = new WheelEventArgs();
2002 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
2004 if (_wheelEventHandler != null)
2006 return _wheelEventHandler(this, e);
2012 private EventHandler _onWindowEventHandler;
2013 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2014 private delegate void OnWindowEventCallbackType(IntPtr control);
2015 private OnWindowEventCallbackType _onWindowEventCallback;
2018 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
2019 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
2021 /// <since_tizen> 3 </since_tizen>
2022 public event EventHandler AddedToWindow
2026 if (_onWindowEventHandler == null)
2028 _onWindowEventCallback = OnWindow;
2029 this.OnWindowSignal().Connect(_onWindowEventCallback);
2032 _onWindowEventHandler += value;
2037 _onWindowEventHandler -= value;
2039 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
2041 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
2046 // Callback for View OnWindow signal
2047 private void OnWindow(IntPtr data)
2049 if (_onWindowEventHandler != null)
2051 _onWindowEventHandler(this, null);
2056 private EventHandler _offWindowEventHandler;
2057 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2058 private delegate void OffWindowEventCallbackType(IntPtr control);
2059 private OffWindowEventCallbackType _offWindowEventCallback;
2062 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
2063 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
2065 /// <since_tizen> 3 </since_tizen>
2066 public event EventHandler RemovedFromWindow
2070 if (_offWindowEventHandler == null)
2072 _offWindowEventCallback = OffWindow;
2073 this.OffWindowSignal().Connect(_offWindowEventCallback);
2076 _offWindowEventHandler += value;
2081 _offWindowEventHandler -= value;
2083 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
2085 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
2090 // Callback for View OffWindow signal
2091 private void OffWindow(IntPtr data)
2093 if (_offWindowEventHandler != null)
2095 _offWindowEventHandler(this, null);
2100 /// Event arguments of visibility changed.
2102 /// <since_tizen> 3 </since_tizen>
2103 public class VisibilityChangedEventArgs : EventArgs
2106 private bool _visibility;
2107 private VisibilityChangeType _type;
2110 /// The view, or child of view, whose visibility has changed.
2112 /// <since_tizen> 3 </since_tizen>
2126 /// Whether the view is now visible or not.
2128 /// <since_tizen> 3 </since_tizen>
2129 public bool Visibility
2137 _visibility = value;
2142 /// Whether the view's visible property has changed or a parent's.
2144 /// <since_tizen> 3 </since_tizen>
2145 public VisibilityChangeType Type
2158 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
2159 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2160 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
2161 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
2164 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
2165 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
2167 /// <since_tizen> 3 </since_tizen>
2168 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
2172 if (_visibilityChangedEventHandler == null)
2174 _visibilityChangedEventCallback = OnVisibilityChanged;
2175 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
2178 _visibilityChangedEventHandler += value;
2183 _visibilityChangedEventHandler -= value;
2185 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
2187 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
2192 // Callback for View visibility change signal
2193 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
2195 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
2198 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2200 e.Visibility = visibility;
2203 if (_visibilityChangedEventHandler != null)
2205 _visibilityChangedEventHandler(this, e);
2211 /// Event arguments of layout direction changed.
2213 /// <since_tizen> 4 </since_tizen>
2214 public class LayoutDirectionChangedEventArgs : EventArgs
2217 private ViewLayoutDirectionType _type;
2220 /// The view, or child of view, whose layout direction has changed.
2222 /// <since_tizen> 4 </since_tizen>
2236 /// Whether the view's layout direction property has changed or a parent's.
2238 /// <since_tizen> 4 </since_tizen>
2239 public ViewLayoutDirectionType Type
2252 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
2253 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2254 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
2255 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
2258 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
2259 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
2261 /// <since_tizen> 4 </since_tizen>
2262 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
2266 if (_layoutDirectionChangedEventHandler == null)
2268 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
2269 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
2272 _layoutDirectionChangedEventHandler += value;
2277 _layoutDirectionChangedEventHandler -= value;
2279 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
2281 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
2286 // Callback for View layout direction change signal
2287 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
2289 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
2292 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2296 if (_layoutDirectionChangedEventHandler != null)
2298 _layoutDirectionChangedEventHandler(this, e);
2302 // Resource Ready Signal
2304 private EventHandler _resourcesLoadedEventHandler;
2305 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2306 private delegate void ResourcesLoadedCallbackType(IntPtr control);
2307 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
2310 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
2311 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
2313 /// <since_tizen> 3 </since_tizen>
2314 public event EventHandler ResourcesLoaded
2318 if (_resourcesLoadedEventHandler == null)
2320 _ResourcesLoadedCallback = OnResourcesLoaded;
2321 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
2324 _resourcesLoadedEventHandler += value;
2329 _resourcesLoadedEventHandler -= value;
2331 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
2333 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
2338 private void OnResourcesLoaded(IntPtr view)
2340 if (_resourcesLoadedEventHandler != null)
2342 _resourcesLoadedEventHandler(this, null);
2346 internal IntPtr GetPtrfromView()
2348 return (IntPtr)swigCPtr;
2351 internal class Property
2353 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
2354 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
2355 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
2356 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
2357 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
2358 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
2359 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
2360 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
2361 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
2362 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
2363 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
2364 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
2365 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
2366 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
2367 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
2368 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
2369 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
2370 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
2371 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
2372 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
2373 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
2374 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
2375 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
2376 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
2377 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
2378 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
2379 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
2380 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
2381 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
2382 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
2383 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
2384 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
2385 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
2386 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
2387 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
2388 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
2389 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
2390 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
2391 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
2392 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
2393 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
2394 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
2395 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
2396 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
2397 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
2398 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
2399 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
2400 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
2401 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
2402 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
2403 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
2404 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
2405 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
2406 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
2407 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
2408 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
2409 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
2410 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
2411 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
2412 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
2413 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
2414 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
2415 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();
2419 /// Describes the direction to move the focus towards.
2421 /// <since_tizen> 3 </since_tizen>
2422 public enum FocusDirection
2425 /// Move keyboard focus towards the left direction.
2427 /// <since_tizen> 3 </since_tizen>
2430 /// Move keyboard focus towards the right direction.
2432 /// <since_tizen> 3 </since_tizen>
2435 /// Move keyboard focus towards the up direction.
2437 /// <since_tizen> 3 </since_tizen>
2440 /// Move keyboard focus towards the down direction.
2442 /// <since_tizen> 3 </since_tizen>
2445 /// Move keyboard focus towards the previous page direction.
2447 /// <since_tizen> 3 </since_tizen>
2450 /// Move keyboard focus towards the next page direction.
2452 /// <since_tizen> 3 </since_tizen>
2456 protected void InitXamlResource()
2458 if (null != Application.Current)
2460 Application.AddResourceChangedCallback(this, OnResourcesChanged);
2465 /// Creates a new instance of a view.
2467 /// <since_tizen> 3 </since_tizen>
2468 public View() : this(NDalicPINVOKE.View_New(), true)
2471 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2473 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
2476 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2479 private View ConvertIdToView(uint id)
2482 if (GetParent() is View)
2484 View parentView = GetParent() as View;
2485 view = parentView.FindChildById(id);
2490 view = Window.Instance.GetRootLayer().FindChildById(id);
2496 internal void SetKeyInputFocus()
2498 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
2499 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2503 /// Queries whether the view has a focus.
2505 /// <returns>True if this view has a focus.</returns>
2506 /// <since_tizen> 3 </since_tizen>
2507 public bool HasFocus()
2509 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
2510 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2514 internal void ClearKeyInputFocus()
2516 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
2517 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2520 internal PinchGestureDetector GetPinchGestureDetector()
2522 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
2523 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2527 internal PanGestureDetector GetPanGestureDetector()
2529 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
2530 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2534 internal TapGestureDetector GetTapGestureDetector()
2536 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
2537 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2541 internal LongPressGestureDetector GetLongPressGestureDetector()
2543 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
2544 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2549 /// Sets the name of the style to be applied to the view.
2551 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
2552 /// <since_tizen> 3 </since_tizen>
2553 public void SetStyleName(string styleName)
2555 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
2556 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2560 /// Retrieves the name of the style to be applied to the view (if any).
2562 /// <returns>A string matching a style, or an empty string.</returns>
2563 /// <since_tizen> 3 </since_tizen>
2564 public string GetStyleName()
2566 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
2567 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2571 internal void SetBackgroundColor(Vector4 color)
2573 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
2574 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2577 internal Vector4 GetBackgroundColor()
2579 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
2580 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2584 internal void SetBackgroundImage(Image image)
2586 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
2587 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2591 /// Clears the background.
2593 /// <since_tizen> 3 </since_tizen>
2594 public void ClearBackground()
2596 NDalicPINVOKE.View_ClearBackground(swigCPtr);
2597 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2600 internal ControlKeySignal KeyEventSignal()
2602 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
2603 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2607 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
2609 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
2610 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2614 internal KeyInputFocusSignal KeyInputFocusLostSignal()
2616 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
2617 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2621 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
2623 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2626 internal enum PropertyRange
2628 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
2629 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
2630 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
2634 /// The StyleName, type string.
2636 /// <since_tizen> 3 </since_tizen>
2637 public string StyleName
2641 return (string)GetValue(StyleNameProperty);
2645 SetValue(StyleNameProperty, value);
2646 NotifyPropertyChanged();
2651 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
2653 /// <since_tizen> 3 </since_tizen>
2654 public Color BackgroundColor
2658 return (Color)GetValue(BackgroundColorProperty);
2662 SetValue(BackgroundColorProperty, value);
2663 NotifyPropertyChanged();
2668 /// Creates an animation to animate the background color visual. If there is no
2669 /// background visual, creates one with transparent black as it's mixColor.
2671 /// <since_tizen> 3 </since_tizen>
2672 public Animation AnimateBackgroundColor(object destinationValue,
2675 AlphaFunction.BuiltinFunctions? alphaFunction = null,
2676 object initialValue = null)
2678 Tizen.NUI.PropertyMap background = Background;
2680 if (background.Empty())
2682 // If there is no background yet, ensure there is a transparent
2684 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
2685 background = Background;
2687 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
2691 /// Creates an animation to animate the mixColor of the named visual.
2693 /// <since_tizen> 3 </since_tizen>
2694 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
2696 Animation animation = null;
2698 PropertyMap _animator = new PropertyMap();
2699 if (alphaFunction != null)
2701 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
2704 PropertyMap _timePeriod = new PropertyMap();
2705 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
2706 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
2707 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
2709 PropertyMap _transition = new PropertyMap();
2710 _transition.Add("animator", new PropertyValue(_animator));
2711 _transition.Add("target", new PropertyValue(targetVisual));
2712 _transition.Add("property", new PropertyValue("mixColor"));
2714 if (initialColor != null)
2716 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
2717 _transition.Add("initialValue", initValue);
2720 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
2721 _transition.Add("targetValue", destValue);
2722 TransitionData _transitionData = new TransitionData(_transition);
2724 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
2725 if (NDalicPINVOKE.SWIGPendingException.Pending)
2726 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2732 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
2734 /// <since_tizen> 3 </since_tizen>
2735 public string BackgroundImage
2739 return (string)GetValue(BackgroundImageProperty);
2743 SetValue(BackgroundImageProperty, value);
2744 NotifyPropertyChanged();
2749 /// The background of view.
2751 /// <since_tizen> 3 </since_tizen>
2752 public Tizen.NUI.PropertyMap Background
2756 return (PropertyMap)GetValue(BackgroundProperty);
2760 SetValue(BackgroundProperty, value);
2761 NotifyPropertyChanged();
2767 /// The current state of the view.
2769 /// <since_tizen> 3 </since_tizen>
2774 return (States)GetValue(StateProperty);
2778 SetValue(StateProperty, value);
2779 NotifyPropertyChanged();
2784 /// The current sub state of the view.
2786 /// <since_tizen> 3 </since_tizen>
2787 public States SubState
2791 return (States)GetValue(SubStateProperty);
2795 SetValue(SubStateProperty, value);
2796 NotifyPropertyChanged();
2801 /// Displays a tooltip
2803 /// <since_tizen> 3 </since_tizen>
2804 public Tizen.NUI.PropertyMap Tooltip
2808 return (PropertyMap)GetValue(TooltipProperty);
2812 SetValue(TooltipProperty, value);
2813 NotifyPropertyChanged();
2818 /// Displays a tooltip as a text.
2820 /// <since_tizen> 3 </since_tizen>
2821 public string TooltipText
2825 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
2826 NotifyPropertyChanged();
2830 private int LeftFocusableViewId
2835 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
2840 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2844 private int RightFocusableViewId
2849 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
2854 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2858 private int UpFocusableViewId
2863 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
2868 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2872 private int DownFocusableViewId
2877 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
2882 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2887 /// The Child property of FlexContainer.<br />
2888 /// The proportion of the free space in the container, the flex item will receive.<br />
2889 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
2891 /// <since_tizen> 3 </since_tizen>
2896 return (float)GetValue(FlexProperty);
2900 SetValue(FlexProperty, value);
2901 NotifyPropertyChanged();
2906 /// The Child property of FlexContainer.<br />
2907 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
2909 /// <since_tizen> 3 </since_tizen>
2910 public int AlignSelf
2914 return (int)GetValue(AlignSelfProperty);
2918 SetValue(AlignSelfProperty, value);
2919 NotifyPropertyChanged();
2924 /// The Child property of FlexContainer.<br />
2925 /// The space around the flex item.<br />
2927 /// <since_tizen> 3 </since_tizen>
2928 public Vector4 FlexMargin
2932 return (Vector4)GetValue(FlexMarginProperty);
2936 SetValue(FlexMarginProperty, value);
2937 NotifyPropertyChanged();
2942 /// The top-left cell this child occupies, if not set, the first available cell is used.
2944 /// <since_tizen> 3 </since_tizen>
2945 public Vector2 CellIndex
2949 return (Vector2)GetValue(CellIndexProperty);
2953 SetValue(CellIndexProperty, value);
2954 NotifyPropertyChanged();
2959 /// The number of rows this child occupies, if not set, the default value is 1.
2961 /// <since_tizen> 3 </since_tizen>
2962 public float RowSpan
2966 return (float)GetValue(RowSpanProperty);
2970 SetValue(RowSpanProperty, value);
2971 NotifyPropertyChanged();
2976 /// The number of columns this child occupies, if not set, the default value is 1.
2978 /// <since_tizen> 3 </since_tizen>
2979 public float ColumnSpan
2983 return (float)GetValue(ColumnSpanProperty);
2987 SetValue(ColumnSpanProperty, value);
2988 NotifyPropertyChanged();
2993 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
2995 /// <since_tizen> 3 </since_tizen>
2996 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
3000 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
3004 SetValue(CellHorizontalAlignmentProperty, value);
3005 NotifyPropertyChanged();
3010 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
3012 /// <since_tizen> 3 </since_tizen>
3013 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
3017 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
3021 SetValue(CellVerticalAlignmentProperty, value);
3022 NotifyPropertyChanged();
3027 /// The left focusable view.<br />
3028 /// This will return null if not set.<br />
3029 /// This will also return null if the specified left focusable view is not on a window.<br />
3031 /// <since_tizen> 3 </since_tizen>
3032 public View LeftFocusableView
3034 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3037 return (View)GetValue(LeftFocusableViewProperty);
3041 SetValue(LeftFocusableViewProperty, value);
3042 NotifyPropertyChanged();
3047 /// The right focusable view.<br />
3048 /// This will return null if not set.<br />
3049 /// This will also return null if the specified right focusable view is not on a window.<br />
3051 /// <since_tizen> 3 </since_tizen>
3052 public View RightFocusableView
3054 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3057 return (View)GetValue(RightFocusableViewProperty);
3061 SetValue(RightFocusableViewProperty, value);
3062 NotifyPropertyChanged();
3067 /// The up focusable view.<br />
3068 /// This will return null if not set.<br />
3069 /// This will also return null if the specified up focusable view is not on a window.<br />
3071 /// <since_tizen> 3 </since_tizen>
3072 public View UpFocusableView
3074 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3077 return (View)GetValue(UpFocusableViewProperty);
3081 SetValue(UpFocusableViewProperty, value);
3082 NotifyPropertyChanged();
3087 /// The down focusable view.<br />
3088 /// This will return null if not set.<br />
3089 /// This will also return null if the specified down focusable view is not on a window.<br />
3091 /// <since_tizen> 3 </since_tizen>
3092 public View DownFocusableView
3094 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3097 return (View)GetValue(DownFocusableViewProperty);
3101 SetValue(DownFocusableViewProperty, value);
3102 NotifyPropertyChanged();
3107 /// Whether the view should be focusable by keyboard navigation.
3109 /// <since_tizen> 3 </since_tizen>
3110 public bool Focusable
3114 SetValue(FocusableProperty, value);
3115 NotifyPropertyChanged();
3119 return (bool)GetValue(FocusableProperty);
3124 /// Enumeration for describing the states of the view.
3126 /// <since_tizen> 3 </since_tizen>
3130 /// The normal state.
3134 /// The focused state.
3138 /// The disabled state.
3144 /// Retrieves the position of the view.<br />
3145 /// The coordinates are relative to the view's parent.<br />
3147 /// <since_tizen> 3 </since_tizen>
3148 public Position CurrentPosition
3152 return GetCurrentPosition();
3157 /// Sets the size of a view for the width and the height.<br />
3158 /// Geometry can be scaled to fit within this area.<br />
3159 /// This does not interfere with the view's scale factor.<br />
3160 /// The views default depth is the minimum of width and height.<br />
3163 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
3164 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
3165 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
3166 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3167 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
3168 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
3170 /// <since_tizen> 3 </since_tizen>
3171 public Size2D Size2D
3175 Size2D temp = (Size2D)GetValue(Size2DProperty);
3176 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
3180 SetValue(Size2DProperty, value);
3181 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
3182 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
3183 NotifyPropertyChanged();
3187 private void OnSize2DChanged(int width, int height)
3189 Size2D = new Size2D(width, height);
3193 /// Retrieves the size of the view.<br />
3194 /// The coordinates are relative to the view's parent.<br />
3196 /// <since_tizen> 3 </since_tizen>
3197 public Size2D CurrentSize
3201 return GetCurrentSize();
3206 /// Retrieves and sets the view's opacity.<br />
3208 /// <since_tizen> 3 </since_tizen>
3209 public float Opacity
3213 return (float)GetValue(OpacityProperty);
3217 SetValue(OpacityProperty, value);
3218 NotifyPropertyChanged();
3223 /// Sets the position of the view for X and Y.<br />
3224 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
3225 /// If the position inheritance is disabled, sets the world position.<br />
3228 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
3229 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
3230 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
3231 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3232 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
3233 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
3235 /// <since_tizen> 3 </since_tizen>
3236 public Position2D Position2D
3240 Position2D temp = (Position2D)GetValue(Position2DProperty);
3241 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
3245 SetValue(Position2DProperty, value);
3246 NotifyPropertyChanged();
3250 private void OnPosition2DChanged(int x, int y)
3252 Position2D = new Position2D(x, y);
3256 /// Retrieves the screen postion of the view.<br />
3258 /// <since_tizen> 3 </since_tizen>
3259 public Vector2 ScreenPosition
3263 Vector2 temp = new Vector2(0.0f, 0.0f);
3264 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
3270 /// Determines whether the pivot point should be used to determine the position of the view.
3271 /// This is true by default.
3273 /// <remarks>If false, then the top-left of the view is used for the position.
3274 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
3276 /// <since_tizen> 3 </since_tizen>
3277 public bool PositionUsesPivotPoint
3281 return (bool)GetValue(PositionUsesPivotPointProperty);
3285 SetValue(PositionUsesPivotPointProperty, value);
3286 NotifyPropertyChanged();
3291 /// Please do not use! this will be deprecated.
3293 /// Please do not use! this will be deprecated!
3294 /// Instead please use PositionUsesPivotPoint.
3295 /// <since_tizen> 3 </since_tizen>
3296 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
3298 "View view = new View(); " +
3299 "view.PivotPoint = PivotPoint.Center; " +
3300 "view.PositionUsesPivotPoint = true;")]
3301 [EditorBrowsable(EditorBrowsableState.Never)]
3302 public bool PositionUsesAnchorPoint
3307 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
3312 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3313 NotifyPropertyChanged();
3317 internal bool FocusState
3321 return IsKeyboardFocusable();
3325 SetKeyboardFocusable(value);
3330 /// Queries whether the view is connected to the stage.<br />
3331 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
3333 /// <since_tizen> 3 </since_tizen>
3334 public bool IsOnWindow
3343 /// Gets the depth in the hierarchy for the view.
3345 /// <since_tizen> 3 </since_tizen>
3346 public int HierarchyDepth
3350 return GetHierarchyDepth();
3355 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
3358 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
3359 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
3360 /// The values set by this property will likely change.
3362 /// <since_tizen> 3 </since_tizen>
3363 public int SiblingOrder
3367 return (int)GetValue(SiblingOrderProperty);
3371 SetValue(SiblingOrderProperty, value);
3372 NotifyPropertyChanged();
3377 /// Returns the natural size of the view.
3380 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3382 /// /// Please do not use! this will be deprecated!
3383 /// Instead please use NaturalSize2D.
3384 /// <since_tizen> 3 </since_tizen>
3385 [Obsolete("Please do not use! This will be deprecated! Please use NaturalSize2D instead! " +
3387 "TextLabel label = new TextLabel(\"Hello World!\"); " +
3388 "Size2D size = label.NaturalSize2D;")]
3389 [EditorBrowsable(EditorBrowsableState.Never)]
3390 public Vector3 NaturalSize
3394 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3395 if (NDalicPINVOKE.SWIGPendingException.Pending)
3396 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3402 /// Returns the natural size (Size2D) of the view.
3405 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3407 /// <since_tizen> 4 </since_tizen>
3408 public Size2D NaturalSize2D
3412 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3413 if (NDalicPINVOKE.SWIGPendingException.Pending)
3414 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3416 return new Size2D((int)temp.Width, (int)temp.Height);
3421 /// Set the layout on this control.
3425 internal LayoutItem Layout
3429 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
3431 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3432 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3433 NDalicPINVOKE.delete_BaseHandle(CPtr);
3434 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3436 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3438 return basehandle as LayoutItem;
3442 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(value));
3443 value.LayoutChildren.Clear();
3445 foreach (View view in Children)
3447 value.LayoutChildren.Add(view.Layout);
3456 /// This is an asynchronous method.
3458 /// <since_tizen> 3 </since_tizen>
3468 /// This is an asynchronous method.
3469 /// If the view is hidden, then the view and its children will not be rendered.
3470 /// 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.
3472 /// <since_tizen> 3 </since_tizen>
3478 internal void Raise()
3480 var parentChildren = GetParent()?.Children;
3482 if (parentChildren != null)
3484 int currentIndex = parentChildren.IndexOf(this);
3486 // If the view is not already the last item in the list.
3487 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
3489 View temp = parentChildren[currentIndex + 1];
3490 parentChildren[currentIndex + 1] = this;
3491 parentChildren[currentIndex] = temp;
3493 NDalicPINVOKE.Raise(swigCPtr);
3494 if (NDalicPINVOKE.SWIGPendingException.Pending)
3495 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3501 internal void Lower()
3503 var parentChildren = GetParent()?.Children;
3505 if (parentChildren != null)
3507 int currentIndex = parentChildren.IndexOf(this);
3509 // If the view is not already the first item in the list.
3510 if (currentIndex > 0 && currentIndex < parentChildren.Count)
3512 View temp = parentChildren[currentIndex - 1];
3513 parentChildren[currentIndex - 1] = this;
3514 parentChildren[currentIndex] = temp;
3516 NDalicPINVOKE.Lower(swigCPtr);
3517 if (NDalicPINVOKE.SWIGPendingException.Pending)
3518 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3524 /// Raises the view above all other views.
3527 /// Sibling order of views within the parent will be updated automatically.
3528 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
3530 /// <since_tizen> 3 </since_tizen>
3531 public void RaiseToTop()
3533 var parentChildren = GetParent()?.Children;
3535 if (parentChildren != null)
3537 parentChildren.Remove(this);
3538 parentChildren.Add(this);
3540 NDalicPINVOKE.RaiseToTop(swigCPtr);
3541 if (NDalicPINVOKE.SWIGPendingException.Pending)
3542 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3548 /// Lowers the view to the bottom of all views.
3551 /// The sibling order of views within the parent will be updated automatically.
3552 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3554 /// <since_tizen> 3 </since_tizen>
3555 public void LowerToBottom()
3557 var parentChildren = GetParent()?.Children;
3559 if (parentChildren != null)
3561 parentChildren.Remove(this);
3562 parentChildren.Insert(0, this);
3564 NDalicPINVOKE.LowerToBottom(swigCPtr);
3565 if (NDalicPINVOKE.SWIGPendingException.Pending)
3566 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3571 /// Queries if all resources required by a view are loaded and ready.
3573 /// <remarks>Most resources are only loaded when the control is placed on the stage.
3575 /// <since_tizen> 3 </since_tizen>
3576 public bool IsResourceReady()
3578 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
3579 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3584 /// Raises the view to above the target view.
3586 /// <remarks>The sibling order of views within the parent will be updated automatically.
3587 /// Views on the level above the target view will still be shown above this view.
3588 /// Raising this view above views with the same sibling order as each other will raise this view above them.
3589 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3591 /// <param name="target">Will be raised above this view.</param>
3592 internal void RaiseAbove(View target)
3594 var parentChildren = GetParent()?.Children;
3596 if (parentChildren != null)
3598 int currentIndex = parentChildren.IndexOf(this);
3599 int targetIndex = parentChildren.IndexOf(target);
3601 if (currentIndex < 0 || targetIndex < 0 ||
3602 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3604 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3607 // If the currentIndex is less than the target index and the target has the same parent.
3608 if (currentIndex < targetIndex)
3610 parentChildren.Remove(this);
3611 parentChildren.Insert(targetIndex, this);
3613 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
3614 if (NDalicPINVOKE.SWIGPendingException.Pending)
3615 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3622 /// Lowers the view to below the target view.
3624 /// <remarks>The sibling order of views within the parent will be updated automatically.
3625 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
3626 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3628 /// <param name="target">Will be lowered below this view.</param>
3629 internal void LowerBelow(View target)
3631 var parentChildren = GetParent()?.Children;
3633 if (parentChildren != null)
3635 int currentIndex = parentChildren.IndexOf(this);
3636 int targetIndex = parentChildren.IndexOf(target);
3637 if (currentIndex < 0 || targetIndex < 0 ||
3638 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3640 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3644 // If the currentIndex is not already the 0th index and the target has the same parent.
3645 if ((currentIndex != 0) && (targetIndex != -1) &&
3646 (currentIndex > targetIndex))
3648 parentChildren.Remove(this);
3649 parentChildren.Insert(targetIndex, this);
3651 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
3652 if (NDalicPINVOKE.SWIGPendingException.Pending)
3653 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3659 internal string GetName()
3661 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
3662 if (NDalicPINVOKE.SWIGPendingException.Pending)
3663 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3667 internal void SetName(string name)
3669 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
3670 if (NDalicPINVOKE.SWIGPendingException.Pending)
3671 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3674 internal uint GetId()
3676 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
3677 if (NDalicPINVOKE.SWIGPendingException.Pending)
3678 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3682 internal bool IsRoot()
3684 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
3685 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3689 internal bool OnWindow()
3691 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
3692 if (NDalicPINVOKE.SWIGPendingException.Pending)
3693 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3698 /// Gets the parent layer of this view.If a view has no parent, this method does nothing.
3700 /// <pre>The view has been initialized. </pre>
3701 /// <returns>the parent layer of view </returns>
3702 /// <since_tizen> 5 </since_tizen>
3703 public Layer GetLayer()
3705 //to fix memory leak issue, match the handle count with native side.
3706 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
3707 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3708 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
3709 NDalicPINVOKE.delete_BaseHandle(CPtr);
3710 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3712 if (NDalicPINVOKE.SWIGPendingException.Pending)
3713 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3718 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
3720 /// <pre>The (child) view has been initialized. </pre>
3721 /// <since_tizen> 4 </since_tizen>
3722 public void Unparent()
3724 GetParent()?.Remove(this);
3728 /// Search through this view's hierarchy for a view with the given name.
3729 /// The view itself is also considered in the search.
3731 /// <pre>The view has been initialized.</pre>
3732 /// <param name="viewName">The name of the view to find.</param>
3733 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
3734 /// <since_tizen> 3 </since_tizen>
3735 public View FindChildByName(string viewName)
3737 //to fix memory leak issue, match the handle count with native side.
3738 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
3739 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3740 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3741 NDalicPINVOKE.delete_BaseHandle(CPtr);
3742 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3744 if (NDalicPINVOKE.SWIGPendingException.Pending)
3745 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3749 internal View FindChildById(uint id)
3751 //to fix memory leak issue, match the handle count with native side.
3752 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
3753 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3754 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3755 NDalicPINVOKE.delete_BaseHandle(CPtr);
3756 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3758 if (NDalicPINVOKE.SWIGPendingException.Pending)
3759 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3763 internal void SetParentOrigin(Vector3 origin)
3765 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
3766 if (NDalicPINVOKE.SWIGPendingException.Pending)
3767 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3770 internal Vector3 GetCurrentParentOrigin()
3772 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
3773 if (NDalicPINVOKE.SWIGPendingException.Pending)
3774 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3778 internal void SetAnchorPoint(Vector3 anchorPoint)
3780 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
3781 if (NDalicPINVOKE.SWIGPendingException.Pending)
3782 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3785 internal Vector3 GetCurrentAnchorPoint()
3787 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
3788 if (NDalicPINVOKE.SWIGPendingException.Pending)
3789 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3793 internal void SetSize(float width, float height)
3795 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
3796 if (NDalicPINVOKE.SWIGPendingException.Pending)
3797 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3800 internal void SetSize(float width, float height, float depth)
3802 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
3803 if (NDalicPINVOKE.SWIGPendingException.Pending)
3804 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3807 internal void SetSize(Vector2 size)
3809 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
3810 if (NDalicPINVOKE.SWIGPendingException.Pending)
3811 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3814 internal void SetSize(Vector3 size)
3816 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
3817 if (NDalicPINVOKE.SWIGPendingException.Pending)
3818 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3821 internal Vector3 GetTargetSize()
3823 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
3824 if (NDalicPINVOKE.SWIGPendingException.Pending)
3825 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3829 internal Size2D GetCurrentSize()
3831 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
3832 if (NDalicPINVOKE.SWIGPendingException.Pending)
3833 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3834 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
3838 internal Vector3 GetNaturalSize()
3840 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3841 if (NDalicPINVOKE.SWIGPendingException.Pending)
3842 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3846 internal void SetPosition(float x, float y)
3848 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
3849 if (NDalicPINVOKE.SWIGPendingException.Pending)
3850 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3853 internal void SetPosition(float x, float y, float z)
3855 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
3856 if (NDalicPINVOKE.SWIGPendingException.Pending)
3857 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3860 internal void SetPosition(Vector3 position)
3862 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
3863 if (NDalicPINVOKE.SWIGPendingException.Pending)
3864 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3867 internal void SetX(float x)
3869 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
3870 if (NDalicPINVOKE.SWIGPendingException.Pending)
3871 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3874 internal void SetY(float y)
3876 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
3877 if (NDalicPINVOKE.SWIGPendingException.Pending)
3878 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3881 internal void SetZ(float z)
3883 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
3884 if (NDalicPINVOKE.SWIGPendingException.Pending)
3885 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3888 internal void TranslateBy(Vector3 distance)
3890 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
3891 if (NDalicPINVOKE.SWIGPendingException.Pending)
3892 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3895 internal Position GetCurrentPosition()
3897 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
3898 if (NDalicPINVOKE.SWIGPendingException.Pending)
3899 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3903 internal Vector3 GetCurrentWorldPosition()
3905 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
3906 if (NDalicPINVOKE.SWIGPendingException.Pending)
3907 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3911 internal void SetInheritPosition(bool inherit)
3913 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
3914 if (NDalicPINVOKE.SWIGPendingException.Pending)
3915 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3918 internal bool IsPositionInherited()
3920 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
3921 if (NDalicPINVOKE.SWIGPendingException.Pending)
3922 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3926 internal void SetOrientation(Degree angle, Vector3 axis)
3928 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
3929 if (NDalicPINVOKE.SWIGPendingException.Pending)
3930 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3933 internal void SetOrientation(Radian angle, Vector3 axis)
3935 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
3936 if (NDalicPINVOKE.SWIGPendingException.Pending)
3937 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3940 internal void SetOrientation(Rotation orientation)
3942 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
3943 if (NDalicPINVOKE.SWIGPendingException.Pending)
3944 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3947 internal void RotateBy(Degree angle, Vector3 axis)
3949 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
3950 if (NDalicPINVOKE.SWIGPendingException.Pending)
3951 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3954 internal void RotateBy(Radian angle, Vector3 axis)
3956 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
3957 if (NDalicPINVOKE.SWIGPendingException.Pending)
3958 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3961 internal void RotateBy(Rotation relativeRotation)
3963 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
3964 if (NDalicPINVOKE.SWIGPendingException.Pending)
3965 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3968 internal Rotation GetCurrentOrientation()
3970 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
3971 if (NDalicPINVOKE.SWIGPendingException.Pending)
3972 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3976 internal void SetInheritOrientation(bool inherit)
3978 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
3979 if (NDalicPINVOKE.SWIGPendingException.Pending)
3980 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3983 internal bool IsOrientationInherited()
3985 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
3986 if (NDalicPINVOKE.SWIGPendingException.Pending)
3987 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3991 internal Rotation GetCurrentWorldOrientation()
3993 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
3994 if (NDalicPINVOKE.SWIGPendingException.Pending)
3995 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3999 internal void SetScale(float scale)
4001 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
4002 if (NDalicPINVOKE.SWIGPendingException.Pending)
4003 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4006 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4008 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4009 if (NDalicPINVOKE.SWIGPendingException.Pending)
4010 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4013 internal void SetScale(Vector3 scale)
4015 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4016 if (NDalicPINVOKE.SWIGPendingException.Pending)
4017 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4020 internal void ScaleBy(Vector3 relativeScale)
4022 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4023 if (NDalicPINVOKE.SWIGPendingException.Pending)
4024 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4027 internal Vector3 GetCurrentScale()
4029 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
4030 if (NDalicPINVOKE.SWIGPendingException.Pending)
4031 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4035 internal Vector3 GetCurrentWorldScale()
4037 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
4038 if (NDalicPINVOKE.SWIGPendingException.Pending)
4039 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4043 internal void SetInheritScale(bool inherit)
4045 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
4046 if (NDalicPINVOKE.SWIGPendingException.Pending)
4047 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4050 internal bool IsScaleInherited()
4052 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
4053 if (NDalicPINVOKE.SWIGPendingException.Pending)
4054 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4058 internal Matrix GetCurrentWorldMatrix()
4060 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4061 if (NDalicPINVOKE.SWIGPendingException.Pending)
4062 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4066 internal void SetVisible(bool visible)
4068 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
4069 if (NDalicPINVOKE.SWIGPendingException.Pending)
4070 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4073 internal bool IsVisible()
4075 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
4076 if (NDalicPINVOKE.SWIGPendingException.Pending)
4077 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4081 internal void SetOpacity(float opacity)
4083 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
4084 if (NDalicPINVOKE.SWIGPendingException.Pending)
4085 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4088 internal float GetCurrentOpacity()
4090 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
4091 if (NDalicPINVOKE.SWIGPendingException.Pending)
4092 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4096 internal void SetColor(Vector4 color)
4098 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4099 if (NDalicPINVOKE.SWIGPendingException.Pending)
4100 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4103 internal Vector4 GetCurrentColor()
4105 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
4106 if (NDalicPINVOKE.SWIGPendingException.Pending)
4107 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4111 internal void SetColorMode(ColorMode colorMode)
4113 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
4114 if (NDalicPINVOKE.SWIGPendingException.Pending)
4115 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4118 internal ColorMode GetColorMode()
4120 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
4121 if (NDalicPINVOKE.SWIGPendingException.Pending)
4122 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4126 internal Vector4 GetCurrentWorldColor()
4128 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
4129 if (NDalicPINVOKE.SWIGPendingException.Pending)
4130 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4134 internal void SetDrawMode(DrawModeType drawMode)
4136 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4137 if (NDalicPINVOKE.SWIGPendingException.Pending)
4138 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4141 internal DrawModeType GetDrawMode()
4143 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
4144 if (NDalicPINVOKE.SWIGPendingException.Pending)
4145 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4150 /// Converts screen coordinates into the view's coordinate system using the default camera.
4152 /// <pre>The view has been initialized.</pre>
4153 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4154 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4155 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4156 /// <param name="screenX">The screen X-coordinate.</param>
4157 /// <param name="screenY">The screen Y-coordinate.</param>
4158 /// <returns>True if the conversion succeeded.</returns>
4159 /// <since_tizen> 3 </since_tizen>
4160 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4162 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4163 if (NDalicPINVOKE.SWIGPendingException.Pending)
4164 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4168 internal void SetKeyboardFocusable(bool focusable)
4170 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4171 if (NDalicPINVOKE.SWIGPendingException.Pending)
4172 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4175 internal bool IsKeyboardFocusable()
4177 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
4178 if (NDalicPINVOKE.SWIGPendingException.Pending)
4179 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4183 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4185 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4186 if (NDalicPINVOKE.SWIGPendingException.Pending)
4187 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4190 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4192 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4193 if (NDalicPINVOKE.SWIGPendingException.Pending)
4194 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4199 /// Sets the relative to parent size factor of the view.<br />
4200 /// This factor is only used when ResizePolicy is set to either:
4201 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4202 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4204 /// <pre>The view has been initialized.</pre>
4205 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4206 /// <since_tizen> 3 </since_tizen>
4207 public void SetSizeModeFactor(Vector3 factor)
4209 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4210 if (NDalicPINVOKE.SWIGPendingException.Pending)
4211 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4214 internal Vector3 GetSizeModeFactor()
4216 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
4217 if (NDalicPINVOKE.SWIGPendingException.Pending)
4218 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4223 /// Calculates the height of the view given a width.<br />
4224 /// The natural size is used for default calculation.<br />
4225 /// Size 0 is treated as aspect ratio 1:1.<br />
4227 /// <param name="width">The width to use.</param>
4228 /// <returns>The height based on the width.</returns>
4229 /// <since_tizen> 3 </since_tizen>
4230 public float GetHeightForWidth(float width)
4232 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
4233 if (NDalicPINVOKE.SWIGPendingException.Pending)
4234 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4239 /// Calculates the width of the view given a height.<br />
4240 /// The natural size is used for default calculation.<br />
4241 /// Size 0 is treated as aspect ratio 1:1.<br />
4243 /// <param name="height">The height to use.</param>
4244 /// <returns>The width based on the height.</returns>
4245 /// <since_tizen> 3 </since_tizen>
4246 public float GetWidthForHeight(float height)
4248 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
4249 if (NDalicPINVOKE.SWIGPendingException.Pending)
4250 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4255 /// Return the amount of size allocated for relayout.
4257 /// <param name="dimension">The dimension to retrieve.</param>
4258 /// <returns>Return the size.</returns>
4259 /// <since_tizen> 3 </since_tizen>
4260 public float GetRelayoutSize(DimensionType dimension)
4262 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4263 if (NDalicPINVOKE.SWIGPendingException.Pending)
4264 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4269 /// Set the padding for the view.
4271 /// <param name="padding">Padding for the view.</param>
4272 /// <since_tizen> 3 </since_tizen>
4273 public void SetPadding(PaddingType padding)
4275 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4276 if (NDalicPINVOKE.SWIGPendingException.Pending)
4277 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4281 /// Return the value of padding for the view.
4283 /// <param name="paddingOut">the value of padding for the view</param>
4284 /// <since_tizen> 3 </since_tizen>
4285 public void GetPadding(PaddingType paddingOut)
4287 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4288 if (NDalicPINVOKE.SWIGPendingException.Pending)
4289 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4292 internal void SetMinimumSize(Vector2 size)
4294 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4295 if (NDalicPINVOKE.SWIGPendingException.Pending)
4296 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4299 internal Vector2 GetMinimumSize()
4301 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
4302 if (NDalicPINVOKE.SWIGPendingException.Pending)
4303 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4307 internal void SetMaximumSize(Vector2 size)
4309 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4310 if (NDalicPINVOKE.SWIGPendingException.Pending)
4311 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4314 internal Vector2 GetMaximumSize()
4316 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
4317 if (NDalicPINVOKE.SWIGPendingException.Pending)
4318 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4322 internal int GetHierarchyDepth()
4324 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
4325 if (NDalicPINVOKE.SWIGPendingException.Pending)
4326 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4330 /// <since_tizen> 3 </since_tizen>
4331 public uint AddRenderer(Renderer renderer)
4333 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4334 if (NDalicPINVOKE.SWIGPendingException.Pending)
4335 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4339 internal uint GetRendererCount()
4341 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
4342 if (NDalicPINVOKE.SWIGPendingException.Pending)
4343 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4347 /// <since_tizen> 3 </since_tizen>
4348 public Renderer GetRendererAt(uint index)
4350 //to fix memory leak issue, match the handle count with native side.
4351 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
4352 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4353 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4354 NDalicPINVOKE.delete_BaseHandle(CPtr);
4355 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4357 if (NDalicPINVOKE.SWIGPendingException.Pending)
4358 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4362 /// <since_tizen> 3 </since_tizen>
4363 public void RemoveRenderer(Renderer renderer)
4365 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4366 if (NDalicPINVOKE.SWIGPendingException.Pending)
4367 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4370 /// <since_tizen> 3 </since_tizen>
4371 public void RemoveRenderer(uint index)
4373 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4374 if (NDalicPINVOKE.SWIGPendingException.Pending)
4375 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4378 internal TouchDataSignal TouchSignal()
4380 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
4381 if (NDalicPINVOKE.SWIGPendingException.Pending)
4382 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4386 internal HoverSignal HoveredSignal()
4388 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
4389 if (NDalicPINVOKE.SWIGPendingException.Pending)
4390 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4394 internal WheelSignal WheelEventSignal()
4396 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
4397 if (NDalicPINVOKE.SWIGPendingException.Pending)
4398 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4402 internal ViewSignal OnWindowSignal()
4404 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
4405 if (NDalicPINVOKE.SWIGPendingException.Pending)
4406 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4410 internal ViewSignal OffWindowSignal()
4412 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
4413 if (NDalicPINVOKE.SWIGPendingException.Pending)
4414 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4418 internal ViewSignal OnRelayoutSignal()
4420 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
4421 if (NDalicPINVOKE.SWIGPendingException.Pending)
4422 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4426 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
4428 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
4429 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4434 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
4436 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
4437 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4442 internal ViewSignal ResourcesLoadedSignal()
4444 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
4445 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4450 /// Gets or sets the origin of a view within its parent's area.<br />
4451 /// 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 />
4452 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
4453 /// A view's position is the distance between this origin and the view's anchor-point.<br />
4455 /// <pre>The view has been initialized.</pre>
4456 /// <since_tizen> 3 </since_tizen>
4457 public Position ParentOrigin
4461 return (Position)GetValue(ParentOriginProperty);
4465 SetValue(ParentOriginProperty, value);
4466 NotifyPropertyChanged();
4470 internal float ParentOriginX
4475 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
4480 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
4481 NotifyPropertyChanged();
4485 internal float ParentOriginY
4490 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
4495 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
4496 NotifyPropertyChanged();
4500 internal float ParentOriginZ
4505 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
4510 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
4511 NotifyPropertyChanged();
4516 /// Gets or sets the anchor-point of a view.<br />
4517 /// 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 />
4518 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
4519 /// A view position is the distance between its parent-origin and this anchor-point.<br />
4520 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
4521 /// <pre>The view has been initialized.</pre>
4523 /// <since_tizen> 3 </since_tizen>
4524 public Position PivotPoint
4528 return (Position)GetValue(PivotPointProperty);
4532 SetValue(PivotPointProperty, value);
4533 NotifyPropertyChanged();
4537 internal float PivotPointX
4542 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
4547 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
4551 internal float PivotPointY
4556 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
4561 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
4565 internal float PivotPointZ
4570 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
4575 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
4580 /// Gets or sets the size width of the view.
4582 /// <since_tizen> 3 </since_tizen>
4583 public float SizeWidth
4587 return (float)GetValue(SizeWidthProperty);
4591 SetValue(SizeWidthProperty, value);
4592 NotifyPropertyChanged();
4597 /// Gets or sets the size height of the view.
4599 /// <since_tizen> 3 </since_tizen>
4600 public float SizeHeight
4604 return (float)GetValue(SizeHeightProperty);
4608 SetValue(SizeHeightProperty, value);
4609 NotifyPropertyChanged();
4614 /// Gets or sets the position of the view.<br />
4615 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
4616 /// If the position inheritance is disabled, sets the world position.<br />
4618 /// <since_tizen> 3 </since_tizen>
4619 public Position Position
4623 return (Position)GetValue(PositionProperty);
4627 SetValue(PositionProperty, value);
4628 NotifyPropertyChanged();
4633 /// Gets or sets the position X of the view.
4635 /// <since_tizen> 3 </since_tizen>
4636 public float PositionX
4640 return (float)GetValue(PositionXProperty);
4644 SetValue(PositionXProperty, value);
4645 NotifyPropertyChanged();
4650 /// Gets or sets the position Y of the view.
4652 /// <since_tizen> 3 </since_tizen>
4653 public float PositionY
4657 return (float)GetValue(PositionYProperty);
4661 SetValue(PositionYProperty, value);
4662 NotifyPropertyChanged();
4667 /// Gets or sets the position Z of the view.
4669 /// <since_tizen> 3 </since_tizen>
4670 public float PositionZ
4674 return (float)GetValue(PositionZProperty);
4678 SetValue(PositionZProperty, value);
4679 NotifyPropertyChanged();
4684 /// Gets or sets the world position of the view.
4686 /// <since_tizen> 3 </since_tizen>
4687 public Vector3 WorldPosition
4691 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4692 GetProperty(View.Property.WORLD_POSITION).Get(temp);
4697 internal float WorldPositionX
4702 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
4707 internal float WorldPositionY
4712 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
4717 internal float WorldPositionZ
4722 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
4728 /// Gets or sets the orientation of the view.<br />
4729 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
4731 /// <remarks>This is an asynchronous method.</remarks>
4732 /// <since_tizen> 3 </since_tizen>
4733 public Rotation Orientation
4737 return (Rotation)GetValue(OrientationProperty);
4741 SetValue(OrientationProperty, value);
4742 NotifyPropertyChanged();
4747 /// Gets or sets the world orientation of the view.<br />
4749 /// <since_tizen> 3 </since_tizen>
4750 public Rotation WorldOrientation
4754 Rotation temp = new Rotation();
4755 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
4761 /// Gets or sets the scale factor applied to the view.<br />
4763 /// <since_tizen> 3 </since_tizen>
4764 public Vector3 Scale
4768 return (Vector3)GetValue(ScaleProperty);
4772 SetValue(ScaleProperty, value);
4773 NotifyPropertyChanged();
4778 /// Gets or sets the scale X factor applied to the view.
4780 /// <since_tizen> 3 </since_tizen>
4785 return (float)GetValue(ScaleXProperty);
4789 SetValue(ScaleXProperty, value);
4790 NotifyPropertyChanged();
4795 /// Gets or sets the scale Y factor applied to the view.
4797 /// <since_tizen> 3 </since_tizen>
4802 return (float)GetValue(ScaleYProperty);
4806 SetValue(ScaleYProperty, value);
4807 NotifyPropertyChanged();
4812 /// Gets or sets the scale Z factor applied to the view.
4814 /// <since_tizen> 3 </since_tizen>
4819 return (float)GetValue(ScaleZProperty);
4823 SetValue(ScaleZProperty, value);
4824 NotifyPropertyChanged();
4829 /// Gets the world scale of the view.
4831 /// <since_tizen> 3 </since_tizen>
4832 public Vector3 WorldScale
4836 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4837 GetProperty(View.Property.WORLD_SCALE).Get(temp);
4843 /// Retrieves the visibility flag of the view.
4846 /// If the view is not visible, then the view and its children will not be rendered.
4847 /// 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.
4849 /// <since_tizen> 3 </since_tizen>
4850 public bool Visibility
4855 GetProperty(View.Property.VISIBLE).Get(out temp);
4861 /// Gets the view's world color.
4863 /// <since_tizen> 3 </since_tizen>
4864 public Vector4 WorldColor
4868 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
4869 GetProperty(View.Property.WORLD_COLOR).Get(temp);
4874 internal Matrix WorldMatrix
4878 Matrix temp = new Matrix();
4879 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
4885 /// Gets or sets the view's name.
4887 /// <since_tizen> 3 </since_tizen>
4892 return (string)GetValue(NameProperty);
4896 SetValue(NameProperty, value);
4897 NotifyPropertyChanged();
4902 /// Get the number of children held by the view.
4904 /// <since_tizen> 3 </since_tizen>
4905 public new uint ChildCount
4909 return GetChildCount();
4914 /// Gets the view's ID.
4917 /// <since_tizen> 3 </since_tizen>
4927 /// Gets or sets the status of whether the view should emit touch or hover signals.
4929 /// <since_tizen> 3 </since_tizen>
4930 public bool Sensitive
4934 return (bool)GetValue(SensitiveProperty);
4938 SetValue(SensitiveProperty, value);
4939 NotifyPropertyChanged();
4944 /// 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.
4946 /// <since_tizen> 3 </since_tizen>
4947 public bool LeaveRequired
4951 return (bool)GetValue(LeaveRequiredProperty);
4955 SetValue(LeaveRequiredProperty, value);
4956 NotifyPropertyChanged();
4961 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
4963 /// <since_tizen> 3 </since_tizen>
4964 public bool InheritOrientation
4968 return (bool)GetValue(InheritOrientationProperty);
4972 SetValue(InheritOrientationProperty, value);
4973 NotifyPropertyChanged();
4978 /// Gets or sets the status of whether a child view inherits it's parent's scale.
4980 /// <since_tizen> 3 </since_tizen>
4981 public bool InheritScale
4985 return (bool)GetValue(InheritScaleProperty);
4989 SetValue(InheritScaleProperty, value);
4990 NotifyPropertyChanged();
4995 /// Gets or sets the status of how the view and its children should be drawn.<br />
4996 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
4997 /// 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 />
4998 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
4999 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
5000 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
5002 /// <since_tizen> 3 </since_tizen>
5003 public DrawModeType DrawMode
5007 return (DrawModeType)GetValue(DrawModeProperty);
5011 SetValue(DrawModeProperty, value);
5012 NotifyPropertyChanged();
5017 /// Gets or sets the relative to parent size factor of the view.<br />
5018 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
5019 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
5021 /// <since_tizen> 3 </since_tizen>
5022 public Vector3 SizeModeFactor
5026 return (Vector3)GetValue(SizeModeFactorProperty);
5030 SetValue(SizeModeFactorProperty, value);
5031 NotifyPropertyChanged();
5036 /// Gets or sets the width resize policy to be used.
5038 /// <since_tizen> 3 </since_tizen>
5039 public ResizePolicyType WidthResizePolicy
5043 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
5047 SetValue(WidthResizePolicyProperty, value);
5048 NotifyPropertyChanged();
5053 /// Gets or sets the height resize policy to be used.
5055 /// <since_tizen> 3 </since_tizen>
5056 public ResizePolicyType HeightResizePolicy
5060 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
5064 SetValue(HeightResizePolicyProperty, value);
5065 NotifyPropertyChanged();
5070 /// Gets or sets the policy to use when setting size with size negotiation.<br />
5071 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
5073 /// <since_tizen> 3 </since_tizen>
5074 public SizeScalePolicyType SizeScalePolicy
5078 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
5082 SetValue(SizeScalePolicyProperty, value);
5083 NotifyPropertyChanged();
5088 /// Gets or sets the status of whether the width size is dependent on the height size.
5090 /// <since_tizen> 3 </since_tizen>
5091 public bool WidthForHeight
5095 return (bool)GetValue(WidthForHeightProperty);
5099 SetValue(WidthForHeightProperty, value);
5100 NotifyPropertyChanged();
5105 /// Gets or sets the status of whether the height size is dependent on the width size.
5107 /// <since_tizen> 3 </since_tizen>
5108 public bool HeightForWidth
5112 return (bool)GetValue(HeightForWidthProperty);
5116 SetValue(HeightForWidthProperty, value);
5117 NotifyPropertyChanged();
5122 /// Gets or sets the padding for use in layout.
5124 /// <since_tizen> 5 </since_tizen>
5125 public Extents Padding
5129 return (Extents)GetValue(PaddingProperty);
5133 SetValue(PaddingProperty, value);
5134 NotifyPropertyChanged();
5139 /// Gets or sets the minimum size the view can be assigned in size negotiation.
5141 /// <since_tizen> 3 </since_tizen>
5142 public Size2D MinimumSize
5146 return (Size2D)GetValue(MinimumSizeProperty);
5152 // Note: it only works if minimum size is >= than natural size.
5153 // To force the size it should be done through the width&height spec or Size2D.
5154 Layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
5155 Layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
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 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
5175 // MATCH_PARENT spec + parent container size can be used to limit
5176 SetValue(MaximumSizeProperty, value);
5177 NotifyPropertyChanged();
5182 /// Gets or sets whether a child view inherits it's parent's position.<br />
5183 /// Default is to inherit.<br />
5184 /// 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 />
5186 /// <since_tizen> 3 </since_tizen>
5187 public bool InheritPosition
5191 return (bool)GetValue(InheritPositionProperty);
5195 SetValue(InheritPositionProperty, value);
5196 NotifyPropertyChanged();
5201 /// Gets or sets the clipping behavior (mode) of it's children.
5203 /// <since_tizen> 3 </since_tizen>
5204 public ClippingModeType ClippingMode
5208 return (ClippingModeType)GetValue(ClippingModeProperty);
5212 SetValue(ClippingModeProperty, value);
5213 NotifyPropertyChanged();
5218 /// Gets the number of renderers held by the view.
5220 /// <since_tizen> 3 </since_tizen>
5221 public uint RendererCount
5225 return GetRendererCount();
5230 /// [Obsolete("Please do not use! this will be deprecated")]
5232 /// <since_tizen> 3 </since_tizen>
5233 /// Please do not use! this will be deprecated!
5234 /// Instead please use PivotPoint.
5235 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
5237 "View view = new View(); " +
5238 "view.PivotPoint = PivotPoint.Center; " +
5239 "view.PositionUsesPivotPoint = true;")]
5240 [EditorBrowsable(EditorBrowsableState.Never)]
5241 public Position AnchorPoint
5245 Position temp = new Position(0.0f, 0.0f, 0.0f);
5246 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
5251 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
5252 NotifyPropertyChanged();
5257 /// [Obsolete("Please do not use! this will be deprecated")]
5259 /// <since_tizen> 3 </since_tizen>
5260 [Obsolete("Please do not use! This will be deprecated! Please use Size2D instead! " +
5262 "View view = new View(); " +
5263 "view.Size2D = new Size2D(100, 100);")]
5264 [EditorBrowsable(EditorBrowsableState.Never)]
5269 return (Size)GetValue(SizeProperty);
5273 SetValue(SizeProperty, value);
5274 NotifyPropertyChanged();
5279 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
5281 /// <since_tizen> 3 </since_tizen>
5282 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
5284 "Container parent = view.GetParent(); " +
5285 "View view = parent as View;")]
5286 [EditorBrowsable(EditorBrowsableState.Never)]
5287 public new View Parent
5292 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
5293 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
5294 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
5296 if (basehandle is Layer layer)
5298 ret = new View(Layer.getCPtr(layer).Handle, false);
5299 NUILog.Error("This Parent property is deprecated, shoud do not be used");
5303 ret = basehandle as View;
5306 NDalicPINVOKE.delete_BaseHandle(CPtr);
5307 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5309 if (NDalicPINVOKE.SWIGPendingException.Pending)
5310 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5316 /// Gets/Sets whether inherit parent's the layout Direction.
5318 /// <since_tizen> 4 </since_tizen>
5319 public bool InheritLayoutDirection
5323 return (bool)GetValue(InheritLayoutDirectionProperty);
5327 SetValue(InheritLayoutDirectionProperty, value);
5328 NotifyPropertyChanged();
5333 /// Gets/Sets the layout Direction.
5335 /// <since_tizen> 4 </since_tizen>
5336 public ViewLayoutDirectionType LayoutDirection
5340 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
5344 SetValue(LayoutDirectionProperty, value);
5345 NotifyPropertyChanged();
5350 /// Gets or sets the Margin for use in layout.
5352 /// <since_tizen> 4 </since_tizen>
5353 public Extents Margin
5357 return (Extents)GetValue(MarginProperty);
5361 SetValue(MarginProperty, value);
5362 NotifyPropertyChanged();
5366 internal Style Style
5370 return (Style)GetValue(StyleProperty);
5374 SetValue(StyleProperty, value);
5379 /// [Obsolete("Please do not use! this will be deprecated")]
5381 /// Please do not use! this will be deprecated!
5382 /// Instead please use Padding.
5383 /// <since_tizen> 4 </since_tizen>
5384 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
5385 [EditorBrowsable(EditorBrowsableState.Never)]
5386 public Extents PaddingEX
5390 Extents temp = new Extents(0, 0, 0, 0);
5391 GetProperty(View.Property.PADDING).Get(temp);
5396 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
5397 NotifyPropertyChanged();
5402 /// Perform an action on a visual registered to this view. <br />
5403 /// Visuals will have actions, this API is used to perform one of these actions with the given attributes.
5405 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
5406 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find supported actions.</param>
5407 /// <param name="attributes">Optional attributes for the action.</param>
5408 /// <since_tizen> 5 </since_tizen>
5409 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
5411 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
5412 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5415 internal readonly MergedStyle _mergedStyle;
5418 /// Child property to specify desired width
5420 internal int LayoutWidthSpecificationFixed
5425 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5427 NUILog.Error("WidthSpecificationFixed get error!");
5433 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5438 /// Child property to specify desired height
5440 internal int LayoutHeightSpecificationFixed
5445 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5447 NUILog.Error("HeightSpecificationFixed get error!");
5453 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5458 /// Child property to specify desired width, use MatchParent/WrapContent)
5460 internal ChildLayoutData LayoutWidthSpecification
5465 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5467 NUILog.Error("WidthSpecificationFixed get error!");
5469 return (ChildLayoutData)tmp;
5473 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5478 /// Child property to specify desired height, use MatchParent/WrapContent)
5480 internal ChildLayoutData LayoutHeightSpecification
5485 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5487 NUILog.Error("HeightSpecificationFixed get error!");
5489 return (ChildLayoutData)tmp;
5493 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5500 /// The View layout Direction type.
5502 /// <since_tizen> 4 </since_tizen>
5503 public enum ViewLayoutDirectionType
5508 /// <since_tizen> 4 </since_tizen>
5513 /// <since_tizen> 4 </since_tizen>
5517 internal enum ChildLayoutData
5520 /// Constant which indicates child size should match parent size
5524 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size