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 /// Flag to allow Layouting to be disabled for Views.
31 /// Once a View has a Layout set then any children added to Views from then on will receive
32 /// automatic Layouts.
33 private static bool layoutingDisabled = true;
35 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
36 [EditorBrowsable(EditorBrowsableState.Never)]
37 public bool IsResourcesCreated
41 return Application.Current.IsResourcesCreated;
45 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
46 [EditorBrowsable(EditorBrowsableState.Never)]
47 public ResourceDictionary XamlResources
51 return Application.Current.XamlResources;
55 Application.Current.XamlResources = value;
59 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
60 [EditorBrowsable(EditorBrowsableState.Never)]
61 public static readonly BindableProperty StyleNameProperty = BindableProperty.Create("StyleName", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
63 var view = (View)bindable;
66 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue));
69 defaultValueCreator:(bindable) =>
71 var view = (View)bindable;
73 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STYLE_NAME).Get(out temp);
76 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
77 [EditorBrowsable(EditorBrowsableState.Never)]
78 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), Color.Transparent, propertyChanged: (bindable, oldValue, newValue) =>
80 var view = (View)bindable;
83 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((Color)newValue));
86 defaultValueCreator:(bindable) =>
88 var view = (View)bindable;
89 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
91 Tizen.NUI.PropertyMap background = view.Background;
93 background.Find(Visual.Property.Type)?.Get(out visualType);
94 if (visualType == (int)Visual.Type.Color)
96 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
99 return backgroundColor;
101 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
102 [EditorBrowsable(EditorBrowsableState.Never)]
103 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
105 var view = (View)bindable;
106 if (newValue != null)
108 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((string)newValue));
111 defaultValueCreator:(bindable) =>
113 var view = (View)bindable;
114 string backgroundImage = "";
116 Tizen.NUI.PropertyMap background = view.Background;
118 background.Find(Visual.Property.Type)?.Get(out visualType);
119 if (visualType == (int)Visual.Type.Image)
121 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
124 return backgroundImage;
126 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
127 [EditorBrowsable(EditorBrowsableState.Never)]
128 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create("Background", typeof(PropertyMap), typeof(View), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
130 var view = (View)bindable;
131 if (newValue != null)
133 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
136 defaultValueCreator:(bindable) =>
138 var view = (View)bindable;
139 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
140 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
143 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
144 [EditorBrowsable(EditorBrowsableState.Never)]
145 public static readonly BindableProperty StateProperty = BindableProperty.Create("State", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
147 var view = (View)bindable;
148 if (newValue != null)
150 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
153 defaultValueCreator:(bindable) =>
155 var view = (View)bindable;
157 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
159 NUILog.Error("State get error!");
163 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
164 [EditorBrowsable(EditorBrowsableState.Never)]
165 public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
167 var view = (View)bindable;
168 string valueToString = "";
169 if (newValue != null)
171 switch ((States)newValue)
173 case States.Normal: { valueToString = "NORMAL"; break; }
174 case States.Focused: { valueToString = "FOCUSED"; break; }
175 case States.Disabled: { valueToString = "DISABLED"; break; }
176 default: { valueToString = "NORMAL"; break; }
178 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
181 defaultValueCreator:(bindable) =>
183 var view = (View)bindable;
185 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
187 NUILog.Error("subState get error!");
191 case "NORMAL": return States.Normal;
192 case "FOCUSED": return States.Focused;
193 case "DISABLED": return States.Disabled;
194 default: return States.Normal;
197 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
198 [EditorBrowsable(EditorBrowsableState.Never)]
199 public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
201 var view = (View)bindable;
202 if (newValue != null)
204 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
207 defaultValueCreator:(bindable) =>
209 var view = (View)bindable;
210 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
211 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
214 // public static readonly BindableProperty TooltipTextProperty = BindableProperty.Create("TooltipText", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
216 // var view = (View)bindable;
217 // if (newValue != null)
219 // Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((string)newValue));
222 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
223 [EditorBrowsable(EditorBrowsableState.Never)]
224 public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
226 var view = (View)bindable;
227 if (newValue != null)
229 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
232 defaultValueCreator:(bindable) =>
234 var view = (View)bindable;
236 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
239 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
240 [EditorBrowsable(EditorBrowsableState.Never)]
241 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
243 var view = (View)bindable;
244 if (newValue != null)
246 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
249 defaultValueCreator:(bindable) =>
251 var view = (View)bindable;
253 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
256 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
257 [EditorBrowsable(EditorBrowsableState.Never)]
258 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), Vector4.Zero, propertyChanged: (bindable, oldValue, newValue) =>
260 var view = (View)bindable;
261 if (newValue != null)
263 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
266 defaultValueCreator:(bindable) =>
268 var view = (View)bindable;
269 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
270 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
273 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
274 [EditorBrowsable(EditorBrowsableState.Never)]
275 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
277 var view = (View)bindable;
278 if (newValue != null)
280 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
283 defaultValueCreator:(bindable) =>
285 var view = (View)bindable;
286 Vector2 temp = new Vector2(0.0f, 0.0f);
287 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
290 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
291 [EditorBrowsable(EditorBrowsableState.Never)]
292 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
294 var view = (View)bindable;
295 if (newValue != null)
297 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
300 defaultValueCreator:(bindable) =>
302 var view = (View)bindable;
304 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
307 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
308 [EditorBrowsable(EditorBrowsableState.Never)]
309 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
311 var view = (View)bindable;
312 if (newValue != null)
314 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
317 defaultValueCreator:(bindable) =>
319 var view = (View)bindable;
321 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
324 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
325 [EditorBrowsable(EditorBrowsableState.Never)]
326 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
328 var view = (View)bindable;
329 string valueToString = "";
331 if (newValue != null)
333 switch ((HorizontalAlignmentType)newValue)
335 case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
336 case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
337 case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
338 default: { valueToString = "left"; break; }
340 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
343 defaultValueCreator:(bindable) =>
345 var view = (View)bindable;
347 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
349 NUILog.Error("CellHorizontalAlignment get error!");
354 case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
355 case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
356 case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
357 default: return Tizen.NUI.HorizontalAlignmentType.Left;
360 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
361 [EditorBrowsable(EditorBrowsableState.Never)]
362 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
364 var view = (View)bindable;
365 string valueToString = "";
367 if (newValue != null)
369 switch ((VerticalAlignmentType)newValue)
371 case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
372 case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
373 case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
374 default: { valueToString = "top"; break; }
376 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
379 defaultValueCreator:(bindable) =>
381 var view = (View)bindable;
383 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
385 NUILog.Error("CellVerticalAlignment get error!");
390 case "top": return Tizen.NUI.VerticalAlignmentType.Top;
391 case "center": return Tizen.NUI.VerticalAlignmentType.Center;
392 case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
393 default: return Tizen.NUI.VerticalAlignmentType.Top;
396 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
397 [EditorBrowsable(EditorBrowsableState.Never)]
398 public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
400 var view = (View)bindable;
401 if (newValue != null)
403 Tizen.NUI.Object.SetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
406 defaultValueCreator:(bindable) =>
408 var view = (View)bindable;
410 Tizen.NUI.Object.GetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT).Get(out temp);
413 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
414 [EditorBrowsable(EditorBrowsableState.Never)]
415 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
417 var view = (View)bindable;
418 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
419 else { view.LeftFocusableViewId = -1; }
421 defaultValueCreator:(bindable) =>
423 var view = (View)bindable;
424 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
427 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
428 [EditorBrowsable(EditorBrowsableState.Never)]
429 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
431 var view = (View)bindable;
432 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
433 else { view.RightFocusableViewId = -1; }
435 defaultValueCreator:(bindable) =>
437 var view = (View)bindable;
438 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
441 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
442 [EditorBrowsable(EditorBrowsableState.Never)]
443 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
445 var view = (View)bindable;
446 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
447 else { view.UpFocusableViewId = -1; }
449 defaultValueCreator:(bindable) =>
451 var view = (View)bindable;
452 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
455 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
456 [EditorBrowsable(EditorBrowsableState.Never)]
457 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
459 var view = (View)bindable;
460 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
461 else { view.DownFocusableViewId = -1; }
463 defaultValueCreator:(bindable) =>
465 var view = (View)bindable;
466 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
469 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
470 [EditorBrowsable(EditorBrowsableState.Never)]
471 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
473 var view = (View)bindable;
474 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
476 defaultValueCreator:(bindable) =>
478 var view = (View)bindable;
479 return view.IsKeyboardFocusable();
481 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
482 [EditorBrowsable(EditorBrowsableState.Never)]
483 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
485 var view = (View)bindable;
486 if (newValue != null)
488 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue( new Size((Size2D)newValue)));
491 defaultValueCreator:(bindable) =>
493 var view = (View)bindable;
494 Size temp = new Size(0.0f, 0.0f, 0.0f);
495 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
496 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
499 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
500 [EditorBrowsable(EditorBrowsableState.Never)]
501 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
503 var view = (View)bindable;
504 if (newValue != null)
506 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
509 defaultValueCreator:(bindable) =>
511 var view = (View)bindable;
513 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
516 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
517 [EditorBrowsable(EditorBrowsableState.Never)]
518 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), new Position2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
520 var view = (View)bindable;
521 if (newValue != null)
523 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue( new Position((Position2D)newValue) ));
526 defaultValueCreator:(bindable) =>
528 var view = (View)bindable;
529 Position temp = new Position(0.0f, 0.0f, 0.0f);
530 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
531 return new Position2D(temp);
533 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
534 [EditorBrowsable(EditorBrowsableState.Never)]
535 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
537 var view = (View)bindable;
538 if (newValue != null)
540 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
543 defaultValueCreator:(bindable) =>
545 var view = (View)bindable;
547 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
550 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
551 [EditorBrowsable(EditorBrowsableState.Never)]
552 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
554 var view = (View)bindable;
556 if (newValue != null)
558 value = (int)newValue;
561 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
564 var siblings = view.GetParent()?.Children;
565 if (siblings != null)
567 int currentOrder = siblings.IndexOf(view);
568 if (value != currentOrder)
570 if (value == 0) { view.LowerToBottom(); }
571 else if (value < siblings.Count - 1)
573 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
574 else { view.LowerBelow(siblings[value]); }
576 else { view.RaiseToTop(); }
581 defaultValueCreator:(bindable) =>
583 var view = (View)bindable;
584 var parentChildren = view.GetParent()?.Children;
585 int currentOrder = 0;
586 if (parentChildren != null)
588 currentOrder = parentChildren.IndexOf(view);
590 if (currentOrder < 0) { return 0; }
591 else if (currentOrder < parentChildren.Count) { return currentOrder; }
596 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
597 [EditorBrowsable(EditorBrowsableState.Never)]
598 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), Position.ParentOriginTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
600 var view = (View)bindable;
601 if (newValue != null)
603 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
606 defaultValueCreator:(bindable) =>
608 var view = (View)bindable;
609 Position temp = new Position(0.0f, 0.0f, 0.0f);
610 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
614 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
615 [EditorBrowsable(EditorBrowsableState.Never)]
616 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), Position.PivotPointTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
618 var view = (View)bindable;
619 if (newValue != null)
621 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
624 defaultValueCreator:(bindable) =>
626 var view = (View)bindable;
627 Position temp = new Position(0.0f, 0.0f, 0.0f);
628 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
631 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
632 [EditorBrowsable(EditorBrowsableState.Never)]
633 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
635 var view = (View)bindable;
636 if (newValue != null)
638 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
641 defaultValueCreator:(bindable) =>
643 var view = (View)bindable;
645 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
648 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
649 [EditorBrowsable(EditorBrowsableState.Never)]
650 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
652 var view = (View)bindable;
653 if (newValue != null)
655 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
658 defaultValueCreator:(bindable) =>
660 var view = (View)bindable;
662 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
665 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
666 [EditorBrowsable(EditorBrowsableState.Never)]
667 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), Position.Zero, propertyChanged: (bindable, oldValue, newValue) =>
669 var view = (View)bindable;
670 if (newValue != null)
672 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
675 defaultValueCreator:(bindable) =>
677 var view = (View)bindable;
678 Position temp = new Position(0.0f, 0.0f, 0.0f);
679 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
682 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
683 [EditorBrowsable(EditorBrowsableState.Never)]
684 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
686 var view = (View)bindable;
687 if (newValue != null)
689 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
692 defaultValueCreator:(bindable) =>
694 var view = (View)bindable;
696 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
699 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
700 [EditorBrowsable(EditorBrowsableState.Never)]
701 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
703 var view = (View)bindable;
704 if (newValue != null)
706 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
709 defaultValueCreator:(bindable) =>
711 var view = (View)bindable;
713 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
716 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
717 [EditorBrowsable(EditorBrowsableState.Never)]
718 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
720 var view = (View)bindable;
721 if (newValue != null)
723 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
726 defaultValueCreator:(bindable) =>
728 var view = (View)bindable;
730 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
733 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
734 [EditorBrowsable(EditorBrowsableState.Never)]
735 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), new Rotation(new Radian(0), Vector3.ZAxis), propertyChanged: (bindable, oldValue, newValue) =>
737 var view = (View)bindable;
738 if (newValue != null)
740 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
743 defaultValueCreator:(bindable) =>
745 var view = (View)bindable;
746 Rotation temp = new Rotation();
747 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
750 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
751 [EditorBrowsable(EditorBrowsableState.Never)]
752 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
754 var view = (View)bindable;
755 if (newValue != null)
757 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
760 defaultValueCreator:(bindable) =>
762 var view = (View)bindable;
763 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
764 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
767 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
768 [EditorBrowsable(EditorBrowsableState.Never)]
769 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
771 var view = (View)bindable;
772 if (newValue != null)
774 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
777 defaultValueCreator:(bindable) =>
779 var view = (View)bindable;
781 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
784 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
785 [EditorBrowsable(EditorBrowsableState.Never)]
786 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
788 var view = (View)bindable;
789 if (newValue != null)
791 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
794 defaultValueCreator:(bindable) =>
796 var view = (View)bindable;
798 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
801 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
802 [EditorBrowsable(EditorBrowsableState.Never)]
803 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
805 var view = (View)bindable;
806 if (newValue != null)
808 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
811 defaultValueCreator:(bindable) =>
813 var view = (View)bindable;
815 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
818 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
819 [EditorBrowsable(EditorBrowsableState.Never)]
820 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
822 var view = (View)bindable;
823 if (newValue != null)
825 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
828 defaultValueCreator:(bindable) =>
830 var view = (View)bindable;
832 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
835 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
836 [EditorBrowsable(EditorBrowsableState.Never)]
837 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
839 var view = (View)bindable;
840 if (newValue != null)
842 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
845 defaultValueCreator:(bindable) =>
847 var view = (View)bindable;
849 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
852 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
853 [EditorBrowsable(EditorBrowsableState.Never)]
854 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
856 var view = (View)bindable;
857 if (newValue != null)
859 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
862 defaultValueCreator:(bindable) =>
864 var view = (View)bindable;
866 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
869 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
870 [EditorBrowsable(EditorBrowsableState.Never)]
871 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
873 var view = (View)bindable;
874 if (newValue != null)
876 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
879 defaultValueCreator:(bindable) =>
881 var view = (View)bindable;
883 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
886 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
887 [EditorBrowsable(EditorBrowsableState.Never)]
888 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
890 var view = (View)bindable;
891 if (newValue != null)
893 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
896 defaultValueCreator:(bindable) =>
898 var view = (View)bindable;
900 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
903 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
904 [EditorBrowsable(EditorBrowsableState.Never)]
905 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
907 var view = (View)bindable;
908 if (newValue != null)
910 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
913 defaultValueCreator:(bindable) =>
915 var view = (View)bindable;
917 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
919 NUILog.Error("DrawMode get error!");
923 case "NORMAL": return DrawModeType.Normal;
924 case "OVERLAY_2D": return DrawModeType.Overlay2D;
925 case "STENCIL": return DrawModeType.Stencil;
926 default: return DrawModeType.Normal;
929 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
930 [EditorBrowsable(EditorBrowsableState.Never)]
931 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
933 var view = (View)bindable;
934 if (newValue != null)
936 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
939 defaultValueCreator:(bindable) =>
941 var view = (View)bindable;
942 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
943 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
946 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
947 [EditorBrowsable(EditorBrowsableState.Never)]
948 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
950 var view = (View)bindable;
951 if (newValue != null)
953 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
956 defaultValueCreator:(bindable) =>
958 var view = (View)bindable;
960 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
962 NUILog.Error("WidthResizePolicy get error!");
966 case "FIXED": return ResizePolicyType.Fixed;
967 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
968 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
969 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
970 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
971 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
972 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
973 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
974 default: return ResizePolicyType.Fixed;
977 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
978 [EditorBrowsable(EditorBrowsableState.Never)]
979 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
981 var view = (View)bindable;
982 if (newValue != null)
984 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
987 defaultValueCreator:(bindable) =>
989 var view = (View)bindable;
991 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
993 NUILog.Error("HeightResizePolicy get error!");
997 case "FIXED": return ResizePolicyType.Fixed;
998 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
999 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1000 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1001 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1002 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1003 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1004 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1005 default: return ResizePolicyType.Fixed;
1008 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1009 [EditorBrowsable(EditorBrowsableState.Never)]
1010 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1012 var view = (View)bindable;
1013 string valueToString = "";
1014 if (newValue != null)
1016 switch ((SizeScalePolicyType)newValue)
1018 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1019 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1020 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1021 default: { valueToString = "USE_SIZE_SET"; break; }
1023 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1026 defaultValueCreator:(bindable) =>
1028 var view = (View)bindable;
1030 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1032 NUILog.Error("SizeScalePolicy get error!");
1036 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1037 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1038 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1039 default: return SizeScalePolicyType.UseSizeSet;
1042 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1043 [EditorBrowsable(EditorBrowsableState.Never)]
1044 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1046 var view = (View)bindable;
1047 if (newValue != null)
1049 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1052 defaultValueCreator:(bindable) =>
1054 var view = (View)bindable;
1056 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1059 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1060 [EditorBrowsable(EditorBrowsableState.Never)]
1061 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1063 var view = (View)bindable;
1064 if (newValue != null)
1066 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1069 defaultValueCreator:(bindable) =>
1071 var view = (View)bindable;
1073 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1076 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1077 [EditorBrowsable(EditorBrowsableState.Never)]
1078 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), new Extents(0,0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1080 var view = (View)bindable;
1081 if (newValue != null)
1083 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1086 defaultValueCreator:(bindable) =>
1088 var view = (View)bindable;
1089 Extents temp = new Extents(0, 0, 0, 0);
1090 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1093 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1094 [EditorBrowsable(EditorBrowsableState.Never)]
1095 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), new Size(0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1097 var view = (View)bindable;
1098 if (newValue != null)
1100 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1103 defaultValueCreator: (bindable) => {
1104 var view = (View)bindable;
1105 Size temp = new Size(0, 0, 0);
1106 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1109 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1110 [EditorBrowsable(EditorBrowsableState.Never)]
1111 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
1113 var view = (View)bindable;
1114 if (newValue != null)
1116 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1119 defaultValueCreator:(bindable) =>
1121 var view = (View)bindable;
1122 Size2D temp = new Size2D(0, 0);
1123 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1126 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1127 [EditorBrowsable(EditorBrowsableState.Never)]
1128 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
1130 var view = (View)bindable;
1131 if (newValue != null)
1133 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1136 defaultValueCreator:(bindable) =>
1138 var view = (View)bindable;
1139 Size2D temp = new Size2D(0, 0);
1140 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1143 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1144 [EditorBrowsable(EditorBrowsableState.Never)]
1145 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1147 var view = (View)bindable;
1148 if (newValue != null)
1150 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1153 defaultValueCreator:(bindable) =>
1155 var view = (View)bindable;
1157 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1160 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1161 [EditorBrowsable(EditorBrowsableState.Never)]
1162 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1164 var view = (View)bindable;
1165 if (newValue != null)
1167 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1170 defaultValueCreator:(bindable) =>
1172 var view = (View)bindable;
1174 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1176 NUILog.Error("ClippingMode get error!");
1178 return (ClippingModeType)temp;
1180 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1181 [EditorBrowsable(EditorBrowsableState.Never)]
1182 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1184 var view = (View)bindable;
1185 if (newValue != null)
1187 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1190 defaultValueCreator:(bindable) =>
1192 var view = (View)bindable;
1194 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1197 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1198 [EditorBrowsable(EditorBrowsableState.Never)]
1199 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1201 var view = (View)bindable;
1202 if (newValue != null)
1204 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1207 defaultValueCreator:(bindable) =>
1209 var view = (View)bindable;
1211 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1213 NUILog.Error("LAYOUT_DIRECTION get error!");
1215 return (ViewLayoutDirectionType)temp;
1217 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1218 [EditorBrowsable(EditorBrowsableState.Never)]
1219 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), new Extents(0,0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1221 var view = (View)bindable;
1222 if (newValue != null)
1224 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1227 defaultValueCreator:(bindable) =>
1229 var view = (View)bindable;
1230 Extents temp = new Extents(0, 0, 0, 0);
1231 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1234 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1235 [EditorBrowsable(EditorBrowsableState.Never)]
1236 public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style),
1237 propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1240 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1242 private bool layoutSet = false; // Flag to indicate if SetLayout was called or View was automatically given a Layout
1244 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
1246 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1249 PositionUsesPivotPoint = false;
1251 _mergedStyle = new MergedStyle(GetType(), this);
1254 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
1256 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1260 /// Event argument passed through the ChildAdded event.
1262 /// <since_tizen> 5 </since_tizen>
1263 public class ChildAddedEventArgs : EventArgs
1266 /// Added child view at moment.
1268 /// <since_tizen> 5 </since_tizen>
1269 public View Added { get; set; }
1273 /// Event when a child is added.
1275 /// <since_tizen> 5 </since_tizen>
1276 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1278 // From Container Base class
1280 /// Adds a child view to this view.
1282 /// <seealso cref="Container.Add" />
1283 /// <since_tizen> 4 </since_tizen>
1284 public override void Add(View child)
1288 Tizen.Log.Fatal("NUI", "Child is null");
1292 Log.Info("NUI", "Adding Child:" + child.Name + " to " + Name + "\n");
1294 Container oldParent = child.GetParent();
1295 if (oldParent != this)
1297 if (oldParent != null)
1299 oldParent.Remove(child);
1301 child.InternalParent = this;
1303 // Only give children a layout if their parent is an explicit container or a pure View.
1304 // Pure View meaning not derived from a View, e.g a Legacy container.
1305 // layoutSet flag is true when the View became a layout using the set Layout API opposed to automatically due to it's parent.
1306 // First time the set Layout API is used by any View the Window no longer has layoutingDisabled.
1307 if ((true == layoutSet || GetType() == typeof(View)) && null == child.Layout && false == layoutingDisabled )
1309 Log.Info("NUI", "Parent[" + Name + "] Layout set[" + layoutSet.ToString() + "] Pure View[" + (!layoutSet).ToString() + "]\n");
1310 // If child is a View or explicitly set to require layouting then set child as a LayoutGroup.
1311 // If the child is derived from a View then it may be a legacy or existing container hence will do layouting itself.
1312 if( child.GetType() == typeof(View) || true == child.LayoutingRequired )
1314 Log.Info("NUI", "Creating LayoutGroup for " + child.Name + " LayoutingRequired[" + child.LayoutingRequired.ToString() + "]\n");
1315 child.SetLayout( new LayoutGroup() );
1319 // Adding child as a leaf, layouting will not propagate past this child.
1320 // Legacy containers will be a LayoutItems too and layout their children how they wish.
1321 Log.Info("NUI", "Creating LayoutItem for " + child.Name + "\n");
1322 child.SetLayout( new LayoutItem() );
1328 Layout.LayoutChildren.Add(child.Layout);
1331 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
1332 if (NDalicPINVOKE.SWIGPendingException.Pending)
1333 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1334 Children.Add(child);
1336 if (ChildAdded != null)
1338 ChildAddedEventArgs e = new ChildAddedEventArgs
1342 ChildAdded(this, e);
1348 /// Event argument passed through the ChildRemoved event.
1350 /// <since_tizen> 5 </since_tizen>
1351 public class ChildRemovedEventArgs : EventArgs
1354 /// Removed child view at moment.
1356 /// <since_tizen> 5 </since_tizen>
1357 public View Removed { get; set; }
1361 /// Event when a child is removed.
1363 /// <since_tizen> 5 </since_tizen>
1364 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1368 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
1370 /// <seealso cref="Container.Remove" />
1371 /// <since_tizen> 4 </since_tizen>
1372 public override void Remove(View child)
1374 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
1375 if (NDalicPINVOKE.SWIGPendingException.Pending)
1376 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1378 Children.Remove(child);
1379 child.InternalParent = null;
1385 Layout.LayoutChildren.Remove(child.Layout);
1389 if (ChildRemoved != null)
1391 ChildRemovedEventArgs e = new ChildRemovedEventArgs
1395 ChildRemoved(this, e);
1400 /// Retrieves a child view by index.
1402 /// <seealso cref="Container.GetChildAt" />
1403 /// <since_tizen> 4 </since_tizen>
1404 public override View GetChildAt(uint index)
1406 if (index < Children.Count)
1408 return Children[Convert.ToInt32(index)];
1417 /// Retrieves the number of children held by the view.
1419 /// <seealso cref="Container.GetChildCount" />
1420 /// <since_tizen> 4 </since_tizen>
1421 public override uint GetChildCount()
1423 return Convert.ToUInt32(Children.Count);
1427 /// Gets the views parent.
1429 /// <seealso cref="Container.GetParent()" />
1430 /// <since_tizen> 4 </since_tizen>
1431 public override Container GetParent()
1433 return this.InternalParent as Container;
1436 internal bool IsTopLevelView()
1438 if (GetParent() is Layer)
1446 /// you can override it to clean-up your own resources.
1448 /// <param name="type">DisposeTypes</param>
1449 /// <since_tizen> 3 </since_tizen>
1450 protected override void Dispose(DisposeTypes type)
1457 if (type == DisposeTypes.Explicit)
1460 //Release your own managed resources here.
1461 //You should release all of your own disposable objects here.
1464 //Release your own unmanaged resources here.
1465 //You should not access any managed member here except static instance.
1466 //because the execution order of Finalizes is non-deterministic.
1469 DisConnectFromSignals();
1472 if (swigCPtr.Handle != global::System.IntPtr.Zero)
1476 swigCMemOwn = false;
1477 NDalicPINVOKE.delete_View(swigCPtr);
1479 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1482 foreach (View view in Children)
1484 view.InternalParent = null;
1491 private void DisConnectFromSignals()
1493 // Save current CPtr.
1494 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
1496 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
1497 swigCPtr = GetBaseHandleCPtrHandleRef;
1499 if (_onRelayoutEventCallback != null)
1501 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1504 if (_offWindowEventCallback != null)
1506 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1509 if (_onWindowEventCallback != null)
1511 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1514 if (_wheelEventCallback != null)
1516 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1519 if (_hoverEventCallback != null)
1521 this.HoveredSignal().Disconnect(_hoverEventCallback);
1524 if (_touchDataCallback != null)
1526 this.TouchSignal().Disconnect(_touchDataCallback);
1529 if (_ResourcesLoadedCallback != null)
1531 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1534 if (_offWindowEventCallback != null)
1536 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1539 if (_onWindowEventCallback != null)
1541 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1544 if (_wheelEventCallback != null)
1546 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1549 if (_hoverEventCallback != null)
1551 this.HoveredSignal().Disconnect(_hoverEventCallback);
1554 if (_touchDataCallback != null)
1556 this.TouchSignal().Disconnect(_touchDataCallback);
1559 if (_onRelayoutEventCallback != null)
1561 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1564 if (_keyCallback != null)
1566 this.KeyEventSignal().Disconnect(_keyCallback);
1569 if (_keyInputFocusLostCallback != null)
1571 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1574 if (_keyInputFocusGainedCallback != null)
1576 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1579 if (_backgroundResourceLoadedCallback != null)
1581 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1584 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
1585 // Restore current CPtr.
1586 swigCPtr = currentCPtr;
1589 private EventHandler _keyInputFocusGainedEventHandler;
1590 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1591 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1592 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1595 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1596 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1598 /// <since_tizen> 3 </since_tizen>
1599 public event EventHandler FocusGained
1603 if (_keyInputFocusGainedEventHandler == null)
1605 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1606 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1609 _keyInputFocusGainedEventHandler += value;
1614 _keyInputFocusGainedEventHandler -= value;
1616 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1618 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1623 private void OnKeyInputFocusGained(IntPtr view)
1625 if (_keyInputFocusGainedEventHandler != null)
1627 _keyInputFocusGainedEventHandler(this, null);
1632 private EventHandler _keyInputFocusLostEventHandler;
1633 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1634 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1635 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1638 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1639 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1641 /// <since_tizen> 3 </since_tizen>
1642 public event EventHandler FocusLost
1646 if (_keyInputFocusLostEventHandler == null)
1648 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1649 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1652 _keyInputFocusLostEventHandler += value;
1657 _keyInputFocusLostEventHandler -= value;
1659 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1661 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1666 private void OnKeyInputFocusLost(IntPtr view)
1668 if (_keyInputFocusLostEventHandler != null)
1670 _keyInputFocusLostEventHandler(this, null);
1675 /// Event arguments that passed via the KeyEvent signal.
1677 /// <since_tizen> 3 </since_tizen>
1678 public class KeyEventArgs : EventArgs
1683 /// Key - is the key sent to the view.
1685 /// <since_tizen> 3 </since_tizen>
1699 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1700 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1701 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1702 private KeyCallbackType _keyCallback;
1705 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1706 /// The KeyPressed signal is emitted when the key event is received.<br />
1708 /// <since_tizen> 3 </since_tizen>
1709 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1713 if (_keyEventHandler == null)
1715 _keyCallback = OnKeyEvent;
1716 this.KeyEventSignal().Connect(_keyCallback);
1719 _keyEventHandler += value;
1724 _keyEventHandler -= value;
1726 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1728 this.KeyEventSignal().Disconnect(_keyCallback);
1733 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
1735 if (keyEvent == global::System.IntPtr.Zero)
1737 NUILog.Error("keyEvent should not be null!");
1741 KeyEventArgs e = new KeyEventArgs();
1743 bool result = false;
1745 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
1747 if (_keyEventHandler != null)
1749 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
1751 // Oring the result of each callback.
1752 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
1754 result |= del(this, e);
1761 private EventHandler _onRelayoutEventHandler;
1762 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1763 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1764 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1767 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1768 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1770 /// <since_tizen> 3 </since_tizen>
1771 public event EventHandler Relayout
1775 if (_onRelayoutEventHandler == null)
1777 _onRelayoutEventCallback = OnRelayout;
1778 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1781 _onRelayoutEventHandler += value;
1786 _onRelayoutEventHandler -= value;
1788 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1790 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1796 // Callback for View OnRelayout signal
1797 private void OnRelayout(IntPtr data)
1799 if (_onRelayoutEventHandler != null)
1801 _onRelayoutEventHandler(this, null);
1806 /// Event arguments that passed via the touch signal.
1808 /// <since_tizen> 3 </since_tizen>
1809 public class TouchEventArgs : EventArgs
1811 private Touch _touch;
1814 /// Touch - contains the information of touch points.
1816 /// <since_tizen> 3 </since_tizen>
1830 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1831 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1832 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1833 private TouchDataCallbackType _touchDataCallback;
1836 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1837 /// The touched signal is emitted when the touch input is received.<br />
1839 /// <since_tizen> 3 </since_tizen>
1840 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1844 if (_touchDataEventHandler == null)
1846 _touchDataCallback = OnTouch;
1847 this.TouchSignal().Connect(_touchDataCallback);
1850 _touchDataEventHandler += value;
1855 _touchDataEventHandler -= value;
1857 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1859 this.TouchSignal().Disconnect(_touchDataCallback);
1865 // Callback for View TouchSignal
1866 private bool OnTouch(IntPtr view, IntPtr touchData)
1868 if (touchData == global::System.IntPtr.Zero)
1870 NUILog.Error("touchData should not be null!");
1874 TouchEventArgs e = new TouchEventArgs();
1876 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
1878 if (_touchDataEventHandler != null)
1880 return _touchDataEventHandler(this, e);
1887 /// Event arguments that passed via the hover signal.
1889 /// <since_tizen> 3 </since_tizen>
1890 public class HoverEventArgs : EventArgs
1892 private Hover _hover;
1895 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
1897 /// <since_tizen> 3 </since_tizen>
1911 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1912 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1913 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1914 private HoverEventCallbackType _hoverEventCallback;
1917 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1918 /// The hovered signal is emitted when the hover input is received.<br />
1920 /// <since_tizen> 3 </since_tizen>
1921 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1925 if (_hoverEventHandler == null)
1927 _hoverEventCallback = OnHoverEvent;
1928 this.HoveredSignal().Connect(_hoverEventCallback);
1931 _hoverEventHandler += value;
1936 _hoverEventHandler -= value;
1938 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1940 this.HoveredSignal().Disconnect(_hoverEventCallback);
1946 // Callback for View Hover signal
1947 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
1949 if (hoverEvent == global::System.IntPtr.Zero)
1951 NUILog.Error("hoverEvent should not be null!");
1955 HoverEventArgs e = new HoverEventArgs();
1957 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
1959 if (_hoverEventHandler != null)
1961 return _hoverEventHandler(this, e);
1968 /// Event arguments that passed via the wheel signal.
1970 /// <since_tizen> 3 </since_tizen>
1971 public class WheelEventArgs : EventArgs
1973 private Wheel _wheel;
1976 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
1978 /// <since_tizen> 3 </since_tizen>
1992 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1993 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1994 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1995 private WheelEventCallbackType _wheelEventCallback;
1998 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1999 /// The WheelMoved signal is emitted when the wheel event is received.<br />
2001 /// <since_tizen> 3 </since_tizen>
2002 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
2006 if (_wheelEventHandler == null)
2008 _wheelEventCallback = OnWheelEvent;
2009 this.WheelEventSignal().Connect(_wheelEventCallback);
2012 _wheelEventHandler += value;
2017 _wheelEventHandler -= value;
2019 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
2021 this.WheelEventSignal().Disconnect(_wheelEventCallback);
2027 // Callback for View Wheel signal
2028 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
2030 if (wheelEvent == global::System.IntPtr.Zero)
2032 NUILog.Error("wheelEvent should not be null!");
2036 WheelEventArgs e = new WheelEventArgs();
2038 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
2040 if (_wheelEventHandler != null)
2042 return _wheelEventHandler(this, e);
2048 private EventHandler _onWindowEventHandler;
2049 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2050 private delegate void OnWindowEventCallbackType(IntPtr control);
2051 private OnWindowEventCallbackType _onWindowEventCallback;
2054 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
2055 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
2057 /// <since_tizen> 3 </since_tizen>
2058 public event EventHandler AddedToWindow
2062 if (_onWindowEventHandler == null)
2064 _onWindowEventCallback = OnWindow;
2065 this.OnWindowSignal().Connect(_onWindowEventCallback);
2068 _onWindowEventHandler += value;
2073 _onWindowEventHandler -= value;
2075 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
2077 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
2082 // Callback for View OnWindow signal
2083 private void OnWindow(IntPtr data)
2085 if (_onWindowEventHandler != null)
2087 _onWindowEventHandler(this, null);
2092 private EventHandler _offWindowEventHandler;
2093 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2094 private delegate void OffWindowEventCallbackType(IntPtr control);
2095 private OffWindowEventCallbackType _offWindowEventCallback;
2098 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
2099 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
2101 /// <since_tizen> 3 </since_tizen>
2102 public event EventHandler RemovedFromWindow
2106 if (_offWindowEventHandler == null)
2108 _offWindowEventCallback = OffWindow;
2109 this.OffWindowSignal().Connect(_offWindowEventCallback);
2112 _offWindowEventHandler += value;
2117 _offWindowEventHandler -= value;
2119 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
2121 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
2126 // Callback for View OffWindow signal
2127 private void OffWindow(IntPtr data)
2129 if (_offWindowEventHandler != null)
2131 _offWindowEventHandler(this, null);
2136 /// Event arguments of visibility changed.
2138 /// <since_tizen> 3 </since_tizen>
2139 public class VisibilityChangedEventArgs : EventArgs
2142 private bool _visibility;
2143 private VisibilityChangeType _type;
2146 /// The view, or child of view, whose visibility has changed.
2148 /// <since_tizen> 3 </since_tizen>
2162 /// Whether the view is now visible or not.
2164 /// <since_tizen> 3 </since_tizen>
2165 public bool Visibility
2173 _visibility = value;
2178 /// Whether the view's visible property has changed or a parent's.
2180 /// <since_tizen> 3 </since_tizen>
2181 public VisibilityChangeType Type
2194 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
2195 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2196 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
2197 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
2200 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
2201 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
2203 /// <since_tizen> 3 </since_tizen>
2204 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
2208 if (_visibilityChangedEventHandler == null)
2210 _visibilityChangedEventCallback = OnVisibilityChanged;
2211 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
2214 _visibilityChangedEventHandler += value;
2219 _visibilityChangedEventHandler -= value;
2221 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
2223 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
2228 // Callback for View visibility change signal
2229 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
2231 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
2234 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2236 e.Visibility = visibility;
2239 if (_visibilityChangedEventHandler != null)
2241 _visibilityChangedEventHandler(this, e);
2247 /// Event arguments of layout direction changed.
2249 /// <since_tizen> 4 </since_tizen>
2250 public class LayoutDirectionChangedEventArgs : EventArgs
2253 private ViewLayoutDirectionType _type;
2256 /// The view, or child of view, whose layout direction has changed.
2258 /// <since_tizen> 4 </since_tizen>
2272 /// Whether the view's layout direction property has changed or a parent's.
2274 /// <since_tizen> 4 </since_tizen>
2275 public ViewLayoutDirectionType Type
2288 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
2289 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2290 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
2291 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
2294 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
2295 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
2297 /// <since_tizen> 4 </since_tizen>
2298 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
2302 if (_layoutDirectionChangedEventHandler == null)
2304 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
2305 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
2308 _layoutDirectionChangedEventHandler += value;
2313 _layoutDirectionChangedEventHandler -= value;
2315 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
2317 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
2322 // Callback for View layout direction change signal
2323 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
2325 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
2328 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2332 if (_layoutDirectionChangedEventHandler != null)
2334 _layoutDirectionChangedEventHandler(this, e);
2338 // Resource Ready Signal
2340 private EventHandler _resourcesLoadedEventHandler;
2341 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2342 private delegate void ResourcesLoadedCallbackType(IntPtr control);
2343 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
2346 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
2347 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
2349 /// <since_tizen> 3 </since_tizen>
2350 public event EventHandler ResourcesLoaded
2354 if (_resourcesLoadedEventHandler == null)
2356 _ResourcesLoadedCallback = OnResourcesLoaded;
2357 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
2360 _resourcesLoadedEventHandler += value;
2365 _resourcesLoadedEventHandler -= value;
2367 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
2369 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
2374 private void OnResourcesLoaded(IntPtr view)
2376 if (_resourcesLoadedEventHandler != null)
2378 _resourcesLoadedEventHandler(this, null);
2382 internal IntPtr GetPtrfromView()
2384 return (IntPtr)swigCPtr;
2387 internal class Property
2389 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
2390 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
2391 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
2392 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
2393 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
2394 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
2395 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
2396 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
2397 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
2398 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
2399 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
2400 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
2401 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
2402 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
2403 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
2404 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
2405 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
2406 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
2407 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
2408 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
2409 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
2410 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
2411 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
2412 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
2413 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
2414 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
2415 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
2416 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
2417 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
2418 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
2419 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
2420 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
2421 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
2422 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
2423 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
2424 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
2425 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
2426 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
2427 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
2428 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
2429 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
2430 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
2431 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
2432 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
2433 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
2434 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
2435 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
2436 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
2437 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
2438 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
2439 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
2440 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
2441 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
2442 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
2443 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
2444 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
2445 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
2446 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
2447 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
2448 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
2449 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
2450 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
2451 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();
2455 /// Describes the direction to move the focus towards.
2457 /// <since_tizen> 3 </since_tizen>
2458 public enum FocusDirection
2461 /// Move keyboard focus towards the left direction.
2463 /// <since_tizen> 3 </since_tizen>
2466 /// Move keyboard focus towards the right direction.
2468 /// <since_tizen> 3 </since_tizen>
2471 /// Move keyboard focus towards the up direction.
2473 /// <since_tizen> 3 </since_tizen>
2476 /// Move keyboard focus towards the down direction.
2478 /// <since_tizen> 3 </since_tizen>
2481 /// Move keyboard focus towards the previous page direction.
2483 /// <since_tizen> 3 </since_tizen>
2486 /// Move keyboard focus towards the next page direction.
2488 /// <since_tizen> 3 </since_tizen>
2493 /// Creates a new instance of a view.
2495 /// <since_tizen> 3 </since_tizen>
2496 public View() : this(NDalicPINVOKE.View_New(), true)
2498 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2500 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
2502 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2505 private View ConvertIdToView(uint id)
2508 if (GetParent() is View)
2510 View parentView = GetParent() as View;
2511 view = parentView.FindChildById(id);
2516 view = Window.Instance.GetRootLayer().FindChildById(id);
2522 internal void SetKeyInputFocus()
2524 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
2525 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2529 /// Queries whether the view has a focus.
2531 /// <returns>True if this view has a focus.</returns>
2532 /// <since_tizen> 3 </since_tizen>
2533 public bool HasFocus()
2535 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
2536 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2540 internal void ClearKeyInputFocus()
2542 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
2543 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2546 internal PinchGestureDetector GetPinchGestureDetector()
2548 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
2549 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2553 internal PanGestureDetector GetPanGestureDetector()
2555 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
2556 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2560 internal TapGestureDetector GetTapGestureDetector()
2562 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
2563 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2567 internal LongPressGestureDetector GetLongPressGestureDetector()
2569 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
2570 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2575 /// Sets the name of the style to be applied to the view.
2577 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
2578 /// <since_tizen> 3 </since_tizen>
2579 public void SetStyleName(string styleName)
2581 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
2582 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2586 /// Retrieves the name of the style to be applied to the view (if any).
2588 /// <returns>A string matching a style, or an empty string.</returns>
2589 /// <since_tizen> 3 </since_tizen>
2590 public string GetStyleName()
2592 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
2593 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2597 internal void SetBackgroundColor(Vector4 color)
2599 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
2600 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2603 internal Vector4 GetBackgroundColor()
2605 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
2606 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2610 internal void SetBackgroundImage(Image image)
2612 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
2613 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2617 /// Clears the background.
2619 /// <since_tizen> 3 </since_tizen>
2620 public void ClearBackground()
2622 NDalicPINVOKE.View_ClearBackground(swigCPtr);
2623 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2626 internal ControlKeySignal KeyEventSignal()
2628 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
2629 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2633 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
2635 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
2636 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2640 internal KeyInputFocusSignal KeyInputFocusLostSignal()
2642 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
2643 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2647 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
2649 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2652 internal enum PropertyRange
2654 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
2655 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
2656 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
2660 /// The StyleName, type string.
2662 /// <since_tizen> 3 </since_tizen>
2663 public string StyleName
2667 return (string)GetValue(StyleNameProperty);
2671 SetValue(StyleNameProperty, value);
2672 NotifyPropertyChanged();
2677 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
2679 /// <since_tizen> 3 </since_tizen>
2680 public Color BackgroundColor
2684 return (Color)GetValue(BackgroundColorProperty);
2688 SetValue(BackgroundColorProperty, value);
2689 NotifyPropertyChanged();
2694 /// Creates an animation to animate the background color visual. If there is no
2695 /// background visual, creates one with transparent black as it's mixColor.
2697 /// <since_tizen> 3 </since_tizen>
2698 public Animation AnimateBackgroundColor(object destinationValue,
2701 AlphaFunction.BuiltinFunctions? alphaFunction = null,
2702 object initialValue = null)
2704 Tizen.NUI.PropertyMap background = Background;
2706 if (background.Empty())
2708 // If there is no background yet, ensure there is a transparent
2710 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
2711 background = Background;
2713 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
2717 /// Creates an animation to animate the mixColor of the named visual.
2719 /// <since_tizen> 3 </since_tizen>
2720 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
2722 Animation animation = null;
2724 PropertyMap _animator = new PropertyMap();
2725 if (alphaFunction != null)
2727 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
2730 PropertyMap _timePeriod = new PropertyMap();
2731 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
2732 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
2733 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
2735 PropertyMap _transition = new PropertyMap();
2736 _transition.Add("animator", new PropertyValue(_animator));
2737 _transition.Add("target", new PropertyValue(targetVisual));
2738 _transition.Add("property", new PropertyValue("mixColor"));
2740 if (initialColor != null)
2742 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
2743 _transition.Add("initialValue", initValue);
2746 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
2747 _transition.Add("targetValue", destValue);
2748 TransitionData _transitionData = new TransitionData(_transition);
2750 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
2751 if (NDalicPINVOKE.SWIGPendingException.Pending)
2752 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2758 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
2760 /// <since_tizen> 3 </since_tizen>
2761 public string BackgroundImage
2765 return (string)GetValue(BackgroundImageProperty);
2769 SetValue(BackgroundImageProperty, value);
2770 NotifyPropertyChanged();
2775 /// The background of view.
2777 /// <since_tizen> 3 </since_tizen>
2778 public Tizen.NUI.PropertyMap Background
2782 return (PropertyMap)GetValue(BackgroundProperty);
2786 SetValue(BackgroundProperty, value);
2787 NotifyPropertyChanged();
2793 /// The current state of the view.
2795 /// <since_tizen> 3 </since_tizen>
2800 return (States)GetValue(StateProperty);
2804 SetValue(StateProperty, value);
2805 NotifyPropertyChanged();
2810 /// The current sub state of the view.
2812 /// <since_tizen> 3 </since_tizen>
2813 public States SubState
2817 return (States)GetValue(SubStateProperty);
2821 SetValue(SubStateProperty, value);
2822 NotifyPropertyChanged();
2827 /// Displays a tooltip
2829 /// <since_tizen> 3 </since_tizen>
2830 public Tizen.NUI.PropertyMap Tooltip
2834 return (PropertyMap)GetValue(TooltipProperty);
2838 SetValue(TooltipProperty, value);
2839 NotifyPropertyChanged();
2844 /// Displays a tooltip as a text.
2846 /// <since_tizen> 3 </since_tizen>
2847 public string TooltipText
2851 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
2852 NotifyPropertyChanged();
2856 private int LeftFocusableViewId
2861 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
2866 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2870 private int RightFocusableViewId
2875 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
2880 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2884 private int UpFocusableViewId
2889 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
2894 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2898 private int DownFocusableViewId
2903 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
2908 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2913 /// The Child property of FlexContainer.<br />
2914 /// The proportion of the free space in the container, the flex item will receive.<br />
2915 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
2917 /// <since_tizen> 3 </since_tizen>
2922 return (float)GetValue(FlexProperty);
2926 SetValue(FlexProperty, value);
2927 NotifyPropertyChanged();
2932 /// The Child property of FlexContainer.<br />
2933 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
2935 /// <since_tizen> 3 </since_tizen>
2936 public int AlignSelf
2940 return (int)GetValue(AlignSelfProperty);
2944 SetValue(AlignSelfProperty, value);
2945 NotifyPropertyChanged();
2950 /// The Child property of FlexContainer.<br />
2951 /// The space around the flex item.<br />
2953 /// <since_tizen> 3 </since_tizen>
2954 public Vector4 FlexMargin
2958 return (Vector4)GetValue(FlexMarginProperty);
2962 SetValue(FlexMarginProperty, value);
2963 NotifyPropertyChanged();
2968 /// The top-left cell this child occupies, if not set, the first available cell is used.
2970 /// <since_tizen> 3 </since_tizen>
2971 public Vector2 CellIndex
2975 return (Vector2)GetValue(CellIndexProperty);
2979 SetValue(CellIndexProperty, value);
2980 NotifyPropertyChanged();
2985 /// The number of rows this child occupies, if not set, the default value is 1.
2987 /// <since_tizen> 3 </since_tizen>
2988 public float RowSpan
2992 return (float)GetValue(RowSpanProperty);
2996 SetValue(RowSpanProperty, value);
2997 NotifyPropertyChanged();
3002 /// The number of columns this child occupies, if not set, the default value is 1.
3004 /// <since_tizen> 3 </since_tizen>
3005 public float ColumnSpan
3009 return (float)GetValue(ColumnSpanProperty);
3013 SetValue(ColumnSpanProperty, value);
3014 NotifyPropertyChanged();
3019 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
3021 /// <since_tizen> 3 </since_tizen>
3022 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
3026 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
3030 SetValue(CellHorizontalAlignmentProperty, value);
3031 NotifyPropertyChanged();
3036 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
3038 /// <since_tizen> 3 </since_tizen>
3039 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
3043 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
3047 SetValue(CellVerticalAlignmentProperty, value);
3048 NotifyPropertyChanged();
3053 /// The left focusable view.<br />
3054 /// This will return null if not set.<br />
3055 /// This will also return null if the specified left focusable view is not on a window.<br />
3057 /// <since_tizen> 3 </since_tizen>
3058 public View LeftFocusableView
3060 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3063 return (View)GetValue(LeftFocusableViewProperty);
3067 SetValue(LeftFocusableViewProperty, value);
3068 NotifyPropertyChanged();
3073 /// The right focusable view.<br />
3074 /// This will return null if not set.<br />
3075 /// This will also return null if the specified right focusable view is not on a window.<br />
3077 /// <since_tizen> 3 </since_tizen>
3078 public View RightFocusableView
3080 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3083 return (View)GetValue(RightFocusableViewProperty);
3087 SetValue(RightFocusableViewProperty, value);
3088 NotifyPropertyChanged();
3093 /// The up focusable view.<br />
3094 /// This will return null if not set.<br />
3095 /// This will also return null if the specified up focusable view is not on a window.<br />
3097 /// <since_tizen> 3 </since_tizen>
3098 public View UpFocusableView
3100 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3103 return (View)GetValue(UpFocusableViewProperty);
3107 SetValue(UpFocusableViewProperty, value);
3108 NotifyPropertyChanged();
3113 /// The down focusable view.<br />
3114 /// This will return null if not set.<br />
3115 /// This will also return null if the specified down focusable view is not on a window.<br />
3117 /// <since_tizen> 3 </since_tizen>
3118 public View DownFocusableView
3120 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3123 return (View)GetValue(DownFocusableViewProperty);
3127 SetValue(DownFocusableViewProperty, value);
3128 NotifyPropertyChanged();
3133 /// Whether the view should be focusable by keyboard navigation.
3135 /// <since_tizen> 3 </since_tizen>
3136 public bool Focusable
3140 SetValue(FocusableProperty, value);
3141 NotifyPropertyChanged();
3145 return (bool)GetValue(FocusableProperty);
3150 /// Enumeration for describing the states of the view.
3152 /// <since_tizen> 3 </since_tizen>
3156 /// The normal state.
3160 /// The focused state.
3164 /// The disabled state.
3170 /// Retrieves the position of the view.<br />
3171 /// The coordinates are relative to the view's parent.<br />
3173 /// <since_tizen> 3 </since_tizen>
3174 public Position CurrentPosition
3178 return GetCurrentPosition();
3183 /// Sets the size of a view for the width and the height.<br />
3184 /// Geometry can be scaled to fit within this area.<br />
3185 /// This does not interfere with the view's scale factor.<br />
3186 /// The views default depth is the minimum of width and height.<br />
3189 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
3190 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
3191 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
3192 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3193 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
3194 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
3195 /// It may not match the current value in some cases, i.e. when the animation is progressing or the maximum or minimu size is set. <br />
3197 /// <since_tizen> 3 </since_tizen>
3198 public Size2D Size2D
3202 Size2D temp = (Size2D)GetValue(Size2DProperty);
3203 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
3207 SetValue(Size2DProperty, value);
3208 // Set Specification so when layouts measure this View it matches the value set here.
3209 // All Views are currently Layouts.
3210 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
3211 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
3212 NotifyPropertyChanged();
3216 private void OnSize2DChanged(int width, int height)
3218 Size2D = new Size2D(width, height);
3222 /// Retrieves the size of the view.<br />
3223 /// The coordinates are relative to the view's parent.<br />
3225 /// <since_tizen> 3 </since_tizen>
3226 public Size2D CurrentSize
3230 return GetCurrentSize();
3235 /// Retrieves and sets the view's opacity.<br />
3237 /// <since_tizen> 3 </since_tizen>
3238 public float Opacity
3242 return (float)GetValue(OpacityProperty);
3246 SetValue(OpacityProperty, value);
3247 NotifyPropertyChanged();
3252 /// Sets the position of the view for X and Y.<br />
3253 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
3254 /// If the position inheritance is disabled, sets the world position.<br />
3257 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
3258 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
3259 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
3260 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3261 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
3262 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
3264 /// <since_tizen> 3 </since_tizen>
3265 public Position2D Position2D
3269 Position2D temp = (Position2D)GetValue(Position2DProperty);
3270 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
3274 SetValue(Position2DProperty, value);
3275 NotifyPropertyChanged();
3279 private void OnPosition2DChanged(int x, int y)
3281 Position2D = new Position2D(x, y);
3285 /// Retrieves the screen postion of the view.<br />
3287 /// <since_tizen> 3 </since_tizen>
3288 public Vector2 ScreenPosition
3292 Vector2 temp = new Vector2(0.0f, 0.0f);
3293 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
3299 /// Determines whether the pivot point should be used to determine the position of the view.
3300 /// This is true by default.
3302 /// <remarks>If false, then the top-left of the view is used for the position.
3303 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
3305 /// <since_tizen> 3 </since_tizen>
3306 public bool PositionUsesPivotPoint
3310 return (bool)GetValue(PositionUsesPivotPointProperty);
3314 SetValue(PositionUsesPivotPointProperty, value);
3315 NotifyPropertyChanged();
3320 /// Please do not use! this will be deprecated.
3322 /// Please do not use! this will be deprecated!
3323 /// Instead please use PositionUsesPivotPoint.
3324 /// <since_tizen> 3 </since_tizen>
3325 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
3327 "View view = new View(); " +
3328 "view.PivotPoint = PivotPoint.Center; " +
3329 "view.PositionUsesPivotPoint = true;")]
3330 [EditorBrowsable(EditorBrowsableState.Never)]
3331 public bool PositionUsesAnchorPoint
3336 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
3341 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3342 NotifyPropertyChanged();
3346 internal bool FocusState
3350 return IsKeyboardFocusable();
3354 SetKeyboardFocusable(value);
3359 /// Queries whether the view is connected to the stage.<br />
3360 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
3362 /// <since_tizen> 3 </since_tizen>
3363 public bool IsOnWindow
3372 /// Gets the depth in the hierarchy for the view.
3374 /// <since_tizen> 3 </since_tizen>
3375 public int HierarchyDepth
3379 return GetHierarchyDepth();
3384 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
3387 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
3388 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
3389 /// The values set by this property will likely change.
3391 /// <since_tizen> 3 </since_tizen>
3392 public int SiblingOrder
3396 return (int)GetValue(SiblingOrderProperty);
3400 SetValue(SiblingOrderProperty, value);
3401 NotifyPropertyChanged();
3406 /// Returns the natural size of the view.
3409 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3411 /// <since_tizen> 5 </since_tizen>
3412 public Vector3 NaturalSize
3416 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3417 if (NDalicPINVOKE.SWIGPendingException.Pending)
3418 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3424 /// Returns the natural size (Size2D) of the view.
3427 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3429 /// <since_tizen> 4 </since_tizen>
3430 public Size2D NaturalSize2D
3434 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3435 if (NDalicPINVOKE.SWIGPendingException.Pending)
3436 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3438 return new Size2D((int)temp.Width, (int)temp.Height);
3443 /// Set the layout on this control.
3447 internal LayoutItem Layout
3451 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
3453 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3454 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3455 NDalicPINVOKE.delete_BaseHandle(CPtr);
3456 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3458 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3460 return basehandle as LayoutItem;
3464 Log.Info("NUI", "Set Layout on:" + Name + "\n");
3465 layoutingDisabled = false;
3471 internal void SetLayout( LayoutItem layout )
3473 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(layout) );
3474 layout.LayoutChildren.Clear();
3475 foreach (View view in Children)
3477 layout.LayoutChildren.Add(view.Layout);
3482 /// Set that layouting is required on this View. It will automatically receive a Layout.
3486 internal bool LayoutingRequired
3490 bool result = Tizen.NUI.NDalicManualPINVOKE.View_IsLayoutingRequired(View.getCPtr(this));
3491 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3496 Tizen.NUI.NDalicManualPINVOKE.View_SetLayoutingRequired(View.getCPtr(this), value);
3504 /// This is an asynchronous method.
3506 /// <since_tizen> 3 </since_tizen>
3516 /// This is an asynchronous method.
3517 /// If the view is hidden, then the view and its children will not be rendered.
3518 /// 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.
3520 /// <since_tizen> 3 </since_tizen>
3526 internal void Raise()
3528 var parentChildren = GetParent()?.Children;
3530 if (parentChildren != null)
3532 int currentIndex = parentChildren.IndexOf(this);
3534 // If the view is not already the last item in the list.
3535 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
3537 View temp = parentChildren[currentIndex + 1];
3538 parentChildren[currentIndex + 1] = this;
3539 parentChildren[currentIndex] = temp;
3541 NDalicPINVOKE.Raise(swigCPtr);
3542 if (NDalicPINVOKE.SWIGPendingException.Pending)
3543 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3549 internal void Lower()
3551 var parentChildren = GetParent()?.Children;
3553 if (parentChildren != null)
3555 int currentIndex = parentChildren.IndexOf(this);
3557 // If the view is not already the first item in the list.
3558 if (currentIndex > 0 && currentIndex < parentChildren.Count)
3560 View temp = parentChildren[currentIndex - 1];
3561 parentChildren[currentIndex - 1] = this;
3562 parentChildren[currentIndex] = temp;
3564 NDalicPINVOKE.Lower(swigCPtr);
3565 if (NDalicPINVOKE.SWIGPendingException.Pending)
3566 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3572 /// Raises the view above all other views.
3575 /// Sibling order of views within the parent will be updated automatically.
3576 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
3578 /// <since_tizen> 3 </since_tizen>
3579 public void RaiseToTop()
3581 var parentChildren = GetParent()?.Children;
3583 if (parentChildren != null)
3585 parentChildren.Remove(this);
3586 parentChildren.Add(this);
3588 NDalicPINVOKE.RaiseToTop(swigCPtr);
3589 if (NDalicPINVOKE.SWIGPendingException.Pending)
3590 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3596 /// Lowers the view to the bottom of all views.
3599 /// The sibling order of views within the parent will be updated automatically.
3600 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3602 /// <since_tizen> 3 </since_tizen>
3603 public void LowerToBottom()
3605 var parentChildren = GetParent()?.Children;
3607 if (parentChildren != null)
3609 parentChildren.Remove(this);
3610 parentChildren.Insert(0, this);
3612 NDalicPINVOKE.LowerToBottom(swigCPtr);
3613 if (NDalicPINVOKE.SWIGPendingException.Pending)
3614 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3619 /// Queries if all resources required by a view are loaded and ready.
3621 /// <remarks>Most resources are only loaded when the control is placed on the stage.
3623 /// <since_tizen> 3 </since_tizen>
3624 public bool IsResourceReady()
3626 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
3627 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3632 /// Raises the view to above the target view.
3634 /// <remarks>The sibling order of views within the parent will be updated automatically.
3635 /// Views on the level above the target view will still be shown above this view.
3636 /// Raising this view above views with the same sibling order as each other will raise this view above them.
3637 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3639 /// <param name="target">Will be raised above this view.</param>
3640 internal void RaiseAbove(View target)
3642 var parentChildren = GetParent()?.Children;
3644 if (parentChildren != null)
3646 int currentIndex = parentChildren.IndexOf(this);
3647 int targetIndex = parentChildren.IndexOf(target);
3649 if (currentIndex < 0 || targetIndex < 0 ||
3650 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3652 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3655 // If the currentIndex is less than the target index and the target has the same parent.
3656 if (currentIndex < targetIndex)
3658 parentChildren.Remove(this);
3659 parentChildren.Insert(targetIndex, this);
3661 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
3662 if (NDalicPINVOKE.SWIGPendingException.Pending)
3663 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3670 /// Lowers the view to below the target view.
3672 /// <remarks>The sibling order of views within the parent will be updated automatically.
3673 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
3674 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3676 /// <param name="target">Will be lowered below this view.</param>
3677 internal void LowerBelow(View target)
3679 var parentChildren = GetParent()?.Children;
3681 if (parentChildren != null)
3683 int currentIndex = parentChildren.IndexOf(this);
3684 int targetIndex = parentChildren.IndexOf(target);
3685 if (currentIndex < 0 || targetIndex < 0 ||
3686 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3688 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3692 // If the currentIndex is not already the 0th index and the target has the same parent.
3693 if ((currentIndex != 0) && (targetIndex != -1) &&
3694 (currentIndex > targetIndex))
3696 parentChildren.Remove(this);
3697 parentChildren.Insert(targetIndex, this);
3699 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
3700 if (NDalicPINVOKE.SWIGPendingException.Pending)
3701 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3707 internal string GetName()
3709 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
3710 if (NDalicPINVOKE.SWIGPendingException.Pending)
3711 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3715 internal void SetName(string name)
3717 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
3718 if (NDalicPINVOKE.SWIGPendingException.Pending)
3719 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3722 internal uint GetId()
3724 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
3725 if (NDalicPINVOKE.SWIGPendingException.Pending)
3726 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3730 internal bool IsRoot()
3732 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
3733 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3737 internal bool OnWindow()
3739 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
3740 if (NDalicPINVOKE.SWIGPendingException.Pending)
3741 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3746 /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
3748 /// <pre>The view has been initialized. </pre>
3749 /// <returns>The parent layer of view </returns>
3750 /// <since_tizen> 5 </since_tizen>
3751 public Layer GetLayer()
3753 //to fix memory leak issue, match the handle count with native side.
3754 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
3755 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3756 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
3757 NDalicPINVOKE.delete_BaseHandle(CPtr);
3758 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3760 if (NDalicPINVOKE.SWIGPendingException.Pending)
3761 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3766 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
3768 /// <pre>The (child) view has been initialized. </pre>
3769 /// <since_tizen> 4 </since_tizen>
3770 public void Unparent()
3772 GetParent()?.Remove(this);
3776 /// Search through this view's hierarchy for a view with the given name.
3777 /// The view itself is also considered in the search.
3779 /// <pre>The view has been initialized.</pre>
3780 /// <param name="viewName">The name of the view to find.</param>
3781 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
3782 /// <since_tizen> 3 </since_tizen>
3783 public View FindChildByName(string viewName)
3785 //to fix memory leak issue, match the handle count with native side.
3786 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
3787 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3788 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3789 NDalicPINVOKE.delete_BaseHandle(CPtr);
3790 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3792 if (NDalicPINVOKE.SWIGPendingException.Pending)
3793 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3797 internal View FindChildById(uint id)
3799 //to fix memory leak issue, match the handle count with native side.
3800 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
3801 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3802 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3803 NDalicPINVOKE.delete_BaseHandle(CPtr);
3804 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3806 if (NDalicPINVOKE.SWIGPendingException.Pending)
3807 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3811 internal void SetParentOrigin(Vector3 origin)
3813 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
3814 if (NDalicPINVOKE.SWIGPendingException.Pending)
3815 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3818 internal Vector3 GetCurrentParentOrigin()
3820 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
3821 if (NDalicPINVOKE.SWIGPendingException.Pending)
3822 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3826 internal void SetAnchorPoint(Vector3 anchorPoint)
3828 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
3829 if (NDalicPINVOKE.SWIGPendingException.Pending)
3830 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3833 internal Vector3 GetCurrentAnchorPoint()
3835 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
3836 if (NDalicPINVOKE.SWIGPendingException.Pending)
3837 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3841 internal void SetSize(float width, float height)
3843 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
3844 if (NDalicPINVOKE.SWIGPendingException.Pending)
3845 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3848 internal void SetSize(float width, float height, float depth)
3850 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
3851 if (NDalicPINVOKE.SWIGPendingException.Pending)
3852 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3855 internal void SetSize(Vector2 size)
3857 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
3858 if (NDalicPINVOKE.SWIGPendingException.Pending)
3859 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3862 internal void SetSize(Vector3 size)
3864 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
3865 if (NDalicPINVOKE.SWIGPendingException.Pending)
3866 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3869 internal Vector3 GetTargetSize()
3871 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
3872 if (NDalicPINVOKE.SWIGPendingException.Pending)
3873 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3877 internal Size2D GetCurrentSize()
3879 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
3880 if (NDalicPINVOKE.SWIGPendingException.Pending)
3881 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3882 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
3886 internal Vector3 GetNaturalSize()
3888 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3889 if (NDalicPINVOKE.SWIGPendingException.Pending)
3890 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3894 internal void SetPosition(float x, float y)
3896 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
3897 if (NDalicPINVOKE.SWIGPendingException.Pending)
3898 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3901 internal void SetPosition(float x, float y, float z)
3903 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
3904 if (NDalicPINVOKE.SWIGPendingException.Pending)
3905 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3908 internal void SetPosition(Vector3 position)
3910 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
3911 if (NDalicPINVOKE.SWIGPendingException.Pending)
3912 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3915 internal void SetX(float x)
3917 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
3918 if (NDalicPINVOKE.SWIGPendingException.Pending)
3919 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3922 internal void SetY(float y)
3924 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
3925 if (NDalicPINVOKE.SWIGPendingException.Pending)
3926 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3929 internal void SetZ(float z)
3931 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
3932 if (NDalicPINVOKE.SWIGPendingException.Pending)
3933 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3936 internal void TranslateBy(Vector3 distance)
3938 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
3939 if (NDalicPINVOKE.SWIGPendingException.Pending)
3940 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3943 internal Position GetCurrentPosition()
3945 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
3946 if (NDalicPINVOKE.SWIGPendingException.Pending)
3947 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3951 internal Vector3 GetCurrentWorldPosition()
3953 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
3954 if (NDalicPINVOKE.SWIGPendingException.Pending)
3955 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3959 internal void SetInheritPosition(bool inherit)
3961 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
3962 if (NDalicPINVOKE.SWIGPendingException.Pending)
3963 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3966 internal bool IsPositionInherited()
3968 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
3969 if (NDalicPINVOKE.SWIGPendingException.Pending)
3970 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3974 internal void SetOrientation(Degree angle, Vector3 axis)
3976 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
3977 if (NDalicPINVOKE.SWIGPendingException.Pending)
3978 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3981 internal void SetOrientation(Radian angle, Vector3 axis)
3983 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
3984 if (NDalicPINVOKE.SWIGPendingException.Pending)
3985 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3988 internal void SetOrientation(Rotation orientation)
3990 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
3991 if (NDalicPINVOKE.SWIGPendingException.Pending)
3992 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3995 internal void RotateBy(Degree angle, Vector3 axis)
3997 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
3998 if (NDalicPINVOKE.SWIGPendingException.Pending)
3999 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4002 internal void RotateBy(Radian angle, Vector3 axis)
4004 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4005 if (NDalicPINVOKE.SWIGPendingException.Pending)
4006 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4009 internal void RotateBy(Rotation relativeRotation)
4011 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4012 if (NDalicPINVOKE.SWIGPendingException.Pending)
4013 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4016 internal Rotation GetCurrentOrientation()
4018 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
4019 if (NDalicPINVOKE.SWIGPendingException.Pending)
4020 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4024 internal void SetInheritOrientation(bool inherit)
4026 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
4027 if (NDalicPINVOKE.SWIGPendingException.Pending)
4028 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4031 internal bool IsOrientationInherited()
4033 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
4034 if (NDalicPINVOKE.SWIGPendingException.Pending)
4035 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4039 internal Rotation GetCurrentWorldOrientation()
4041 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4042 if (NDalicPINVOKE.SWIGPendingException.Pending)
4043 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4047 internal void SetScale(float scale)
4049 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
4050 if (NDalicPINVOKE.SWIGPendingException.Pending)
4051 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4054 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4056 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4057 if (NDalicPINVOKE.SWIGPendingException.Pending)
4058 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4061 internal void SetScale(Vector3 scale)
4063 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4064 if (NDalicPINVOKE.SWIGPendingException.Pending)
4065 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4068 internal void ScaleBy(Vector3 relativeScale)
4070 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4071 if (NDalicPINVOKE.SWIGPendingException.Pending)
4072 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4075 internal Vector3 GetCurrentScale()
4077 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
4078 if (NDalicPINVOKE.SWIGPendingException.Pending)
4079 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4083 internal Vector3 GetCurrentWorldScale()
4085 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
4086 if (NDalicPINVOKE.SWIGPendingException.Pending)
4087 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4091 internal void SetInheritScale(bool inherit)
4093 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
4094 if (NDalicPINVOKE.SWIGPendingException.Pending)
4095 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4098 internal bool IsScaleInherited()
4100 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
4101 if (NDalicPINVOKE.SWIGPendingException.Pending)
4102 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4106 internal Matrix GetCurrentWorldMatrix()
4108 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4109 if (NDalicPINVOKE.SWIGPendingException.Pending)
4110 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4114 internal void SetVisible(bool visible)
4116 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
4117 if (NDalicPINVOKE.SWIGPendingException.Pending)
4118 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4121 internal bool IsVisible()
4123 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
4124 if (NDalicPINVOKE.SWIGPendingException.Pending)
4125 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4129 internal void SetOpacity(float opacity)
4131 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
4132 if (NDalicPINVOKE.SWIGPendingException.Pending)
4133 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4136 internal float GetCurrentOpacity()
4138 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
4139 if (NDalicPINVOKE.SWIGPendingException.Pending)
4140 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4144 internal void SetColor(Vector4 color)
4146 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4147 if (NDalicPINVOKE.SWIGPendingException.Pending)
4148 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4151 internal Vector4 GetCurrentColor()
4153 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
4154 if (NDalicPINVOKE.SWIGPendingException.Pending)
4155 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4159 internal void SetColorMode(ColorMode colorMode)
4161 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
4162 if (NDalicPINVOKE.SWIGPendingException.Pending)
4163 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4166 internal ColorMode GetColorMode()
4168 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
4169 if (NDalicPINVOKE.SWIGPendingException.Pending)
4170 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4174 internal Vector4 GetCurrentWorldColor()
4176 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
4177 if (NDalicPINVOKE.SWIGPendingException.Pending)
4178 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4182 internal void SetDrawMode(DrawModeType drawMode)
4184 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4185 if (NDalicPINVOKE.SWIGPendingException.Pending)
4186 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4189 internal DrawModeType GetDrawMode()
4191 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
4192 if (NDalicPINVOKE.SWIGPendingException.Pending)
4193 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4198 /// Converts screen coordinates into the view's coordinate system using the default camera.
4200 /// <pre>The view has been initialized.</pre>
4201 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4202 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4203 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4204 /// <param name="screenX">The screen X-coordinate.</param>
4205 /// <param name="screenY">The screen Y-coordinate.</param>
4206 /// <returns>True if the conversion succeeded.</returns>
4207 /// <since_tizen> 3 </since_tizen>
4208 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4210 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4211 if (NDalicPINVOKE.SWIGPendingException.Pending)
4212 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4216 internal void SetKeyboardFocusable(bool focusable)
4218 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4219 if (NDalicPINVOKE.SWIGPendingException.Pending)
4220 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4223 internal bool IsKeyboardFocusable()
4225 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
4226 if (NDalicPINVOKE.SWIGPendingException.Pending)
4227 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4231 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4233 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4234 if (NDalicPINVOKE.SWIGPendingException.Pending)
4235 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4238 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4240 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4241 if (NDalicPINVOKE.SWIGPendingException.Pending)
4242 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4247 /// Sets the relative to parent size factor of the view.<br />
4248 /// This factor is only used when ResizePolicy is set to either:
4249 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4250 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4252 /// <pre>The view has been initialized.</pre>
4253 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4254 /// <since_tizen> 3 </since_tizen>
4255 public void SetSizeModeFactor(Vector3 factor)
4257 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4258 if (NDalicPINVOKE.SWIGPendingException.Pending)
4259 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4262 internal Vector3 GetSizeModeFactor()
4264 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
4265 if (NDalicPINVOKE.SWIGPendingException.Pending)
4266 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4271 /// Calculates the height of the view given a width.<br />
4272 /// The natural size is used for default calculation.<br />
4273 /// Size 0 is treated as aspect ratio 1:1.<br />
4275 /// <param name="width">The width to use.</param>
4276 /// <returns>The height based on the width.</returns>
4277 /// <since_tizen> 3 </since_tizen>
4278 public float GetHeightForWidth(float width)
4280 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
4281 if (NDalicPINVOKE.SWIGPendingException.Pending)
4282 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4287 /// Calculates the width of the view given a height.<br />
4288 /// The natural size is used for default calculation.<br />
4289 /// Size 0 is treated as aspect ratio 1:1.<br />
4291 /// <param name="height">The height to use.</param>
4292 /// <returns>The width based on the height.</returns>
4293 /// <since_tizen> 3 </since_tizen>
4294 public float GetWidthForHeight(float height)
4296 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
4297 if (NDalicPINVOKE.SWIGPendingException.Pending)
4298 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4303 /// Return the amount of size allocated for relayout.
4305 /// <param name="dimension">The dimension to retrieve.</param>
4306 /// <returns>Return the size.</returns>
4307 /// <since_tizen> 3 </since_tizen>
4308 public float GetRelayoutSize(DimensionType dimension)
4310 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4311 if (NDalicPINVOKE.SWIGPendingException.Pending)
4312 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4317 /// Set the padding for the view.
4319 /// <param name="padding">Padding for the view.</param>
4320 /// <since_tizen> 3 </since_tizen>
4321 public void SetPadding(PaddingType padding)
4323 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4324 if (NDalicPINVOKE.SWIGPendingException.Pending)
4325 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4329 /// Return the value of padding for the view.
4331 /// <param name="paddingOut">the value of padding for the view</param>
4332 /// <since_tizen> 3 </since_tizen>
4333 public void GetPadding(PaddingType paddingOut)
4335 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4336 if (NDalicPINVOKE.SWIGPendingException.Pending)
4337 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4340 internal void SetMinimumSize(Vector2 size)
4342 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4343 if (NDalicPINVOKE.SWIGPendingException.Pending)
4344 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4347 internal Vector2 GetMinimumSize()
4349 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
4350 if (NDalicPINVOKE.SWIGPendingException.Pending)
4351 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4355 internal void SetMaximumSize(Vector2 size)
4357 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4358 if (NDalicPINVOKE.SWIGPendingException.Pending)
4359 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4362 internal Vector2 GetMaximumSize()
4364 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
4365 if (NDalicPINVOKE.SWIGPendingException.Pending)
4366 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4370 internal int GetHierarchyDepth()
4372 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
4373 if (NDalicPINVOKE.SWIGPendingException.Pending)
4374 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4378 /// <since_tizen> 3 </since_tizen>
4379 public uint AddRenderer(Renderer renderer)
4381 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4382 if (NDalicPINVOKE.SWIGPendingException.Pending)
4383 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4387 internal uint GetRendererCount()
4389 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
4390 if (NDalicPINVOKE.SWIGPendingException.Pending)
4391 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4395 /// <since_tizen> 3 </since_tizen>
4396 public Renderer GetRendererAt(uint index)
4398 //to fix memory leak issue, match the handle count with native side.
4399 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
4400 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4401 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4402 NDalicPINVOKE.delete_BaseHandle(CPtr);
4403 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4405 if (NDalicPINVOKE.SWIGPendingException.Pending)
4406 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4410 /// <since_tizen> 3 </since_tizen>
4411 public void RemoveRenderer(Renderer renderer)
4413 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4414 if (NDalicPINVOKE.SWIGPendingException.Pending)
4415 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4418 /// <since_tizen> 3 </since_tizen>
4419 public void RemoveRenderer(uint index)
4421 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4422 if (NDalicPINVOKE.SWIGPendingException.Pending)
4423 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4426 internal TouchDataSignal TouchSignal()
4428 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
4429 if (NDalicPINVOKE.SWIGPendingException.Pending)
4430 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4434 internal HoverSignal HoveredSignal()
4436 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
4437 if (NDalicPINVOKE.SWIGPendingException.Pending)
4438 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4442 internal WheelSignal WheelEventSignal()
4444 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
4445 if (NDalicPINVOKE.SWIGPendingException.Pending)
4446 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4450 internal ViewSignal OnWindowSignal()
4452 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
4453 if (NDalicPINVOKE.SWIGPendingException.Pending)
4454 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4458 internal ViewSignal OffWindowSignal()
4460 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
4461 if (NDalicPINVOKE.SWIGPendingException.Pending)
4462 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4466 internal ViewSignal OnRelayoutSignal()
4468 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
4469 if (NDalicPINVOKE.SWIGPendingException.Pending)
4470 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4474 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
4476 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
4477 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4482 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
4484 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
4485 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4490 internal ViewSignal ResourcesLoadedSignal()
4492 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
4493 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4498 /// Gets or sets the origin of a view within its parent's area.<br />
4499 /// 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 />
4500 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
4501 /// A view's position is the distance between this origin and the view's anchor-point.<br />
4503 /// <pre>The view has been initialized.</pre>
4504 /// <since_tizen> 3 </since_tizen>
4505 public Position ParentOrigin
4509 return (Position)GetValue(ParentOriginProperty);
4513 SetValue(ParentOriginProperty, value);
4514 NotifyPropertyChanged();
4518 internal float ParentOriginX
4523 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
4528 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
4529 NotifyPropertyChanged();
4533 internal float ParentOriginY
4538 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
4543 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
4544 NotifyPropertyChanged();
4548 internal float ParentOriginZ
4553 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
4558 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
4559 NotifyPropertyChanged();
4564 /// Gets or sets the anchor-point of a view.<br />
4565 /// 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 />
4566 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
4567 /// A view position is the distance between its parent-origin and this anchor-point.<br />
4568 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
4569 /// <pre>The view has been initialized.</pre>
4571 /// <since_tizen> 3 </since_tizen>
4572 public Position PivotPoint
4576 return (Position)GetValue(PivotPointProperty);
4580 SetValue(PivotPointProperty, value);
4581 NotifyPropertyChanged();
4585 internal float PivotPointX
4590 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
4595 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
4599 internal float PivotPointY
4604 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
4609 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
4613 internal float PivotPointZ
4618 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
4623 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
4628 /// Gets or sets the size width of the view.
4630 /// <since_tizen> 3 </since_tizen>
4631 public float SizeWidth
4635 return (float)GetValue(SizeWidthProperty);
4639 SetValue(SizeWidthProperty, value);
4640 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
4641 NotifyPropertyChanged();
4646 /// Gets or sets the size height of the view.
4648 /// <since_tizen> 3 </since_tizen>
4649 public float SizeHeight
4653 return (float)GetValue(SizeHeightProperty);
4657 SetValue(SizeHeightProperty, value);
4658 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
4659 NotifyPropertyChanged();
4664 /// Gets or sets the position of the view.<br />
4665 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
4666 /// If the position inheritance is disabled, sets the world position.<br />
4668 /// <since_tizen> 3 </since_tizen>
4669 public Position Position
4673 return (Position)GetValue(PositionProperty);
4677 SetValue(PositionProperty, value);
4678 NotifyPropertyChanged();
4683 /// Gets or sets the position X of the view.
4685 /// <since_tizen> 3 </since_tizen>
4686 public float PositionX
4690 return (float)GetValue(PositionXProperty);
4694 SetValue(PositionXProperty, value);
4695 NotifyPropertyChanged();
4700 /// Gets or sets the position Y of the view.
4702 /// <since_tizen> 3 </since_tizen>
4703 public float PositionY
4707 return (float)GetValue(PositionYProperty);
4711 SetValue(PositionYProperty, value);
4712 NotifyPropertyChanged();
4717 /// Gets or sets the position Z of the view.
4719 /// <since_tizen> 3 </since_tizen>
4720 public float PositionZ
4724 return (float)GetValue(PositionZProperty);
4728 SetValue(PositionZProperty, value);
4729 NotifyPropertyChanged();
4734 /// Gets or sets the world position of the view.
4736 /// <since_tizen> 3 </since_tizen>
4737 public Vector3 WorldPosition
4741 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4742 GetProperty(View.Property.WORLD_POSITION).Get(temp);
4747 internal float WorldPositionX
4752 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
4757 internal float WorldPositionY
4762 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
4767 internal float WorldPositionZ
4772 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
4778 /// Gets or sets the orientation of the view.<br />
4779 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
4781 /// <remarks>This is an asynchronous method.</remarks>
4782 /// <since_tizen> 3 </since_tizen>
4783 public Rotation Orientation
4787 return (Rotation)GetValue(OrientationProperty);
4791 SetValue(OrientationProperty, value);
4792 NotifyPropertyChanged();
4797 /// Gets or sets the world orientation of the view.<br />
4799 /// <since_tizen> 3 </since_tizen>
4800 public Rotation WorldOrientation
4804 Rotation temp = new Rotation();
4805 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
4811 /// Gets or sets the scale factor applied to the view.<br />
4813 /// <since_tizen> 3 </since_tizen>
4814 public Vector3 Scale
4818 return (Vector3)GetValue(ScaleProperty);
4822 SetValue(ScaleProperty, value);
4823 NotifyPropertyChanged();
4828 /// Gets or sets the scale X factor applied to the view.
4830 /// <since_tizen> 3 </since_tizen>
4835 return (float)GetValue(ScaleXProperty);
4839 SetValue(ScaleXProperty, value);
4840 NotifyPropertyChanged();
4845 /// Gets or sets the scale Y factor applied to the view.
4847 /// <since_tizen> 3 </since_tizen>
4852 return (float)GetValue(ScaleYProperty);
4856 SetValue(ScaleYProperty, value);
4857 NotifyPropertyChanged();
4862 /// Gets or sets the scale Z factor applied to the view.
4864 /// <since_tizen> 3 </since_tizen>
4869 return (float)GetValue(ScaleZProperty);
4873 SetValue(ScaleZProperty, value);
4874 NotifyPropertyChanged();
4879 /// Gets the world scale of the view.
4881 /// <since_tizen> 3 </since_tizen>
4882 public Vector3 WorldScale
4886 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4887 GetProperty(View.Property.WORLD_SCALE).Get(temp);
4893 /// Retrieves the visibility flag of the view.
4896 /// If the view is not visible, then the view and its children will not be rendered.
4897 /// 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.
4899 /// <since_tizen> 3 </since_tizen>
4900 public bool Visibility
4905 GetProperty(View.Property.VISIBLE).Get(out temp);
4911 /// Gets the view's world color.
4913 /// <since_tizen> 3 </since_tizen>
4914 public Vector4 WorldColor
4918 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
4919 GetProperty(View.Property.WORLD_COLOR).Get(temp);
4924 internal Matrix WorldMatrix
4928 Matrix temp = new Matrix();
4929 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
4935 /// Gets or sets the view's name.
4937 /// <since_tizen> 3 </since_tizen>
4942 return (string)GetValue(NameProperty);
4946 SetValue(NameProperty, value);
4947 NotifyPropertyChanged();
4952 /// Get the number of children held by the view.
4954 /// <since_tizen> 3 </since_tizen>
4955 public new uint ChildCount
4959 return GetChildCount();
4964 /// Gets the view's ID.
4967 /// <since_tizen> 3 </since_tizen>
4977 /// Gets or sets the status of whether the view should emit touch or hover signals.
4979 /// <since_tizen> 3 </since_tizen>
4980 public bool Sensitive
4984 return (bool)GetValue(SensitiveProperty);
4988 SetValue(SensitiveProperty, value);
4989 NotifyPropertyChanged();
4994 /// 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.
4996 /// <since_tizen> 3 </since_tizen>
4997 public bool LeaveRequired
5001 return (bool)GetValue(LeaveRequiredProperty);
5005 SetValue(LeaveRequiredProperty, value);
5006 NotifyPropertyChanged();
5011 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
5013 /// <since_tizen> 3 </since_tizen>
5014 public bool InheritOrientation
5018 return (bool)GetValue(InheritOrientationProperty);
5022 SetValue(InheritOrientationProperty, value);
5023 NotifyPropertyChanged();
5028 /// Gets or sets the status of whether a child view inherits it's parent's scale.
5030 /// <since_tizen> 3 </since_tizen>
5031 public bool InheritScale
5035 return (bool)GetValue(InheritScaleProperty);
5039 SetValue(InheritScaleProperty, value);
5040 NotifyPropertyChanged();
5045 /// Gets or sets the status of how the view and its children should be drawn.<br />
5046 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
5047 /// 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 />
5048 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
5049 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
5050 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
5052 /// <since_tizen> 3 </since_tizen>
5053 public DrawModeType DrawMode
5057 return (DrawModeType)GetValue(DrawModeProperty);
5061 SetValue(DrawModeProperty, value);
5062 NotifyPropertyChanged();
5067 /// Gets or sets the relative to parent size factor of the view.<br />
5068 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
5069 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
5071 /// <since_tizen> 3 </since_tizen>
5072 public Vector3 SizeModeFactor
5076 return (Vector3)GetValue(SizeModeFactorProperty);
5080 SetValue(SizeModeFactorProperty, value);
5081 NotifyPropertyChanged();
5086 /// Gets or sets the width resize policy to be used.
5088 /// <since_tizen> 3 </since_tizen>
5089 public ResizePolicyType WidthResizePolicy
5093 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
5097 SetValue(WidthResizePolicyProperty, value);
5098 // Match ResizePolicy to new Layouting.
5099 // Parent relative policies can not be mapped at this point as parent size unknown.
5102 case ResizePolicyType.UseNaturalSize :
5104 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
5107 case ResizePolicyType.FillToParent :
5109 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.MatchParent ) );
5112 case ResizePolicyType.FitToChildren :
5114 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
5120 NotifyPropertyChanged();
5125 /// Gets or sets the height resize policy to be used.
5127 /// <since_tizen> 3 </since_tizen>
5128 public ResizePolicyType HeightResizePolicy
5132 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
5136 SetValue(HeightResizePolicyProperty, value);
5137 // Match ResizePolicy to new Layouting.
5138 // Parent relative policies can not be mapped at this point as parent size unknown.
5141 case ResizePolicyType.UseNaturalSize :
5143 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
5146 case ResizePolicyType.FillToParent :
5148 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.MatchParent ) );
5151 case ResizePolicyType.FitToChildren :
5153 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
5159 NotifyPropertyChanged();
5164 /// Gets or sets the policy to use when setting size with size negotiation.<br />
5165 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
5167 /// <since_tizen> 3 </since_tizen>
5168 public SizeScalePolicyType SizeScalePolicy
5172 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
5176 SetValue(SizeScalePolicyProperty, value);
5177 NotifyPropertyChanged();
5182 /// Gets or sets the status of whether the width size is dependent on the height size.
5184 /// <since_tizen> 3 </since_tizen>
5185 public bool WidthForHeight
5189 return (bool)GetValue(WidthForHeightProperty);
5193 SetValue(WidthForHeightProperty, value);
5194 NotifyPropertyChanged();
5199 /// Gets or sets the status of whether the height size is dependent on the width size.
5201 /// <since_tizen> 3 </since_tizen>
5202 public bool HeightForWidth
5206 return (bool)GetValue(HeightForWidthProperty);
5210 SetValue(HeightForWidthProperty, value);
5211 NotifyPropertyChanged();
5216 /// Gets or sets the padding for use in layout.
5218 /// <since_tizen> 5 </since_tizen>
5219 public Extents Padding
5223 return (Extents)GetValue(PaddingProperty);
5227 SetValue(PaddingProperty, value);
5228 NotifyPropertyChanged();
5233 /// Gets or sets the minimum size the view can be assigned in size negotiation.
5235 /// <since_tizen> 3 </since_tizen>
5236 public Size2D MinimumSize
5240 return (Size2D)GetValue(MinimumSizeProperty);
5246 // Note: it only works if minimum size is >= than natural size.
5247 // To force the size it should be done through the width&height spec or Size2D.
5248 Layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
5249 Layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
5251 SetValue(MinimumSizeProperty, value);
5252 NotifyPropertyChanged();
5257 /// Gets or sets the maximum size the view can be assigned in size negotiation.
5259 /// <since_tizen> 3 </since_tizen>
5260 public Size2D MaximumSize
5264 return (Size2D)GetValue(MaximumSizeProperty);
5268 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
5269 // MATCH_PARENT spec + parent container size can be used to limit
5270 SetValue(MaximumSizeProperty, value);
5271 NotifyPropertyChanged();
5276 /// Gets or sets whether a child view inherits it's parent's position.<br />
5277 /// Default is to inherit.<br />
5278 /// 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 />
5280 /// <since_tizen> 3 </since_tizen>
5281 public bool InheritPosition
5285 return (bool)GetValue(InheritPositionProperty);
5289 SetValue(InheritPositionProperty, value);
5290 NotifyPropertyChanged();
5295 /// Gets or sets the clipping behavior (mode) of it's children.
5297 /// <since_tizen> 3 </since_tizen>
5298 public ClippingModeType ClippingMode
5302 return (ClippingModeType)GetValue(ClippingModeProperty);
5306 SetValue(ClippingModeProperty, value);
5307 NotifyPropertyChanged();
5312 /// Gets the number of renderers held by the view.
5314 /// <since_tizen> 3 </since_tizen>
5315 public uint RendererCount
5319 return GetRendererCount();
5324 /// [Obsolete("Please do not use! this will be deprecated")]
5326 /// <since_tizen> 3 </since_tizen>
5327 /// Please do not use! this will be deprecated!
5328 /// Instead please use PivotPoint.
5329 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
5331 "View view = new View(); " +
5332 "view.PivotPoint = PivotPoint.Center; " +
5333 "view.PositionUsesPivotPoint = true;")]
5334 [EditorBrowsable(EditorBrowsableState.Never)]
5335 public Position AnchorPoint
5339 Position temp = new Position(0.0f, 0.0f, 0.0f);
5340 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
5345 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
5346 NotifyPropertyChanged();
5351 /// Sets the size of a view for the width, the height and the depth.<br />
5352 /// Geometry can be scaled to fit within this area.<br />
5353 /// This does not interfere with the view's scale factor.<br />
5354 /// The views default depth is the minimum of width and height.<br />
5357 /// Please note that multi-cascade setting is not possible for this NUI object. <br />
5358 /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
5359 /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
5360 /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
5361 /// It may not match the current value in some cases, i.e. when the animation is progressing or the maximum or minimu size is set. <br />
5363 /// <since_tizen> 5 </since_tizen>
5368 return (Size)GetValue(SizeProperty);
5372 SetValue(SizeProperty, value);
5373 // Set Specification so when layouts measure this View it matches the value set here.
5374 // All Views are currently Layouts.
5375 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
5376 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
5377 NotifyPropertyChanged();
5382 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
5384 /// <since_tizen> 3 </since_tizen>
5385 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
5387 "Container parent = view.GetParent(); " +
5388 "View view = parent as View;")]
5389 [EditorBrowsable(EditorBrowsableState.Never)]
5390 public new View Parent
5395 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
5396 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
5397 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
5399 if (basehandle is Layer layer)
5401 ret = new View(Layer.getCPtr(layer).Handle, false);
5402 NUILog.Error("This Parent property is deprecated, shoud do not be used");
5406 ret = basehandle as View;
5409 NDalicPINVOKE.delete_BaseHandle(CPtr);
5410 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5412 if (NDalicPINVOKE.SWIGPendingException.Pending)
5413 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5419 /// Gets/Sets whether inherit parent's the layout Direction.
5421 /// <since_tizen> 4 </since_tizen>
5422 public bool InheritLayoutDirection
5426 return (bool)GetValue(InheritLayoutDirectionProperty);
5430 SetValue(InheritLayoutDirectionProperty, value);
5431 NotifyPropertyChanged();
5436 /// Gets/Sets the layout Direction.
5438 /// <since_tizen> 4 </since_tizen>
5439 public ViewLayoutDirectionType LayoutDirection
5443 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
5447 SetValue(LayoutDirectionProperty, value);
5448 NotifyPropertyChanged();
5453 /// Gets or sets the Margin for use in layout.
5456 /// Margin property is supported by Layout algorithms and containers.
5457 /// Please Set Layout if you want to use Margin property.
5459 /// <since_tizen> 4 </since_tizen>
5460 public Extents Margin
5464 return (Extents)GetValue(MarginProperty);
5468 SetValue(MarginProperty, value);
5469 NotifyPropertyChanged();
5473 internal Style Style
5477 return (Style)GetValue(StyleProperty);
5481 SetValue(StyleProperty, value);
5486 /// [Obsolete("Please do not use! this will be deprecated")]
5488 /// Please do not use! this will be deprecated!
5489 /// Instead please use Padding.
5490 /// <since_tizen> 4 </since_tizen>
5491 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
5492 [EditorBrowsable(EditorBrowsableState.Never)]
5493 public Extents PaddingEX
5497 Extents temp = new Extents(0, 0, 0, 0);
5498 GetProperty(View.Property.PADDING).Get(temp);
5503 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
5504 NotifyPropertyChanged();
5509 /// Perform an action on a visual registered to this view. <br />
5510 /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
5512 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
5513 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
5514 /// <param name="attributes">Optional attributes for the action.</param>
5515 /// <since_tizen> 5 </since_tizen>
5516 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
5518 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
5519 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5522 internal readonly MergedStyle _mergedStyle;
5525 /// Child property to specify desired width
5527 internal int LayoutWidthSpecificationFixed
5532 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5534 NUILog.Error("WidthSpecificationFixed get error!");
5540 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5545 /// Child property to specify desired height
5547 internal int LayoutHeightSpecificationFixed
5552 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5554 NUILog.Error("HeightSpecificationFixed get error!");
5560 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5565 /// Child property to specify desired width, use MatchParent/WrapContent)
5567 internal ChildLayoutData LayoutWidthSpecification
5572 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5574 NUILog.Error("WidthSpecificationFixed get error!");
5576 return (ChildLayoutData)tmp;
5580 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5585 /// Child property to specify desired height, use MatchParent/WrapContent)
5587 internal ChildLayoutData LayoutHeightSpecification
5592 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5594 NUILog.Error("HeightSpecificationFixed get error!");
5596 return (ChildLayoutData)tmp;
5600 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5604 internal float Weight
5608 return (float)GetValue(WeightProperty);
5612 SetValue(WeightProperty, value);
5613 NotifyPropertyChanged();
5617 private bool _backgroundImageSynchronosLoading = false;
5618 internal bool BackgroundImageSynchronosLoading
5622 return _backgroundImageSynchronosLoading;
5626 if (value != _backgroundImageSynchronosLoading)
5629 PropertyMap bgMap = this.Background;
5631 bgMap.Find(Visual.Property.Type)?.Get(out visualType);
5632 if (visualType == (int)Visual.Type.Image)
5634 bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
5636 if (bgUrl.Length != 0)
5638 _backgroundImageSynchronosLoading = value;
5639 bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
5640 this.Background = bgMap;
5646 internal class BackgroundResourceLoadedEventArgs : EventArgs
5648 private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5649 public ResourceLoadingStatusType Status
5662 private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
5663 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
5664 private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
5665 private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
5667 internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
5671 if (_backgroundResourceLoadedEventHandler == null)
5673 _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
5674 this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
5677 _backgroundResourceLoadedEventHandler += value;
5681 _backgroundResourceLoadedEventHandler -= value;
5683 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
5685 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5690 private void OnBackgroundResourceLoaded(IntPtr view)
5692 BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5693 e.Status = (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5695 if (_backgroundResourceLoadedEventHandler != null)
5697 _backgroundResourceLoadedEventHandler(this, e);
5701 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5703 return (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5710 /// The View layout Direction type.
5712 /// <since_tizen> 4 </since_tizen>
5713 public enum ViewLayoutDirectionType
5718 /// <since_tizen> 4 </since_tizen>
5723 /// <since_tizen> 4 </since_tizen>
5727 internal enum ChildLayoutData
5730 /// Constant which indicates child size should match parent size
5734 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
5739 internal enum ResourceLoadingStatusType