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 WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
399 var view = (View)bindable;
400 if (newValue != null)
402 Tizen.NUI.Object.SetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
405 defaultValueCreator:(bindable) =>
407 var view = (View)bindable;
409 Tizen.NUI.Object.GetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT).Get(out temp);
412 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
413 [EditorBrowsable(EditorBrowsableState.Never)]
414 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create("LeftFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
416 var view = (View)bindable;
417 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View).GetId(); }
418 else { view.LeftFocusableViewId = -1; }
420 defaultValueCreator:(bindable) =>
422 var view = (View)bindable;
423 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
426 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
427 [EditorBrowsable(EditorBrowsableState.Never)]
428 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create("RightFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
430 var view = (View)bindable;
431 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View).GetId(); }
432 else { view.RightFocusableViewId = -1; }
434 defaultValueCreator:(bindable) =>
436 var view = (View)bindable;
437 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
440 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
441 [EditorBrowsable(EditorBrowsableState.Never)]
442 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create("UpFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
444 var view = (View)bindable;
445 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View).GetId(); }
446 else { view.UpFocusableViewId = -1; }
448 defaultValueCreator:(bindable) =>
450 var view = (View)bindable;
451 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
454 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
455 [EditorBrowsable(EditorBrowsableState.Never)]
456 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create("DownFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
458 var view = (View)bindable;
459 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View).GetId(); }
460 else { view.DownFocusableViewId = -1; }
462 defaultValueCreator:(bindable) =>
464 var view = (View)bindable;
465 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
468 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
469 [EditorBrowsable(EditorBrowsableState.Never)]
470 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
472 var view = (View)bindable;
473 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
475 defaultValueCreator:(bindable) =>
477 var view = (View)bindable;
478 return view.IsKeyboardFocusable();
480 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
481 [EditorBrowsable(EditorBrowsableState.Never)]
482 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
484 var view = (View)bindable;
485 if (newValue != null)
487 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue( new Size((Size2D)newValue)));
490 defaultValueCreator:(bindable) =>
492 var view = (View)bindable;
493 Size temp = new Size(0.0f, 0.0f, 0.0f);
494 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
495 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
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 OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
502 var view = (View)bindable;
503 if (newValue != null)
505 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
508 defaultValueCreator:(bindable) =>
510 var view = (View)bindable;
512 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out 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 Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), new Position2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
519 var view = (View)bindable;
520 if (newValue != null)
522 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue( new Position((Position2D)newValue) ));
525 defaultValueCreator:(bindable) =>
527 var view = (View)bindable;
528 Position temp = new Position(0.0f, 0.0f, 0.0f);
529 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
530 return new Position2D(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 PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
536 var view = (View)bindable;
537 if (newValue != null)
539 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
542 defaultValueCreator:(bindable) =>
544 var view = (View)bindable;
546 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
549 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
550 [EditorBrowsable(EditorBrowsableState.Never)]
551 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
553 var view = (View)bindable;
555 if (newValue != null)
557 value = (int)newValue;
560 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
563 var siblings = view.GetParent()?.Children;
564 if (siblings != null)
566 int currentOrder = siblings.IndexOf(view);
567 if (value != currentOrder)
569 if (value == 0) { view.LowerToBottom(); }
570 else if (value < siblings.Count - 1)
572 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
573 else { view.LowerBelow(siblings[value]); }
575 else { view.RaiseToTop(); }
580 defaultValueCreator:(bindable) =>
582 var view = (View)bindable;
583 var parentChildren = view.GetParent()?.Children;
584 int currentOrder = 0;
585 if (parentChildren != null)
587 currentOrder = parentChildren.IndexOf(view);
589 if (currentOrder < 0) { return 0; }
590 else if (currentOrder < parentChildren.Count) { return currentOrder; }
595 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
596 [EditorBrowsable(EditorBrowsableState.Never)]
597 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), Position.ParentOriginTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
599 var view = (View)bindable;
600 if (newValue != null)
602 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
605 defaultValueCreator:(bindable) =>
607 var view = (View)bindable;
608 Position temp = new Position(0.0f, 0.0f, 0.0f);
609 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).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 PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), Position.PivotPointTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
617 var view = (View)bindable;
618 if (newValue != null)
620 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
623 defaultValueCreator:(bindable) =>
625 var view = (View)bindable;
626 Position temp = new Position(0.0f, 0.0f, 0.0f);
627 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(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 SizeWidthProperty = BindableProperty.Create("SizeWidth", 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_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
640 defaultValueCreator:(bindable) =>
642 var view = (View)bindable;
644 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).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 SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
651 var view = (View)bindable;
652 if (newValue != null)
654 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
657 defaultValueCreator:(bindable) =>
659 var view = (View)bindable;
661 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out 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 PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), Position.Zero, propertyChanged: (bindable, oldValue, newValue) =>
668 var view = (View)bindable;
669 if (newValue != null)
671 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
674 defaultValueCreator:(bindable) =>
676 var view = (View)bindable;
677 Position temp = new Position(0.0f, 0.0f, 0.0f);
678 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(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 PositionXProperty = BindableProperty.Create("PositionX", 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_X, new Tizen.NUI.PropertyValue((float)newValue));
691 defaultValueCreator:(bindable) =>
693 var view = (View)bindable;
695 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).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 PositionYProperty = BindableProperty.Create("PositionY", 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_Y, new Tizen.NUI.PropertyValue((float)newValue));
708 defaultValueCreator:(bindable) =>
710 var view = (View)bindable;
712 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).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 PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
719 var view = (View)bindable;
720 if (newValue != null)
722 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
725 defaultValueCreator:(bindable) =>
727 var view = (View)bindable;
729 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out 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 OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), new Rotation(new Radian(0), Vector3.ZAxis), propertyChanged: (bindable, oldValue, newValue) =>
736 var view = (View)bindable;
737 if (newValue != null)
739 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
742 defaultValueCreator:(bindable) =>
744 var view = (View)bindable;
745 Rotation temp = new Rotation();
746 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).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 ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
753 var view = (View)bindable;
754 if (newValue != null)
756 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
759 defaultValueCreator:(bindable) =>
761 var view = (View)bindable;
762 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
763 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(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 ScaleXProperty = BindableProperty.Create("ScaleX", 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_X, new Tizen.NUI.PropertyValue((float)newValue));
776 defaultValueCreator:(bindable) =>
778 var view = (View)bindable;
780 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).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 ScaleYProperty = BindableProperty.Create("ScaleY", 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_Y, new Tizen.NUI.PropertyValue((float)newValue));
793 defaultValueCreator:(bindable) =>
795 var view = (View)bindable;
797 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).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 ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
804 var view = (View)bindable;
805 if (newValue != null)
807 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
810 defaultValueCreator:(bindable) =>
812 var view = (View)bindable;
814 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).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 NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
821 var view = (View)bindable;
822 if (newValue != null)
824 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
827 defaultValueCreator:(bindable) =>
829 var view = (View)bindable;
831 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).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 SensitiveProperty = BindableProperty.Create("Sensitive", 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.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
844 defaultValueCreator:(bindable) =>
846 var view = (View)bindable;
848 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).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 LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", 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.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
861 defaultValueCreator:(bindable) =>
863 var view = (View)bindable;
865 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).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 InheritOrientationProperty = BindableProperty.Create("InheritOrientation", 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_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
878 defaultValueCreator:(bindable) =>
880 var view = (View)bindable;
882 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).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 InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
889 var view = (View)bindable;
890 if (newValue != null)
892 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
895 defaultValueCreator:(bindable) =>
897 var view = (View)bindable;
899 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
902 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
903 [EditorBrowsable(EditorBrowsableState.Never)]
904 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
906 var view = (View)bindable;
907 if (newValue != null)
909 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
912 defaultValueCreator:(bindable) =>
914 var view = (View)bindable;
916 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
918 NUILog.Error("DrawMode get error!");
922 case "NORMAL": return DrawModeType.Normal;
923 case "OVERLAY_2D": return DrawModeType.Overlay2D;
924 case "STENCIL": return DrawModeType.Stencil;
925 default: return DrawModeType.Normal;
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 SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
932 var view = (View)bindable;
933 if (newValue != null)
935 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
938 defaultValueCreator:(bindable) =>
940 var view = (View)bindable;
941 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
942 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
945 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
946 [EditorBrowsable(EditorBrowsableState.Never)]
947 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
949 var view = (View)bindable;
950 if (newValue != null)
952 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
955 defaultValueCreator:(bindable) =>
957 var view = (View)bindable;
959 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
961 NUILog.Error("WidthResizePolicy get error!");
965 case "FIXED": return ResizePolicyType.Fixed;
966 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
967 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
968 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
969 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
970 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
971 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
972 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
973 default: return ResizePolicyType.Fixed;
976 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
977 [EditorBrowsable(EditorBrowsableState.Never)]
978 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
980 var view = (View)bindable;
981 if (newValue != null)
983 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
986 defaultValueCreator:(bindable) =>
988 var view = (View)bindable;
990 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
992 NUILog.Error("HeightResizePolicy get error!");
996 case "FIXED": return ResizePolicyType.Fixed;
997 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
998 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
999 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1000 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1001 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1002 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1003 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1004 default: return ResizePolicyType.Fixed;
1007 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1008 [EditorBrowsable(EditorBrowsableState.Never)]
1009 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1011 var view = (View)bindable;
1012 string valueToString = "";
1013 if (newValue != null)
1015 switch ((SizeScalePolicyType)newValue)
1017 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1018 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1019 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1020 default: { valueToString = "USE_SIZE_SET"; break; }
1022 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1025 defaultValueCreator:(bindable) =>
1027 var view = (View)bindable;
1029 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1031 NUILog.Error("SizeScalePolicy get error!");
1035 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1036 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1037 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1038 default: return SizeScalePolicyType.UseSizeSet;
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 WidthForHeightProperty = BindableProperty.Create("WidthForHeight", 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.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1051 defaultValueCreator:(bindable) =>
1053 var view = (View)bindable;
1055 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).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 HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1062 var view = (View)bindable;
1063 if (newValue != null)
1065 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1068 defaultValueCreator:(bindable) =>
1070 var view = (View)bindable;
1072 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out 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 PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), new Extents(0,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.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1085 defaultValueCreator:(bindable) =>
1087 var view = (View)bindable;
1088 Extents temp = new Extents(0, 0, 0, 0);
1089 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1092 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1093 [EditorBrowsable(EditorBrowsableState.Never)]
1094 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), new Size(0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1096 var view = (View)bindable;
1097 if (newValue != null)
1099 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1102 defaultValueCreator: (bindable) => {
1103 var view = (View)bindable;
1104 Size temp = new Size(0, 0, 0);
1105 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.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 MinimumSizeProperty = BindableProperty.Create("MinimumSize", 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.MINIMUM_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.MINIMUM_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 MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
1129 var view = (View)bindable;
1130 if (newValue != null)
1132 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1135 defaultValueCreator:(bindable) =>
1137 var view = (View)bindable;
1138 Size2D temp = new Size2D(0, 0);
1139 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(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 InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1146 var view = (View)bindable;
1147 if (newValue != null)
1149 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1152 defaultValueCreator:(bindable) =>
1154 var view = (View)bindable;
1156 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1159 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1160 [EditorBrowsable(EditorBrowsableState.Never)]
1161 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1163 var view = (View)bindable;
1164 if (newValue != null)
1166 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1169 defaultValueCreator:(bindable) =>
1171 var view = (View)bindable;
1173 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1175 NUILog.Error("ClippingMode get error!");
1177 return (ClippingModeType)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 InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1183 var view = (View)bindable;
1184 if (newValue != null)
1186 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1189 defaultValueCreator:(bindable) =>
1191 var view = (View)bindable;
1193 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1196 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1197 [EditorBrowsable(EditorBrowsableState.Never)]
1198 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1200 var view = (View)bindable;
1201 if (newValue != null)
1203 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1206 defaultValueCreator:(bindable) =>
1208 var view = (View)bindable;
1210 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1212 NUILog.Error("LAYOUT_DIRECTION get error!");
1214 return (ViewLayoutDirectionType)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 MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), new Extents(0,0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1220 var view = (View)bindable;
1221 if (newValue != null)
1223 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1226 defaultValueCreator:(bindable) =>
1228 var view = (View)bindable;
1229 Extents temp = new Extents(0, 0, 0, 0);
1230 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1233 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1234 [EditorBrowsable(EditorBrowsableState.Never)]
1235 public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style),
1236 propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1239 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1241 private bool layoutSet = false; // Flag to indicate if SetLayout was called or View was automatically given a Layout
1243 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
1245 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1248 PositionUsesPivotPoint = false;
1250 _mergedStyle = new MergedStyle(GetType(), this);
1253 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
1255 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1259 /// Event argument passed through the ChildAdded event.
1261 /// <since_tizen> 5 </since_tizen>
1262 public class ChildAddedEventArgs : EventArgs
1265 /// Added child view at moment.
1267 /// <since_tizen> 5 </since_tizen>
1268 public View Added { get; set; }
1272 /// Event when a child is added.
1274 /// <since_tizen> 5 </since_tizen>
1275 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1277 // From Container Base class
1279 /// Adds a child view to this view.
1281 /// <seealso cref="Container.Add" />
1282 /// <since_tizen> 4 </since_tizen>
1283 public override void Add(View child)
1287 Tizen.Log.Fatal("NUI", "Child is null");
1291 Container oldParent = child.GetParent();
1292 if (oldParent != this)
1294 if (oldParent != null)
1296 oldParent.Remove(child);
1298 child.InternalParent = this;
1300 if (layoutSet == true && child.Layout == null) // Only give children a layout if parent an explicit container
1302 if( child.GetType() == typeof(View) || true == child.LayoutingRequired )
1304 child.Layout = new LayoutGroup();
1309 child.Layout = new LayoutItem();
1315 Layout.LayoutChildren.Add(child.Layout);
1318 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
1319 if (NDalicPINVOKE.SWIGPendingException.Pending)
1320 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1321 Children.Add(child);
1323 if (ChildAdded != null)
1325 ChildAddedEventArgs e = new ChildAddedEventArgs
1329 ChildAdded(this, e);
1335 /// Event argument passed through the ChildRemoved event.
1337 /// <since_tizen> 5 </since_tizen>
1338 public class ChildRemovedEventArgs : EventArgs
1341 /// Removed child view at moment.
1343 /// <since_tizen> 5 </since_tizen>
1344 public View Removed { get; set; }
1348 /// Event when a child is removed.
1350 /// <since_tizen> 5 </since_tizen>
1351 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1355 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
1357 /// <seealso cref="Container.Remove" />
1358 /// <since_tizen> 4 </since_tizen>
1359 public override void Remove(View child)
1361 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
1362 if (NDalicPINVOKE.SWIGPendingException.Pending)
1363 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1365 Children.Remove(child);
1366 child.InternalParent = null;
1372 Layout.LayoutChildren.Remove(child.Layout);
1376 if (ChildRemoved != null)
1378 ChildRemovedEventArgs e = new ChildRemovedEventArgs
1382 ChildRemoved(this, e);
1387 /// Retrieves a child view by index.
1389 /// <seealso cref="Container.GetChildAt" />
1390 /// <since_tizen> 4 </since_tizen>
1391 public override View GetChildAt(uint index)
1393 if (index < Children.Count)
1395 return Children[Convert.ToInt32(index)];
1404 /// Retrieves the number of children held by the view.
1406 /// <seealso cref="Container.GetChildCount" />
1407 /// <since_tizen> 4 </since_tizen>
1408 public override uint GetChildCount()
1410 return Convert.ToUInt32(Children.Count);
1414 /// Gets the views parent.
1416 /// <seealso cref="Container.GetParent()" />
1417 /// <since_tizen> 4 </since_tizen>
1418 public override Container GetParent()
1420 return this.InternalParent as Container;
1423 internal bool IsTopLevelView()
1425 if (GetParent() is Layer)
1433 /// you can override it to clean-up your own resources.
1435 /// <param name="type">DisposeTypes</param>
1436 /// <since_tizen> 3 </since_tizen>
1437 protected override void Dispose(DisposeTypes type)
1444 if (type == DisposeTypes.Explicit)
1447 //Release your own managed resources here.
1448 //You should release all of your own disposable objects here.
1451 //Release your own unmanaged resources here.
1452 //You should not access any managed member here except static instance.
1453 //because the execution order of Finalizes is non-deterministic.
1456 DisConnectFromSignals();
1459 if (swigCPtr.Handle != global::System.IntPtr.Zero)
1463 swigCMemOwn = false;
1464 NDalicPINVOKE.delete_View(swigCPtr);
1466 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1469 foreach (View view in Children)
1471 view.InternalParent = null;
1478 private void DisConnectFromSignals()
1480 // Save current CPtr.
1481 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
1483 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
1484 swigCPtr = GetBaseHandleCPtrHandleRef;
1486 if (_onRelayoutEventCallback != null)
1488 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1491 if (_offWindowEventCallback != null)
1493 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1496 if (_onWindowEventCallback != null)
1498 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1501 if (_wheelEventCallback != null)
1503 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1506 if (_hoverEventCallback != null)
1508 this.HoveredSignal().Disconnect(_hoverEventCallback);
1511 if (_touchDataCallback != null)
1513 this.TouchSignal().Disconnect(_touchDataCallback);
1516 if (_ResourcesLoadedCallback != null)
1518 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1521 if (_offWindowEventCallback != null)
1523 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1526 if (_onWindowEventCallback != null)
1528 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1531 if (_wheelEventCallback != null)
1533 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1536 if (_hoverEventCallback != null)
1538 this.HoveredSignal().Disconnect(_hoverEventCallback);
1541 if (_touchDataCallback != null)
1543 this.TouchSignal().Disconnect(_touchDataCallback);
1546 if (_onRelayoutEventCallback != null)
1548 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1551 if (_keyCallback != null)
1553 this.KeyEventSignal().Disconnect(_keyCallback);
1556 if (_keyInputFocusLostCallback != null)
1558 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1561 if (_keyInputFocusGainedCallback != null)
1563 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1566 if (_backgroundResourceLoadedCallback != null)
1568 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1571 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
1572 // Restore current CPtr.
1573 swigCPtr = currentCPtr;
1576 private EventHandler _keyInputFocusGainedEventHandler;
1577 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1578 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1579 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1582 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1583 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1585 /// <since_tizen> 3 </since_tizen>
1586 public event EventHandler FocusGained
1590 if (_keyInputFocusGainedEventHandler == null)
1592 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1593 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1596 _keyInputFocusGainedEventHandler += value;
1601 _keyInputFocusGainedEventHandler -= value;
1603 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1605 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1610 private void OnKeyInputFocusGained(IntPtr view)
1612 if (_keyInputFocusGainedEventHandler != null)
1614 _keyInputFocusGainedEventHandler(this, null);
1619 private EventHandler _keyInputFocusLostEventHandler;
1620 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1621 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1622 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1625 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1626 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1628 /// <since_tizen> 3 </since_tizen>
1629 public event EventHandler FocusLost
1633 if (_keyInputFocusLostEventHandler == null)
1635 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1636 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1639 _keyInputFocusLostEventHandler += value;
1644 _keyInputFocusLostEventHandler -= value;
1646 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1648 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1653 private void OnKeyInputFocusLost(IntPtr view)
1655 if (_keyInputFocusLostEventHandler != null)
1657 _keyInputFocusLostEventHandler(this, null);
1662 /// Event arguments that passed via the KeyEvent signal.
1664 /// <since_tizen> 3 </since_tizen>
1665 public class KeyEventArgs : EventArgs
1670 /// Key - is the key sent to the view.
1672 /// <since_tizen> 3 </since_tizen>
1686 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1687 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1688 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1689 private KeyCallbackType _keyCallback;
1692 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1693 /// The KeyPressed signal is emitted when the key event is received.<br />
1695 /// <since_tizen> 3 </since_tizen>
1696 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1700 if (_keyEventHandler == null)
1702 _keyCallback = OnKeyEvent;
1703 this.KeyEventSignal().Connect(_keyCallback);
1706 _keyEventHandler += value;
1711 _keyEventHandler -= value;
1713 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1715 this.KeyEventSignal().Disconnect(_keyCallback);
1720 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
1722 if (keyEvent == global::System.IntPtr.Zero)
1724 NUILog.Error("keyEvent should not be null!");
1728 KeyEventArgs e = new KeyEventArgs();
1730 bool result = false;
1732 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
1734 if (_keyEventHandler != null)
1736 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
1738 // Oring the result of each callback.
1739 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
1741 result |= del(this, e);
1748 private EventHandler _onRelayoutEventHandler;
1749 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1750 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1751 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1754 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1755 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1757 /// <since_tizen> 3 </since_tizen>
1758 public event EventHandler Relayout
1762 if (_onRelayoutEventHandler == null)
1764 _onRelayoutEventCallback = OnRelayout;
1765 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1768 _onRelayoutEventHandler += value;
1773 _onRelayoutEventHandler -= value;
1775 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1777 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1783 // Callback for View OnRelayout signal
1784 private void OnRelayout(IntPtr data)
1786 if (_onRelayoutEventHandler != null)
1788 _onRelayoutEventHandler(this, null);
1793 /// Event arguments that passed via the touch signal.
1795 /// <since_tizen> 3 </since_tizen>
1796 public class TouchEventArgs : EventArgs
1798 private Touch _touch;
1801 /// Touch - contains the information of touch points.
1803 /// <since_tizen> 3 </since_tizen>
1817 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1818 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1819 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1820 private TouchDataCallbackType _touchDataCallback;
1823 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1824 /// The touched signal is emitted when the touch input is received.<br />
1826 /// <since_tizen> 3 </since_tizen>
1827 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1831 if (_touchDataEventHandler == null)
1833 _touchDataCallback = OnTouch;
1834 this.TouchSignal().Connect(_touchDataCallback);
1837 _touchDataEventHandler += value;
1842 _touchDataEventHandler -= value;
1844 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1846 this.TouchSignal().Disconnect(_touchDataCallback);
1852 // Callback for View TouchSignal
1853 private bool OnTouch(IntPtr view, IntPtr touchData)
1855 if (touchData == global::System.IntPtr.Zero)
1857 NUILog.Error("touchData should not be null!");
1861 TouchEventArgs e = new TouchEventArgs();
1863 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
1865 if (_touchDataEventHandler != null)
1867 return _touchDataEventHandler(this, e);
1874 /// Event arguments that passed via the hover signal.
1876 /// <since_tizen> 3 </since_tizen>
1877 public class HoverEventArgs : EventArgs
1879 private Hover _hover;
1882 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
1884 /// <since_tizen> 3 </since_tizen>
1898 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1899 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1900 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1901 private HoverEventCallbackType _hoverEventCallback;
1904 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1905 /// The hovered signal is emitted when the hover input is received.<br />
1907 /// <since_tizen> 3 </since_tizen>
1908 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1912 if (_hoverEventHandler == null)
1914 _hoverEventCallback = OnHoverEvent;
1915 this.HoveredSignal().Connect(_hoverEventCallback);
1918 _hoverEventHandler += value;
1923 _hoverEventHandler -= value;
1925 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1927 this.HoveredSignal().Disconnect(_hoverEventCallback);
1933 // Callback for View Hover signal
1934 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
1936 if (hoverEvent == global::System.IntPtr.Zero)
1938 NUILog.Error("hoverEvent should not be null!");
1942 HoverEventArgs e = new HoverEventArgs();
1944 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
1946 if (_hoverEventHandler != null)
1948 return _hoverEventHandler(this, e);
1955 /// Event arguments that passed via the wheel signal.
1957 /// <since_tizen> 3 </since_tizen>
1958 public class WheelEventArgs : EventArgs
1960 private Wheel _wheel;
1963 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
1965 /// <since_tizen> 3 </since_tizen>
1979 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1980 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1981 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1982 private WheelEventCallbackType _wheelEventCallback;
1985 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1986 /// The WheelMoved signal is emitted when the wheel event is received.<br />
1988 /// <since_tizen> 3 </since_tizen>
1989 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1993 if (_wheelEventHandler == null)
1995 _wheelEventCallback = OnWheelEvent;
1996 this.WheelEventSignal().Connect(_wheelEventCallback);
1999 _wheelEventHandler += value;
2004 _wheelEventHandler -= value;
2006 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
2008 this.WheelEventSignal().Disconnect(_wheelEventCallback);
2014 // Callback for View Wheel signal
2015 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
2017 if (wheelEvent == global::System.IntPtr.Zero)
2019 NUILog.Error("wheelEvent should not be null!");
2023 WheelEventArgs e = new WheelEventArgs();
2025 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
2027 if (_wheelEventHandler != null)
2029 return _wheelEventHandler(this, e);
2035 private EventHandler _onWindowEventHandler;
2036 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2037 private delegate void OnWindowEventCallbackType(IntPtr control);
2038 private OnWindowEventCallbackType _onWindowEventCallback;
2041 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
2042 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
2044 /// <since_tizen> 3 </since_tizen>
2045 public event EventHandler AddedToWindow
2049 if (_onWindowEventHandler == null)
2051 _onWindowEventCallback = OnWindow;
2052 this.OnWindowSignal().Connect(_onWindowEventCallback);
2055 _onWindowEventHandler += value;
2060 _onWindowEventHandler -= value;
2062 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
2064 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
2069 // Callback for View OnWindow signal
2070 private void OnWindow(IntPtr data)
2072 if (_onWindowEventHandler != null)
2074 _onWindowEventHandler(this, null);
2079 private EventHandler _offWindowEventHandler;
2080 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2081 private delegate void OffWindowEventCallbackType(IntPtr control);
2082 private OffWindowEventCallbackType _offWindowEventCallback;
2085 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
2086 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
2088 /// <since_tizen> 3 </since_tizen>
2089 public event EventHandler RemovedFromWindow
2093 if (_offWindowEventHandler == null)
2095 _offWindowEventCallback = OffWindow;
2096 this.OffWindowSignal().Connect(_offWindowEventCallback);
2099 _offWindowEventHandler += value;
2104 _offWindowEventHandler -= value;
2106 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
2108 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
2113 // Callback for View OffWindow signal
2114 private void OffWindow(IntPtr data)
2116 if (_offWindowEventHandler != null)
2118 _offWindowEventHandler(this, null);
2123 /// Event arguments of visibility changed.
2125 /// <since_tizen> 3 </since_tizen>
2126 public class VisibilityChangedEventArgs : EventArgs
2129 private bool _visibility;
2130 private VisibilityChangeType _type;
2133 /// The view, or child of view, whose visibility has changed.
2135 /// <since_tizen> 3 </since_tizen>
2149 /// Whether the view is now visible or not.
2151 /// <since_tizen> 3 </since_tizen>
2152 public bool Visibility
2160 _visibility = value;
2165 /// Whether the view's visible property has changed or a parent's.
2167 /// <since_tizen> 3 </since_tizen>
2168 public VisibilityChangeType Type
2181 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
2182 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2183 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
2184 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
2187 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
2188 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
2190 /// <since_tizen> 3 </since_tizen>
2191 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
2195 if (_visibilityChangedEventHandler == null)
2197 _visibilityChangedEventCallback = OnVisibilityChanged;
2198 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
2201 _visibilityChangedEventHandler += value;
2206 _visibilityChangedEventHandler -= value;
2208 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
2210 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
2215 // Callback for View visibility change signal
2216 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
2218 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
2221 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2223 e.Visibility = visibility;
2226 if (_visibilityChangedEventHandler != null)
2228 _visibilityChangedEventHandler(this, e);
2234 /// Event arguments of layout direction changed.
2236 /// <since_tizen> 4 </since_tizen>
2237 public class LayoutDirectionChangedEventArgs : EventArgs
2240 private ViewLayoutDirectionType _type;
2243 /// The view, or child of view, whose layout direction has changed.
2245 /// <since_tizen> 4 </since_tizen>
2259 /// Whether the view's layout direction property has changed or a parent's.
2261 /// <since_tizen> 4 </since_tizen>
2262 public ViewLayoutDirectionType Type
2275 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
2276 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2277 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
2278 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
2281 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
2282 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
2284 /// <since_tizen> 4 </since_tizen>
2285 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
2289 if (_layoutDirectionChangedEventHandler == null)
2291 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
2292 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
2295 _layoutDirectionChangedEventHandler += value;
2300 _layoutDirectionChangedEventHandler -= value;
2302 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
2304 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
2309 // Callback for View layout direction change signal
2310 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
2312 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
2315 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2319 if (_layoutDirectionChangedEventHandler != null)
2321 _layoutDirectionChangedEventHandler(this, e);
2325 // Resource Ready Signal
2327 private EventHandler _resourcesLoadedEventHandler;
2328 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2329 private delegate void ResourcesLoadedCallbackType(IntPtr control);
2330 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
2333 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
2334 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
2336 /// <since_tizen> 3 </since_tizen>
2337 public event EventHandler ResourcesLoaded
2341 if (_resourcesLoadedEventHandler == null)
2343 _ResourcesLoadedCallback = OnResourcesLoaded;
2344 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
2347 _resourcesLoadedEventHandler += value;
2352 _resourcesLoadedEventHandler -= value;
2354 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
2356 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
2361 private void OnResourcesLoaded(IntPtr view)
2363 if (_resourcesLoadedEventHandler != null)
2365 _resourcesLoadedEventHandler(this, null);
2369 internal IntPtr GetPtrfromView()
2371 return (IntPtr)swigCPtr;
2374 internal class Property
2376 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
2377 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
2378 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
2379 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
2380 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
2381 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
2382 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
2383 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
2384 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
2385 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
2386 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
2387 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
2388 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
2389 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
2390 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
2391 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
2392 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
2393 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
2394 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
2395 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
2396 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
2397 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
2398 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
2399 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
2400 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
2401 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
2402 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
2403 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
2404 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
2405 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
2406 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
2407 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
2408 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
2409 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
2410 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
2411 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
2412 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
2413 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
2414 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
2415 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
2416 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
2417 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
2418 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
2419 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
2420 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
2421 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
2422 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
2423 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
2424 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
2425 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
2426 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
2427 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
2428 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
2429 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
2430 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
2431 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
2432 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
2433 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
2434 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
2435 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
2436 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
2437 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
2438 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();
2442 /// Describes the direction to move the focus towards.
2444 /// <since_tizen> 3 </since_tizen>
2445 public enum FocusDirection
2448 /// Move keyboard focus towards the left direction.
2450 /// <since_tizen> 3 </since_tizen>
2453 /// Move keyboard focus towards the right direction.
2455 /// <since_tizen> 3 </since_tizen>
2458 /// Move keyboard focus towards the up direction.
2460 /// <since_tizen> 3 </since_tizen>
2463 /// Move keyboard focus towards the down direction.
2465 /// <since_tizen> 3 </since_tizen>
2468 /// Move keyboard focus towards the previous page direction.
2470 /// <since_tizen> 3 </since_tizen>
2473 /// Move keyboard focus towards the next page direction.
2475 /// <since_tizen> 3 </since_tizen>
2480 /// Creates a new instance of a view.
2482 /// <since_tizen> 3 </since_tizen>
2483 public View() : this(NDalicPINVOKE.View_New(), true)
2485 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2487 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
2489 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2492 private View ConvertIdToView(uint id)
2495 if (GetParent() is View)
2497 View parentView = GetParent() as View;
2498 view = parentView.FindChildById(id);
2503 view = Window.Instance.GetRootLayer().FindChildById(id);
2509 internal void SetKeyInputFocus()
2511 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
2512 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2516 /// Queries whether the view has a focus.
2518 /// <returns>True if this view has a focus.</returns>
2519 /// <since_tizen> 3 </since_tizen>
2520 public bool HasFocus()
2522 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
2523 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2527 internal void ClearKeyInputFocus()
2529 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
2530 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2533 internal PinchGestureDetector GetPinchGestureDetector()
2535 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
2536 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2540 internal PanGestureDetector GetPanGestureDetector()
2542 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
2543 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2547 internal TapGestureDetector GetTapGestureDetector()
2549 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
2550 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2554 internal LongPressGestureDetector GetLongPressGestureDetector()
2556 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
2557 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2562 /// Sets the name of the style to be applied to the view.
2564 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
2565 /// <since_tizen> 3 </since_tizen>
2566 public void SetStyleName(string styleName)
2568 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
2569 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2573 /// Retrieves the name of the style to be applied to the view (if any).
2575 /// <returns>A string matching a style, or an empty string.</returns>
2576 /// <since_tizen> 3 </since_tizen>
2577 public string GetStyleName()
2579 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
2580 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2584 internal void SetBackgroundColor(Vector4 color)
2586 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
2587 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2590 internal Vector4 GetBackgroundColor()
2592 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
2593 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2597 internal void SetBackgroundImage(Image image)
2599 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
2600 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2604 /// Clears the background.
2606 /// <since_tizen> 3 </since_tizen>
2607 public void ClearBackground()
2609 NDalicPINVOKE.View_ClearBackground(swigCPtr);
2610 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2613 internal ControlKeySignal KeyEventSignal()
2615 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
2616 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2620 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
2622 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
2623 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2627 internal KeyInputFocusSignal KeyInputFocusLostSignal()
2629 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
2630 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2634 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
2636 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2639 internal enum PropertyRange
2641 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
2642 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
2643 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
2647 /// The StyleName, type string.
2649 /// <since_tizen> 3 </since_tizen>
2650 public string StyleName
2654 return (string)GetValue(StyleNameProperty);
2658 SetValue(StyleNameProperty, value);
2659 NotifyPropertyChanged();
2664 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
2666 /// <since_tizen> 3 </since_tizen>
2667 public Color BackgroundColor
2671 return (Color)GetValue(BackgroundColorProperty);
2675 SetValue(BackgroundColorProperty, value);
2676 NotifyPropertyChanged();
2681 /// Creates an animation to animate the background color visual. If there is no
2682 /// background visual, creates one with transparent black as it's mixColor.
2684 /// <since_tizen> 3 </since_tizen>
2685 public Animation AnimateBackgroundColor(object destinationValue,
2688 AlphaFunction.BuiltinFunctions? alphaFunction = null,
2689 object initialValue = null)
2691 Tizen.NUI.PropertyMap background = Background;
2693 if (background.Empty())
2695 // If there is no background yet, ensure there is a transparent
2697 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
2698 background = Background;
2700 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
2704 /// Creates an animation to animate the mixColor of the named visual.
2706 /// <since_tizen> 3 </since_tizen>
2707 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
2709 Animation animation = null;
2711 PropertyMap _animator = new PropertyMap();
2712 if (alphaFunction != null)
2714 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
2717 PropertyMap _timePeriod = new PropertyMap();
2718 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
2719 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
2720 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
2722 PropertyMap _transition = new PropertyMap();
2723 _transition.Add("animator", new PropertyValue(_animator));
2724 _transition.Add("target", new PropertyValue(targetVisual));
2725 _transition.Add("property", new PropertyValue("mixColor"));
2727 if (initialColor != null)
2729 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
2730 _transition.Add("initialValue", initValue);
2733 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
2734 _transition.Add("targetValue", destValue);
2735 TransitionData _transitionData = new TransitionData(_transition);
2737 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
2738 if (NDalicPINVOKE.SWIGPendingException.Pending)
2739 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2745 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
2747 /// <since_tizen> 3 </since_tizen>
2748 public string BackgroundImage
2752 return (string)GetValue(BackgroundImageProperty);
2756 SetValue(BackgroundImageProperty, value);
2757 NotifyPropertyChanged();
2762 /// The background of view.
2764 /// <since_tizen> 3 </since_tizen>
2765 public Tizen.NUI.PropertyMap Background
2769 return (PropertyMap)GetValue(BackgroundProperty);
2773 SetValue(BackgroundProperty, value);
2774 NotifyPropertyChanged();
2780 /// The current state of the view.
2782 /// <since_tizen> 3 </since_tizen>
2787 return (States)GetValue(StateProperty);
2791 SetValue(StateProperty, value);
2792 NotifyPropertyChanged();
2797 /// The current sub state of the view.
2799 /// <since_tizen> 3 </since_tizen>
2800 public States SubState
2804 return (States)GetValue(SubStateProperty);
2808 SetValue(SubStateProperty, value);
2809 NotifyPropertyChanged();
2814 /// Displays a tooltip
2816 /// <since_tizen> 3 </since_tizen>
2817 public Tizen.NUI.PropertyMap Tooltip
2821 return (PropertyMap)GetValue(TooltipProperty);
2825 SetValue(TooltipProperty, value);
2826 NotifyPropertyChanged();
2831 /// Displays a tooltip as a text.
2833 /// <since_tizen> 3 </since_tizen>
2834 public string TooltipText
2838 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
2839 NotifyPropertyChanged();
2843 private int LeftFocusableViewId
2848 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
2853 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2857 private int RightFocusableViewId
2862 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
2867 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2871 private int UpFocusableViewId
2876 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
2881 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2885 private int DownFocusableViewId
2890 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
2895 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2900 /// The Child property of FlexContainer.<br />
2901 /// The proportion of the free space in the container, the flex item will receive.<br />
2902 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
2904 /// <since_tizen> 3 </since_tizen>
2909 return (float)GetValue(FlexProperty);
2913 SetValue(FlexProperty, value);
2914 NotifyPropertyChanged();
2919 /// The Child property of FlexContainer.<br />
2920 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
2922 /// <since_tizen> 3 </since_tizen>
2923 public int AlignSelf
2927 return (int)GetValue(AlignSelfProperty);
2931 SetValue(AlignSelfProperty, value);
2932 NotifyPropertyChanged();
2937 /// The Child property of FlexContainer.<br />
2938 /// The space around the flex item.<br />
2940 /// <since_tizen> 3 </since_tizen>
2941 public Vector4 FlexMargin
2945 return (Vector4)GetValue(FlexMarginProperty);
2949 SetValue(FlexMarginProperty, value);
2950 NotifyPropertyChanged();
2955 /// The top-left cell this child occupies, if not set, the first available cell is used.
2957 /// <since_tizen> 3 </since_tizen>
2958 public Vector2 CellIndex
2962 return (Vector2)GetValue(CellIndexProperty);
2966 SetValue(CellIndexProperty, value);
2967 NotifyPropertyChanged();
2972 /// The number of rows this child occupies, if not set, the default value is 1.
2974 /// <since_tizen> 3 </since_tizen>
2975 public float RowSpan
2979 return (float)GetValue(RowSpanProperty);
2983 SetValue(RowSpanProperty, value);
2984 NotifyPropertyChanged();
2989 /// The number of columns this child occupies, if not set, the default value is 1.
2991 /// <since_tizen> 3 </since_tizen>
2992 public float ColumnSpan
2996 return (float)GetValue(ColumnSpanProperty);
3000 SetValue(ColumnSpanProperty, value);
3001 NotifyPropertyChanged();
3006 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
3008 /// <since_tizen> 3 </since_tizen>
3009 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
3013 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
3017 SetValue(CellHorizontalAlignmentProperty, value);
3018 NotifyPropertyChanged();
3023 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
3025 /// <since_tizen> 3 </since_tizen>
3026 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
3030 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
3034 SetValue(CellVerticalAlignmentProperty, value);
3035 NotifyPropertyChanged();
3040 /// The left focusable view.<br />
3041 /// This will return null if not set.<br />
3042 /// This will also return null if the specified left focusable view is not on a window.<br />
3044 /// <since_tizen> 3 </since_tizen>
3045 public View LeftFocusableView
3047 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3050 return (View)GetValue(LeftFocusableViewProperty);
3054 SetValue(LeftFocusableViewProperty, value);
3055 NotifyPropertyChanged();
3060 /// The right focusable view.<br />
3061 /// This will return null if not set.<br />
3062 /// This will also return null if the specified right focusable view is not on a window.<br />
3064 /// <since_tizen> 3 </since_tizen>
3065 public View RightFocusableView
3067 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3070 return (View)GetValue(RightFocusableViewProperty);
3074 SetValue(RightFocusableViewProperty, value);
3075 NotifyPropertyChanged();
3080 /// The up focusable view.<br />
3081 /// This will return null if not set.<br />
3082 /// This will also return null if the specified up focusable view is not on a window.<br />
3084 /// <since_tizen> 3 </since_tizen>
3085 public View UpFocusableView
3087 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3090 return (View)GetValue(UpFocusableViewProperty);
3094 SetValue(UpFocusableViewProperty, value);
3095 NotifyPropertyChanged();
3100 /// The down focusable view.<br />
3101 /// This will return null if not set.<br />
3102 /// This will also return null if the specified down focusable view is not on a window.<br />
3104 /// <since_tizen> 3 </since_tizen>
3105 public View DownFocusableView
3107 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3110 return (View)GetValue(DownFocusableViewProperty);
3114 SetValue(DownFocusableViewProperty, value);
3115 NotifyPropertyChanged();
3120 /// Whether the view should be focusable by keyboard navigation.
3122 /// <since_tizen> 3 </since_tizen>
3123 public bool Focusable
3127 SetValue(FocusableProperty, value);
3128 NotifyPropertyChanged();
3132 return (bool)GetValue(FocusableProperty);
3137 /// Enumeration for describing the states of the view.
3139 /// <since_tizen> 3 </since_tizen>
3143 /// The normal state.
3147 /// The focused state.
3151 /// The disabled state.
3157 /// Retrieves the position of the view.<br />
3158 /// The coordinates are relative to the view's parent.<br />
3160 /// <since_tizen> 3 </since_tizen>
3161 public Position CurrentPosition
3165 return GetCurrentPosition();
3170 /// Sets the size of a view for the width and the height.<br />
3171 /// Geometry can be scaled to fit within this area.<br />
3172 /// This does not interfere with the view's scale factor.<br />
3173 /// The views default depth is the minimum of width and height.<br />
3176 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
3177 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
3178 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
3179 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3180 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
3181 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
3183 /// <since_tizen> 3 </since_tizen>
3184 public Size2D Size2D
3188 Size2D temp = (Size2D)GetValue(Size2DProperty);
3189 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
3193 SetValue(Size2DProperty, value);
3194 // Set Specification so when layouts measure this View it matches the value set here.
3195 // All Views are currently Layouts.
3196 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
3197 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
3198 NotifyPropertyChanged();
3202 private void OnSize2DChanged(int width, int height)
3204 Size2D = new Size2D(width, height);
3208 /// Retrieves the size of the view.<br />
3209 /// The coordinates are relative to the view's parent.<br />
3211 /// <since_tizen> 3 </since_tizen>
3212 public Size2D CurrentSize
3216 return GetCurrentSize();
3221 /// Retrieves and sets the view's opacity.<br />
3223 /// <since_tizen> 3 </since_tizen>
3224 public float Opacity
3228 return (float)GetValue(OpacityProperty);
3232 SetValue(OpacityProperty, value);
3233 NotifyPropertyChanged();
3238 /// Sets the position of the view for X and Y.<br />
3239 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
3240 /// If the position inheritance is disabled, sets the world position.<br />
3243 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
3244 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
3245 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
3246 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3247 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
3248 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
3250 /// <since_tizen> 3 </since_tizen>
3251 public Position2D Position2D
3255 Position2D temp = (Position2D)GetValue(Position2DProperty);
3256 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
3260 SetValue(Position2DProperty, value);
3261 NotifyPropertyChanged();
3265 private void OnPosition2DChanged(int x, int y)
3267 Position2D = new Position2D(x, y);
3271 /// Retrieves the screen postion of the view.<br />
3273 /// <since_tizen> 3 </since_tizen>
3274 public Vector2 ScreenPosition
3278 Vector2 temp = new Vector2(0.0f, 0.0f);
3279 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
3285 /// Determines whether the pivot point should be used to determine the position of the view.
3286 /// This is true by default.
3288 /// <remarks>If false, then the top-left of the view is used for the position.
3289 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
3291 /// <since_tizen> 3 </since_tizen>
3292 public bool PositionUsesPivotPoint
3296 return (bool)GetValue(PositionUsesPivotPointProperty);
3300 SetValue(PositionUsesPivotPointProperty, value);
3301 NotifyPropertyChanged();
3306 /// Please do not use! this will be deprecated.
3308 /// Please do not use! this will be deprecated!
3309 /// Instead please use PositionUsesPivotPoint.
3310 /// <since_tizen> 3 </since_tizen>
3311 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
3313 "View view = new View(); " +
3314 "view.PivotPoint = PivotPoint.Center; " +
3315 "view.PositionUsesPivotPoint = true;")]
3316 [EditorBrowsable(EditorBrowsableState.Never)]
3317 public bool PositionUsesAnchorPoint
3322 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
3327 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3328 NotifyPropertyChanged();
3332 internal bool FocusState
3336 return IsKeyboardFocusable();
3340 SetKeyboardFocusable(value);
3345 /// Queries whether the view is connected to the stage.<br />
3346 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
3348 /// <since_tizen> 3 </since_tizen>
3349 public bool IsOnWindow
3358 /// Gets the depth in the hierarchy for the view.
3360 /// <since_tizen> 3 </since_tizen>
3361 public int HierarchyDepth
3365 return GetHierarchyDepth();
3370 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
3373 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
3374 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
3375 /// The values set by this property will likely change.
3377 /// <since_tizen> 3 </since_tizen>
3378 public int SiblingOrder
3382 return (int)GetValue(SiblingOrderProperty);
3386 SetValue(SiblingOrderProperty, value);
3387 NotifyPropertyChanged();
3392 /// Returns the natural size of the view.
3395 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3397 /// <since_tizen> 5 </since_tizen>
3398 public Vector3 NaturalSize
3402 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3403 if (NDalicPINVOKE.SWIGPendingException.Pending)
3404 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3410 /// Returns the natural size (Size2D) of the view.
3413 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3415 /// <since_tizen> 4 </since_tizen>
3416 public Size2D NaturalSize2D
3420 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3421 if (NDalicPINVOKE.SWIGPendingException.Pending)
3422 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3424 return new Size2D((int)temp.Width, (int)temp.Height);
3429 /// Set the layout on this control.
3433 internal LayoutItem Layout
3437 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
3439 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3440 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3441 NDalicPINVOKE.delete_BaseHandle(CPtr);
3442 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3444 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3446 return basehandle as LayoutItem;
3450 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(value));
3451 value.LayoutChildren.Clear();
3453 foreach (View view in Children)
3455 value.LayoutChildren.Add(view.Layout);
3461 /// Set that layouting is required on this View. It will automatically receive a Layout.
3465 internal bool LayoutingRequired
3469 bool result = Tizen.NUI.NDalicManualPINVOKE.View_IsLayoutingRequired(View.getCPtr(this));
3470 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3475 Tizen.NUI.NDalicManualPINVOKE.View_SetLayoutingRequired(View.getCPtr(this), value);
3483 /// This is an asynchronous method.
3485 /// <since_tizen> 3 </since_tizen>
3495 /// This is an asynchronous method.
3496 /// If the view is hidden, then the view and its children will not be rendered.
3497 /// 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.
3499 /// <since_tizen> 3 </since_tizen>
3505 internal void Raise()
3507 var parentChildren = GetParent()?.Children;
3509 if (parentChildren != null)
3511 int currentIndex = parentChildren.IndexOf(this);
3513 // If the view is not already the last item in the list.
3514 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
3516 View temp = parentChildren[currentIndex + 1];
3517 parentChildren[currentIndex + 1] = this;
3518 parentChildren[currentIndex] = temp;
3520 NDalicPINVOKE.Raise(swigCPtr);
3521 if (NDalicPINVOKE.SWIGPendingException.Pending)
3522 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3528 internal void Lower()
3530 var parentChildren = GetParent()?.Children;
3532 if (parentChildren != null)
3534 int currentIndex = parentChildren.IndexOf(this);
3536 // If the view is not already the first item in the list.
3537 if (currentIndex > 0 && currentIndex < parentChildren.Count)
3539 View temp = parentChildren[currentIndex - 1];
3540 parentChildren[currentIndex - 1] = this;
3541 parentChildren[currentIndex] = temp;
3543 NDalicPINVOKE.Lower(swigCPtr);
3544 if (NDalicPINVOKE.SWIGPendingException.Pending)
3545 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3551 /// Raises the view above all other views.
3554 /// Sibling order of views within the parent will be updated automatically.
3555 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
3557 /// <since_tizen> 3 </since_tizen>
3558 public void RaiseToTop()
3560 var parentChildren = GetParent()?.Children;
3562 if (parentChildren != null)
3564 parentChildren.Remove(this);
3565 parentChildren.Add(this);
3567 NDalicPINVOKE.RaiseToTop(swigCPtr);
3568 if (NDalicPINVOKE.SWIGPendingException.Pending)
3569 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3575 /// Lowers the view to the bottom of all views.
3578 /// The sibling order of views within the parent will be updated automatically.
3579 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3581 /// <since_tizen> 3 </since_tizen>
3582 public void LowerToBottom()
3584 var parentChildren = GetParent()?.Children;
3586 if (parentChildren != null)
3588 parentChildren.Remove(this);
3589 parentChildren.Insert(0, this);
3591 NDalicPINVOKE.LowerToBottom(swigCPtr);
3592 if (NDalicPINVOKE.SWIGPendingException.Pending)
3593 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3598 /// Queries if all resources required by a view are loaded and ready.
3600 /// <remarks>Most resources are only loaded when the control is placed on the stage.
3602 /// <since_tizen> 3 </since_tizen>
3603 public bool IsResourceReady()
3605 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
3606 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3611 /// Raises the view to above the target view.
3613 /// <remarks>The sibling order of views within the parent will be updated automatically.
3614 /// Views on the level above the target view will still be shown above this view.
3615 /// Raising this view above views with the same sibling order as each other will raise this view above them.
3616 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3618 /// <param name="target">Will be raised above this view.</param>
3619 internal void RaiseAbove(View target)
3621 var parentChildren = GetParent()?.Children;
3623 if (parentChildren != null)
3625 int currentIndex = parentChildren.IndexOf(this);
3626 int targetIndex = parentChildren.IndexOf(target);
3628 if (currentIndex < 0 || targetIndex < 0 ||
3629 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3631 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3634 // If the currentIndex is less than the target index and the target has the same parent.
3635 if (currentIndex < targetIndex)
3637 parentChildren.Remove(this);
3638 parentChildren.Insert(targetIndex, this);
3640 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
3641 if (NDalicPINVOKE.SWIGPendingException.Pending)
3642 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3649 /// Lowers the view to below the target view.
3651 /// <remarks>The sibling order of views within the parent will be updated automatically.
3652 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
3653 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3655 /// <param name="target">Will be lowered below this view.</param>
3656 internal void LowerBelow(View target)
3658 var parentChildren = GetParent()?.Children;
3660 if (parentChildren != null)
3662 int currentIndex = parentChildren.IndexOf(this);
3663 int targetIndex = parentChildren.IndexOf(target);
3664 if (currentIndex < 0 || targetIndex < 0 ||
3665 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3667 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3671 // If the currentIndex is not already the 0th index and the target has the same parent.
3672 if ((currentIndex != 0) && (targetIndex != -1) &&
3673 (currentIndex > targetIndex))
3675 parentChildren.Remove(this);
3676 parentChildren.Insert(targetIndex, this);
3678 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
3679 if (NDalicPINVOKE.SWIGPendingException.Pending)
3680 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3686 internal string GetName()
3688 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
3689 if (NDalicPINVOKE.SWIGPendingException.Pending)
3690 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3694 internal void SetName(string name)
3696 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
3697 if (NDalicPINVOKE.SWIGPendingException.Pending)
3698 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3701 internal uint GetId()
3703 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
3704 if (NDalicPINVOKE.SWIGPendingException.Pending)
3705 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3709 internal bool IsRoot()
3711 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
3712 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3716 internal bool OnWindow()
3718 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
3719 if (NDalicPINVOKE.SWIGPendingException.Pending)
3720 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3725 /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
3727 /// <pre>The view has been initialized. </pre>
3728 /// <returns>The parent layer of view </returns>
3729 /// <since_tizen> 5 </since_tizen>
3730 public Layer GetLayer()
3732 //to fix memory leak issue, match the handle count with native side.
3733 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
3734 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3735 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
3736 NDalicPINVOKE.delete_BaseHandle(CPtr);
3737 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3739 if (NDalicPINVOKE.SWIGPendingException.Pending)
3740 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3745 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
3747 /// <pre>The (child) view has been initialized. </pre>
3748 /// <since_tizen> 4 </since_tizen>
3749 public void Unparent()
3751 GetParent()?.Remove(this);
3755 /// Search through this view's hierarchy for a view with the given name.
3756 /// The view itself is also considered in the search.
3758 /// <pre>The view has been initialized.</pre>
3759 /// <param name="viewName">The name of the view to find.</param>
3760 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
3761 /// <since_tizen> 3 </since_tizen>
3762 public View FindChildByName(string viewName)
3764 //to fix memory leak issue, match the handle count with native side.
3765 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
3766 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3767 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3768 NDalicPINVOKE.delete_BaseHandle(CPtr);
3769 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3771 if (NDalicPINVOKE.SWIGPendingException.Pending)
3772 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3776 internal View FindChildById(uint id)
3778 //to fix memory leak issue, match the handle count with native side.
3779 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
3780 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3781 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3782 NDalicPINVOKE.delete_BaseHandle(CPtr);
3783 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3785 if (NDalicPINVOKE.SWIGPendingException.Pending)
3786 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3790 internal void SetParentOrigin(Vector3 origin)
3792 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
3793 if (NDalicPINVOKE.SWIGPendingException.Pending)
3794 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3797 internal Vector3 GetCurrentParentOrigin()
3799 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
3800 if (NDalicPINVOKE.SWIGPendingException.Pending)
3801 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3805 internal void SetAnchorPoint(Vector3 anchorPoint)
3807 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
3808 if (NDalicPINVOKE.SWIGPendingException.Pending)
3809 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3812 internal Vector3 GetCurrentAnchorPoint()
3814 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
3815 if (NDalicPINVOKE.SWIGPendingException.Pending)
3816 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3820 internal void SetSize(float width, float height)
3822 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
3823 if (NDalicPINVOKE.SWIGPendingException.Pending)
3824 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3827 internal void SetSize(float width, float height, float depth)
3829 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
3830 if (NDalicPINVOKE.SWIGPendingException.Pending)
3831 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3834 internal void SetSize(Vector2 size)
3836 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
3837 if (NDalicPINVOKE.SWIGPendingException.Pending)
3838 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3841 internal void SetSize(Vector3 size)
3843 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
3844 if (NDalicPINVOKE.SWIGPendingException.Pending)
3845 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3848 internal Vector3 GetTargetSize()
3850 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
3851 if (NDalicPINVOKE.SWIGPendingException.Pending)
3852 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3856 internal Size2D GetCurrentSize()
3858 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
3859 if (NDalicPINVOKE.SWIGPendingException.Pending)
3860 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3861 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
3865 internal Vector3 GetNaturalSize()
3867 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3868 if (NDalicPINVOKE.SWIGPendingException.Pending)
3869 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3873 internal void SetPosition(float x, float y)
3875 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
3876 if (NDalicPINVOKE.SWIGPendingException.Pending)
3877 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3880 internal void SetPosition(float x, float y, float z)
3882 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
3883 if (NDalicPINVOKE.SWIGPendingException.Pending)
3884 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3887 internal void SetPosition(Vector3 position)
3889 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
3890 if (NDalicPINVOKE.SWIGPendingException.Pending)
3891 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3894 internal void SetX(float x)
3896 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
3897 if (NDalicPINVOKE.SWIGPendingException.Pending)
3898 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3901 internal void SetY(float y)
3903 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
3904 if (NDalicPINVOKE.SWIGPendingException.Pending)
3905 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3908 internal void SetZ(float z)
3910 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
3911 if (NDalicPINVOKE.SWIGPendingException.Pending)
3912 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3915 internal void TranslateBy(Vector3 distance)
3917 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
3918 if (NDalicPINVOKE.SWIGPendingException.Pending)
3919 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3922 internal Position GetCurrentPosition()
3924 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
3925 if (NDalicPINVOKE.SWIGPendingException.Pending)
3926 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3930 internal Vector3 GetCurrentWorldPosition()
3932 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
3933 if (NDalicPINVOKE.SWIGPendingException.Pending)
3934 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3938 internal void SetInheritPosition(bool inherit)
3940 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
3941 if (NDalicPINVOKE.SWIGPendingException.Pending)
3942 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3945 internal bool IsPositionInherited()
3947 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
3948 if (NDalicPINVOKE.SWIGPendingException.Pending)
3949 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3953 internal void SetOrientation(Degree angle, Vector3 axis)
3955 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
3956 if (NDalicPINVOKE.SWIGPendingException.Pending)
3957 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3960 internal void SetOrientation(Radian angle, Vector3 axis)
3962 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
3963 if (NDalicPINVOKE.SWIGPendingException.Pending)
3964 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3967 internal void SetOrientation(Rotation orientation)
3969 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
3970 if (NDalicPINVOKE.SWIGPendingException.Pending)
3971 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3974 internal void RotateBy(Degree angle, Vector3 axis)
3976 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
3977 if (NDalicPINVOKE.SWIGPendingException.Pending)
3978 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3981 internal void RotateBy(Radian angle, Vector3 axis)
3983 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
3984 if (NDalicPINVOKE.SWIGPendingException.Pending)
3985 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3988 internal void RotateBy(Rotation relativeRotation)
3990 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
3991 if (NDalicPINVOKE.SWIGPendingException.Pending)
3992 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3995 internal Rotation GetCurrentOrientation()
3997 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
3998 if (NDalicPINVOKE.SWIGPendingException.Pending)
3999 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4003 internal void SetInheritOrientation(bool inherit)
4005 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
4006 if (NDalicPINVOKE.SWIGPendingException.Pending)
4007 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4010 internal bool IsOrientationInherited()
4012 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
4013 if (NDalicPINVOKE.SWIGPendingException.Pending)
4014 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4018 internal Rotation GetCurrentWorldOrientation()
4020 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4021 if (NDalicPINVOKE.SWIGPendingException.Pending)
4022 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4026 internal void SetScale(float scale)
4028 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
4029 if (NDalicPINVOKE.SWIGPendingException.Pending)
4030 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4033 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4035 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4036 if (NDalicPINVOKE.SWIGPendingException.Pending)
4037 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4040 internal void SetScale(Vector3 scale)
4042 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4043 if (NDalicPINVOKE.SWIGPendingException.Pending)
4044 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4047 internal void ScaleBy(Vector3 relativeScale)
4049 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4050 if (NDalicPINVOKE.SWIGPendingException.Pending)
4051 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4054 internal Vector3 GetCurrentScale()
4056 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
4057 if (NDalicPINVOKE.SWIGPendingException.Pending)
4058 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4062 internal Vector3 GetCurrentWorldScale()
4064 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
4065 if (NDalicPINVOKE.SWIGPendingException.Pending)
4066 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4070 internal void SetInheritScale(bool inherit)
4072 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
4073 if (NDalicPINVOKE.SWIGPendingException.Pending)
4074 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4077 internal bool IsScaleInherited()
4079 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
4080 if (NDalicPINVOKE.SWIGPendingException.Pending)
4081 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4085 internal Matrix GetCurrentWorldMatrix()
4087 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4088 if (NDalicPINVOKE.SWIGPendingException.Pending)
4089 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4093 internal void SetVisible(bool visible)
4095 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
4096 if (NDalicPINVOKE.SWIGPendingException.Pending)
4097 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4100 internal bool IsVisible()
4102 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
4103 if (NDalicPINVOKE.SWIGPendingException.Pending)
4104 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4108 internal void SetOpacity(float opacity)
4110 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
4111 if (NDalicPINVOKE.SWIGPendingException.Pending)
4112 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4115 internal float GetCurrentOpacity()
4117 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
4118 if (NDalicPINVOKE.SWIGPendingException.Pending)
4119 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4123 internal void SetColor(Vector4 color)
4125 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4126 if (NDalicPINVOKE.SWIGPendingException.Pending)
4127 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4130 internal Vector4 GetCurrentColor()
4132 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
4133 if (NDalicPINVOKE.SWIGPendingException.Pending)
4134 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4138 internal void SetColorMode(ColorMode colorMode)
4140 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
4141 if (NDalicPINVOKE.SWIGPendingException.Pending)
4142 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4145 internal ColorMode GetColorMode()
4147 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
4148 if (NDalicPINVOKE.SWIGPendingException.Pending)
4149 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4153 internal Vector4 GetCurrentWorldColor()
4155 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
4156 if (NDalicPINVOKE.SWIGPendingException.Pending)
4157 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4161 internal void SetDrawMode(DrawModeType drawMode)
4163 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4164 if (NDalicPINVOKE.SWIGPendingException.Pending)
4165 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4168 internal DrawModeType GetDrawMode()
4170 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
4171 if (NDalicPINVOKE.SWIGPendingException.Pending)
4172 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4177 /// Converts screen coordinates into the view's coordinate system using the default camera.
4179 /// <pre>The view has been initialized.</pre>
4180 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4181 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4182 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4183 /// <param name="screenX">The screen X-coordinate.</param>
4184 /// <param name="screenY">The screen Y-coordinate.</param>
4185 /// <returns>True if the conversion succeeded.</returns>
4186 /// <since_tizen> 3 </since_tizen>
4187 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4189 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4190 if (NDalicPINVOKE.SWIGPendingException.Pending)
4191 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4195 internal void SetKeyboardFocusable(bool focusable)
4197 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4198 if (NDalicPINVOKE.SWIGPendingException.Pending)
4199 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4202 internal bool IsKeyboardFocusable()
4204 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
4205 if (NDalicPINVOKE.SWIGPendingException.Pending)
4206 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4210 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4212 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4213 if (NDalicPINVOKE.SWIGPendingException.Pending)
4214 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4217 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4219 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4220 if (NDalicPINVOKE.SWIGPendingException.Pending)
4221 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4226 /// Sets the relative to parent size factor of the view.<br />
4227 /// This factor is only used when ResizePolicy is set to either:
4228 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4229 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4231 /// <pre>The view has been initialized.</pre>
4232 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4233 /// <since_tizen> 3 </since_tizen>
4234 public void SetSizeModeFactor(Vector3 factor)
4236 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4237 if (NDalicPINVOKE.SWIGPendingException.Pending)
4238 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4241 internal Vector3 GetSizeModeFactor()
4243 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
4244 if (NDalicPINVOKE.SWIGPendingException.Pending)
4245 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4250 /// Calculates the height of the view given a width.<br />
4251 /// The natural size is used for default calculation.<br />
4252 /// Size 0 is treated as aspect ratio 1:1.<br />
4254 /// <param name="width">The width to use.</param>
4255 /// <returns>The height based on the width.</returns>
4256 /// <since_tizen> 3 </since_tizen>
4257 public float GetHeightForWidth(float width)
4259 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
4260 if (NDalicPINVOKE.SWIGPendingException.Pending)
4261 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4266 /// Calculates the width of the view given a height.<br />
4267 /// The natural size is used for default calculation.<br />
4268 /// Size 0 is treated as aspect ratio 1:1.<br />
4270 /// <param name="height">The height to use.</param>
4271 /// <returns>The width based on the height.</returns>
4272 /// <since_tizen> 3 </since_tizen>
4273 public float GetWidthForHeight(float height)
4275 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
4276 if (NDalicPINVOKE.SWIGPendingException.Pending)
4277 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4282 /// Return the amount of size allocated for relayout.
4284 /// <param name="dimension">The dimension to retrieve.</param>
4285 /// <returns>Return the size.</returns>
4286 /// <since_tizen> 3 </since_tizen>
4287 public float GetRelayoutSize(DimensionType dimension)
4289 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4290 if (NDalicPINVOKE.SWIGPendingException.Pending)
4291 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4296 /// Set the padding for the view.
4298 /// <param name="padding">Padding for the view.</param>
4299 /// <since_tizen> 3 </since_tizen>
4300 public void SetPadding(PaddingType padding)
4302 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4303 if (NDalicPINVOKE.SWIGPendingException.Pending)
4304 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4308 /// Return the value of padding for the view.
4310 /// <param name="paddingOut">the value of padding for the view</param>
4311 /// <since_tizen> 3 </since_tizen>
4312 public void GetPadding(PaddingType paddingOut)
4314 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4315 if (NDalicPINVOKE.SWIGPendingException.Pending)
4316 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4319 internal void SetMinimumSize(Vector2 size)
4321 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4322 if (NDalicPINVOKE.SWIGPendingException.Pending)
4323 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4326 internal Vector2 GetMinimumSize()
4328 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
4329 if (NDalicPINVOKE.SWIGPendingException.Pending)
4330 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4334 internal void SetMaximumSize(Vector2 size)
4336 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4337 if (NDalicPINVOKE.SWIGPendingException.Pending)
4338 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4341 internal Vector2 GetMaximumSize()
4343 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
4344 if (NDalicPINVOKE.SWIGPendingException.Pending)
4345 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4349 internal int GetHierarchyDepth()
4351 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
4352 if (NDalicPINVOKE.SWIGPendingException.Pending)
4353 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4357 /// <since_tizen> 3 </since_tizen>
4358 public uint AddRenderer(Renderer renderer)
4360 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4361 if (NDalicPINVOKE.SWIGPendingException.Pending)
4362 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4366 internal uint GetRendererCount()
4368 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
4369 if (NDalicPINVOKE.SWIGPendingException.Pending)
4370 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4374 /// <since_tizen> 3 </since_tizen>
4375 public Renderer GetRendererAt(uint index)
4377 //to fix memory leak issue, match the handle count with native side.
4378 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
4379 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4380 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4381 NDalicPINVOKE.delete_BaseHandle(CPtr);
4382 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4384 if (NDalicPINVOKE.SWIGPendingException.Pending)
4385 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4389 /// <since_tizen> 3 </since_tizen>
4390 public void RemoveRenderer(Renderer renderer)
4392 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4393 if (NDalicPINVOKE.SWIGPendingException.Pending)
4394 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4397 /// <since_tizen> 3 </since_tizen>
4398 public void RemoveRenderer(uint index)
4400 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4401 if (NDalicPINVOKE.SWIGPendingException.Pending)
4402 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4405 internal TouchDataSignal TouchSignal()
4407 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
4408 if (NDalicPINVOKE.SWIGPendingException.Pending)
4409 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4413 internal HoverSignal HoveredSignal()
4415 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
4416 if (NDalicPINVOKE.SWIGPendingException.Pending)
4417 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4421 internal WheelSignal WheelEventSignal()
4423 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
4424 if (NDalicPINVOKE.SWIGPendingException.Pending)
4425 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4429 internal ViewSignal OnWindowSignal()
4431 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
4432 if (NDalicPINVOKE.SWIGPendingException.Pending)
4433 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4437 internal ViewSignal OffWindowSignal()
4439 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
4440 if (NDalicPINVOKE.SWIGPendingException.Pending)
4441 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4445 internal ViewSignal OnRelayoutSignal()
4447 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
4448 if (NDalicPINVOKE.SWIGPendingException.Pending)
4449 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4453 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
4455 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
4456 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4461 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
4463 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
4464 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4469 internal ViewSignal ResourcesLoadedSignal()
4471 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
4472 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4477 /// Gets or sets the origin of a view within its parent's area.<br />
4478 /// 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 />
4479 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
4480 /// A view's position is the distance between this origin and the view's anchor-point.<br />
4482 /// <pre>The view has been initialized.</pre>
4483 /// <since_tizen> 3 </since_tizen>
4484 public Position ParentOrigin
4488 return (Position)GetValue(ParentOriginProperty);
4492 SetValue(ParentOriginProperty, value);
4493 NotifyPropertyChanged();
4497 internal float ParentOriginX
4502 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
4507 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
4508 NotifyPropertyChanged();
4512 internal float ParentOriginY
4517 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
4522 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
4523 NotifyPropertyChanged();
4527 internal float ParentOriginZ
4532 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
4537 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
4538 NotifyPropertyChanged();
4543 /// Gets or sets the anchor-point of a view.<br />
4544 /// 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 />
4545 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
4546 /// A view position is the distance between its parent-origin and this anchor-point.<br />
4547 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
4548 /// <pre>The view has been initialized.</pre>
4550 /// <since_tizen> 3 </since_tizen>
4551 public Position PivotPoint
4555 return (Position)GetValue(PivotPointProperty);
4559 SetValue(PivotPointProperty, value);
4560 NotifyPropertyChanged();
4564 internal float PivotPointX
4569 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
4574 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
4578 internal float PivotPointY
4583 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
4588 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
4592 internal float PivotPointZ
4597 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
4602 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
4607 /// Gets or sets the size width of the view.
4609 /// <since_tizen> 3 </since_tizen>
4610 public float SizeWidth
4614 return (float)GetValue(SizeWidthProperty);
4618 SetValue(SizeWidthProperty, value);
4619 NotifyPropertyChanged();
4624 /// Gets or sets the size height of the view.
4626 /// <since_tizen> 3 </since_tizen>
4627 public float SizeHeight
4631 return (float)GetValue(SizeHeightProperty);
4635 SetValue(SizeHeightProperty, value);
4636 NotifyPropertyChanged();
4641 /// Gets or sets the position of the view.<br />
4642 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
4643 /// If the position inheritance is disabled, sets the world position.<br />
4645 /// <since_tizen> 3 </since_tizen>
4646 public Position Position
4650 return (Position)GetValue(PositionProperty);
4654 SetValue(PositionProperty, value);
4655 NotifyPropertyChanged();
4660 /// Gets or sets the position X of the view.
4662 /// <since_tizen> 3 </since_tizen>
4663 public float PositionX
4667 return (float)GetValue(PositionXProperty);
4671 SetValue(PositionXProperty, value);
4672 NotifyPropertyChanged();
4677 /// Gets or sets the position Y of the view.
4679 /// <since_tizen> 3 </since_tizen>
4680 public float PositionY
4684 return (float)GetValue(PositionYProperty);
4688 SetValue(PositionYProperty, value);
4689 NotifyPropertyChanged();
4694 /// Gets or sets the position Z of the view.
4696 /// <since_tizen> 3 </since_tizen>
4697 public float PositionZ
4701 return (float)GetValue(PositionZProperty);
4705 SetValue(PositionZProperty, value);
4706 NotifyPropertyChanged();
4711 /// Gets or sets the world position of the view.
4713 /// <since_tizen> 3 </since_tizen>
4714 public Vector3 WorldPosition
4718 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4719 GetProperty(View.Property.WORLD_POSITION).Get(temp);
4724 internal float WorldPositionX
4729 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
4734 internal float WorldPositionY
4739 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
4744 internal float WorldPositionZ
4749 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
4755 /// Gets or sets the orientation of the view.<br />
4756 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
4758 /// <remarks>This is an asynchronous method.</remarks>
4759 /// <since_tizen> 3 </since_tizen>
4760 public Rotation Orientation
4764 return (Rotation)GetValue(OrientationProperty);
4768 SetValue(OrientationProperty, value);
4769 NotifyPropertyChanged();
4774 /// Gets or sets the world orientation of the view.<br />
4776 /// <since_tizen> 3 </since_tizen>
4777 public Rotation WorldOrientation
4781 Rotation temp = new Rotation();
4782 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
4788 /// Gets or sets the scale factor applied to the view.<br />
4790 /// <since_tizen> 3 </since_tizen>
4791 public Vector3 Scale
4795 return (Vector3)GetValue(ScaleProperty);
4799 SetValue(ScaleProperty, value);
4800 NotifyPropertyChanged();
4805 /// Gets or sets the scale X factor applied to the view.
4807 /// <since_tizen> 3 </since_tizen>
4812 return (float)GetValue(ScaleXProperty);
4816 SetValue(ScaleXProperty, value);
4817 NotifyPropertyChanged();
4822 /// Gets or sets the scale Y factor applied to the view.
4824 /// <since_tizen> 3 </since_tizen>
4829 return (float)GetValue(ScaleYProperty);
4833 SetValue(ScaleYProperty, value);
4834 NotifyPropertyChanged();
4839 /// Gets or sets the scale Z factor applied to the view.
4841 /// <since_tizen> 3 </since_tizen>
4846 return (float)GetValue(ScaleZProperty);
4850 SetValue(ScaleZProperty, value);
4851 NotifyPropertyChanged();
4856 /// Gets the world scale of the view.
4858 /// <since_tizen> 3 </since_tizen>
4859 public Vector3 WorldScale
4863 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4864 GetProperty(View.Property.WORLD_SCALE).Get(temp);
4870 /// Retrieves the visibility flag of the view.
4873 /// If the view is not visible, then the view and its children will not be rendered.
4874 /// 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.
4876 /// <since_tizen> 3 </since_tizen>
4877 public bool Visibility
4882 GetProperty(View.Property.VISIBLE).Get(out temp);
4888 /// Gets the view's world color.
4890 /// <since_tizen> 3 </since_tizen>
4891 public Vector4 WorldColor
4895 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
4896 GetProperty(View.Property.WORLD_COLOR).Get(temp);
4901 internal Matrix WorldMatrix
4905 Matrix temp = new Matrix();
4906 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
4912 /// Gets or sets the view's name.
4914 /// <since_tizen> 3 </since_tizen>
4919 return (string)GetValue(NameProperty);
4923 SetValue(NameProperty, value);
4924 NotifyPropertyChanged();
4929 /// Get the number of children held by the view.
4931 /// <since_tizen> 3 </since_tizen>
4932 public new uint ChildCount
4936 return GetChildCount();
4941 /// Gets the view's ID.
4944 /// <since_tizen> 3 </since_tizen>
4954 /// Gets or sets the status of whether the view should emit touch or hover signals.
4956 /// <since_tizen> 3 </since_tizen>
4957 public bool Sensitive
4961 return (bool)GetValue(SensitiveProperty);
4965 SetValue(SensitiveProperty, value);
4966 NotifyPropertyChanged();
4971 /// 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.
4973 /// <since_tizen> 3 </since_tizen>
4974 public bool LeaveRequired
4978 return (bool)GetValue(LeaveRequiredProperty);
4982 SetValue(LeaveRequiredProperty, value);
4983 NotifyPropertyChanged();
4988 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
4990 /// <since_tizen> 3 </since_tizen>
4991 public bool InheritOrientation
4995 return (bool)GetValue(InheritOrientationProperty);
4999 SetValue(InheritOrientationProperty, value);
5000 NotifyPropertyChanged();
5005 /// Gets or sets the status of whether a child view inherits it's parent's scale.
5007 /// <since_tizen> 3 </since_tizen>
5008 public bool InheritScale
5012 return (bool)GetValue(InheritScaleProperty);
5016 SetValue(InheritScaleProperty, value);
5017 NotifyPropertyChanged();
5022 /// Gets or sets the status of how the view and its children should be drawn.<br />
5023 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
5024 /// 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 />
5025 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
5026 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
5027 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
5029 /// <since_tizen> 3 </since_tizen>
5030 public DrawModeType DrawMode
5034 return (DrawModeType)GetValue(DrawModeProperty);
5038 SetValue(DrawModeProperty, value);
5039 NotifyPropertyChanged();
5044 /// Gets or sets the relative to parent size factor of the view.<br />
5045 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
5046 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
5048 /// <since_tizen> 3 </since_tizen>
5049 public Vector3 SizeModeFactor
5053 return (Vector3)GetValue(SizeModeFactorProperty);
5057 SetValue(SizeModeFactorProperty, value);
5058 NotifyPropertyChanged();
5063 /// Gets or sets the width resize policy to be used.
5065 /// <since_tizen> 3 </since_tizen>
5066 public ResizePolicyType WidthResizePolicy
5070 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
5074 SetValue(WidthResizePolicyProperty, value);
5075 NotifyPropertyChanged();
5080 /// Gets or sets the height resize policy to be used.
5082 /// <since_tizen> 3 </since_tizen>
5083 public ResizePolicyType HeightResizePolicy
5087 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
5091 SetValue(HeightResizePolicyProperty, value);
5092 NotifyPropertyChanged();
5097 /// Gets or sets the policy to use when setting size with size negotiation.<br />
5098 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
5100 /// <since_tizen> 3 </since_tizen>
5101 public SizeScalePolicyType SizeScalePolicy
5105 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
5109 SetValue(SizeScalePolicyProperty, value);
5110 NotifyPropertyChanged();
5115 /// Gets or sets the status of whether the width size is dependent on the height size.
5117 /// <since_tizen> 3 </since_tizen>
5118 public bool WidthForHeight
5122 return (bool)GetValue(WidthForHeightProperty);
5126 SetValue(WidthForHeightProperty, value);
5127 NotifyPropertyChanged();
5132 /// Gets or sets the status of whether the height size is dependent on the width size.
5134 /// <since_tizen> 3 </since_tizen>
5135 public bool HeightForWidth
5139 return (bool)GetValue(HeightForWidthProperty);
5143 SetValue(HeightForWidthProperty, value);
5144 NotifyPropertyChanged();
5149 /// Gets or sets the padding for use in layout.
5151 /// <since_tizen> 5 </since_tizen>
5152 public Extents Padding
5156 return (Extents)GetValue(PaddingProperty);
5160 SetValue(PaddingProperty, value);
5161 NotifyPropertyChanged();
5166 /// Gets or sets the minimum size the view can be assigned in size negotiation.
5168 /// <since_tizen> 3 </since_tizen>
5169 public Size2D MinimumSize
5173 return (Size2D)GetValue(MinimumSizeProperty);
5179 // Note: it only works if minimum size is >= than natural size.
5180 // To force the size it should be done through the width&height spec or Size2D.
5181 Layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
5182 Layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
5184 SetValue(MinimumSizeProperty, value);
5185 NotifyPropertyChanged();
5190 /// Gets or sets the maximum size the view can be assigned in size negotiation.
5192 /// <since_tizen> 3 </since_tizen>
5193 public Size2D MaximumSize
5197 return (Size2D)GetValue(MaximumSizeProperty);
5201 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
5202 // MATCH_PARENT spec + parent container size can be used to limit
5203 SetValue(MaximumSizeProperty, value);
5204 NotifyPropertyChanged();
5209 /// Gets or sets whether a child view inherits it's parent's position.<br />
5210 /// Default is to inherit.<br />
5211 /// 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 />
5213 /// <since_tizen> 3 </since_tizen>
5214 public bool InheritPosition
5218 return (bool)GetValue(InheritPositionProperty);
5222 SetValue(InheritPositionProperty, value);
5223 NotifyPropertyChanged();
5228 /// Gets or sets the clipping behavior (mode) of it's children.
5230 /// <since_tizen> 3 </since_tizen>
5231 public ClippingModeType ClippingMode
5235 return (ClippingModeType)GetValue(ClippingModeProperty);
5239 SetValue(ClippingModeProperty, value);
5240 NotifyPropertyChanged();
5245 /// Gets the number of renderers held by the view.
5247 /// <since_tizen> 3 </since_tizen>
5248 public uint RendererCount
5252 return GetRendererCount();
5257 /// [Obsolete("Please do not use! this will be deprecated")]
5259 /// <since_tizen> 3 </since_tizen>
5260 /// Please do not use! this will be deprecated!
5261 /// Instead please use PivotPoint.
5262 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
5264 "View view = new View(); " +
5265 "view.PivotPoint = PivotPoint.Center; " +
5266 "view.PositionUsesPivotPoint = true;")]
5267 [EditorBrowsable(EditorBrowsableState.Never)]
5268 public Position AnchorPoint
5272 Position temp = new Position(0.0f, 0.0f, 0.0f);
5273 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
5278 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
5279 NotifyPropertyChanged();
5284 /// Sets the size of a view for the width, the height and the depth.<br />
5285 /// Geometry can be scaled to fit within this area.<br />
5286 /// This does not interfere with the view's scale factor.<br />
5287 /// The views default depth is the minimum of width and height.<br />
5290 /// Please note that multi-cascade setting is not possible for this NUI object. <br />
5291 /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
5292 /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
5293 /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
5295 /// <since_tizen> 5 </since_tizen>
5300 return (Size)GetValue(SizeProperty);
5304 SetValue(SizeProperty, value);
5305 NotifyPropertyChanged();
5310 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
5312 /// <since_tizen> 3 </since_tizen>
5313 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
5315 "Container parent = view.GetParent(); " +
5316 "View view = parent as View;")]
5317 [EditorBrowsable(EditorBrowsableState.Never)]
5318 public new View Parent
5323 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
5324 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
5325 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
5327 if (basehandle is Layer layer)
5329 ret = new View(Layer.getCPtr(layer).Handle, false);
5330 NUILog.Error("This Parent property is deprecated, shoud do not be used");
5334 ret = basehandle as View;
5337 NDalicPINVOKE.delete_BaseHandle(CPtr);
5338 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5340 if (NDalicPINVOKE.SWIGPendingException.Pending)
5341 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5347 /// Gets/Sets whether inherit parent's the layout Direction.
5349 /// <since_tizen> 4 </since_tizen>
5350 public bool InheritLayoutDirection
5354 return (bool)GetValue(InheritLayoutDirectionProperty);
5358 SetValue(InheritLayoutDirectionProperty, value);
5359 NotifyPropertyChanged();
5364 /// Gets/Sets the layout Direction.
5366 /// <since_tizen> 4 </since_tizen>
5367 public ViewLayoutDirectionType LayoutDirection
5371 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
5375 SetValue(LayoutDirectionProperty, value);
5376 NotifyPropertyChanged();
5381 /// Gets or sets the Margin for use in layout.
5384 /// Margin property is supported by Layout algorithms and containers.
5385 /// Please Set Layout if you want to use Margin property.
5387 /// <since_tizen> 4 </since_tizen>
5388 public Extents Margin
5392 return (Extents)GetValue(MarginProperty);
5396 SetValue(MarginProperty, value);
5397 NotifyPropertyChanged();
5401 internal Style Style
5405 return (Style)GetValue(StyleProperty);
5409 SetValue(StyleProperty, value);
5414 /// [Obsolete("Please do not use! this will be deprecated")]
5416 /// Please do not use! this will be deprecated!
5417 /// Instead please use Padding.
5418 /// <since_tizen> 4 </since_tizen>
5419 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
5420 [EditorBrowsable(EditorBrowsableState.Never)]
5421 public Extents PaddingEX
5425 Extents temp = new Extents(0, 0, 0, 0);
5426 GetProperty(View.Property.PADDING).Get(temp);
5431 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
5432 NotifyPropertyChanged();
5437 /// Perform an action on a visual registered to this view. <br />
5438 /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
5440 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
5441 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
5442 /// <param name="attributes">Optional attributes for the action.</param>
5443 /// <since_tizen> 5 </since_tizen>
5444 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
5446 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
5447 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5450 internal readonly MergedStyle _mergedStyle;
5453 /// Child property to specify desired width
5455 internal int LayoutWidthSpecificationFixed
5460 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5462 NUILog.Error("WidthSpecificationFixed get error!");
5468 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5473 /// Child property to specify desired height
5475 internal int LayoutHeightSpecificationFixed
5480 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5482 NUILog.Error("HeightSpecificationFixed get error!");
5488 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5493 /// Child property to specify desired width, use MatchParent/WrapContent)
5495 internal ChildLayoutData LayoutWidthSpecification
5500 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5502 NUILog.Error("WidthSpecificationFixed get error!");
5504 return (ChildLayoutData)tmp;
5508 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5513 /// Child property to specify desired height, use MatchParent/WrapContent)
5515 internal ChildLayoutData LayoutHeightSpecification
5520 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5522 NUILog.Error("HeightSpecificationFixed get error!");
5524 return (ChildLayoutData)tmp;
5528 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5532 internal float Weight
5536 return (float)GetValue(WeightProperty);
5540 SetValue(WeightProperty, value);
5541 NotifyPropertyChanged();
5545 private bool _backgroundImageSynchronosLoading = false;
5546 internal bool BackgroundImageSynchronosLoading
5550 return _backgroundImageSynchronosLoading;
5554 if (value != _backgroundImageSynchronosLoading)
5557 PropertyMap bgMap = this.Background;
5559 bgMap.Find(Visual.Property.Type)?.Get(out visualType);
5560 if (visualType == (int)Visual.Type.Image)
5562 bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
5564 if (bgUrl.Length != 0)
5566 _backgroundImageSynchronosLoading = value;
5567 bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
5568 this.Background = bgMap;
5574 internal class BackgroundResourceLoadedEventArgs : EventArgs
5576 private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5577 public ResourceLoadingStatusType Status
5590 private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
5591 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
5592 private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
5593 private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
5595 internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
5599 if (_backgroundResourceLoadedEventHandler == null)
5601 _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
5602 this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
5605 _backgroundResourceLoadedEventHandler += value;
5609 _backgroundResourceLoadedEventHandler -= value;
5611 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
5613 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5618 private void OnBackgroundResourceLoaded(IntPtr view)
5620 BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5621 e.Status = (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5623 if (_backgroundResourceLoadedEventHandler != null)
5625 _backgroundResourceLoadedEventHandler(this, e);
5629 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5631 return (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5638 /// The View layout Direction type.
5640 /// <since_tizen> 4 </since_tizen>
5641 public enum ViewLayoutDirectionType
5646 /// <since_tizen> 4 </since_tizen>
5651 /// <since_tizen> 4 </since_tizen>
5655 internal enum ChildLayoutData
5658 /// Constant which indicates child size should match parent size
5662 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
5667 internal enum ResourceLoadingStatusType