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 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1263 [EditorBrowsable(EditorBrowsableState.Never)]
1264 public class ChildAddedEventArgs : EventArgs
1267 /// Added child view at moment.
1269 /// <since_tizen> 5 </since_tizen>
1270 public View Added { get; set; }
1274 /// Event when a child is added.
1276 /// <since_tizen> 5 </since_tizen>
1277 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1278 [EditorBrowsable(EditorBrowsableState.Never)]
1279 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1281 // From Container Base class
1283 /// Adds a child view to this view.
1285 /// <seealso cref="Container.Add" />
1286 /// <since_tizen> 4 </since_tizen>
1287 public override void Add(View child)
1291 Tizen.Log.Fatal("NUI", "Child is null");
1295 Container oldParent = child.GetParent();
1296 if (oldParent != this)
1298 if (oldParent != null)
1300 oldParent.Remove(child);
1302 child.InternalParent = this;
1304 if (layoutSet == true && child.Layout == null) // Only give children a layout if parent an explicit container
1306 if( child.GetType() == typeof(View) || true == child.LayoutingRequired )
1308 child.Layout = new LayoutGroup();
1313 child.Layout = new LayoutItem();
1319 Layout.LayoutChildren.Add(child.Layout);
1322 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
1323 if (NDalicPINVOKE.SWIGPendingException.Pending)
1324 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1325 Children.Add(child);
1327 if (ChildAdded != null)
1329 ChildAddedEventArgs e = new ChildAddedEventArgs
1333 ChildAdded(this, e);
1339 /// Event argument passed through the ChildRemoved event.
1341 /// <since_tizen> 5 </since_tizen>
1342 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1343 [EditorBrowsable(EditorBrowsableState.Never)]
1344 public class ChildRemovedEventArgs : EventArgs
1347 /// Removed child view at moment.
1349 /// <since_tizen> 5 </since_tizen>
1350 public View Removed { get; set; }
1354 /// Event when a child is removed.
1356 /// <since_tizen> 5 </since_tizen>
1357 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1358 [EditorBrowsable(EditorBrowsableState.Never)]
1359 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1363 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
1365 /// <seealso cref="Container.Remove" />
1366 /// <since_tizen> 4 </since_tizen>
1367 public override void Remove(View child)
1369 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
1370 if (NDalicPINVOKE.SWIGPendingException.Pending)
1371 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1373 Children.Remove(child);
1374 child.InternalParent = null;
1380 Layout.LayoutChildren.Remove(child.Layout);
1384 if (ChildRemoved != null)
1386 ChildRemovedEventArgs e = new ChildRemovedEventArgs
1390 ChildRemoved(this, e);
1395 /// Retrieves a child view by index.
1397 /// <seealso cref="Container.GetChildAt" />
1398 /// <since_tizen> 4 </since_tizen>
1399 public override View GetChildAt(uint index)
1401 if (index < Children.Count)
1403 return Children[Convert.ToInt32(index)];
1412 /// Retrieves the number of children held by the view.
1414 /// <seealso cref="Container.GetChildCount" />
1415 /// <since_tizen> 4 </since_tizen>
1416 public override uint GetChildCount()
1418 return Convert.ToUInt32(Children.Count);
1422 /// Gets the views parent.
1424 /// <seealso cref="Container.GetParent()" />
1425 /// <since_tizen> 4 </since_tizen>
1426 public override Container GetParent()
1428 return this.InternalParent as Container;
1431 internal bool IsTopLevelView()
1433 if (GetParent() is Layer)
1441 /// you can override it to clean-up your own resources.
1443 /// <param name="type">DisposeTypes</param>
1444 /// <since_tizen> 3 </since_tizen>
1445 protected override void Dispose(DisposeTypes type)
1452 if (type == DisposeTypes.Explicit)
1455 //Release your own managed resources here.
1456 //You should release all of your own disposable objects here.
1459 //Release your own unmanaged resources here.
1460 //You should not access any managed member here except static instance.
1461 //because the execution order of Finalizes is non-deterministic.
1464 DisConnectFromSignals();
1467 if (swigCPtr.Handle != global::System.IntPtr.Zero)
1471 swigCMemOwn = false;
1472 NDalicPINVOKE.delete_View(swigCPtr);
1474 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1477 foreach (View view in Children)
1479 view.InternalParent = null;
1486 private void DisConnectFromSignals()
1488 // Save current CPtr.
1489 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
1491 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
1492 swigCPtr = GetBaseHandleCPtrHandleRef;
1494 if (_onRelayoutEventCallback != null)
1496 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1499 if (_offWindowEventCallback != null)
1501 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1504 if (_onWindowEventCallback != null)
1506 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1509 if (_wheelEventCallback != null)
1511 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1514 if (_hoverEventCallback != null)
1516 this.HoveredSignal().Disconnect(_hoverEventCallback);
1519 if (_touchDataCallback != null)
1521 this.TouchSignal().Disconnect(_touchDataCallback);
1524 if (_ResourcesLoadedCallback != null)
1526 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1529 if (_offWindowEventCallback != null)
1531 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1534 if (_onWindowEventCallback != null)
1536 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1539 if (_wheelEventCallback != null)
1541 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1544 if (_hoverEventCallback != null)
1546 this.HoveredSignal().Disconnect(_hoverEventCallback);
1549 if (_touchDataCallback != null)
1551 this.TouchSignal().Disconnect(_touchDataCallback);
1554 if (_onRelayoutEventCallback != null)
1556 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1559 if (_keyCallback != null)
1561 this.KeyEventSignal().Disconnect(_keyCallback);
1564 if (_keyInputFocusLostCallback != null)
1566 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1569 if (_keyInputFocusGainedCallback != null)
1571 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1574 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
1575 // Restore current CPtr.
1576 swigCPtr = currentCPtr;
1579 private EventHandler _keyInputFocusGainedEventHandler;
1580 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1581 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1582 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1585 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1586 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1588 /// <since_tizen> 3 </since_tizen>
1589 public event EventHandler FocusGained
1593 if (_keyInputFocusGainedEventHandler == null)
1595 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1596 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1599 _keyInputFocusGainedEventHandler += value;
1604 _keyInputFocusGainedEventHandler -= value;
1606 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1608 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1613 private void OnKeyInputFocusGained(IntPtr view)
1615 if (_keyInputFocusGainedEventHandler != null)
1617 _keyInputFocusGainedEventHandler(this, null);
1622 private EventHandler _keyInputFocusLostEventHandler;
1623 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1624 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1625 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1628 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1629 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1631 /// <since_tizen> 3 </since_tizen>
1632 public event EventHandler FocusLost
1636 if (_keyInputFocusLostEventHandler == null)
1638 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1639 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1642 _keyInputFocusLostEventHandler += value;
1647 _keyInputFocusLostEventHandler -= value;
1649 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1651 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1656 private void OnKeyInputFocusLost(IntPtr view)
1658 if (_keyInputFocusLostEventHandler != null)
1660 _keyInputFocusLostEventHandler(this, null);
1665 /// Event arguments that passed via the KeyEvent signal.
1667 /// <since_tizen> 3 </since_tizen>
1668 public class KeyEventArgs : EventArgs
1673 /// Key - is the key sent to the view.
1675 /// <since_tizen> 3 </since_tizen>
1689 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1690 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1691 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1692 private KeyCallbackType _keyCallback;
1695 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1696 /// The KeyPressed signal is emitted when the key event is received.<br />
1698 /// <since_tizen> 3 </since_tizen>
1699 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1703 if (_keyEventHandler == null)
1705 _keyCallback = OnKeyEvent;
1706 this.KeyEventSignal().Connect(_keyCallback);
1709 _keyEventHandler += value;
1714 _keyEventHandler -= value;
1716 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1718 this.KeyEventSignal().Disconnect(_keyCallback);
1723 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
1725 if (keyEvent == global::System.IntPtr.Zero)
1727 NUILog.Error("keyEvent should not be null!");
1731 KeyEventArgs e = new KeyEventArgs();
1733 bool result = false;
1735 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
1737 if (_keyEventHandler != null)
1739 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
1741 // Oring the result of each callback.
1742 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
1744 result |= del(this, e);
1751 private EventHandler _onRelayoutEventHandler;
1752 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1753 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1754 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1757 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1758 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1760 /// <since_tizen> 3 </since_tizen>
1761 public event EventHandler Relayout
1765 if (_onRelayoutEventHandler == null)
1767 _onRelayoutEventCallback = OnRelayout;
1768 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1771 _onRelayoutEventHandler += value;
1776 _onRelayoutEventHandler -= value;
1778 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1780 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1786 // Callback for View OnRelayout signal
1787 private void OnRelayout(IntPtr data)
1789 if (_onRelayoutEventHandler != null)
1791 _onRelayoutEventHandler(this, null);
1796 /// Event arguments that passed via the touch signal.
1798 /// <since_tizen> 3 </since_tizen>
1799 public class TouchEventArgs : EventArgs
1801 private Touch _touch;
1804 /// Touch - contains the information of touch points.
1806 /// <since_tizen> 3 </since_tizen>
1820 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1821 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1822 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1823 private TouchDataCallbackType _touchDataCallback;
1826 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1827 /// The touched signal is emitted when the touch input is received.<br />
1829 /// <since_tizen> 3 </since_tizen>
1830 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1834 if (_touchDataEventHandler == null)
1836 _touchDataCallback = OnTouch;
1837 this.TouchSignal().Connect(_touchDataCallback);
1840 _touchDataEventHandler += value;
1845 _touchDataEventHandler -= value;
1847 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1849 this.TouchSignal().Disconnect(_touchDataCallback);
1855 // Callback for View TouchSignal
1856 private bool OnTouch(IntPtr view, IntPtr touchData)
1858 if (touchData == global::System.IntPtr.Zero)
1860 NUILog.Error("touchData should not be null!");
1864 TouchEventArgs e = new TouchEventArgs();
1866 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
1868 if (_touchDataEventHandler != null)
1870 return _touchDataEventHandler(this, e);
1877 /// Event arguments that passed via the hover signal.
1879 /// <since_tizen> 3 </since_tizen>
1880 public class HoverEventArgs : EventArgs
1882 private Hover _hover;
1885 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
1887 /// <since_tizen> 3 </since_tizen>
1901 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1902 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1903 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1904 private HoverEventCallbackType _hoverEventCallback;
1907 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1908 /// The hovered signal is emitted when the hover input is received.<br />
1910 /// <since_tizen> 3 </since_tizen>
1911 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1915 if (_hoverEventHandler == null)
1917 _hoverEventCallback = OnHoverEvent;
1918 this.HoveredSignal().Connect(_hoverEventCallback);
1921 _hoverEventHandler += value;
1926 _hoverEventHandler -= value;
1928 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1930 this.HoveredSignal().Disconnect(_hoverEventCallback);
1936 // Callback for View Hover signal
1937 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
1939 if (hoverEvent == global::System.IntPtr.Zero)
1941 NUILog.Error("hoverEvent should not be null!");
1945 HoverEventArgs e = new HoverEventArgs();
1947 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
1949 if (_hoverEventHandler != null)
1951 return _hoverEventHandler(this, e);
1958 /// Event arguments that passed via the wheel signal.
1960 /// <since_tizen> 3 </since_tizen>
1961 public class WheelEventArgs : EventArgs
1963 private Wheel _wheel;
1966 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
1968 /// <since_tizen> 3 </since_tizen>
1982 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1983 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1984 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1985 private WheelEventCallbackType _wheelEventCallback;
1988 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1989 /// The WheelMoved signal is emitted when the wheel event is received.<br />
1991 /// <since_tizen> 3 </since_tizen>
1992 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1996 if (_wheelEventHandler == null)
1998 _wheelEventCallback = OnWheelEvent;
1999 this.WheelEventSignal().Connect(_wheelEventCallback);
2002 _wheelEventHandler += value;
2007 _wheelEventHandler -= value;
2009 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
2011 this.WheelEventSignal().Disconnect(_wheelEventCallback);
2017 // Callback for View Wheel signal
2018 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
2020 if (wheelEvent == global::System.IntPtr.Zero)
2022 NUILog.Error("wheelEvent should not be null!");
2026 WheelEventArgs e = new WheelEventArgs();
2028 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
2030 if (_wheelEventHandler != null)
2032 return _wheelEventHandler(this, e);
2038 private EventHandler _onWindowEventHandler;
2039 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2040 private delegate void OnWindowEventCallbackType(IntPtr control);
2041 private OnWindowEventCallbackType _onWindowEventCallback;
2044 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
2045 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
2047 /// <since_tizen> 3 </since_tizen>
2048 public event EventHandler AddedToWindow
2052 if (_onWindowEventHandler == null)
2054 _onWindowEventCallback = OnWindow;
2055 this.OnWindowSignal().Connect(_onWindowEventCallback);
2058 _onWindowEventHandler += value;
2063 _onWindowEventHandler -= value;
2065 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
2067 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
2072 // Callback for View OnWindow signal
2073 private void OnWindow(IntPtr data)
2075 if (_onWindowEventHandler != null)
2077 _onWindowEventHandler(this, null);
2082 private EventHandler _offWindowEventHandler;
2083 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2084 private delegate void OffWindowEventCallbackType(IntPtr control);
2085 private OffWindowEventCallbackType _offWindowEventCallback;
2088 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
2089 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
2091 /// <since_tizen> 3 </since_tizen>
2092 public event EventHandler RemovedFromWindow
2096 if (_offWindowEventHandler == null)
2098 _offWindowEventCallback = OffWindow;
2099 this.OffWindowSignal().Connect(_offWindowEventCallback);
2102 _offWindowEventHandler += value;
2107 _offWindowEventHandler -= value;
2109 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
2111 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
2116 // Callback for View OffWindow signal
2117 private void OffWindow(IntPtr data)
2119 if (_offWindowEventHandler != null)
2121 _offWindowEventHandler(this, null);
2126 /// Event arguments of visibility changed.
2128 /// <since_tizen> 3 </since_tizen>
2129 public class VisibilityChangedEventArgs : EventArgs
2132 private bool _visibility;
2133 private VisibilityChangeType _type;
2136 /// The view, or child of view, whose visibility has changed.
2138 /// <since_tizen> 3 </since_tizen>
2152 /// Whether the view is now visible or not.
2154 /// <since_tizen> 3 </since_tizen>
2155 public bool Visibility
2163 _visibility = value;
2168 /// Whether the view's visible property has changed or a parent's.
2170 /// <since_tizen> 3 </since_tizen>
2171 public VisibilityChangeType Type
2184 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
2185 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2186 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
2187 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
2190 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
2191 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
2193 /// <since_tizen> 3 </since_tizen>
2194 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
2198 if (_visibilityChangedEventHandler == null)
2200 _visibilityChangedEventCallback = OnVisibilityChanged;
2201 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
2204 _visibilityChangedEventHandler += value;
2209 _visibilityChangedEventHandler -= value;
2211 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
2213 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
2218 // Callback for View visibility change signal
2219 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
2221 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
2224 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2226 e.Visibility = visibility;
2229 if (_visibilityChangedEventHandler != null)
2231 _visibilityChangedEventHandler(this, e);
2237 /// Event arguments of layout direction changed.
2239 /// <since_tizen> 4 </since_tizen>
2240 public class LayoutDirectionChangedEventArgs : EventArgs
2243 private ViewLayoutDirectionType _type;
2246 /// The view, or child of view, whose layout direction has changed.
2248 /// <since_tizen> 4 </since_tizen>
2262 /// Whether the view's layout direction property has changed or a parent's.
2264 /// <since_tizen> 4 </since_tizen>
2265 public ViewLayoutDirectionType Type
2278 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
2279 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2280 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
2281 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
2284 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
2285 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
2287 /// <since_tizen> 4 </since_tizen>
2288 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
2292 if (_layoutDirectionChangedEventHandler == null)
2294 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
2295 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
2298 _layoutDirectionChangedEventHandler += value;
2303 _layoutDirectionChangedEventHandler -= value;
2305 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
2307 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
2312 // Callback for View layout direction change signal
2313 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
2315 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
2318 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2322 if (_layoutDirectionChangedEventHandler != null)
2324 _layoutDirectionChangedEventHandler(this, e);
2328 // Resource Ready Signal
2330 private EventHandler _resourcesLoadedEventHandler;
2331 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2332 private delegate void ResourcesLoadedCallbackType(IntPtr control);
2333 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
2336 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
2337 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
2339 /// <since_tizen> 3 </since_tizen>
2340 public event EventHandler ResourcesLoaded
2344 if (_resourcesLoadedEventHandler == null)
2346 _ResourcesLoadedCallback = OnResourcesLoaded;
2347 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
2350 _resourcesLoadedEventHandler += value;
2355 _resourcesLoadedEventHandler -= value;
2357 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
2359 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
2364 private void OnResourcesLoaded(IntPtr view)
2366 if (_resourcesLoadedEventHandler != null)
2368 _resourcesLoadedEventHandler(this, null);
2372 internal IntPtr GetPtrfromView()
2374 return (IntPtr)swigCPtr;
2377 internal class Property
2379 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
2380 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
2381 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
2382 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
2383 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
2384 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
2385 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
2386 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
2387 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
2388 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
2389 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
2390 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
2391 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
2392 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
2393 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
2394 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
2395 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
2396 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
2397 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
2398 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
2399 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
2400 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
2401 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
2402 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
2403 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
2404 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
2405 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
2406 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
2407 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
2408 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
2409 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
2410 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
2411 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
2412 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
2413 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
2414 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
2415 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
2416 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
2417 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
2418 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
2419 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
2420 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
2421 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
2422 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
2423 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
2424 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
2425 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
2426 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
2427 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
2428 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
2429 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
2430 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
2431 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
2432 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
2433 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
2434 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
2435 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
2436 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
2437 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
2438 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
2439 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
2440 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
2441 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();
2445 /// Describes the direction to move the focus towards.
2447 /// <since_tizen> 3 </since_tizen>
2448 public enum FocusDirection
2451 /// Move keyboard focus towards the left direction.
2453 /// <since_tizen> 3 </since_tizen>
2456 /// Move keyboard focus towards the right direction.
2458 /// <since_tizen> 3 </since_tizen>
2461 /// Move keyboard focus towards the up direction.
2463 /// <since_tizen> 3 </since_tizen>
2466 /// Move keyboard focus towards the down direction.
2468 /// <since_tizen> 3 </since_tizen>
2471 /// Move keyboard focus towards the previous page direction.
2473 /// <since_tizen> 3 </since_tizen>
2476 /// Move keyboard focus towards the next page direction.
2478 /// <since_tizen> 3 </since_tizen>
2483 /// Creates a new instance of a view.
2485 /// <since_tizen> 3 </since_tizen>
2486 public View() : this(NDalicPINVOKE.View_New(), true)
2488 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2490 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
2492 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2495 private View ConvertIdToView(uint id)
2498 if (GetParent() is View)
2500 View parentView = GetParent() as View;
2501 view = parentView.FindChildById(id);
2506 view = Window.Instance.GetRootLayer().FindChildById(id);
2512 internal void SetKeyInputFocus()
2514 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
2515 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2519 /// Queries whether the view has a focus.
2521 /// <returns>True if this view has a focus.</returns>
2522 /// <since_tizen> 3 </since_tizen>
2523 public bool HasFocus()
2525 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
2526 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2530 internal void ClearKeyInputFocus()
2532 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
2533 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2536 internal PinchGestureDetector GetPinchGestureDetector()
2538 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
2539 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2543 internal PanGestureDetector GetPanGestureDetector()
2545 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
2546 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2550 internal TapGestureDetector GetTapGestureDetector()
2552 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
2553 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2557 internal LongPressGestureDetector GetLongPressGestureDetector()
2559 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
2560 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2565 /// Sets the name of the style to be applied to the view.
2567 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
2568 /// <since_tizen> 3 </since_tizen>
2569 public void SetStyleName(string styleName)
2571 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
2572 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2576 /// Retrieves the name of the style to be applied to the view (if any).
2578 /// <returns>A string matching a style, or an empty string.</returns>
2579 /// <since_tizen> 3 </since_tizen>
2580 public string GetStyleName()
2582 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
2583 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2587 internal void SetBackgroundColor(Vector4 color)
2589 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
2590 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2593 internal Vector4 GetBackgroundColor()
2595 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
2596 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2600 internal void SetBackgroundImage(Image image)
2602 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
2603 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2607 /// Clears the background.
2609 /// <since_tizen> 3 </since_tizen>
2610 public void ClearBackground()
2612 NDalicPINVOKE.View_ClearBackground(swigCPtr);
2613 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2616 internal ControlKeySignal KeyEventSignal()
2618 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
2619 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2623 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
2625 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
2626 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2630 internal KeyInputFocusSignal KeyInputFocusLostSignal()
2632 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
2633 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2637 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
2639 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2642 internal enum PropertyRange
2644 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
2645 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
2646 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
2650 /// The StyleName, type string.
2652 /// <since_tizen> 3 </since_tizen>
2653 public string StyleName
2657 return (string)GetValue(StyleNameProperty);
2661 SetValue(StyleNameProperty, value);
2662 NotifyPropertyChanged();
2667 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
2669 /// <since_tizen> 3 </since_tizen>
2670 public Color BackgroundColor
2674 return (Color)GetValue(BackgroundColorProperty);
2678 SetValue(BackgroundColorProperty, value);
2679 NotifyPropertyChanged();
2684 /// Creates an animation to animate the background color visual. If there is no
2685 /// background visual, creates one with transparent black as it's mixColor.
2687 /// <since_tizen> 3 </since_tizen>
2688 public Animation AnimateBackgroundColor(object destinationValue,
2691 AlphaFunction.BuiltinFunctions? alphaFunction = null,
2692 object initialValue = null)
2694 Tizen.NUI.PropertyMap background = Background;
2696 if (background.Empty())
2698 // If there is no background yet, ensure there is a transparent
2700 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
2701 background = Background;
2703 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
2707 /// Creates an animation to animate the mixColor of the named visual.
2709 /// <since_tizen> 3 </since_tizen>
2710 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
2712 Animation animation = null;
2714 PropertyMap _animator = new PropertyMap();
2715 if (alphaFunction != null)
2717 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
2720 PropertyMap _timePeriod = new PropertyMap();
2721 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
2722 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
2723 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
2725 PropertyMap _transition = new PropertyMap();
2726 _transition.Add("animator", new PropertyValue(_animator));
2727 _transition.Add("target", new PropertyValue(targetVisual));
2728 _transition.Add("property", new PropertyValue("mixColor"));
2730 if (initialColor != null)
2732 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
2733 _transition.Add("initialValue", initValue);
2736 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
2737 _transition.Add("targetValue", destValue);
2738 TransitionData _transitionData = new TransitionData(_transition);
2740 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
2741 if (NDalicPINVOKE.SWIGPendingException.Pending)
2742 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2748 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
2750 /// <since_tizen> 3 </since_tizen>
2751 public string BackgroundImage
2755 return (string)GetValue(BackgroundImageProperty);
2759 SetValue(BackgroundImageProperty, value);
2760 NotifyPropertyChanged();
2765 /// The background of view.
2767 /// <since_tizen> 3 </since_tizen>
2768 public Tizen.NUI.PropertyMap Background
2772 return (PropertyMap)GetValue(BackgroundProperty);
2776 SetValue(BackgroundProperty, value);
2777 NotifyPropertyChanged();
2783 /// The current state of the view.
2785 /// <since_tizen> 3 </since_tizen>
2790 return (States)GetValue(StateProperty);
2794 SetValue(StateProperty, value);
2795 NotifyPropertyChanged();
2800 /// The current sub state of the view.
2802 /// <since_tizen> 3 </since_tizen>
2803 public States SubState
2807 return (States)GetValue(SubStateProperty);
2811 SetValue(SubStateProperty, value);
2812 NotifyPropertyChanged();
2817 /// Displays a tooltip
2819 /// <since_tizen> 3 </since_tizen>
2820 public Tizen.NUI.PropertyMap Tooltip
2824 return (PropertyMap)GetValue(TooltipProperty);
2828 SetValue(TooltipProperty, value);
2829 NotifyPropertyChanged();
2834 /// Displays a tooltip as a text.
2836 /// <since_tizen> 3 </since_tizen>
2837 public string TooltipText
2841 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
2842 NotifyPropertyChanged();
2846 private int LeftFocusableViewId
2851 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
2856 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2860 private int RightFocusableViewId
2865 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
2870 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2874 private int UpFocusableViewId
2879 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
2884 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2888 private int DownFocusableViewId
2893 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
2898 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2903 /// The Child property of FlexContainer.<br />
2904 /// The proportion of the free space in the container, the flex item will receive.<br />
2905 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
2907 /// <since_tizen> 3 </since_tizen>
2912 return (float)GetValue(FlexProperty);
2916 SetValue(FlexProperty, value);
2917 NotifyPropertyChanged();
2922 /// The Child property of FlexContainer.<br />
2923 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
2925 /// <since_tizen> 3 </since_tizen>
2926 public int AlignSelf
2930 return (int)GetValue(AlignSelfProperty);
2934 SetValue(AlignSelfProperty, value);
2935 NotifyPropertyChanged();
2940 /// The Child property of FlexContainer.<br />
2941 /// The space around the flex item.<br />
2943 /// <since_tizen> 3 </since_tizen>
2944 public Vector4 FlexMargin
2948 return (Vector4)GetValue(FlexMarginProperty);
2952 SetValue(FlexMarginProperty, value);
2953 NotifyPropertyChanged();
2958 /// The top-left cell this child occupies, if not set, the first available cell is used.
2960 /// <since_tizen> 3 </since_tizen>
2961 public Vector2 CellIndex
2965 return (Vector2)GetValue(CellIndexProperty);
2969 SetValue(CellIndexProperty, value);
2970 NotifyPropertyChanged();
2975 /// The number of rows this child occupies, if not set, the default value is 1.
2977 /// <since_tizen> 3 </since_tizen>
2978 public float RowSpan
2982 return (float)GetValue(RowSpanProperty);
2986 SetValue(RowSpanProperty, value);
2987 NotifyPropertyChanged();
2992 /// The number of columns this child occupies, if not set, the default value is 1.
2994 /// <since_tizen> 3 </since_tizen>
2995 public float ColumnSpan
2999 return (float)GetValue(ColumnSpanProperty);
3003 SetValue(ColumnSpanProperty, value);
3004 NotifyPropertyChanged();
3009 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
3011 /// <since_tizen> 3 </since_tizen>
3012 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
3016 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
3020 SetValue(CellHorizontalAlignmentProperty, value);
3021 NotifyPropertyChanged();
3026 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
3028 /// <since_tizen> 3 </since_tizen>
3029 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
3033 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
3037 SetValue(CellVerticalAlignmentProperty, value);
3038 NotifyPropertyChanged();
3043 /// The left focusable view.<br />
3044 /// This will return null if not set.<br />
3045 /// This will also return null if the specified left focusable view is not on a window.<br />
3047 /// <since_tizen> 3 </since_tizen>
3048 public View LeftFocusableView
3050 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3053 return (View)GetValue(LeftFocusableViewProperty);
3057 SetValue(LeftFocusableViewProperty, value);
3058 NotifyPropertyChanged();
3063 /// The right focusable view.<br />
3064 /// This will return null if not set.<br />
3065 /// This will also return null if the specified right focusable view is not on a window.<br />
3067 /// <since_tizen> 3 </since_tizen>
3068 public View RightFocusableView
3070 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3073 return (View)GetValue(RightFocusableViewProperty);
3077 SetValue(RightFocusableViewProperty, value);
3078 NotifyPropertyChanged();
3083 /// The up focusable view.<br />
3084 /// This will return null if not set.<br />
3085 /// This will also return null if the specified up focusable view is not on a window.<br />
3087 /// <since_tizen> 3 </since_tizen>
3088 public View UpFocusableView
3090 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3093 return (View)GetValue(UpFocusableViewProperty);
3097 SetValue(UpFocusableViewProperty, value);
3098 NotifyPropertyChanged();
3103 /// The down focusable view.<br />
3104 /// This will return null if not set.<br />
3105 /// This will also return null if the specified down focusable view is not on a window.<br />
3107 /// <since_tizen> 3 </since_tizen>
3108 public View DownFocusableView
3110 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3113 return (View)GetValue(DownFocusableViewProperty);
3117 SetValue(DownFocusableViewProperty, value);
3118 NotifyPropertyChanged();
3123 /// Whether the view should be focusable by keyboard navigation.
3125 /// <since_tizen> 3 </since_tizen>
3126 public bool Focusable
3130 SetValue(FocusableProperty, value);
3131 NotifyPropertyChanged();
3135 return (bool)GetValue(FocusableProperty);
3140 /// Enumeration for describing the states of the view.
3142 /// <since_tizen> 3 </since_tizen>
3146 /// The normal state.
3150 /// The focused state.
3154 /// The disabled state.
3160 /// Retrieves the position of the view.<br />
3161 /// The coordinates are relative to the view's parent.<br />
3163 /// <since_tizen> 3 </since_tizen>
3164 public Position CurrentPosition
3168 return GetCurrentPosition();
3173 /// Sets the size of a view for the width and the height.<br />
3174 /// Geometry can be scaled to fit within this area.<br />
3175 /// This does not interfere with the view's scale factor.<br />
3176 /// The views default depth is the minimum of width and height.<br />
3179 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
3180 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
3181 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
3182 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3183 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
3184 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
3186 /// <since_tizen> 3 </since_tizen>
3187 public Size2D Size2D
3191 Size2D temp = (Size2D)GetValue(Size2DProperty);
3192 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
3196 SetValue(Size2DProperty, value);
3197 // Set Specification so when layouts measure this View it matches the value set here.
3198 // All Views are currently Layouts.
3199 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
3200 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
3201 NotifyPropertyChanged();
3205 private void OnSize2DChanged(int width, int height)
3207 Size2D = new Size2D(width, height);
3211 /// Retrieves the size of the view.<br />
3212 /// The coordinates are relative to the view's parent.<br />
3214 /// <since_tizen> 3 </since_tizen>
3215 public Size2D CurrentSize
3219 return GetCurrentSize();
3224 /// Retrieves and sets the view's opacity.<br />
3226 /// <since_tizen> 3 </since_tizen>
3227 public float Opacity
3231 return (float)GetValue(OpacityProperty);
3235 SetValue(OpacityProperty, value);
3236 NotifyPropertyChanged();
3241 /// Sets the position of the view for X and Y.<br />
3242 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
3243 /// If the position inheritance is disabled, sets the world position.<br />
3246 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
3247 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
3248 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
3249 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3250 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
3251 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
3253 /// <since_tizen> 3 </since_tizen>
3254 public Position2D Position2D
3258 Position2D temp = (Position2D)GetValue(Position2DProperty);
3259 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
3263 SetValue(Position2DProperty, value);
3264 NotifyPropertyChanged();
3268 private void OnPosition2DChanged(int x, int y)
3270 Position2D = new Position2D(x, y);
3274 /// Retrieves the screen postion of the view.<br />
3276 /// <since_tizen> 3 </since_tizen>
3277 public Vector2 ScreenPosition
3281 Vector2 temp = new Vector2(0.0f, 0.0f);
3282 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
3288 /// Determines whether the pivot point should be used to determine the position of the view.
3289 /// This is true by default.
3291 /// <remarks>If false, then the top-left of the view is used for the position.
3292 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
3294 /// <since_tizen> 3 </since_tizen>
3295 public bool PositionUsesPivotPoint
3299 return (bool)GetValue(PositionUsesPivotPointProperty);
3303 SetValue(PositionUsesPivotPointProperty, value);
3304 NotifyPropertyChanged();
3309 /// Please do not use! this will be deprecated.
3311 /// Please do not use! this will be deprecated!
3312 /// Instead please use PositionUsesPivotPoint.
3313 /// <since_tizen> 3 </since_tizen>
3314 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
3316 "View view = new View(); " +
3317 "view.PivotPoint = PivotPoint.Center; " +
3318 "view.PositionUsesPivotPoint = true;")]
3319 [EditorBrowsable(EditorBrowsableState.Never)]
3320 public bool PositionUsesAnchorPoint
3325 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
3330 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3331 NotifyPropertyChanged();
3335 internal bool FocusState
3339 return IsKeyboardFocusable();
3343 SetKeyboardFocusable(value);
3348 /// Queries whether the view is connected to the stage.<br />
3349 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
3351 /// <since_tizen> 3 </since_tizen>
3352 public bool IsOnWindow
3361 /// Gets the depth in the hierarchy for the view.
3363 /// <since_tizen> 3 </since_tizen>
3364 public int HierarchyDepth
3368 return GetHierarchyDepth();
3373 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
3376 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
3377 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
3378 /// The values set by this property will likely change.
3380 /// <since_tizen> 3 </since_tizen>
3381 public int SiblingOrder
3385 return (int)GetValue(SiblingOrderProperty);
3389 SetValue(SiblingOrderProperty, value);
3390 NotifyPropertyChanged();
3395 /// Returns the natural size of the view.
3398 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3400 /// <since_tizen> 5 </since_tizen>
3401 public Vector3 NaturalSize
3405 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3406 if (NDalicPINVOKE.SWIGPendingException.Pending)
3407 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3413 /// Returns the natural size (Size2D) of the view.
3416 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3418 /// <since_tizen> 4 </since_tizen>
3419 public Size2D NaturalSize2D
3423 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3424 if (NDalicPINVOKE.SWIGPendingException.Pending)
3425 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3427 return new Size2D((int)temp.Width, (int)temp.Height);
3432 /// Set the layout on this control.
3436 internal LayoutItem Layout
3440 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
3442 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3443 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3444 NDalicPINVOKE.delete_BaseHandle(CPtr);
3445 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3447 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3449 return basehandle as LayoutItem;
3453 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(value));
3454 value.LayoutChildren.Clear();
3456 foreach (View view in Children)
3458 value.LayoutChildren.Add(view.Layout);
3464 /// Set that layouting is required on this View. It will automatically receive a Layout.
3468 internal bool LayoutingRequired
3472 bool result = Tizen.NUI.NDalicManualPINVOKE.View_IsLayoutingRequired(View.getCPtr(this));
3473 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3478 Tizen.NUI.NDalicManualPINVOKE.View_SetLayoutingRequired(View.getCPtr(this), value);
3486 /// This is an asynchronous method.
3488 /// <since_tizen> 3 </since_tizen>
3498 /// This is an asynchronous method.
3499 /// If the view is hidden, then the view and its children will not be rendered.
3500 /// 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.
3502 /// <since_tizen> 3 </since_tizen>
3508 internal void Raise()
3510 var parentChildren = GetParent()?.Children;
3512 if (parentChildren != null)
3514 int currentIndex = parentChildren.IndexOf(this);
3516 // If the view is not already the last item in the list.
3517 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
3519 View temp = parentChildren[currentIndex + 1];
3520 parentChildren[currentIndex + 1] = this;
3521 parentChildren[currentIndex] = temp;
3523 NDalicPINVOKE.Raise(swigCPtr);
3524 if (NDalicPINVOKE.SWIGPendingException.Pending)
3525 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3531 internal void Lower()
3533 var parentChildren = GetParent()?.Children;
3535 if (parentChildren != null)
3537 int currentIndex = parentChildren.IndexOf(this);
3539 // If the view is not already the first item in the list.
3540 if (currentIndex > 0 && currentIndex < parentChildren.Count)
3542 View temp = parentChildren[currentIndex - 1];
3543 parentChildren[currentIndex - 1] = this;
3544 parentChildren[currentIndex] = temp;
3546 NDalicPINVOKE.Lower(swigCPtr);
3547 if (NDalicPINVOKE.SWIGPendingException.Pending)
3548 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3554 /// Raises the view above all other views.
3557 /// Sibling order of views within the parent will be updated automatically.
3558 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
3560 /// <since_tizen> 3 </since_tizen>
3561 public void RaiseToTop()
3563 var parentChildren = GetParent()?.Children;
3565 if (parentChildren != null)
3567 parentChildren.Remove(this);
3568 parentChildren.Add(this);
3570 NDalicPINVOKE.RaiseToTop(swigCPtr);
3571 if (NDalicPINVOKE.SWIGPendingException.Pending)
3572 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3578 /// Lowers the view to the bottom of all views.
3581 /// The sibling order of views within the parent will be updated automatically.
3582 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3584 /// <since_tizen> 3 </since_tizen>
3585 public void LowerToBottom()
3587 var parentChildren = GetParent()?.Children;
3589 if (parentChildren != null)
3591 parentChildren.Remove(this);
3592 parentChildren.Insert(0, this);
3594 NDalicPINVOKE.LowerToBottom(swigCPtr);
3595 if (NDalicPINVOKE.SWIGPendingException.Pending)
3596 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3601 /// Queries if all resources required by a view are loaded and ready.
3603 /// <remarks>Most resources are only loaded when the control is placed on the stage.
3605 /// <since_tizen> 3 </since_tizen>
3606 public bool IsResourceReady()
3608 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
3609 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3614 /// Raises the view to above the target view.
3616 /// <remarks>The sibling order of views within the parent will be updated automatically.
3617 /// Views on the level above the target view will still be shown above this view.
3618 /// Raising this view above views with the same sibling order as each other will raise this view above them.
3619 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3621 /// <param name="target">Will be raised above this view.</param>
3622 internal void RaiseAbove(View target)
3624 var parentChildren = GetParent()?.Children;
3626 if (parentChildren != null)
3628 int currentIndex = parentChildren.IndexOf(this);
3629 int targetIndex = parentChildren.IndexOf(target);
3631 if (currentIndex < 0 || targetIndex < 0 ||
3632 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3634 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3637 // If the currentIndex is less than the target index and the target has the same parent.
3638 if (currentIndex < targetIndex)
3640 parentChildren.Remove(this);
3641 parentChildren.Insert(targetIndex, this);
3643 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
3644 if (NDalicPINVOKE.SWIGPendingException.Pending)
3645 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3652 /// Lowers the view to below the target view.
3654 /// <remarks>The sibling order of views within the parent will be updated automatically.
3655 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
3656 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3658 /// <param name="target">Will be lowered below this view.</param>
3659 internal void LowerBelow(View target)
3661 var parentChildren = GetParent()?.Children;
3663 if (parentChildren != null)
3665 int currentIndex = parentChildren.IndexOf(this);
3666 int targetIndex = parentChildren.IndexOf(target);
3667 if (currentIndex < 0 || targetIndex < 0 ||
3668 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3670 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3674 // If the currentIndex is not already the 0th index and the target has the same parent.
3675 if ((currentIndex != 0) && (targetIndex != -1) &&
3676 (currentIndex > targetIndex))
3678 parentChildren.Remove(this);
3679 parentChildren.Insert(targetIndex, this);
3681 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
3682 if (NDalicPINVOKE.SWIGPendingException.Pending)
3683 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3689 internal string GetName()
3691 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
3692 if (NDalicPINVOKE.SWIGPendingException.Pending)
3693 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3697 internal void SetName(string name)
3699 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
3700 if (NDalicPINVOKE.SWIGPendingException.Pending)
3701 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3704 internal uint GetId()
3706 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
3707 if (NDalicPINVOKE.SWIGPendingException.Pending)
3708 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3712 internal bool IsRoot()
3714 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
3715 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3719 internal bool OnWindow()
3721 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
3722 if (NDalicPINVOKE.SWIGPendingException.Pending)
3723 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3728 /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
3730 /// <pre>The view has been initialized. </pre>
3731 /// <returns>The parent layer of view </returns>
3732 /// <since_tizen> 5 </since_tizen>
3733 public Layer GetLayer()
3735 //to fix memory leak issue, match the handle count with native side.
3736 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
3737 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3738 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
3739 NDalicPINVOKE.delete_BaseHandle(CPtr);
3740 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3742 if (NDalicPINVOKE.SWIGPendingException.Pending)
3743 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3748 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
3750 /// <pre>The (child) view has been initialized. </pre>
3751 /// <since_tizen> 4 </since_tizen>
3752 public void Unparent()
3754 GetParent()?.Remove(this);
3758 /// Search through this view's hierarchy for a view with the given name.
3759 /// The view itself is also considered in the search.
3761 /// <pre>The view has been initialized.</pre>
3762 /// <param name="viewName">The name of the view to find.</param>
3763 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
3764 /// <since_tizen> 3 </since_tizen>
3765 public View FindChildByName(string viewName)
3767 //to fix memory leak issue, match the handle count with native side.
3768 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
3769 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3770 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3771 NDalicPINVOKE.delete_BaseHandle(CPtr);
3772 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3774 if (NDalicPINVOKE.SWIGPendingException.Pending)
3775 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3779 internal View FindChildById(uint id)
3781 //to fix memory leak issue, match the handle count with native side.
3782 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
3783 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3784 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3785 NDalicPINVOKE.delete_BaseHandle(CPtr);
3786 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3788 if (NDalicPINVOKE.SWIGPendingException.Pending)
3789 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3793 internal void SetParentOrigin(Vector3 origin)
3795 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
3796 if (NDalicPINVOKE.SWIGPendingException.Pending)
3797 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3800 internal Vector3 GetCurrentParentOrigin()
3802 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
3803 if (NDalicPINVOKE.SWIGPendingException.Pending)
3804 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3808 internal void SetAnchorPoint(Vector3 anchorPoint)
3810 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
3811 if (NDalicPINVOKE.SWIGPendingException.Pending)
3812 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3815 internal Vector3 GetCurrentAnchorPoint()
3817 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
3818 if (NDalicPINVOKE.SWIGPendingException.Pending)
3819 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3823 internal void SetSize(float width, float height)
3825 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
3826 if (NDalicPINVOKE.SWIGPendingException.Pending)
3827 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3830 internal void SetSize(float width, float height, float depth)
3832 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
3833 if (NDalicPINVOKE.SWIGPendingException.Pending)
3834 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3837 internal void SetSize(Vector2 size)
3839 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
3840 if (NDalicPINVOKE.SWIGPendingException.Pending)
3841 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3844 internal void SetSize(Vector3 size)
3846 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
3847 if (NDalicPINVOKE.SWIGPendingException.Pending)
3848 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3851 internal Vector3 GetTargetSize()
3853 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
3854 if (NDalicPINVOKE.SWIGPendingException.Pending)
3855 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3859 internal Size2D GetCurrentSize()
3861 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
3862 if (NDalicPINVOKE.SWIGPendingException.Pending)
3863 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3864 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
3868 internal Vector3 GetNaturalSize()
3870 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3871 if (NDalicPINVOKE.SWIGPendingException.Pending)
3872 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3876 internal void SetPosition(float x, float y)
3878 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
3879 if (NDalicPINVOKE.SWIGPendingException.Pending)
3880 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3883 internal void SetPosition(float x, float y, float z)
3885 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
3886 if (NDalicPINVOKE.SWIGPendingException.Pending)
3887 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3890 internal void SetPosition(Vector3 position)
3892 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
3893 if (NDalicPINVOKE.SWIGPendingException.Pending)
3894 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3897 internal void SetX(float x)
3899 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
3900 if (NDalicPINVOKE.SWIGPendingException.Pending)
3901 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3904 internal void SetY(float y)
3906 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
3907 if (NDalicPINVOKE.SWIGPendingException.Pending)
3908 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3911 internal void SetZ(float z)
3913 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
3914 if (NDalicPINVOKE.SWIGPendingException.Pending)
3915 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3918 internal void TranslateBy(Vector3 distance)
3920 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
3921 if (NDalicPINVOKE.SWIGPendingException.Pending)
3922 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3925 internal Position GetCurrentPosition()
3927 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
3928 if (NDalicPINVOKE.SWIGPendingException.Pending)
3929 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3933 internal Vector3 GetCurrentWorldPosition()
3935 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
3936 if (NDalicPINVOKE.SWIGPendingException.Pending)
3937 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3941 internal void SetInheritPosition(bool inherit)
3943 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
3944 if (NDalicPINVOKE.SWIGPendingException.Pending)
3945 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3948 internal bool IsPositionInherited()
3950 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
3951 if (NDalicPINVOKE.SWIGPendingException.Pending)
3952 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3956 internal void SetOrientation(Degree angle, Vector3 axis)
3958 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
3959 if (NDalicPINVOKE.SWIGPendingException.Pending)
3960 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3963 internal void SetOrientation(Radian angle, Vector3 axis)
3965 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
3966 if (NDalicPINVOKE.SWIGPendingException.Pending)
3967 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3970 internal void SetOrientation(Rotation orientation)
3972 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
3973 if (NDalicPINVOKE.SWIGPendingException.Pending)
3974 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3977 internal void RotateBy(Degree angle, Vector3 axis)
3979 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
3980 if (NDalicPINVOKE.SWIGPendingException.Pending)
3981 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3984 internal void RotateBy(Radian angle, Vector3 axis)
3986 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
3987 if (NDalicPINVOKE.SWIGPendingException.Pending)
3988 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3991 internal void RotateBy(Rotation relativeRotation)
3993 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
3994 if (NDalicPINVOKE.SWIGPendingException.Pending)
3995 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3998 internal Rotation GetCurrentOrientation()
4000 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
4001 if (NDalicPINVOKE.SWIGPendingException.Pending)
4002 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4006 internal void SetInheritOrientation(bool inherit)
4008 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
4009 if (NDalicPINVOKE.SWIGPendingException.Pending)
4010 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4013 internal bool IsOrientationInherited()
4015 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
4016 if (NDalicPINVOKE.SWIGPendingException.Pending)
4017 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4021 internal Rotation GetCurrentWorldOrientation()
4023 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4024 if (NDalicPINVOKE.SWIGPendingException.Pending)
4025 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4029 internal void SetScale(float scale)
4031 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
4032 if (NDalicPINVOKE.SWIGPendingException.Pending)
4033 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4036 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4038 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4039 if (NDalicPINVOKE.SWIGPendingException.Pending)
4040 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4043 internal void SetScale(Vector3 scale)
4045 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4046 if (NDalicPINVOKE.SWIGPendingException.Pending)
4047 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4050 internal void ScaleBy(Vector3 relativeScale)
4052 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4053 if (NDalicPINVOKE.SWIGPendingException.Pending)
4054 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4057 internal Vector3 GetCurrentScale()
4059 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
4060 if (NDalicPINVOKE.SWIGPendingException.Pending)
4061 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4065 internal Vector3 GetCurrentWorldScale()
4067 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
4068 if (NDalicPINVOKE.SWIGPendingException.Pending)
4069 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4073 internal void SetInheritScale(bool inherit)
4075 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
4076 if (NDalicPINVOKE.SWIGPendingException.Pending)
4077 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4080 internal bool IsScaleInherited()
4082 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
4083 if (NDalicPINVOKE.SWIGPendingException.Pending)
4084 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4088 internal Matrix GetCurrentWorldMatrix()
4090 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4091 if (NDalicPINVOKE.SWIGPendingException.Pending)
4092 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4096 internal void SetVisible(bool visible)
4098 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
4099 if (NDalicPINVOKE.SWIGPendingException.Pending)
4100 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4103 internal bool IsVisible()
4105 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
4106 if (NDalicPINVOKE.SWIGPendingException.Pending)
4107 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4111 internal void SetOpacity(float opacity)
4113 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
4114 if (NDalicPINVOKE.SWIGPendingException.Pending)
4115 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4118 internal float GetCurrentOpacity()
4120 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
4121 if (NDalicPINVOKE.SWIGPendingException.Pending)
4122 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4126 internal void SetColor(Vector4 color)
4128 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4129 if (NDalicPINVOKE.SWIGPendingException.Pending)
4130 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4133 internal Vector4 GetCurrentColor()
4135 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
4136 if (NDalicPINVOKE.SWIGPendingException.Pending)
4137 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4141 internal void SetColorMode(ColorMode colorMode)
4143 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
4144 if (NDalicPINVOKE.SWIGPendingException.Pending)
4145 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4148 internal ColorMode GetColorMode()
4150 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
4151 if (NDalicPINVOKE.SWIGPendingException.Pending)
4152 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4156 internal Vector4 GetCurrentWorldColor()
4158 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
4159 if (NDalicPINVOKE.SWIGPendingException.Pending)
4160 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4164 internal void SetDrawMode(DrawModeType drawMode)
4166 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4167 if (NDalicPINVOKE.SWIGPendingException.Pending)
4168 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4171 internal DrawModeType GetDrawMode()
4173 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
4174 if (NDalicPINVOKE.SWIGPendingException.Pending)
4175 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4180 /// Converts screen coordinates into the view's coordinate system using the default camera.
4182 /// <pre>The view has been initialized.</pre>
4183 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4184 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4185 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4186 /// <param name="screenX">The screen X-coordinate.</param>
4187 /// <param name="screenY">The screen Y-coordinate.</param>
4188 /// <returns>True if the conversion succeeded.</returns>
4189 /// <since_tizen> 3 </since_tizen>
4190 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4192 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4193 if (NDalicPINVOKE.SWIGPendingException.Pending)
4194 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4198 internal void SetKeyboardFocusable(bool focusable)
4200 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4201 if (NDalicPINVOKE.SWIGPendingException.Pending)
4202 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4205 internal bool IsKeyboardFocusable()
4207 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
4208 if (NDalicPINVOKE.SWIGPendingException.Pending)
4209 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4213 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4215 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4216 if (NDalicPINVOKE.SWIGPendingException.Pending)
4217 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4220 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4222 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4223 if (NDalicPINVOKE.SWIGPendingException.Pending)
4224 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4229 /// Sets the relative to parent size factor of the view.<br />
4230 /// This factor is only used when ResizePolicy is set to either:
4231 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4232 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4234 /// <pre>The view has been initialized.</pre>
4235 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4236 /// <since_tizen> 3 </since_tizen>
4237 public void SetSizeModeFactor(Vector3 factor)
4239 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4240 if (NDalicPINVOKE.SWIGPendingException.Pending)
4241 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4244 internal Vector3 GetSizeModeFactor()
4246 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
4247 if (NDalicPINVOKE.SWIGPendingException.Pending)
4248 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4253 /// Calculates the height of the view given a width.<br />
4254 /// The natural size is used for default calculation.<br />
4255 /// Size 0 is treated as aspect ratio 1:1.<br />
4257 /// <param name="width">The width to use.</param>
4258 /// <returns>The height based on the width.</returns>
4259 /// <since_tizen> 3 </since_tizen>
4260 public float GetHeightForWidth(float width)
4262 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
4263 if (NDalicPINVOKE.SWIGPendingException.Pending)
4264 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4269 /// Calculates the width of the view given a height.<br />
4270 /// The natural size is used for default calculation.<br />
4271 /// Size 0 is treated as aspect ratio 1:1.<br />
4273 /// <param name="height">The height to use.</param>
4274 /// <returns>The width based on the height.</returns>
4275 /// <since_tizen> 3 </since_tizen>
4276 public float GetWidthForHeight(float height)
4278 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
4279 if (NDalicPINVOKE.SWIGPendingException.Pending)
4280 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4285 /// Return the amount of size allocated for relayout.
4287 /// <param name="dimension">The dimension to retrieve.</param>
4288 /// <returns>Return the size.</returns>
4289 /// <since_tizen> 3 </since_tizen>
4290 public float GetRelayoutSize(DimensionType dimension)
4292 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4293 if (NDalicPINVOKE.SWIGPendingException.Pending)
4294 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4299 /// Set the padding for the view.
4301 /// <param name="padding">Padding for the view.</param>
4302 /// <since_tizen> 3 </since_tizen>
4303 public void SetPadding(PaddingType padding)
4305 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4306 if (NDalicPINVOKE.SWIGPendingException.Pending)
4307 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4311 /// Return the value of padding for the view.
4313 /// <param name="paddingOut">the value of padding for the view</param>
4314 /// <since_tizen> 3 </since_tizen>
4315 public void GetPadding(PaddingType paddingOut)
4317 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4318 if (NDalicPINVOKE.SWIGPendingException.Pending)
4319 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4322 internal void SetMinimumSize(Vector2 size)
4324 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4325 if (NDalicPINVOKE.SWIGPendingException.Pending)
4326 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4329 internal Vector2 GetMinimumSize()
4331 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
4332 if (NDalicPINVOKE.SWIGPendingException.Pending)
4333 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4337 internal void SetMaximumSize(Vector2 size)
4339 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4340 if (NDalicPINVOKE.SWIGPendingException.Pending)
4341 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4344 internal Vector2 GetMaximumSize()
4346 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
4347 if (NDalicPINVOKE.SWIGPendingException.Pending)
4348 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4352 internal int GetHierarchyDepth()
4354 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
4355 if (NDalicPINVOKE.SWIGPendingException.Pending)
4356 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4360 /// <since_tizen> 3 </since_tizen>
4361 public uint AddRenderer(Renderer renderer)
4363 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4364 if (NDalicPINVOKE.SWIGPendingException.Pending)
4365 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4369 internal uint GetRendererCount()
4371 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
4372 if (NDalicPINVOKE.SWIGPendingException.Pending)
4373 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4377 /// <since_tizen> 3 </since_tizen>
4378 public Renderer GetRendererAt(uint index)
4380 //to fix memory leak issue, match the handle count with native side.
4381 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
4382 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4383 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4384 NDalicPINVOKE.delete_BaseHandle(CPtr);
4385 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4387 if (NDalicPINVOKE.SWIGPendingException.Pending)
4388 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4392 /// <since_tizen> 3 </since_tizen>
4393 public void RemoveRenderer(Renderer renderer)
4395 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4396 if (NDalicPINVOKE.SWIGPendingException.Pending)
4397 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4400 /// <since_tizen> 3 </since_tizen>
4401 public void RemoveRenderer(uint index)
4403 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4404 if (NDalicPINVOKE.SWIGPendingException.Pending)
4405 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4408 internal TouchDataSignal TouchSignal()
4410 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
4411 if (NDalicPINVOKE.SWIGPendingException.Pending)
4412 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4416 internal HoverSignal HoveredSignal()
4418 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
4419 if (NDalicPINVOKE.SWIGPendingException.Pending)
4420 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4424 internal WheelSignal WheelEventSignal()
4426 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
4427 if (NDalicPINVOKE.SWIGPendingException.Pending)
4428 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4432 internal ViewSignal OnWindowSignal()
4434 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
4435 if (NDalicPINVOKE.SWIGPendingException.Pending)
4436 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4440 internal ViewSignal OffWindowSignal()
4442 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
4443 if (NDalicPINVOKE.SWIGPendingException.Pending)
4444 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4448 internal ViewSignal OnRelayoutSignal()
4450 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
4451 if (NDalicPINVOKE.SWIGPendingException.Pending)
4452 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4456 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
4458 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
4459 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4464 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
4466 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
4467 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4472 internal ViewSignal ResourcesLoadedSignal()
4474 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
4475 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4480 /// Gets or sets the origin of a view within its parent's area.<br />
4481 /// 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 />
4482 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
4483 /// A view's position is the distance between this origin and the view's anchor-point.<br />
4485 /// <pre>The view has been initialized.</pre>
4486 /// <since_tizen> 3 </since_tizen>
4487 public Position ParentOrigin
4491 return (Position)GetValue(ParentOriginProperty);
4495 SetValue(ParentOriginProperty, value);
4496 NotifyPropertyChanged();
4500 internal float ParentOriginX
4505 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
4510 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
4511 NotifyPropertyChanged();
4515 internal float ParentOriginY
4520 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
4525 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
4526 NotifyPropertyChanged();
4530 internal float ParentOriginZ
4535 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
4540 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
4541 NotifyPropertyChanged();
4546 /// Gets or sets the anchor-point of a view.<br />
4547 /// 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 />
4548 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
4549 /// A view position is the distance between its parent-origin and this anchor-point.<br />
4550 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
4551 /// <pre>The view has been initialized.</pre>
4553 /// <since_tizen> 3 </since_tizen>
4554 public Position PivotPoint
4558 return (Position)GetValue(PivotPointProperty);
4562 SetValue(PivotPointProperty, value);
4563 NotifyPropertyChanged();
4567 internal float PivotPointX
4572 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
4577 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
4581 internal float PivotPointY
4586 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
4591 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
4595 internal float PivotPointZ
4600 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
4605 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
4610 /// Gets or sets the size width of the view.
4612 /// <since_tizen> 3 </since_tizen>
4613 public float SizeWidth
4617 return (float)GetValue(SizeWidthProperty);
4621 SetValue(SizeWidthProperty, value);
4622 NotifyPropertyChanged();
4627 /// Gets or sets the size height of the view.
4629 /// <since_tizen> 3 </since_tizen>
4630 public float SizeHeight
4634 return (float)GetValue(SizeHeightProperty);
4638 SetValue(SizeHeightProperty, value);
4639 NotifyPropertyChanged();
4644 /// Gets or sets the position of the view.<br />
4645 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
4646 /// If the position inheritance is disabled, sets the world position.<br />
4648 /// <since_tizen> 3 </since_tizen>
4649 public Position Position
4653 return (Position)GetValue(PositionProperty);
4657 SetValue(PositionProperty, value);
4658 NotifyPropertyChanged();
4663 /// Gets or sets the position X of the view.
4665 /// <since_tizen> 3 </since_tizen>
4666 public float PositionX
4670 return (float)GetValue(PositionXProperty);
4674 SetValue(PositionXProperty, value);
4675 NotifyPropertyChanged();
4680 /// Gets or sets the position Y of the view.
4682 /// <since_tizen> 3 </since_tizen>
4683 public float PositionY
4687 return (float)GetValue(PositionYProperty);
4691 SetValue(PositionYProperty, value);
4692 NotifyPropertyChanged();
4697 /// Gets or sets the position Z of the view.
4699 /// <since_tizen> 3 </since_tizen>
4700 public float PositionZ
4704 return (float)GetValue(PositionZProperty);
4708 SetValue(PositionZProperty, value);
4709 NotifyPropertyChanged();
4714 /// Gets or sets the world position of the view.
4716 /// <since_tizen> 3 </since_tizen>
4717 public Vector3 WorldPosition
4721 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4722 GetProperty(View.Property.WORLD_POSITION).Get(temp);
4727 internal float WorldPositionX
4732 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
4737 internal float WorldPositionY
4742 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
4747 internal float WorldPositionZ
4752 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
4758 /// Gets or sets the orientation of the view.<br />
4759 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
4761 /// <remarks>This is an asynchronous method.</remarks>
4762 /// <since_tizen> 3 </since_tizen>
4763 public Rotation Orientation
4767 return (Rotation)GetValue(OrientationProperty);
4771 SetValue(OrientationProperty, value);
4772 NotifyPropertyChanged();
4777 /// Gets or sets the world orientation of the view.<br />
4779 /// <since_tizen> 3 </since_tizen>
4780 public Rotation WorldOrientation
4784 Rotation temp = new Rotation();
4785 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
4791 /// Gets or sets the scale factor applied to the view.<br />
4793 /// <since_tizen> 3 </since_tizen>
4794 public Vector3 Scale
4798 return (Vector3)GetValue(ScaleProperty);
4802 SetValue(ScaleProperty, value);
4803 NotifyPropertyChanged();
4808 /// Gets or sets the scale X factor applied to the view.
4810 /// <since_tizen> 3 </since_tizen>
4815 return (float)GetValue(ScaleXProperty);
4819 SetValue(ScaleXProperty, value);
4820 NotifyPropertyChanged();
4825 /// Gets or sets the scale Y factor applied to the view.
4827 /// <since_tizen> 3 </since_tizen>
4832 return (float)GetValue(ScaleYProperty);
4836 SetValue(ScaleYProperty, value);
4837 NotifyPropertyChanged();
4842 /// Gets or sets the scale Z factor applied to the view.
4844 /// <since_tizen> 3 </since_tizen>
4849 return (float)GetValue(ScaleZProperty);
4853 SetValue(ScaleZProperty, value);
4854 NotifyPropertyChanged();
4859 /// Gets the world scale of the view.
4861 /// <since_tizen> 3 </since_tizen>
4862 public Vector3 WorldScale
4866 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4867 GetProperty(View.Property.WORLD_SCALE).Get(temp);
4873 /// Retrieves the visibility flag of the view.
4876 /// If the view is not visible, then the view and its children will not be rendered.
4877 /// 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.
4879 /// <since_tizen> 3 </since_tizen>
4880 public bool Visibility
4885 GetProperty(View.Property.VISIBLE).Get(out temp);
4891 /// Gets the view's world color.
4893 /// <since_tizen> 3 </since_tizen>
4894 public Vector4 WorldColor
4898 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
4899 GetProperty(View.Property.WORLD_COLOR).Get(temp);
4904 internal Matrix WorldMatrix
4908 Matrix temp = new Matrix();
4909 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
4915 /// Gets or sets the view's name.
4917 /// <since_tizen> 3 </since_tizen>
4922 return (string)GetValue(NameProperty);
4926 SetValue(NameProperty, value);
4927 NotifyPropertyChanged();
4932 /// Get the number of children held by the view.
4934 /// <since_tizen> 3 </since_tizen>
4935 public new uint ChildCount
4939 return GetChildCount();
4944 /// Gets the view's ID.
4947 /// <since_tizen> 3 </since_tizen>
4957 /// Gets or sets the status of whether the view should emit touch or hover signals.
4959 /// <since_tizen> 3 </since_tizen>
4960 public bool Sensitive
4964 return (bool)GetValue(SensitiveProperty);
4968 SetValue(SensitiveProperty, value);
4969 NotifyPropertyChanged();
4974 /// 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.
4976 /// <since_tizen> 3 </since_tizen>
4977 public bool LeaveRequired
4981 return (bool)GetValue(LeaveRequiredProperty);
4985 SetValue(LeaveRequiredProperty, value);
4986 NotifyPropertyChanged();
4991 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
4993 /// <since_tizen> 3 </since_tizen>
4994 public bool InheritOrientation
4998 return (bool)GetValue(InheritOrientationProperty);
5002 SetValue(InheritOrientationProperty, value);
5003 NotifyPropertyChanged();
5008 /// Gets or sets the status of whether a child view inherits it's parent's scale.
5010 /// <since_tizen> 3 </since_tizen>
5011 public bool InheritScale
5015 return (bool)GetValue(InheritScaleProperty);
5019 SetValue(InheritScaleProperty, value);
5020 NotifyPropertyChanged();
5025 /// Gets or sets the status of how the view and its children should be drawn.<br />
5026 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
5027 /// 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 />
5028 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
5029 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
5030 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
5032 /// <since_tizen> 3 </since_tizen>
5033 public DrawModeType DrawMode
5037 return (DrawModeType)GetValue(DrawModeProperty);
5041 SetValue(DrawModeProperty, value);
5042 NotifyPropertyChanged();
5047 /// Gets or sets the relative to parent size factor of the view.<br />
5048 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
5049 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
5051 /// <since_tizen> 3 </since_tizen>
5052 public Vector3 SizeModeFactor
5056 return (Vector3)GetValue(SizeModeFactorProperty);
5060 SetValue(SizeModeFactorProperty, value);
5061 NotifyPropertyChanged();
5066 /// Gets or sets the width resize policy to be used.
5068 /// <since_tizen> 3 </since_tizen>
5069 public ResizePolicyType WidthResizePolicy
5073 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
5077 SetValue(WidthResizePolicyProperty, value);
5078 NotifyPropertyChanged();
5083 /// Gets or sets the height resize policy to be used.
5085 /// <since_tizen> 3 </since_tizen>
5086 public ResizePolicyType HeightResizePolicy
5090 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
5094 SetValue(HeightResizePolicyProperty, value);
5095 NotifyPropertyChanged();
5100 /// Gets or sets the policy to use when setting size with size negotiation.<br />
5101 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
5103 /// <since_tizen> 3 </since_tizen>
5104 public SizeScalePolicyType SizeScalePolicy
5108 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
5112 SetValue(SizeScalePolicyProperty, value);
5113 NotifyPropertyChanged();
5118 /// Gets or sets the status of whether the width size is dependent on the height size.
5120 /// <since_tizen> 3 </since_tizen>
5121 public bool WidthForHeight
5125 return (bool)GetValue(WidthForHeightProperty);
5129 SetValue(WidthForHeightProperty, value);
5130 NotifyPropertyChanged();
5135 /// Gets or sets the status of whether the height size is dependent on the width size.
5137 /// <since_tizen> 3 </since_tizen>
5138 public bool HeightForWidth
5142 return (bool)GetValue(HeightForWidthProperty);
5146 SetValue(HeightForWidthProperty, value);
5147 NotifyPropertyChanged();
5152 /// Gets or sets the padding for use in layout.
5154 /// <since_tizen> 5 </since_tizen>
5155 public Extents Padding
5159 return (Extents)GetValue(PaddingProperty);
5163 SetValue(PaddingProperty, value);
5164 NotifyPropertyChanged();
5169 /// Gets or sets the minimum size the view can be assigned in size negotiation.
5171 /// <since_tizen> 3 </since_tizen>
5172 public Size2D MinimumSize
5176 return (Size2D)GetValue(MinimumSizeProperty);
5182 // Note: it only works if minimum size is >= than natural size.
5183 // To force the size it should be done through the width&height spec or Size2D.
5184 Layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
5185 Layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
5187 SetValue(MinimumSizeProperty, value);
5188 NotifyPropertyChanged();
5193 /// Gets or sets the maximum size the view can be assigned in size negotiation.
5195 /// <since_tizen> 3 </since_tizen>
5196 public Size2D MaximumSize
5200 return (Size2D)GetValue(MaximumSizeProperty);
5204 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
5205 // MATCH_PARENT spec + parent container size can be used to limit
5206 SetValue(MaximumSizeProperty, value);
5207 NotifyPropertyChanged();
5212 /// Gets or sets whether a child view inherits it's parent's position.<br />
5213 /// Default is to inherit.<br />
5214 /// 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 />
5216 /// <since_tizen> 3 </since_tizen>
5217 public bool InheritPosition
5221 return (bool)GetValue(InheritPositionProperty);
5225 SetValue(InheritPositionProperty, value);
5226 NotifyPropertyChanged();
5231 /// Gets or sets the clipping behavior (mode) of it's children.
5233 /// <since_tizen> 3 </since_tizen>
5234 public ClippingModeType ClippingMode
5238 return (ClippingModeType)GetValue(ClippingModeProperty);
5242 SetValue(ClippingModeProperty, value);
5243 NotifyPropertyChanged();
5248 /// Gets the number of renderers held by the view.
5250 /// <since_tizen> 3 </since_tizen>
5251 public uint RendererCount
5255 return GetRendererCount();
5260 /// [Obsolete("Please do not use! this will be deprecated")]
5262 /// <since_tizen> 3 </since_tizen>
5263 /// Please do not use! this will be deprecated!
5264 /// Instead please use PivotPoint.
5265 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
5267 "View view = new View(); " +
5268 "view.PivotPoint = PivotPoint.Center; " +
5269 "view.PositionUsesPivotPoint = true;")]
5270 [EditorBrowsable(EditorBrowsableState.Never)]
5271 public Position AnchorPoint
5275 Position temp = new Position(0.0f, 0.0f, 0.0f);
5276 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
5281 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
5282 NotifyPropertyChanged();
5287 /// Sets the size of a view for the width, the height and the depth.<br />
5288 /// Geometry can be scaled to fit within this area.<br />
5289 /// This does not interfere with the view's scale factor.<br />
5290 /// The views default depth is the minimum of width and height.<br />
5293 /// Please note that multi-cascade setting is not possible for this NUI object. <br />
5294 /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
5295 /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
5296 /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
5298 /// <since_tizen> 5 </since_tizen>
5303 return (Size)GetValue(SizeProperty);
5307 SetValue(SizeProperty, value);
5308 NotifyPropertyChanged();
5313 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
5315 /// <since_tizen> 3 </since_tizen>
5316 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
5318 "Container parent = view.GetParent(); " +
5319 "View view = parent as View;")]
5320 [EditorBrowsable(EditorBrowsableState.Never)]
5321 public new View Parent
5326 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
5327 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
5328 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
5330 if (basehandle is Layer layer)
5332 ret = new View(Layer.getCPtr(layer).Handle, false);
5333 NUILog.Error("This Parent property is deprecated, shoud do not be used");
5337 ret = basehandle as View;
5340 NDalicPINVOKE.delete_BaseHandle(CPtr);
5341 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5343 if (NDalicPINVOKE.SWIGPendingException.Pending)
5344 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5350 /// Gets/Sets whether inherit parent's the layout Direction.
5352 /// <since_tizen> 4 </since_tizen>
5353 public bool InheritLayoutDirection
5357 return (bool)GetValue(InheritLayoutDirectionProperty);
5361 SetValue(InheritLayoutDirectionProperty, value);
5362 NotifyPropertyChanged();
5367 /// Gets/Sets the layout Direction.
5369 /// <since_tizen> 4 </since_tizen>
5370 public ViewLayoutDirectionType LayoutDirection
5374 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
5378 SetValue(LayoutDirectionProperty, value);
5379 NotifyPropertyChanged();
5384 /// Gets or sets the Margin for use in layout.
5387 /// Margin property is supported by Layout algorithms and containers.
5388 /// Please Set Layout if you want to use Margin property.
5390 /// <since_tizen> 4 </since_tizen>
5391 public Extents Margin
5395 return (Extents)GetValue(MarginProperty);
5399 SetValue(MarginProperty, value);
5400 NotifyPropertyChanged();
5404 internal Style Style
5408 return (Style)GetValue(StyleProperty);
5412 SetValue(StyleProperty, value);
5417 /// [Obsolete("Please do not use! this will be deprecated")]
5419 /// Please do not use! this will be deprecated!
5420 /// Instead please use Padding.
5421 /// <since_tizen> 4 </since_tizen>
5422 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
5423 [EditorBrowsable(EditorBrowsableState.Never)]
5424 public Extents PaddingEX
5428 Extents temp = new Extents(0, 0, 0, 0);
5429 GetProperty(View.Property.PADDING).Get(temp);
5434 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
5435 NotifyPropertyChanged();
5440 /// Perform an action on a visual registered to this view. <br />
5441 /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
5443 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
5444 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
5445 /// <param name="attributes">Optional attributes for the action.</param>
5446 /// <since_tizen> 5 </since_tizen>
5447 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
5449 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
5450 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5453 internal readonly MergedStyle _mergedStyle;
5456 /// Child property to specify desired width
5458 internal int LayoutWidthSpecificationFixed
5463 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5465 NUILog.Error("WidthSpecificationFixed get error!");
5471 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5476 /// Child property to specify desired height
5478 internal int LayoutHeightSpecificationFixed
5483 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5485 NUILog.Error("HeightSpecificationFixed get error!");
5491 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5496 /// Child property to specify desired width, use MatchParent/WrapContent)
5498 internal ChildLayoutData LayoutWidthSpecification
5503 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5505 NUILog.Error("WidthSpecificationFixed get error!");
5507 return (ChildLayoutData)tmp;
5511 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5516 /// Child property to specify desired height, use MatchParent/WrapContent)
5518 internal ChildLayoutData LayoutHeightSpecification
5523 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5525 NUILog.Error("HeightSpecificationFixed get error!");
5527 return (ChildLayoutData)tmp;
5531 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5535 internal float Weight
5539 return (float)GetValue(WeightProperty);
5543 SetValue(WeightProperty, value);
5544 NotifyPropertyChanged();
5551 /// The View layout Direction type.
5553 /// <since_tizen> 4 </since_tizen>
5554 public enum ViewLayoutDirectionType
5559 /// <since_tizen> 4 </since_tizen>
5564 /// <since_tizen> 4 </since_tizen>
5568 internal enum ChildLayoutData
5571 /// Constant which indicates child size should match parent size
5575 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size