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 case 0: return States.Normal;
164 case 1: return States.Focused;
165 case 2: return States.Disabled;
166 default: return States.Normal;
169 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
170 [EditorBrowsable(EditorBrowsableState.Never)]
171 public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
173 var view = (View)bindable;
174 string valueToString = "";
175 if (newValue != null)
177 switch ((States)newValue)
179 case States.Normal: { valueToString = "NORMAL"; break; }
180 case States.Focused: { valueToString = "FOCUSED"; break; }
181 case States.Disabled: { valueToString = "DISABLED"; break; }
182 default: { valueToString = "NORMAL"; break; }
184 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
187 defaultValueCreator:(bindable) =>
189 var view = (View)bindable;
191 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
193 NUILog.Error("subState get error!");
197 case "NORMAL": return States.Normal;
198 case "FOCUSED": return States.Focused;
199 case "DISABLED": return States.Disabled;
200 default: return States.Normal;
203 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
204 [EditorBrowsable(EditorBrowsableState.Never)]
205 public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
207 var view = (View)bindable;
208 if (newValue != null)
210 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
213 defaultValueCreator:(bindable) =>
215 var view = (View)bindable;
216 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
217 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
220 // public static readonly BindableProperty TooltipTextProperty = BindableProperty.Create("TooltipText", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
222 // var view = (View)bindable;
223 // if (newValue != null)
225 // Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((string)newValue));
228 public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
230 var view = (View)bindable;
231 if (newValue != null)
233 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
236 defaultValueCreator:(bindable) =>
238 var view = (View)bindable;
240 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
243 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
244 [EditorBrowsable(EditorBrowsableState.Never)]
245 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
247 var view = (View)bindable;
248 if (newValue != null)
250 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
253 defaultValueCreator:(bindable) =>
255 var view = (View)bindable;
257 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
260 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
261 [EditorBrowsable(EditorBrowsableState.Never)]
262 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), Vector4.Zero, propertyChanged: (bindable, oldValue, newValue) =>
264 var view = (View)bindable;
265 if (newValue != null)
267 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
270 defaultValueCreator:(bindable) =>
272 var view = (View)bindable;
273 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
274 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
277 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
278 [EditorBrowsable(EditorBrowsableState.Never)]
279 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
281 var view = (View)bindable;
282 if (newValue != null)
284 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
287 defaultValueCreator:(bindable) =>
289 var view = (View)bindable;
290 Vector2 temp = new Vector2(0.0f, 0.0f);
291 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
294 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
295 [EditorBrowsable(EditorBrowsableState.Never)]
296 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
298 var view = (View)bindable;
299 if (newValue != null)
301 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
304 defaultValueCreator:(bindable) =>
306 var view = (View)bindable;
308 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
311 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
312 [EditorBrowsable(EditorBrowsableState.Never)]
313 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
315 var view = (View)bindable;
316 if (newValue != null)
318 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
321 defaultValueCreator:(bindable) =>
323 var view = (View)bindable;
325 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
328 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
329 [EditorBrowsable(EditorBrowsableState.Never)]
330 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
332 var view = (View)bindable;
333 string valueToString = "";
335 if (newValue != null)
337 switch ((HorizontalAlignmentType)newValue)
339 case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
340 case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
341 case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
342 default: { valueToString = "left"; break; }
344 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
347 defaultValueCreator:(bindable) =>
349 var view = (View)bindable;
351 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
353 NUILog.Error("CellHorizontalAlignment get error!");
358 case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
359 case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
360 case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
361 default: return Tizen.NUI.HorizontalAlignmentType.Left;
364 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
365 [EditorBrowsable(EditorBrowsableState.Never)]
366 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
368 var view = (View)bindable;
369 string valueToString = "";
371 if (newValue != null)
373 switch ((VerticalAlignmentType)newValue)
375 case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
376 case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
377 case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
378 default: { valueToString = "top"; break; }
380 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
383 defaultValueCreator:(bindable) =>
385 var view = (View)bindable;
387 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
389 NUILog.Error("CellVerticalAlignment get error!");
394 case "top": return Tizen.NUI.VerticalAlignmentType.Top;
395 case "center": return Tizen.NUI.VerticalAlignmentType.Center;
396 case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
397 default: return Tizen.NUI.VerticalAlignmentType.Top;
400 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
401 [EditorBrowsable(EditorBrowsableState.Never)]
402 public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
404 var view = (View)bindable;
405 if (newValue != null)
407 Tizen.NUI.Object.SetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
410 defaultValueCreator:(bindable) =>
412 var view = (View)bindable;
414 Tizen.NUI.Object.GetProperty(view.swigCPtr, LinearLayout.ChildProperty.WEIGHT).Get(out temp);
417 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
418 [EditorBrowsable(EditorBrowsableState.Never)]
419 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
421 var view = (View)bindable;
422 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
423 else { view.LeftFocusableViewId = -1; }
425 defaultValueCreator:(bindable) =>
427 var view = (View)bindable;
428 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
431 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
432 [EditorBrowsable(EditorBrowsableState.Never)]
433 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
435 var view = (View)bindable;
436 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
437 else { view.RightFocusableViewId = -1; }
439 defaultValueCreator:(bindable) =>
441 var view = (View)bindable;
442 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
445 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
446 [EditorBrowsable(EditorBrowsableState.Never)]
447 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
449 var view = (View)bindable;
450 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
451 else { view.UpFocusableViewId = -1; }
453 defaultValueCreator:(bindable) =>
455 var view = (View)bindable;
456 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
459 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
460 [EditorBrowsable(EditorBrowsableState.Never)]
461 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
463 var view = (View)bindable;
464 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
465 else { view.DownFocusableViewId = -1; }
467 defaultValueCreator:(bindable) =>
469 var view = (View)bindable;
470 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
473 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
474 [EditorBrowsable(EditorBrowsableState.Never)]
475 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
477 var view = (View)bindable;
478 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
480 defaultValueCreator:(bindable) =>
482 var view = (View)bindable;
483 return view.IsKeyboardFocusable();
485 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
486 [EditorBrowsable(EditorBrowsableState.Never)]
487 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
489 var view = (View)bindable;
490 if (newValue != null)
492 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue( new Size((Size2D)newValue)));
495 defaultValueCreator:(bindable) =>
497 var view = (View)bindable;
498 Size temp = new Size(0.0f, 0.0f, 0.0f);
499 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
500 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
503 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
504 [EditorBrowsable(EditorBrowsableState.Never)]
505 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
507 var view = (View)bindable;
508 if (newValue != null)
510 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
513 defaultValueCreator:(bindable) =>
515 var view = (View)bindable;
517 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
520 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
521 [EditorBrowsable(EditorBrowsableState.Never)]
522 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), new Position2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
524 var view = (View)bindable;
525 if (newValue != null)
527 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue( new Position((Position2D)newValue) ));
530 defaultValueCreator:(bindable) =>
532 var view = (View)bindable;
533 Position temp = new Position(0.0f, 0.0f, 0.0f);
534 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
535 return new Position2D(temp);
537 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
538 [EditorBrowsable(EditorBrowsableState.Never)]
539 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
541 var view = (View)bindable;
542 if (newValue != null)
544 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
547 defaultValueCreator:(bindable) =>
549 var view = (View)bindable;
551 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
554 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
555 [EditorBrowsable(EditorBrowsableState.Never)]
556 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
558 var view = (View)bindable;
560 if (newValue != null)
562 value = (int)newValue;
565 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
568 var siblings = view.GetParent()?.Children;
569 if (siblings != null)
571 int currentOrder = siblings.IndexOf(view);
572 if (value != currentOrder)
574 if (value == 0) { view.LowerToBottom(); }
575 else if (value < siblings.Count - 1)
577 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
578 else { view.LowerBelow(siblings[value]); }
580 else { view.RaiseToTop(); }
585 defaultValueCreator:(bindable) =>
587 var view = (View)bindable;
588 var parentChildren = view.GetParent()?.Children;
589 int currentOrder = 0;
590 if (parentChildren != null)
592 currentOrder = parentChildren.IndexOf(view);
594 if (currentOrder < 0) { return 0; }
595 else if (currentOrder < parentChildren.Count) { return currentOrder; }
600 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
601 [EditorBrowsable(EditorBrowsableState.Never)]
602 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), Position.ParentOriginTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
604 var view = (View)bindable;
605 if (newValue != null)
607 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
610 defaultValueCreator:(bindable) =>
612 var view = (View)bindable;
613 Position temp = new Position(0.0f, 0.0f, 0.0f);
614 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
618 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
619 [EditorBrowsable(EditorBrowsableState.Never)]
620 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), Position.PivotPointTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
622 var view = (View)bindable;
623 if (newValue != null)
625 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
628 defaultValueCreator:(bindable) =>
630 var view = (View)bindable;
631 Position temp = new Position(0.0f, 0.0f, 0.0f);
632 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
635 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
636 [EditorBrowsable(EditorBrowsableState.Never)]
637 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
639 var view = (View)bindable;
640 if (newValue != null)
642 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
645 defaultValueCreator:(bindable) =>
647 var view = (View)bindable;
649 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
652 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
653 [EditorBrowsable(EditorBrowsableState.Never)]
654 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
656 var view = (View)bindable;
657 if (newValue != null)
659 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
662 defaultValueCreator:(bindable) =>
664 var view = (View)bindable;
666 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
669 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
670 [EditorBrowsable(EditorBrowsableState.Never)]
671 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), Position.Zero, propertyChanged: (bindable, oldValue, newValue) =>
673 var view = (View)bindable;
674 if (newValue != null)
676 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
679 defaultValueCreator:(bindable) =>
681 var view = (View)bindable;
682 Position temp = new Position(0.0f, 0.0f, 0.0f);
683 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
686 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
687 [EditorBrowsable(EditorBrowsableState.Never)]
688 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
690 var view = (View)bindable;
691 if (newValue != null)
693 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
696 defaultValueCreator:(bindable) =>
698 var view = (View)bindable;
700 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
703 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
704 [EditorBrowsable(EditorBrowsableState.Never)]
705 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
707 var view = (View)bindable;
708 if (newValue != null)
710 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
713 defaultValueCreator:(bindable) =>
715 var view = (View)bindable;
717 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
720 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
721 [EditorBrowsable(EditorBrowsableState.Never)]
722 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
724 var view = (View)bindable;
725 if (newValue != null)
727 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
730 defaultValueCreator:(bindable) =>
732 var view = (View)bindable;
734 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
737 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
738 [EditorBrowsable(EditorBrowsableState.Never)]
739 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), new Rotation(new Radian(0), Vector3.ZAxis), propertyChanged: (bindable, oldValue, newValue) =>
741 var view = (View)bindable;
742 if (newValue != null)
744 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
747 defaultValueCreator:(bindable) =>
749 var view = (View)bindable;
750 Rotation temp = new Rotation();
751 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
754 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
755 [EditorBrowsable(EditorBrowsableState.Never)]
756 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
758 var view = (View)bindable;
759 if (newValue != null)
761 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
764 defaultValueCreator:(bindable) =>
766 var view = (View)bindable;
767 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
768 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
771 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
772 [EditorBrowsable(EditorBrowsableState.Never)]
773 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
775 var view = (View)bindable;
776 if (newValue != null)
778 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
781 defaultValueCreator:(bindable) =>
783 var view = (View)bindable;
785 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
788 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
789 [EditorBrowsable(EditorBrowsableState.Never)]
790 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
792 var view = (View)bindable;
793 if (newValue != null)
795 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
798 defaultValueCreator:(bindable) =>
800 var view = (View)bindable;
802 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
805 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
806 [EditorBrowsable(EditorBrowsableState.Never)]
807 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
809 var view = (View)bindable;
810 if (newValue != null)
812 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
815 defaultValueCreator:(bindable) =>
817 var view = (View)bindable;
819 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
822 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
823 [EditorBrowsable(EditorBrowsableState.Never)]
824 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
826 var view = (View)bindable;
827 if (newValue != null)
829 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
832 defaultValueCreator:(bindable) =>
834 var view = (View)bindable;
836 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
839 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
840 [EditorBrowsable(EditorBrowsableState.Never)]
841 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
843 var view = (View)bindable;
844 if (newValue != null)
846 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
849 defaultValueCreator:(bindable) =>
851 var view = (View)bindable;
853 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
856 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
857 [EditorBrowsable(EditorBrowsableState.Never)]
858 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
860 var view = (View)bindable;
861 if (newValue != null)
863 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
866 defaultValueCreator:(bindable) =>
868 var view = (View)bindable;
870 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
873 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
874 [EditorBrowsable(EditorBrowsableState.Never)]
875 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
877 var view = (View)bindable;
878 if (newValue != null)
880 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
883 defaultValueCreator:(bindable) =>
885 var view = (View)bindable;
887 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
890 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
891 [EditorBrowsable(EditorBrowsableState.Never)]
892 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
894 var view = (View)bindable;
895 if (newValue != null)
897 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
900 defaultValueCreator:(bindable) =>
902 var view = (View)bindable;
904 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
907 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
908 [EditorBrowsable(EditorBrowsableState.Never)]
909 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
911 var view = (View)bindable;
912 if (newValue != null)
914 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
917 defaultValueCreator:(bindable) =>
919 var view = (View)bindable;
921 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
923 NUILog.Error("DrawMode get error!");
927 case "NORMAL": return DrawModeType.Normal;
928 case "OVERLAY_2D": return DrawModeType.Overlay2D;
929 case "STENCIL": return DrawModeType.Stencil;
930 default: return DrawModeType.Normal;
933 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
934 [EditorBrowsable(EditorBrowsableState.Never)]
935 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
937 var view = (View)bindable;
938 if (newValue != null)
940 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
943 defaultValueCreator:(bindable) =>
945 var view = (View)bindable;
946 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
947 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
950 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
951 [EditorBrowsable(EditorBrowsableState.Never)]
952 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
954 var view = (View)bindable;
955 if (newValue != null)
957 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
960 defaultValueCreator:(bindable) =>
962 var view = (View)bindable;
964 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
966 NUILog.Error("WidthResizePolicy get error!");
970 case "FIXED": return ResizePolicyType.Fixed;
971 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
972 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
973 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
974 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
975 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
976 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
977 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
978 default: return ResizePolicyType.Fixed;
981 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
982 [EditorBrowsable(EditorBrowsableState.Never)]
983 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
985 var view = (View)bindable;
986 if (newValue != null)
988 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
991 defaultValueCreator:(bindable) =>
993 var view = (View)bindable;
995 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
997 NUILog.Error("HeightResizePolicy get error!");
1001 case "FIXED": return ResizePolicyType.Fixed;
1002 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1003 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1004 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1005 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1006 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1007 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1008 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1009 default: return ResizePolicyType.Fixed;
1012 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1013 [EditorBrowsable(EditorBrowsableState.Never)]
1014 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1016 var view = (View)bindable;
1017 string valueToString = "";
1018 if (newValue != null)
1020 switch ((SizeScalePolicyType)newValue)
1022 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1023 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1024 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1025 default: { valueToString = "USE_SIZE_SET"; break; }
1027 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1030 defaultValueCreator:(bindable) =>
1032 var view = (View)bindable;
1034 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1036 NUILog.Error("SizeScalePolicy get error!");
1040 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1041 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1042 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1043 default: return SizeScalePolicyType.UseSizeSet;
1046 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1047 [EditorBrowsable(EditorBrowsableState.Never)]
1048 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1050 var view = (View)bindable;
1051 if (newValue != null)
1053 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1056 defaultValueCreator:(bindable) =>
1058 var view = (View)bindable;
1060 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1063 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1064 [EditorBrowsable(EditorBrowsableState.Never)]
1065 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1067 var view = (View)bindable;
1068 if (newValue != null)
1070 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1073 defaultValueCreator:(bindable) =>
1075 var view = (View)bindable;
1077 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1080 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1081 [EditorBrowsable(EditorBrowsableState.Never)]
1082 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), new Extents(0,0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1084 var view = (View)bindable;
1085 if (newValue != null)
1087 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1090 defaultValueCreator:(bindable) =>
1092 var view = (View)bindable;
1093 Extents temp = new Extents(0, 0, 0, 0);
1094 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1097 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1098 [EditorBrowsable(EditorBrowsableState.Never)]
1099 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), new Size(0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1101 var view = (View)bindable;
1102 if (newValue != null)
1104 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1107 defaultValueCreator: (bindable) => {
1108 var view = (View)bindable;
1109 Size temp = new Size(0, 0, 0);
1110 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1113 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1114 [EditorBrowsable(EditorBrowsableState.Never)]
1115 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
1117 var view = (View)bindable;
1118 if (newValue != null)
1120 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1123 defaultValueCreator:(bindable) =>
1125 var view = (View)bindable;
1126 Size2D temp = new Size2D(0, 0);
1127 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1130 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1131 [EditorBrowsable(EditorBrowsableState.Never)]
1132 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
1134 var view = (View)bindable;
1135 if (newValue != null)
1137 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1140 defaultValueCreator:(bindable) =>
1142 var view = (View)bindable;
1143 Size2D temp = new Size2D(0, 0);
1144 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1147 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1148 [EditorBrowsable(EditorBrowsableState.Never)]
1149 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1151 var view = (View)bindable;
1152 if (newValue != null)
1154 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1157 defaultValueCreator:(bindable) =>
1159 var view = (View)bindable;
1161 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1164 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1165 [EditorBrowsable(EditorBrowsableState.Never)]
1166 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1168 var view = (View)bindable;
1169 if (newValue != null)
1171 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1174 defaultValueCreator:(bindable) =>
1176 var view = (View)bindable;
1178 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1180 NUILog.Error("ClippingMode get error!");
1182 return (ClippingModeType)temp;
1184 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1185 [EditorBrowsable(EditorBrowsableState.Never)]
1186 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1188 var view = (View)bindable;
1189 if (newValue != null)
1191 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1194 defaultValueCreator:(bindable) =>
1196 var view = (View)bindable;
1198 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1201 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1202 [EditorBrowsable(EditorBrowsableState.Never)]
1203 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1205 var view = (View)bindable;
1206 if (newValue != null)
1208 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1211 defaultValueCreator:(bindable) =>
1213 var view = (View)bindable;
1215 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1217 NUILog.Error("LAYOUT_DIRECTION get error!");
1219 return (ViewLayoutDirectionType)temp;
1221 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1222 [EditorBrowsable(EditorBrowsableState.Never)]
1223 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), new Extents(0,0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1225 var view = (View)bindable;
1226 if (newValue != null)
1228 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1231 defaultValueCreator:(bindable) =>
1233 var view = (View)bindable;
1234 Extents temp = new Extents(0, 0, 0, 0);
1235 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1238 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1239 [EditorBrowsable(EditorBrowsableState.Never)]
1240 public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style),
1241 propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1244 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1246 private bool layoutSet = false; // Flag to indicate if SetLayout was called or View was automatically given a Layout
1248 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
1250 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1253 PositionUsesPivotPoint = false;
1255 _mergedStyle = new MergedStyle(GetType(), this);
1258 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
1260 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1264 /// Event argument passed through the ChildAdded event.
1266 /// <since_tizen> 5 </since_tizen>
1267 public class ChildAddedEventArgs : EventArgs
1270 /// Added child view at moment.
1272 /// <since_tizen> 5 </since_tizen>
1273 public View Added { get; set; }
1277 /// Event when a child is added.
1279 /// <since_tizen> 5 </since_tizen>
1280 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1282 // From Container Base class
1284 /// Adds a child view to this view.
1286 /// <seealso cref="Container.Add" />
1287 /// <since_tizen> 4 </since_tizen>
1288 public override void Add(View child)
1292 Tizen.Log.Fatal("NUI", "Child is null");
1296 Log.Info("NUI", "Adding Child:" + child.Name + " to " + Name + "\n");
1298 Container oldParent = child.GetParent();
1299 if (oldParent != this)
1301 if (oldParent != null)
1303 oldParent.Remove(child);
1305 child.InternalParent = this;
1307 // Only give children a layout if their parent is an explicit container or a pure View.
1308 // Pure View meaning not derived from a View, e.g a Legacy container.
1309 // layoutSet flag is true when the View became a layout using the set Layout API opposed to automatically due to it's parent.
1310 // First time the set Layout API is used by any View the Window no longer has layoutingDisabled.
1311 if ((true == layoutSet || GetType() == typeof(View)) && null == child.Layout && false == layoutingDisabled )
1313 Log.Info("NUI", "Parent[" + Name + "] Layout set[" + layoutSet.ToString() + "] Pure View[" + (!layoutSet).ToString() + "]\n");
1314 // If child is a View or explicitly set to require layouting then set child as a LayoutGroup.
1315 // If the child is derived from a View then it may be a legacy or existing container hence will do layouting itself.
1316 if( child.GetType() == typeof(View) || true == child.LayoutingRequired )
1318 Log.Info("NUI", "Creating LayoutGroup for " + child.Name + " LayoutingRequired[" + child.LayoutingRequired.ToString() + "]\n");
1319 child.SetLayout( new LayoutGroup() );
1323 // Adding child as a leaf, layouting will not propagate past this child.
1324 // Legacy containers will be a LayoutItems too and layout their children how they wish.
1325 Log.Info("NUI", "Creating LayoutItem for " + child.Name + "\n");
1326 child.SetLayout( new LayoutItem() );
1332 Layout.LayoutChildren.Add(child.Layout);
1335 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
1336 if (NDalicPINVOKE.SWIGPendingException.Pending)
1337 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1338 Children.Add(child);
1340 if (ChildAdded != null)
1342 ChildAddedEventArgs e = new ChildAddedEventArgs
1346 ChildAdded(this, e);
1352 /// Event argument passed through the ChildRemoved event.
1354 /// <since_tizen> 5 </since_tizen>
1355 public class ChildRemovedEventArgs : EventArgs
1358 /// Removed child view at moment.
1360 /// <since_tizen> 5 </since_tizen>
1361 public View Removed { get; set; }
1365 /// Event when a child is removed.
1367 /// <since_tizen> 5 </since_tizen>
1368 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1372 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
1374 /// <seealso cref="Container.Remove" />
1375 /// <since_tizen> 4 </since_tizen>
1376 public override void Remove(View child)
1378 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
1379 if (NDalicPINVOKE.SWIGPendingException.Pending)
1380 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1382 Children.Remove(child);
1383 child.InternalParent = null;
1389 Layout.LayoutChildren.Remove(child.Layout);
1393 if (ChildRemoved != null)
1395 ChildRemovedEventArgs e = new ChildRemovedEventArgs
1399 ChildRemoved(this, e);
1404 /// Retrieves a child view by index.
1406 /// <seealso cref="Container.GetChildAt" />
1407 /// <since_tizen> 4 </since_tizen>
1408 public override View GetChildAt(uint index)
1410 if (index < Children.Count)
1412 return Children[Convert.ToInt32(index)];
1421 /// Retrieves the number of children held by the view.
1423 /// <seealso cref="Container.GetChildCount" />
1424 /// <since_tizen> 4 </since_tizen>
1425 public override uint GetChildCount()
1427 return Convert.ToUInt32(Children.Count);
1431 /// Gets the views parent.
1433 /// <seealso cref="Container.GetParent()" />
1434 /// <since_tizen> 4 </since_tizen>
1435 public override Container GetParent()
1437 return this.InternalParent as Container;
1440 internal bool IsTopLevelView()
1442 if (GetParent() is Layer)
1450 /// you can override it to clean-up your own resources.
1452 /// <param name="type">DisposeTypes</param>
1453 /// <since_tizen> 3 </since_tizen>
1454 protected override void Dispose(DisposeTypes type)
1461 if (type == DisposeTypes.Explicit)
1464 //Release your own managed resources here.
1465 //You should release all of your own disposable objects here.
1468 //Release your own unmanaged resources here.
1469 //You should not access any managed member here except static instance.
1470 //because the execution order of Finalizes is non-deterministic.
1473 DisConnectFromSignals();
1476 if (swigCPtr.Handle != global::System.IntPtr.Zero)
1480 swigCMemOwn = false;
1481 NDalicPINVOKE.delete_View(swigCPtr);
1483 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1486 foreach (View view in Children)
1488 view.InternalParent = null;
1495 private void DisConnectFromSignals()
1497 // Save current CPtr.
1498 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
1500 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
1501 swigCPtr = GetBaseHandleCPtrHandleRef;
1503 if (_onRelayoutEventCallback != null)
1505 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1508 if (_offWindowEventCallback != null)
1510 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1513 if (_onWindowEventCallback != null)
1515 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1518 if (_wheelEventCallback != null)
1520 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1523 if (_hoverEventCallback != null)
1525 this.HoveredSignal().Disconnect(_hoverEventCallback);
1528 if (_touchDataCallback != null)
1530 this.TouchSignal().Disconnect(_touchDataCallback);
1533 if (_ResourcesLoadedCallback != null)
1535 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1538 if (_offWindowEventCallback != null)
1540 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1543 if (_onWindowEventCallback != null)
1545 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1548 if (_wheelEventCallback != null)
1550 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1553 if (_hoverEventCallback != null)
1555 this.HoveredSignal().Disconnect(_hoverEventCallback);
1558 if (_touchDataCallback != null)
1560 this.TouchSignal().Disconnect(_touchDataCallback);
1563 if (_onRelayoutEventCallback != null)
1565 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1568 if (_keyCallback != null)
1570 this.KeyEventSignal().Disconnect(_keyCallback);
1573 if (_keyInputFocusLostCallback != null)
1575 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1578 if (_keyInputFocusGainedCallback != null)
1580 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1583 if (_backgroundResourceLoadedCallback != null)
1585 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1588 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
1589 // Restore current CPtr.
1590 swigCPtr = currentCPtr;
1593 private EventHandler _keyInputFocusGainedEventHandler;
1594 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1595 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1596 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1599 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1600 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1602 /// <since_tizen> 3 </since_tizen>
1603 public event EventHandler FocusGained
1607 if (_keyInputFocusGainedEventHandler == null)
1609 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1610 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1613 _keyInputFocusGainedEventHandler += value;
1618 _keyInputFocusGainedEventHandler -= value;
1620 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1622 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1627 private void OnKeyInputFocusGained(IntPtr view)
1629 if (_keyInputFocusGainedEventHandler != null)
1631 _keyInputFocusGainedEventHandler(this, null);
1636 private EventHandler _keyInputFocusLostEventHandler;
1637 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1638 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1639 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1642 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1643 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1645 /// <since_tizen> 3 </since_tizen>
1646 public event EventHandler FocusLost
1650 if (_keyInputFocusLostEventHandler == null)
1652 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1653 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1656 _keyInputFocusLostEventHandler += value;
1661 _keyInputFocusLostEventHandler -= value;
1663 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1665 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1670 private void OnKeyInputFocusLost(IntPtr view)
1672 if (_keyInputFocusLostEventHandler != null)
1674 _keyInputFocusLostEventHandler(this, null);
1679 /// Event arguments that passed via the KeyEvent signal.
1681 /// <since_tizen> 3 </since_tizen>
1682 public class KeyEventArgs : EventArgs
1687 /// Key - is the key sent to the view.
1689 /// <since_tizen> 3 </since_tizen>
1703 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1704 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1705 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1706 private KeyCallbackType _keyCallback;
1709 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1710 /// The KeyPressed signal is emitted when the key event is received.<br />
1712 /// <since_tizen> 3 </since_tizen>
1713 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1717 if (_keyEventHandler == null)
1719 _keyCallback = OnKeyEvent;
1720 this.KeyEventSignal().Connect(_keyCallback);
1723 _keyEventHandler += value;
1728 _keyEventHandler -= value;
1730 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1732 this.KeyEventSignal().Disconnect(_keyCallback);
1737 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
1739 if (keyEvent == global::System.IntPtr.Zero)
1741 NUILog.Error("keyEvent should not be null!");
1745 KeyEventArgs e = new KeyEventArgs();
1747 bool result = false;
1749 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
1751 if (_keyEventHandler != null)
1753 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
1755 // Oring the result of each callback.
1756 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
1758 result |= del(this, e);
1765 private EventHandler _onRelayoutEventHandler;
1766 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1767 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1768 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1771 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1772 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1774 /// <since_tizen> 3 </since_tizen>
1775 public event EventHandler Relayout
1779 if (_onRelayoutEventHandler == null)
1781 _onRelayoutEventCallback = OnRelayout;
1782 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1785 _onRelayoutEventHandler += value;
1790 _onRelayoutEventHandler -= value;
1792 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1794 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1800 // Callback for View OnRelayout signal
1801 private void OnRelayout(IntPtr data)
1803 if (_onRelayoutEventHandler != null)
1805 _onRelayoutEventHandler(this, null);
1810 /// Event arguments that passed via the touch signal.
1812 /// <since_tizen> 3 </since_tizen>
1813 public class TouchEventArgs : EventArgs
1815 private Touch _touch;
1818 /// Touch - contains the information of touch points.
1820 /// <since_tizen> 3 </since_tizen>
1834 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1835 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1836 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1837 private TouchDataCallbackType _touchDataCallback;
1840 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1841 /// The touched signal is emitted when the touch input is received.<br />
1843 /// <since_tizen> 3 </since_tizen>
1844 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1848 if (_touchDataEventHandler == null)
1850 _touchDataCallback = OnTouch;
1851 this.TouchSignal().Connect(_touchDataCallback);
1854 _touchDataEventHandler += value;
1859 _touchDataEventHandler -= value;
1861 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1863 this.TouchSignal().Disconnect(_touchDataCallback);
1869 // Callback for View TouchSignal
1870 private bool OnTouch(IntPtr view, IntPtr touchData)
1872 if (touchData == global::System.IntPtr.Zero)
1874 NUILog.Error("touchData should not be null!");
1878 TouchEventArgs e = new TouchEventArgs();
1880 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
1882 if (_touchDataEventHandler != null)
1884 return _touchDataEventHandler(this, e);
1891 /// Event arguments that passed via the hover signal.
1893 /// <since_tizen> 3 </since_tizen>
1894 public class HoverEventArgs : EventArgs
1896 private Hover _hover;
1899 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
1901 /// <since_tizen> 3 </since_tizen>
1915 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1916 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1917 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1918 private HoverEventCallbackType _hoverEventCallback;
1921 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1922 /// The hovered signal is emitted when the hover input is received.<br />
1924 /// <since_tizen> 3 </since_tizen>
1925 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1929 if (_hoverEventHandler == null)
1931 _hoverEventCallback = OnHoverEvent;
1932 this.HoveredSignal().Connect(_hoverEventCallback);
1935 _hoverEventHandler += value;
1940 _hoverEventHandler -= value;
1942 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1944 this.HoveredSignal().Disconnect(_hoverEventCallback);
1950 // Callback for View Hover signal
1951 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
1953 if (hoverEvent == global::System.IntPtr.Zero)
1955 NUILog.Error("hoverEvent should not be null!");
1959 HoverEventArgs e = new HoverEventArgs();
1961 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
1963 if (_hoverEventHandler != null)
1965 return _hoverEventHandler(this, e);
1972 /// Event arguments that passed via the wheel signal.
1974 /// <since_tizen> 3 </since_tizen>
1975 public class WheelEventArgs : EventArgs
1977 private Wheel _wheel;
1980 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
1982 /// <since_tizen> 3 </since_tizen>
1996 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1997 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1998 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1999 private WheelEventCallbackType _wheelEventCallback;
2002 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
2003 /// The WheelMoved signal is emitted when the wheel event is received.<br />
2005 /// <since_tizen> 3 </since_tizen>
2006 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
2010 if (_wheelEventHandler == null)
2012 _wheelEventCallback = OnWheelEvent;
2013 this.WheelEventSignal().Connect(_wheelEventCallback);
2016 _wheelEventHandler += value;
2021 _wheelEventHandler -= value;
2023 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
2025 this.WheelEventSignal().Disconnect(_wheelEventCallback);
2031 // Callback for View Wheel signal
2032 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
2034 if (wheelEvent == global::System.IntPtr.Zero)
2036 NUILog.Error("wheelEvent should not be null!");
2040 WheelEventArgs e = new WheelEventArgs();
2042 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
2044 if (_wheelEventHandler != null)
2046 return _wheelEventHandler(this, e);
2052 private EventHandler _onWindowEventHandler;
2053 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2054 private delegate void OnWindowEventCallbackType(IntPtr control);
2055 private OnWindowEventCallbackType _onWindowEventCallback;
2058 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
2059 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
2061 /// <since_tizen> 3 </since_tizen>
2062 public event EventHandler AddedToWindow
2066 if (_onWindowEventHandler == null)
2068 _onWindowEventCallback = OnWindow;
2069 this.OnWindowSignal().Connect(_onWindowEventCallback);
2072 _onWindowEventHandler += value;
2077 _onWindowEventHandler -= value;
2079 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
2081 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
2086 // Callback for View OnWindow signal
2087 private void OnWindow(IntPtr data)
2089 if (_onWindowEventHandler != null)
2091 _onWindowEventHandler(this, null);
2096 private EventHandler _offWindowEventHandler;
2097 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2098 private delegate void OffWindowEventCallbackType(IntPtr control);
2099 private OffWindowEventCallbackType _offWindowEventCallback;
2102 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
2103 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
2105 /// <since_tizen> 3 </since_tizen>
2106 public event EventHandler RemovedFromWindow
2110 if (_offWindowEventHandler == null)
2112 _offWindowEventCallback = OffWindow;
2113 this.OffWindowSignal().Connect(_offWindowEventCallback);
2116 _offWindowEventHandler += value;
2121 _offWindowEventHandler -= value;
2123 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
2125 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
2130 // Callback for View OffWindow signal
2131 private void OffWindow(IntPtr data)
2133 if (_offWindowEventHandler != null)
2135 _offWindowEventHandler(this, null);
2140 /// Event arguments of visibility changed.
2142 /// <since_tizen> 3 </since_tizen>
2143 public class VisibilityChangedEventArgs : EventArgs
2146 private bool _visibility;
2147 private VisibilityChangeType _type;
2150 /// The view, or child of view, whose visibility has changed.
2152 /// <since_tizen> 3 </since_tizen>
2166 /// Whether the view is now visible or not.
2168 /// <since_tizen> 3 </since_tizen>
2169 public bool Visibility
2177 _visibility = value;
2182 /// Whether the view's visible property has changed or a parent's.
2184 /// <since_tizen> 3 </since_tizen>
2185 public VisibilityChangeType Type
2198 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
2199 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2200 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
2201 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
2204 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
2205 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
2207 /// <since_tizen> 3 </since_tizen>
2208 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
2212 if (_visibilityChangedEventHandler == null)
2214 _visibilityChangedEventCallback = OnVisibilityChanged;
2215 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
2218 _visibilityChangedEventHandler += value;
2223 _visibilityChangedEventHandler -= value;
2225 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
2227 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
2232 // Callback for View visibility change signal
2233 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
2235 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
2238 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2240 e.Visibility = visibility;
2243 if (_visibilityChangedEventHandler != null)
2245 _visibilityChangedEventHandler(this, e);
2251 /// Event arguments of layout direction changed.
2253 /// <since_tizen> 4 </since_tizen>
2254 public class LayoutDirectionChangedEventArgs : EventArgs
2257 private ViewLayoutDirectionType _type;
2260 /// The view, or child of view, whose layout direction has changed.
2262 /// <since_tizen> 4 </since_tizen>
2276 /// Whether the view's layout direction property has changed or a parent's.
2278 /// <since_tizen> 4 </since_tizen>
2279 public ViewLayoutDirectionType Type
2292 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
2293 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2294 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
2295 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
2298 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
2299 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
2301 /// <since_tizen> 4 </since_tizen>
2302 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
2306 if (_layoutDirectionChangedEventHandler == null)
2308 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
2309 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
2312 _layoutDirectionChangedEventHandler += value;
2317 _layoutDirectionChangedEventHandler -= value;
2319 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
2321 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
2326 // Callback for View layout direction change signal
2327 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
2329 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
2332 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2336 if (_layoutDirectionChangedEventHandler != null)
2338 _layoutDirectionChangedEventHandler(this, e);
2342 // Resource Ready Signal
2344 private EventHandler _resourcesLoadedEventHandler;
2345 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2346 private delegate void ResourcesLoadedCallbackType(IntPtr control);
2347 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
2350 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
2351 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
2353 /// <since_tizen> 3 </since_tizen>
2354 public event EventHandler ResourcesLoaded
2358 if (_resourcesLoadedEventHandler == null)
2360 _ResourcesLoadedCallback = OnResourcesLoaded;
2361 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
2364 _resourcesLoadedEventHandler += value;
2369 _resourcesLoadedEventHandler -= value;
2371 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
2373 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
2378 private void OnResourcesLoaded(IntPtr view)
2380 if (_resourcesLoadedEventHandler != null)
2382 _resourcesLoadedEventHandler(this, null);
2386 internal IntPtr GetPtrfromView()
2388 return (IntPtr)swigCPtr;
2391 internal class Property
2393 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
2394 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
2395 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
2396 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
2397 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
2398 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
2399 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
2400 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
2401 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
2402 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
2403 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
2404 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
2405 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
2406 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
2407 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
2408 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
2409 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
2410 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
2411 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
2412 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
2413 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
2414 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
2415 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
2416 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
2417 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
2418 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
2419 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
2420 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
2421 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
2422 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
2423 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
2424 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
2425 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
2426 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
2427 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
2428 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
2429 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
2430 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
2431 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
2432 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
2433 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
2434 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
2435 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
2436 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
2437 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
2438 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
2439 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
2440 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
2441 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
2442 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
2443 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
2444 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
2445 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
2446 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
2447 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
2448 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
2449 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
2450 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
2451 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
2452 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
2453 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
2454 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
2455 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();
2459 /// Describes the direction to move the focus towards.
2461 /// <since_tizen> 3 </since_tizen>
2462 public enum FocusDirection
2465 /// Move keyboard focus towards the left direction.
2467 /// <since_tizen> 3 </since_tizen>
2470 /// Move keyboard focus towards the right direction.
2472 /// <since_tizen> 3 </since_tizen>
2475 /// Move keyboard focus towards the up direction.
2477 /// <since_tizen> 3 </since_tizen>
2480 /// Move keyboard focus towards the down direction.
2482 /// <since_tizen> 3 </since_tizen>
2485 /// Move keyboard focus towards the previous page direction.
2487 /// <since_tizen> 3 </since_tizen>
2490 /// Move keyboard focus towards the next page direction.
2492 /// <since_tizen> 3 </since_tizen>
2497 /// Creates a new instance of a view.
2499 /// <since_tizen> 3 </since_tizen>
2500 public View() : this(NDalicPINVOKE.View_New(), true)
2502 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2504 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
2506 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2509 private View ConvertIdToView(uint id)
2512 if (GetParent() is View)
2514 View parentView = GetParent() as View;
2515 view = parentView.FindChildById(id);
2520 view = Window.Instance.GetRootLayer().FindChildById(id);
2526 internal void SetKeyInputFocus()
2528 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
2529 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2533 /// Queries whether the view has a focus.
2535 /// <returns>True if this view has a focus.</returns>
2536 /// <since_tizen> 3 </since_tizen>
2537 public bool HasFocus()
2539 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
2540 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2544 internal void ClearKeyInputFocus()
2546 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
2547 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2550 internal PinchGestureDetector GetPinchGestureDetector()
2552 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
2553 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2557 internal PanGestureDetector GetPanGestureDetector()
2559 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
2560 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2564 internal TapGestureDetector GetTapGestureDetector()
2566 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
2567 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2571 internal LongPressGestureDetector GetLongPressGestureDetector()
2573 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
2574 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2579 /// Sets the name of the style to be applied to the view.
2581 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
2582 /// <since_tizen> 3 </since_tizen>
2583 public void SetStyleName(string styleName)
2585 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
2586 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2590 /// Retrieves the name of the style to be applied to the view (if any).
2592 /// <returns>A string matching a style, or an empty string.</returns>
2593 /// <since_tizen> 3 </since_tizen>
2594 public string GetStyleName()
2596 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
2597 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2601 internal void SetBackgroundColor(Vector4 color)
2603 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
2604 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2607 internal Vector4 GetBackgroundColor()
2609 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
2610 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2614 internal void SetBackgroundImage(Image image)
2616 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
2617 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2621 /// Clears the background.
2623 /// <since_tizen> 3 </since_tizen>
2624 public void ClearBackground()
2626 NDalicPINVOKE.View_ClearBackground(swigCPtr);
2627 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2630 internal ControlKeySignal KeyEventSignal()
2632 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
2633 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2637 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
2639 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
2640 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2644 internal KeyInputFocusSignal KeyInputFocusLostSignal()
2646 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
2647 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2651 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
2653 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2656 internal enum PropertyRange
2658 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
2659 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
2660 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
2664 /// The StyleName, type string.
2666 /// <since_tizen> 3 </since_tizen>
2667 public string StyleName
2671 return (string)GetValue(StyleNameProperty);
2675 SetValue(StyleNameProperty, value);
2676 NotifyPropertyChanged();
2681 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
2683 /// <since_tizen> 3 </since_tizen>
2684 public Color BackgroundColor
2688 return (Color)GetValue(BackgroundColorProperty);
2692 SetValue(BackgroundColorProperty, value);
2693 NotifyPropertyChanged();
2698 /// Creates an animation to animate the background color visual. If there is no
2699 /// background visual, creates one with transparent black as it's mixColor.
2701 /// <since_tizen> 3 </since_tizen>
2702 public Animation AnimateBackgroundColor(object destinationValue,
2705 AlphaFunction.BuiltinFunctions? alphaFunction = null,
2706 object initialValue = null)
2708 Tizen.NUI.PropertyMap background = Background;
2710 if (background.Empty())
2712 // If there is no background yet, ensure there is a transparent
2714 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
2715 background = Background;
2717 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
2721 /// Creates an animation to animate the mixColor of the named visual.
2723 /// <since_tizen> 3 </since_tizen>
2724 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
2726 Animation animation = null;
2728 PropertyMap _animator = new PropertyMap();
2729 if (alphaFunction != null)
2731 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
2734 PropertyMap _timePeriod = new PropertyMap();
2735 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
2736 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
2737 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
2739 PropertyMap _transition = new PropertyMap();
2740 _transition.Add("animator", new PropertyValue(_animator));
2741 _transition.Add("target", new PropertyValue(targetVisual));
2742 _transition.Add("property", new PropertyValue("mixColor"));
2744 if (initialColor != null)
2746 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
2747 _transition.Add("initialValue", initValue);
2750 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
2751 _transition.Add("targetValue", destValue);
2752 TransitionData _transitionData = new TransitionData(_transition);
2754 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
2755 if (NDalicPINVOKE.SWIGPendingException.Pending)
2756 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2762 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
2764 /// <since_tizen> 3 </since_tizen>
2765 public string BackgroundImage
2769 return (string)GetValue(BackgroundImageProperty);
2773 SetValue(BackgroundImageProperty, value);
2774 NotifyPropertyChanged();
2779 /// The background of view.
2781 /// <since_tizen> 3 </since_tizen>
2782 public Tizen.NUI.PropertyMap Background
2786 return (PropertyMap)GetValue(BackgroundProperty);
2790 SetValue(BackgroundProperty, value);
2791 NotifyPropertyChanged();
2797 /// The current state of the view.
2799 /// <since_tizen> 3 </since_tizen>
2804 return (States)GetValue(StateProperty);
2808 SetValue(StateProperty, value);
2809 NotifyPropertyChanged();
2814 /// The current sub state of the view.
2816 /// <since_tizen> 3 </since_tizen>
2817 public States SubState
2821 return (States)GetValue(SubStateProperty);
2825 SetValue(SubStateProperty, value);
2826 NotifyPropertyChanged();
2831 /// Displays a tooltip
2833 /// <since_tizen> 3 </since_tizen>
2834 public Tizen.NUI.PropertyMap Tooltip
2838 return (PropertyMap)GetValue(TooltipProperty);
2842 SetValue(TooltipProperty, value);
2843 NotifyPropertyChanged();
2848 /// Displays a tooltip as a text.
2850 /// <since_tizen> 3 </since_tizen>
2851 public string TooltipText
2855 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
2856 NotifyPropertyChanged();
2860 private int LeftFocusableViewId
2865 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
2870 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2874 private int RightFocusableViewId
2879 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
2884 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2888 private int UpFocusableViewId
2893 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
2898 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2902 private int DownFocusableViewId
2907 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
2912 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2917 /// The Child property of FlexContainer.<br />
2918 /// The proportion of the free space in the container, the flex item will receive.<br />
2919 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
2921 /// <since_tizen> 3 </since_tizen>
2926 return (float)GetValue(FlexProperty);
2930 SetValue(FlexProperty, value);
2931 NotifyPropertyChanged();
2936 /// The Child property of FlexContainer.<br />
2937 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
2939 /// <since_tizen> 3 </since_tizen>
2940 public int AlignSelf
2944 return (int)GetValue(AlignSelfProperty);
2948 SetValue(AlignSelfProperty, value);
2949 NotifyPropertyChanged();
2954 /// The Child property of FlexContainer.<br />
2955 /// The space around the flex item.<br />
2957 /// <since_tizen> 3 </since_tizen>
2958 public Vector4 FlexMargin
2962 return (Vector4)GetValue(FlexMarginProperty);
2966 SetValue(FlexMarginProperty, value);
2967 NotifyPropertyChanged();
2972 /// The top-left cell this child occupies, if not set, the first available cell is used.
2974 /// <since_tizen> 3 </since_tizen>
2975 public Vector2 CellIndex
2979 return (Vector2)GetValue(CellIndexProperty);
2983 SetValue(CellIndexProperty, value);
2984 NotifyPropertyChanged();
2989 /// The number of rows this child occupies, if not set, the default value is 1.
2991 /// <since_tizen> 3 </since_tizen>
2992 public float RowSpan
2996 return (float)GetValue(RowSpanProperty);
3000 SetValue(RowSpanProperty, value);
3001 NotifyPropertyChanged();
3006 /// The number of columns this child occupies, if not set, the default value is 1.
3008 /// <since_tizen> 3 </since_tizen>
3009 public float ColumnSpan
3013 return (float)GetValue(ColumnSpanProperty);
3017 SetValue(ColumnSpanProperty, value);
3018 NotifyPropertyChanged();
3023 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
3025 /// <since_tizen> 3 </since_tizen>
3026 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
3030 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
3034 SetValue(CellHorizontalAlignmentProperty, value);
3035 NotifyPropertyChanged();
3040 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
3042 /// <since_tizen> 3 </since_tizen>
3043 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
3047 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
3051 SetValue(CellVerticalAlignmentProperty, value);
3052 NotifyPropertyChanged();
3057 /// The left focusable view.<br />
3058 /// This will return null if not set.<br />
3059 /// This will also return null if the specified left focusable view is not on a window.<br />
3061 /// <since_tizen> 3 </since_tizen>
3062 public View LeftFocusableView
3064 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3067 return (View)GetValue(LeftFocusableViewProperty);
3071 SetValue(LeftFocusableViewProperty, value);
3072 NotifyPropertyChanged();
3077 /// The right focusable view.<br />
3078 /// This will return null if not set.<br />
3079 /// This will also return null if the specified right focusable view is not on a window.<br />
3081 /// <since_tizen> 3 </since_tizen>
3082 public View RightFocusableView
3084 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3087 return (View)GetValue(RightFocusableViewProperty);
3091 SetValue(RightFocusableViewProperty, value);
3092 NotifyPropertyChanged();
3097 /// The up focusable view.<br />
3098 /// This will return null if not set.<br />
3099 /// This will also return null if the specified up focusable view is not on a window.<br />
3101 /// <since_tizen> 3 </since_tizen>
3102 public View UpFocusableView
3104 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3107 return (View)GetValue(UpFocusableViewProperty);
3111 SetValue(UpFocusableViewProperty, value);
3112 NotifyPropertyChanged();
3117 /// The down focusable view.<br />
3118 /// This will return null if not set.<br />
3119 /// This will also return null if the specified down focusable view is not on a window.<br />
3121 /// <since_tizen> 3 </since_tizen>
3122 public View DownFocusableView
3124 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3127 return (View)GetValue(DownFocusableViewProperty);
3131 SetValue(DownFocusableViewProperty, value);
3132 NotifyPropertyChanged();
3137 /// Whether the view should be focusable by keyboard navigation.
3139 /// <since_tizen> 3 </since_tizen>
3140 public bool Focusable
3144 SetValue(FocusableProperty, value);
3145 NotifyPropertyChanged();
3149 return (bool)GetValue(FocusableProperty);
3154 /// Enumeration for describing the states of the view.
3156 /// <since_tizen> 3 </since_tizen>
3160 /// The normal state.
3164 /// The focused state.
3168 /// The disabled state.
3174 /// Retrieves the position of the view.<br />
3175 /// The coordinates are relative to the view's parent.<br />
3177 /// <since_tizen> 3 </since_tizen>
3178 public Position CurrentPosition
3182 return GetCurrentPosition();
3187 /// Sets the size of a view for the width and the height.<br />
3188 /// Geometry can be scaled to fit within this area.<br />
3189 /// This does not interfere with the view's scale factor.<br />
3190 /// The views default depth is the minimum of width and height.<br />
3193 /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
3194 /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
3195 /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
3196 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3197 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
3198 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
3199 /// 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 />
3201 /// <since_tizen> 3 </since_tizen>
3202 public Size2D Size2D
3206 Size2D temp = (Size2D)GetValue(Size2DProperty);
3207 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
3211 SetValue(Size2DProperty, value);
3212 // Set Specification so when layouts measure this View it matches the value set here.
3213 // All Views are currently Layouts.
3214 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
3215 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
3216 NotifyPropertyChanged();
3220 private void OnSize2DChanged(int width, int height)
3222 Size2D = new Size2D(width, height);
3226 /// Retrieves the size of the view.<br />
3227 /// The coordinates are relative to the view's parent.<br />
3229 /// <since_tizen> 3 </since_tizen>
3230 public Size2D CurrentSize
3234 return GetCurrentSize();
3239 /// Retrieves and sets the view's opacity.<br />
3241 /// <since_tizen> 3 </since_tizen>
3242 public float Opacity
3246 return (float)GetValue(OpacityProperty);
3250 SetValue(OpacityProperty, value);
3251 NotifyPropertyChanged();
3256 /// Sets the position of the view for X and Y.<br />
3257 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
3258 /// If the position inheritance is disabled, sets the world position.<br />
3261 /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
3262 /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
3263 /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
3264 /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3265 /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
3266 /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
3268 /// <since_tizen> 3 </since_tizen>
3269 public Position2D Position2D
3273 Position2D temp = (Position2D)GetValue(Position2DProperty);
3274 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
3278 SetValue(Position2DProperty, value);
3279 NotifyPropertyChanged();
3283 private void OnPosition2DChanged(int x, int y)
3285 Position2D = new Position2D(x, y);
3289 /// Retrieves the screen postion of the view.<br />
3291 /// <since_tizen> 3 </since_tizen>
3292 public Vector2 ScreenPosition
3296 Vector2 temp = new Vector2(0.0f, 0.0f);
3297 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
3303 /// Determines whether the pivot point should be used to determine the position of the view.
3304 /// This is true by default.
3306 /// <remarks>If false, then the top-left of the view is used for the position.
3307 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
3309 /// <since_tizen> 3 </since_tizen>
3310 public bool PositionUsesPivotPoint
3314 return (bool)GetValue(PositionUsesPivotPointProperty);
3318 SetValue(PositionUsesPivotPointProperty, value);
3319 NotifyPropertyChanged();
3324 /// Please do not use! this will be deprecated.
3326 /// Please do not use! this will be deprecated!
3327 /// Instead please use PositionUsesPivotPoint.
3328 /// <since_tizen> 3 </since_tizen>
3329 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
3331 "View view = new View(); " +
3332 "view.PivotPoint = PivotPoint.Center; " +
3333 "view.PositionUsesPivotPoint = true;")]
3334 [EditorBrowsable(EditorBrowsableState.Never)]
3335 public bool PositionUsesAnchorPoint
3340 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
3345 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3346 NotifyPropertyChanged();
3350 internal bool FocusState
3354 return IsKeyboardFocusable();
3358 SetKeyboardFocusable(value);
3363 /// Queries whether the view is connected to the stage.<br />
3364 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
3366 /// <since_tizen> 3 </since_tizen>
3367 public bool IsOnWindow
3376 /// Gets the depth in the hierarchy for the view.
3378 /// <since_tizen> 3 </since_tizen>
3379 public int HierarchyDepth
3383 return GetHierarchyDepth();
3388 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
3391 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
3392 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
3393 /// The values set by this property will likely change.
3395 /// <since_tizen> 3 </since_tizen>
3396 public int SiblingOrder
3400 return (int)GetValue(SiblingOrderProperty);
3404 SetValue(SiblingOrderProperty, value);
3405 NotifyPropertyChanged();
3410 /// Returns the natural size of the view.
3413 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3415 /// <since_tizen> 5 </since_tizen>
3416 public Vector3 NaturalSize
3420 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3421 if (NDalicPINVOKE.SWIGPendingException.Pending)
3422 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3428 /// Returns the natural size (Size2D) of the view.
3431 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3433 /// <since_tizen> 4 </since_tizen>
3434 public Size2D NaturalSize2D
3438 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3439 if (NDalicPINVOKE.SWIGPendingException.Pending)
3440 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3442 return new Size2D((int)temp.Width, (int)temp.Height);
3447 /// Set the layout on this control.
3451 internal LayoutItem Layout
3455 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
3457 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3458 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3459 NDalicPINVOKE.delete_BaseHandle(CPtr);
3460 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3462 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3464 return basehandle as LayoutItem;
3468 Log.Info("NUI", "Set Layout on:" + Name + "\n");
3469 layoutingDisabled = false;
3475 internal void SetLayout( LayoutItem layout )
3477 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(layout) );
3478 layout.LayoutChildren.Clear();
3479 foreach (View view in Children)
3481 layout.LayoutChildren.Add(view.Layout);
3486 /// Set that layouting is required on this View. It will automatically receive a Layout.
3490 internal bool LayoutingRequired
3494 bool result = Tizen.NUI.NDalicManualPINVOKE.View_IsLayoutingRequired(View.getCPtr(this));
3495 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3500 Tizen.NUI.NDalicManualPINVOKE.View_SetLayoutingRequired(View.getCPtr(this), value);
3508 /// This is an asynchronous method.
3510 /// <since_tizen> 3 </since_tizen>
3520 /// This is an asynchronous method.
3521 /// If the view is hidden, then the view and its children will not be rendered.
3522 /// 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.
3524 /// <since_tizen> 3 </since_tizen>
3530 internal void Raise()
3532 var parentChildren = GetParent()?.Children;
3534 if (parentChildren != null)
3536 int currentIndex = parentChildren.IndexOf(this);
3538 // If the view is not already the last item in the list.
3539 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
3541 View temp = parentChildren[currentIndex + 1];
3542 parentChildren[currentIndex + 1] = this;
3543 parentChildren[currentIndex] = temp;
3545 NDalicPINVOKE.Raise(swigCPtr);
3546 if (NDalicPINVOKE.SWIGPendingException.Pending)
3547 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3553 internal void Lower()
3555 var parentChildren = GetParent()?.Children;
3557 if (parentChildren != null)
3559 int currentIndex = parentChildren.IndexOf(this);
3561 // If the view is not already the first item in the list.
3562 if (currentIndex > 0 && currentIndex < parentChildren.Count)
3564 View temp = parentChildren[currentIndex - 1];
3565 parentChildren[currentIndex - 1] = this;
3566 parentChildren[currentIndex] = temp;
3568 NDalicPINVOKE.Lower(swigCPtr);
3569 if (NDalicPINVOKE.SWIGPendingException.Pending)
3570 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3576 /// Raises the view above all other views.
3579 /// Sibling order of views within the parent will be updated automatically.
3580 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
3582 /// <since_tizen> 3 </since_tizen>
3583 public void RaiseToTop()
3585 var parentChildren = GetParent()?.Children;
3587 if (parentChildren != null)
3589 parentChildren.Remove(this);
3590 parentChildren.Add(this);
3592 NDalicPINVOKE.RaiseToTop(swigCPtr);
3593 if (NDalicPINVOKE.SWIGPendingException.Pending)
3594 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3600 /// Lowers the view to the bottom of all views.
3603 /// The sibling order of views within the parent will be updated automatically.
3604 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3606 /// <since_tizen> 3 </since_tizen>
3607 public void LowerToBottom()
3609 var parentChildren = GetParent()?.Children;
3611 if (parentChildren != null)
3613 parentChildren.Remove(this);
3614 parentChildren.Insert(0, this);
3616 NDalicPINVOKE.LowerToBottom(swigCPtr);
3617 if (NDalicPINVOKE.SWIGPendingException.Pending)
3618 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3623 /// Queries if all resources required by a view are loaded and ready.
3625 /// <remarks>Most resources are only loaded when the control is placed on the stage.
3627 /// <since_tizen> 3 </since_tizen>
3628 public bool IsResourceReady()
3630 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
3631 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3636 /// Raises the view to above the target view.
3638 /// <remarks>The sibling order of views within the parent will be updated automatically.
3639 /// Views on the level above the target view will still be shown above this view.
3640 /// Raising this view above views with the same sibling order as each other will raise this view above them.
3641 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3643 /// <param name="target">Will be raised above this view.</param>
3644 internal void RaiseAbove(View target)
3646 var parentChildren = GetParent()?.Children;
3648 if (parentChildren != null)
3650 int currentIndex = parentChildren.IndexOf(this);
3651 int targetIndex = parentChildren.IndexOf(target);
3653 if (currentIndex < 0 || targetIndex < 0 ||
3654 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3656 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3659 // If the currentIndex is less than the target index and the target has the same parent.
3660 if (currentIndex < targetIndex)
3662 parentChildren.Remove(this);
3663 parentChildren.Insert(targetIndex, this);
3665 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
3666 if (NDalicPINVOKE.SWIGPendingException.Pending)
3667 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3674 /// Lowers the view to below the target view.
3676 /// <remarks>The sibling order of views within the parent will be updated automatically.
3677 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
3678 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3680 /// <param name="target">Will be lowered below this view.</param>
3681 internal void LowerBelow(View target)
3683 var parentChildren = GetParent()?.Children;
3685 if (parentChildren != null)
3687 int currentIndex = parentChildren.IndexOf(this);
3688 int targetIndex = parentChildren.IndexOf(target);
3689 if (currentIndex < 0 || targetIndex < 0 ||
3690 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3692 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3696 // If the currentIndex is not already the 0th index and the target has the same parent.
3697 if ((currentIndex != 0) && (targetIndex != -1) &&
3698 (currentIndex > targetIndex))
3700 parentChildren.Remove(this);
3701 parentChildren.Insert(targetIndex, this);
3703 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
3704 if (NDalicPINVOKE.SWIGPendingException.Pending)
3705 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3711 internal string GetName()
3713 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
3714 if (NDalicPINVOKE.SWIGPendingException.Pending)
3715 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3719 internal void SetName(string name)
3721 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
3722 if (NDalicPINVOKE.SWIGPendingException.Pending)
3723 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3726 internal uint GetId()
3728 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
3729 if (NDalicPINVOKE.SWIGPendingException.Pending)
3730 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3734 internal bool IsRoot()
3736 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
3737 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3741 internal bool OnWindow()
3743 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
3744 if (NDalicPINVOKE.SWIGPendingException.Pending)
3745 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3750 /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
3752 /// <pre>The view has been initialized. </pre>
3753 /// <returns>The parent layer of view </returns>
3754 /// <since_tizen> 5 </since_tizen>
3755 public Layer GetLayer()
3757 //to fix memory leak issue, match the handle count with native side.
3758 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
3759 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3760 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
3761 NDalicPINVOKE.delete_BaseHandle(CPtr);
3762 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3764 if (NDalicPINVOKE.SWIGPendingException.Pending)
3765 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3770 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
3772 /// <pre>The (child) view has been initialized. </pre>
3773 /// <since_tizen> 4 </since_tizen>
3774 public void Unparent()
3776 GetParent()?.Remove(this);
3780 /// Search through this view's hierarchy for a view with the given name.
3781 /// The view itself is also considered in the search.
3783 /// <pre>The view has been initialized.</pre>
3784 /// <param name="viewName">The name of the view to find.</param>
3785 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
3786 /// <since_tizen> 3 </since_tizen>
3787 public View FindChildByName(string viewName)
3789 //to fix memory leak issue, match the handle count with native side.
3790 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
3791 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3792 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3793 NDalicPINVOKE.delete_BaseHandle(CPtr);
3794 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3796 if (NDalicPINVOKE.SWIGPendingException.Pending)
3797 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3801 internal View FindChildById(uint id)
3803 //to fix memory leak issue, match the handle count with native side.
3804 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
3805 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3806 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3807 NDalicPINVOKE.delete_BaseHandle(CPtr);
3808 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3810 if (NDalicPINVOKE.SWIGPendingException.Pending)
3811 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3815 internal void SetParentOrigin(Vector3 origin)
3817 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
3818 if (NDalicPINVOKE.SWIGPendingException.Pending)
3819 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3822 internal Vector3 GetCurrentParentOrigin()
3824 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
3825 if (NDalicPINVOKE.SWIGPendingException.Pending)
3826 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3830 internal void SetAnchorPoint(Vector3 anchorPoint)
3832 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
3833 if (NDalicPINVOKE.SWIGPendingException.Pending)
3834 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3837 internal Vector3 GetCurrentAnchorPoint()
3839 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
3840 if (NDalicPINVOKE.SWIGPendingException.Pending)
3841 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3845 internal void SetSize(float width, float height)
3847 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
3848 if (NDalicPINVOKE.SWIGPendingException.Pending)
3849 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3852 internal void SetSize(float width, float height, float depth)
3854 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
3855 if (NDalicPINVOKE.SWIGPendingException.Pending)
3856 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3859 internal void SetSize(Vector2 size)
3861 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
3862 if (NDalicPINVOKE.SWIGPendingException.Pending)
3863 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3866 internal void SetSize(Vector3 size)
3868 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
3869 if (NDalicPINVOKE.SWIGPendingException.Pending)
3870 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3873 internal Vector3 GetTargetSize()
3875 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
3876 if (NDalicPINVOKE.SWIGPendingException.Pending)
3877 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3881 internal Size2D GetCurrentSize()
3883 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
3884 if (NDalicPINVOKE.SWIGPendingException.Pending)
3885 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3886 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
3890 internal Vector3 GetNaturalSize()
3892 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3893 if (NDalicPINVOKE.SWIGPendingException.Pending)
3894 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3898 internal void SetPosition(float x, float y)
3900 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
3901 if (NDalicPINVOKE.SWIGPendingException.Pending)
3902 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3905 internal void SetPosition(float x, float y, float z)
3907 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
3908 if (NDalicPINVOKE.SWIGPendingException.Pending)
3909 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3912 internal void SetPosition(Vector3 position)
3914 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
3915 if (NDalicPINVOKE.SWIGPendingException.Pending)
3916 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3919 internal void SetX(float x)
3921 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
3922 if (NDalicPINVOKE.SWIGPendingException.Pending)
3923 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3926 internal void SetY(float y)
3928 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
3929 if (NDalicPINVOKE.SWIGPendingException.Pending)
3930 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3933 internal void SetZ(float z)
3935 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
3936 if (NDalicPINVOKE.SWIGPendingException.Pending)
3937 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3940 internal void TranslateBy(Vector3 distance)
3942 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
3943 if (NDalicPINVOKE.SWIGPendingException.Pending)
3944 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3947 internal Position GetCurrentPosition()
3949 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
3950 if (NDalicPINVOKE.SWIGPendingException.Pending)
3951 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3955 internal Vector3 GetCurrentWorldPosition()
3957 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
3958 if (NDalicPINVOKE.SWIGPendingException.Pending)
3959 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3963 internal void SetInheritPosition(bool inherit)
3965 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
3966 if (NDalicPINVOKE.SWIGPendingException.Pending)
3967 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3970 internal bool IsPositionInherited()
3972 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
3973 if (NDalicPINVOKE.SWIGPendingException.Pending)
3974 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3978 internal void SetOrientation(Degree angle, Vector3 axis)
3980 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
3981 if (NDalicPINVOKE.SWIGPendingException.Pending)
3982 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3985 internal void SetOrientation(Radian angle, Vector3 axis)
3987 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
3988 if (NDalicPINVOKE.SWIGPendingException.Pending)
3989 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3992 internal void SetOrientation(Rotation orientation)
3994 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
3995 if (NDalicPINVOKE.SWIGPendingException.Pending)
3996 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3999 internal void RotateBy(Degree angle, Vector3 axis)
4001 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4002 if (NDalicPINVOKE.SWIGPendingException.Pending)
4003 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4006 internal void RotateBy(Radian angle, Vector3 axis)
4008 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4009 if (NDalicPINVOKE.SWIGPendingException.Pending)
4010 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4013 internal void RotateBy(Rotation relativeRotation)
4015 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4016 if (NDalicPINVOKE.SWIGPendingException.Pending)
4017 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4020 internal Rotation GetCurrentOrientation()
4022 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
4023 if (NDalicPINVOKE.SWIGPendingException.Pending)
4024 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4028 internal void SetInheritOrientation(bool inherit)
4030 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
4031 if (NDalicPINVOKE.SWIGPendingException.Pending)
4032 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4035 internal bool IsOrientationInherited()
4037 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
4038 if (NDalicPINVOKE.SWIGPendingException.Pending)
4039 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4043 internal Rotation GetCurrentWorldOrientation()
4045 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4046 if (NDalicPINVOKE.SWIGPendingException.Pending)
4047 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4051 internal void SetScale(float scale)
4053 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
4054 if (NDalicPINVOKE.SWIGPendingException.Pending)
4055 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4058 internal void SetScale(float scaleX, float scaleY, float scaleZ)
4060 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4061 if (NDalicPINVOKE.SWIGPendingException.Pending)
4062 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4065 internal void SetScale(Vector3 scale)
4067 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4068 if (NDalicPINVOKE.SWIGPendingException.Pending)
4069 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4072 internal void ScaleBy(Vector3 relativeScale)
4074 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4075 if (NDalicPINVOKE.SWIGPendingException.Pending)
4076 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4079 internal Vector3 GetCurrentScale()
4081 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
4082 if (NDalicPINVOKE.SWIGPendingException.Pending)
4083 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4087 internal Vector3 GetCurrentWorldScale()
4089 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
4090 if (NDalicPINVOKE.SWIGPendingException.Pending)
4091 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4095 internal void SetInheritScale(bool inherit)
4097 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
4098 if (NDalicPINVOKE.SWIGPendingException.Pending)
4099 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4102 internal bool IsScaleInherited()
4104 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
4105 if (NDalicPINVOKE.SWIGPendingException.Pending)
4106 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4110 internal Matrix GetCurrentWorldMatrix()
4112 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4113 if (NDalicPINVOKE.SWIGPendingException.Pending)
4114 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4118 internal void SetVisible(bool visible)
4120 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
4121 if (NDalicPINVOKE.SWIGPendingException.Pending)
4122 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4125 internal bool IsVisible()
4127 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
4128 if (NDalicPINVOKE.SWIGPendingException.Pending)
4129 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4133 internal void SetOpacity(float opacity)
4135 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
4136 if (NDalicPINVOKE.SWIGPendingException.Pending)
4137 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4140 internal float GetCurrentOpacity()
4142 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
4143 if (NDalicPINVOKE.SWIGPendingException.Pending)
4144 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4148 internal void SetColor(Vector4 color)
4150 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4151 if (NDalicPINVOKE.SWIGPendingException.Pending)
4152 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4155 internal Vector4 GetCurrentColor()
4157 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
4158 if (NDalicPINVOKE.SWIGPendingException.Pending)
4159 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4163 internal void SetColorMode(ColorMode colorMode)
4165 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
4166 if (NDalicPINVOKE.SWIGPendingException.Pending)
4167 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4170 internal ColorMode GetColorMode()
4172 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
4173 if (NDalicPINVOKE.SWIGPendingException.Pending)
4174 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4178 internal Vector4 GetCurrentWorldColor()
4180 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
4181 if (NDalicPINVOKE.SWIGPendingException.Pending)
4182 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4186 internal void SetDrawMode(DrawModeType drawMode)
4188 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4189 if (NDalicPINVOKE.SWIGPendingException.Pending)
4190 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4193 internal DrawModeType GetDrawMode()
4195 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
4196 if (NDalicPINVOKE.SWIGPendingException.Pending)
4197 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4202 /// Converts screen coordinates into the view's coordinate system using the default camera.
4204 /// <pre>The view has been initialized.</pre>
4205 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4206 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4207 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4208 /// <param name="screenX">The screen X-coordinate.</param>
4209 /// <param name="screenY">The screen Y-coordinate.</param>
4210 /// <returns>True if the conversion succeeded.</returns>
4211 /// <since_tizen> 3 </since_tizen>
4212 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4214 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4215 if (NDalicPINVOKE.SWIGPendingException.Pending)
4216 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4220 internal void SetKeyboardFocusable(bool focusable)
4222 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4223 if (NDalicPINVOKE.SWIGPendingException.Pending)
4224 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4227 internal bool IsKeyboardFocusable()
4229 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
4230 if (NDalicPINVOKE.SWIGPendingException.Pending)
4231 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4235 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4237 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4238 if (NDalicPINVOKE.SWIGPendingException.Pending)
4239 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4242 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4244 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4245 if (NDalicPINVOKE.SWIGPendingException.Pending)
4246 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4251 /// Sets the relative to parent size factor of the view.<br />
4252 /// This factor is only used when ResizePolicy is set to either:
4253 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4254 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4256 /// <pre>The view has been initialized.</pre>
4257 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4258 /// <since_tizen> 3 </since_tizen>
4259 public void SetSizeModeFactor(Vector3 factor)
4261 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4262 if (NDalicPINVOKE.SWIGPendingException.Pending)
4263 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4266 internal Vector3 GetSizeModeFactor()
4268 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
4269 if (NDalicPINVOKE.SWIGPendingException.Pending)
4270 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4275 /// Calculates the height of the view given a width.<br />
4276 /// The natural size is used for default calculation.<br />
4277 /// Size 0 is treated as aspect ratio 1:1.<br />
4279 /// <param name="width">The width to use.</param>
4280 /// <returns>The height based on the width.</returns>
4281 /// <since_tizen> 3 </since_tizen>
4282 public float GetHeightForWidth(float width)
4284 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
4285 if (NDalicPINVOKE.SWIGPendingException.Pending)
4286 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4291 /// Calculates the width of the view given a height.<br />
4292 /// The natural size is used for default calculation.<br />
4293 /// Size 0 is treated as aspect ratio 1:1.<br />
4295 /// <param name="height">The height to use.</param>
4296 /// <returns>The width based on the height.</returns>
4297 /// <since_tizen> 3 </since_tizen>
4298 public float GetWidthForHeight(float height)
4300 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
4301 if (NDalicPINVOKE.SWIGPendingException.Pending)
4302 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4307 /// Return the amount of size allocated for relayout.
4309 /// <param name="dimension">The dimension to retrieve.</param>
4310 /// <returns>Return the size.</returns>
4311 /// <since_tizen> 3 </since_tizen>
4312 public float GetRelayoutSize(DimensionType dimension)
4314 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4315 if (NDalicPINVOKE.SWIGPendingException.Pending)
4316 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4321 /// Set the padding for the view.
4323 /// <param name="padding">Padding for the view.</param>
4324 /// <since_tizen> 3 </since_tizen>
4325 public void SetPadding(PaddingType padding)
4327 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4328 if (NDalicPINVOKE.SWIGPendingException.Pending)
4329 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4333 /// Return the value of padding for the view.
4335 /// <param name="paddingOut">the value of padding for the view</param>
4336 /// <since_tizen> 3 </since_tizen>
4337 public void GetPadding(PaddingType paddingOut)
4339 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4340 if (NDalicPINVOKE.SWIGPendingException.Pending)
4341 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4344 internal void SetMinimumSize(Vector2 size)
4346 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4347 if (NDalicPINVOKE.SWIGPendingException.Pending)
4348 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4351 internal Vector2 GetMinimumSize()
4353 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
4354 if (NDalicPINVOKE.SWIGPendingException.Pending)
4355 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4359 internal void SetMaximumSize(Vector2 size)
4361 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4362 if (NDalicPINVOKE.SWIGPendingException.Pending)
4363 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4366 internal Vector2 GetMaximumSize()
4368 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
4369 if (NDalicPINVOKE.SWIGPendingException.Pending)
4370 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4374 internal int GetHierarchyDepth()
4376 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
4377 if (NDalicPINVOKE.SWIGPendingException.Pending)
4378 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4382 /// <since_tizen> 3 </since_tizen>
4383 public uint AddRenderer(Renderer renderer)
4385 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4386 if (NDalicPINVOKE.SWIGPendingException.Pending)
4387 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4391 internal uint GetRendererCount()
4393 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
4394 if (NDalicPINVOKE.SWIGPendingException.Pending)
4395 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4399 /// <since_tizen> 3 </since_tizen>
4400 public Renderer GetRendererAt(uint index)
4402 //to fix memory leak issue, match the handle count with native side.
4403 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
4404 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4405 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4406 NDalicPINVOKE.delete_BaseHandle(CPtr);
4407 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4409 if (NDalicPINVOKE.SWIGPendingException.Pending)
4410 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4414 /// <since_tizen> 3 </since_tizen>
4415 public void RemoveRenderer(Renderer renderer)
4417 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4418 if (NDalicPINVOKE.SWIGPendingException.Pending)
4419 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4422 /// <since_tizen> 3 </since_tizen>
4423 public void RemoveRenderer(uint index)
4425 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4426 if (NDalicPINVOKE.SWIGPendingException.Pending)
4427 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4430 internal TouchDataSignal TouchSignal()
4432 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
4433 if (NDalicPINVOKE.SWIGPendingException.Pending)
4434 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4438 internal HoverSignal HoveredSignal()
4440 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
4441 if (NDalicPINVOKE.SWIGPendingException.Pending)
4442 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4446 internal WheelSignal WheelEventSignal()
4448 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
4449 if (NDalicPINVOKE.SWIGPendingException.Pending)
4450 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4454 internal ViewSignal OnWindowSignal()
4456 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
4457 if (NDalicPINVOKE.SWIGPendingException.Pending)
4458 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4462 internal ViewSignal OffWindowSignal()
4464 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
4465 if (NDalicPINVOKE.SWIGPendingException.Pending)
4466 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4470 internal ViewSignal OnRelayoutSignal()
4472 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
4473 if (NDalicPINVOKE.SWIGPendingException.Pending)
4474 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4478 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
4480 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
4481 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4486 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
4488 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
4489 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4494 internal ViewSignal ResourcesLoadedSignal()
4496 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
4497 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4502 /// Gets or sets the origin of a view within its parent's area.<br />
4503 /// 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 />
4504 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
4505 /// A view's position is the distance between this origin and the view's anchor-point.<br />
4507 /// <pre>The view has been initialized.</pre>
4508 /// <since_tizen> 3 </since_tizen>
4509 public Position ParentOrigin
4513 return (Position)GetValue(ParentOriginProperty);
4517 SetValue(ParentOriginProperty, value);
4518 NotifyPropertyChanged();
4522 internal float ParentOriginX
4527 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
4532 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
4533 NotifyPropertyChanged();
4537 internal float ParentOriginY
4542 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
4547 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
4548 NotifyPropertyChanged();
4552 internal float ParentOriginZ
4557 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
4562 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
4563 NotifyPropertyChanged();
4568 /// Gets or sets the anchor-point of a view.<br />
4569 /// 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 />
4570 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
4571 /// A view position is the distance between its parent-origin and this anchor-point.<br />
4572 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
4573 /// <pre>The view has been initialized.</pre>
4575 /// <since_tizen> 3 </since_tizen>
4576 public Position PivotPoint
4580 return (Position)GetValue(PivotPointProperty);
4584 SetValue(PivotPointProperty, value);
4585 NotifyPropertyChanged();
4589 internal float PivotPointX
4594 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
4599 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
4603 internal float PivotPointY
4608 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
4613 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
4617 internal float PivotPointZ
4622 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
4627 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
4632 /// Gets or sets the size width of the view.
4634 /// <since_tizen> 3 </since_tizen>
4635 public float SizeWidth
4639 return (float)GetValue(SizeWidthProperty);
4643 SetValue(SizeWidthProperty, value);
4644 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
4645 NotifyPropertyChanged();
4650 /// Gets or sets the size height of the view.
4652 /// <since_tizen> 3 </since_tizen>
4653 public float SizeHeight
4657 return (float)GetValue(SizeHeightProperty);
4661 SetValue(SizeHeightProperty, value);
4662 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
4663 NotifyPropertyChanged();
4668 /// Gets or sets the position of the view.<br />
4669 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
4670 /// If the position inheritance is disabled, sets the world position.<br />
4672 /// <since_tizen> 3 </since_tizen>
4673 public Position Position
4677 return (Position)GetValue(PositionProperty);
4681 SetValue(PositionProperty, value);
4682 NotifyPropertyChanged();
4687 /// Gets or sets the position X of the view.
4689 /// <since_tizen> 3 </since_tizen>
4690 public float PositionX
4694 return (float)GetValue(PositionXProperty);
4698 SetValue(PositionXProperty, value);
4699 NotifyPropertyChanged();
4704 /// Gets or sets the position Y of the view.
4706 /// <since_tizen> 3 </since_tizen>
4707 public float PositionY
4711 return (float)GetValue(PositionYProperty);
4715 SetValue(PositionYProperty, value);
4716 NotifyPropertyChanged();
4721 /// Gets or sets the position Z of the view.
4723 /// <since_tizen> 3 </since_tizen>
4724 public float PositionZ
4728 return (float)GetValue(PositionZProperty);
4732 SetValue(PositionZProperty, value);
4733 NotifyPropertyChanged();
4738 /// Gets or sets the world position of the view.
4740 /// <since_tizen> 3 </since_tizen>
4741 public Vector3 WorldPosition
4745 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4746 GetProperty(View.Property.WORLD_POSITION).Get(temp);
4751 internal float WorldPositionX
4756 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
4761 internal float WorldPositionY
4766 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
4771 internal float WorldPositionZ
4776 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
4782 /// Gets or sets the orientation of the view.<br />
4783 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
4785 /// <remarks>This is an asynchronous method.</remarks>
4786 /// <since_tizen> 3 </since_tizen>
4787 public Rotation Orientation
4791 return (Rotation)GetValue(OrientationProperty);
4795 SetValue(OrientationProperty, value);
4796 NotifyPropertyChanged();
4801 /// Gets or sets the world orientation of the view.<br />
4803 /// <since_tizen> 3 </since_tizen>
4804 public Rotation WorldOrientation
4808 Rotation temp = new Rotation();
4809 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
4815 /// Gets or sets the scale factor applied to the view.<br />
4817 /// <since_tizen> 3 </since_tizen>
4818 public Vector3 Scale
4822 return (Vector3)GetValue(ScaleProperty);
4826 SetValue(ScaleProperty, value);
4827 NotifyPropertyChanged();
4832 /// Gets or sets the scale X factor applied to the view.
4834 /// <since_tizen> 3 </since_tizen>
4839 return (float)GetValue(ScaleXProperty);
4843 SetValue(ScaleXProperty, value);
4844 NotifyPropertyChanged();
4849 /// Gets or sets the scale Y factor applied to the view.
4851 /// <since_tizen> 3 </since_tizen>
4856 return (float)GetValue(ScaleYProperty);
4860 SetValue(ScaleYProperty, value);
4861 NotifyPropertyChanged();
4866 /// Gets or sets the scale Z factor applied to the view.
4868 /// <since_tizen> 3 </since_tizen>
4873 return (float)GetValue(ScaleZProperty);
4877 SetValue(ScaleZProperty, value);
4878 NotifyPropertyChanged();
4883 /// Gets the world scale of the view.
4885 /// <since_tizen> 3 </since_tizen>
4886 public Vector3 WorldScale
4890 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4891 GetProperty(View.Property.WORLD_SCALE).Get(temp);
4897 /// Retrieves the visibility flag of the view.
4900 /// If the view is not visible, then the view and its children will not be rendered.
4901 /// 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.
4903 /// <since_tizen> 3 </since_tizen>
4904 public bool Visibility
4909 GetProperty(View.Property.VISIBLE).Get(out temp);
4915 /// Gets the view's world color.
4917 /// <since_tizen> 3 </since_tizen>
4918 public Vector4 WorldColor
4922 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
4923 GetProperty(View.Property.WORLD_COLOR).Get(temp);
4928 internal Matrix WorldMatrix
4932 Matrix temp = new Matrix();
4933 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
4939 /// Gets or sets the view's name.
4941 /// <since_tizen> 3 </since_tizen>
4946 return (string)GetValue(NameProperty);
4950 SetValue(NameProperty, value);
4951 NotifyPropertyChanged();
4956 /// Get the number of children held by the view.
4958 /// <since_tizen> 3 </since_tizen>
4959 public new uint ChildCount
4963 return GetChildCount();
4968 /// Gets the view's ID.
4971 /// <since_tizen> 3 </since_tizen>
4981 /// Gets or sets the status of whether the view should emit touch or hover signals.
4983 /// <since_tizen> 3 </since_tizen>
4984 public bool Sensitive
4988 return (bool)GetValue(SensitiveProperty);
4992 SetValue(SensitiveProperty, value);
4993 NotifyPropertyChanged();
4998 /// 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.
5000 /// <since_tizen> 3 </since_tizen>
5001 public bool LeaveRequired
5005 return (bool)GetValue(LeaveRequiredProperty);
5009 SetValue(LeaveRequiredProperty, value);
5010 NotifyPropertyChanged();
5015 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
5017 /// <since_tizen> 3 </since_tizen>
5018 public bool InheritOrientation
5022 return (bool)GetValue(InheritOrientationProperty);
5026 SetValue(InheritOrientationProperty, value);
5027 NotifyPropertyChanged();
5032 /// Gets or sets the status of whether a child view inherits it's parent's scale.
5034 /// <since_tizen> 3 </since_tizen>
5035 public bool InheritScale
5039 return (bool)GetValue(InheritScaleProperty);
5043 SetValue(InheritScaleProperty, value);
5044 NotifyPropertyChanged();
5049 /// Gets or sets the status of how the view and its children should be drawn.<br />
5050 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
5051 /// 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 />
5052 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
5053 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
5054 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
5056 /// <since_tizen> 3 </since_tizen>
5057 public DrawModeType DrawMode
5061 return (DrawModeType)GetValue(DrawModeProperty);
5065 SetValue(DrawModeProperty, value);
5066 NotifyPropertyChanged();
5071 /// Gets or sets the relative to parent size factor of the view.<br />
5072 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
5073 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
5075 /// <since_tizen> 3 </since_tizen>
5076 public Vector3 SizeModeFactor
5080 return (Vector3)GetValue(SizeModeFactorProperty);
5084 SetValue(SizeModeFactorProperty, value);
5085 NotifyPropertyChanged();
5090 /// Gets or sets the width resize policy to be used.
5092 /// <since_tizen> 3 </since_tizen>
5093 public ResizePolicyType WidthResizePolicy
5097 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
5101 SetValue(WidthResizePolicyProperty, value);
5102 // Match ResizePolicy to new Layouting.
5103 // Parent relative policies can not be mapped at this point as parent size unknown.
5106 case ResizePolicyType.UseNaturalSize :
5108 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
5111 case ResizePolicyType.FillToParent :
5113 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.MatchParent ) );
5116 case ResizePolicyType.FitToChildren :
5118 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
5124 NotifyPropertyChanged();
5129 /// Gets or sets the height resize policy to be used.
5131 /// <since_tizen> 3 </since_tizen>
5132 public ResizePolicyType HeightResizePolicy
5136 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
5140 SetValue(HeightResizePolicyProperty, value);
5141 // Match ResizePolicy to new Layouting.
5142 // Parent relative policies can not be mapped at this point as parent size unknown.
5145 case ResizePolicyType.UseNaturalSize :
5147 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
5150 case ResizePolicyType.FillToParent :
5152 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.MatchParent ) );
5155 case ResizePolicyType.FitToChildren :
5157 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) );
5163 NotifyPropertyChanged();
5168 /// Gets or sets the policy to use when setting size with size negotiation.<br />
5169 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
5171 /// <since_tizen> 3 </since_tizen>
5172 public SizeScalePolicyType SizeScalePolicy
5176 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
5180 SetValue(SizeScalePolicyProperty, value);
5181 NotifyPropertyChanged();
5186 /// Gets or sets the status of whether the width size is dependent on the height size.
5188 /// <since_tizen> 3 </since_tizen>
5189 public bool WidthForHeight
5193 return (bool)GetValue(WidthForHeightProperty);
5197 SetValue(WidthForHeightProperty, value);
5198 NotifyPropertyChanged();
5203 /// Gets or sets the status of whether the height size is dependent on the width size.
5205 /// <since_tizen> 3 </since_tizen>
5206 public bool HeightForWidth
5210 return (bool)GetValue(HeightForWidthProperty);
5214 SetValue(HeightForWidthProperty, value);
5215 NotifyPropertyChanged();
5220 /// Gets or sets the padding for use in layout.
5222 /// <since_tizen> 5 </since_tizen>
5223 public Extents Padding
5227 return (Extents)GetValue(PaddingProperty);
5231 SetValue(PaddingProperty, value);
5232 NotifyPropertyChanged();
5237 /// Gets or sets the minimum size the view can be assigned in size negotiation.
5239 /// <since_tizen> 3 </since_tizen>
5240 public Size2D MinimumSize
5244 return (Size2D)GetValue(MinimumSizeProperty);
5250 // Note: it only works if minimum size is >= than natural size.
5251 // To force the size it should be done through the width&height spec or Size2D.
5252 Layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
5253 Layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
5255 SetValue(MinimumSizeProperty, value);
5256 NotifyPropertyChanged();
5261 /// Gets or sets the maximum size the view can be assigned in size negotiation.
5263 /// <since_tizen> 3 </since_tizen>
5264 public Size2D MaximumSize
5268 return (Size2D)GetValue(MaximumSizeProperty);
5272 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
5273 // MATCH_PARENT spec + parent container size can be used to limit
5274 SetValue(MaximumSizeProperty, value);
5275 NotifyPropertyChanged();
5280 /// Gets or sets whether a child view inherits it's parent's position.<br />
5281 /// Default is to inherit.<br />
5282 /// 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 />
5284 /// <since_tizen> 3 </since_tizen>
5285 public bool InheritPosition
5289 return (bool)GetValue(InheritPositionProperty);
5293 SetValue(InheritPositionProperty, value);
5294 NotifyPropertyChanged();
5299 /// Gets or sets the clipping behavior (mode) of it's children.
5301 /// <since_tizen> 3 </since_tizen>
5302 public ClippingModeType ClippingMode
5306 return (ClippingModeType)GetValue(ClippingModeProperty);
5310 SetValue(ClippingModeProperty, value);
5311 NotifyPropertyChanged();
5316 /// Gets the number of renderers held by the view.
5318 /// <since_tizen> 3 </since_tizen>
5319 public uint RendererCount
5323 return GetRendererCount();
5328 /// [Obsolete("Please do not use! this will be deprecated")]
5330 /// <since_tizen> 3 </since_tizen>
5331 /// Please do not use! this will be deprecated!
5332 /// Instead please use PivotPoint.
5333 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
5335 "View view = new View(); " +
5336 "view.PivotPoint = PivotPoint.Center; " +
5337 "view.PositionUsesPivotPoint = true;")]
5338 [EditorBrowsable(EditorBrowsableState.Never)]
5339 public Position AnchorPoint
5343 Position temp = new Position(0.0f, 0.0f, 0.0f);
5344 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
5349 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
5350 NotifyPropertyChanged();
5355 /// Sets the size of a view for the width, the height and the depth.<br />
5356 /// Geometry can be scaled to fit within this area.<br />
5357 /// This does not interfere with the view's scale factor.<br />
5358 /// The views default depth is the minimum of width and height.<br />
5361 /// Please note that multi-cascade setting is not possible for this NUI object. <br />
5362 /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
5363 /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
5364 /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
5365 /// 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 />
5367 /// <since_tizen> 5 </since_tizen>
5372 return (Size)GetValue(SizeProperty);
5376 SetValue(SizeProperty, value);
5377 // Set Specification so when layouts measure this View it matches the value set here.
5378 // All Views are currently Layouts.
5379 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Width));
5380 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value.Height));
5381 NotifyPropertyChanged();
5386 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
5388 /// <since_tizen> 3 </since_tizen>
5389 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
5391 "Container parent = view.GetParent(); " +
5392 "View view = parent as View;")]
5393 [EditorBrowsable(EditorBrowsableState.Never)]
5394 public new View Parent
5399 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
5400 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
5401 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
5403 if (basehandle is Layer layer)
5405 ret = new View(Layer.getCPtr(layer).Handle, false);
5406 NUILog.Error("This Parent property is deprecated, shoud do not be used");
5410 ret = basehandle as View;
5413 NDalicPINVOKE.delete_BaseHandle(CPtr);
5414 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5416 if (NDalicPINVOKE.SWIGPendingException.Pending)
5417 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5423 /// Gets/Sets whether inherit parent's the layout Direction.
5425 /// <since_tizen> 4 </since_tizen>
5426 public bool InheritLayoutDirection
5430 return (bool)GetValue(InheritLayoutDirectionProperty);
5434 SetValue(InheritLayoutDirectionProperty, value);
5435 NotifyPropertyChanged();
5440 /// Gets/Sets the layout Direction.
5442 /// <since_tizen> 4 </since_tizen>
5443 public ViewLayoutDirectionType LayoutDirection
5447 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
5451 SetValue(LayoutDirectionProperty, value);
5452 NotifyPropertyChanged();
5457 /// Gets or sets the Margin for use in layout.
5460 /// Margin property is supported by Layout algorithms and containers.
5461 /// Please Set Layout if you want to use Margin property.
5463 /// <since_tizen> 4 </since_tizen>
5464 public Extents Margin
5468 return (Extents)GetValue(MarginProperty);
5472 SetValue(MarginProperty, value);
5473 NotifyPropertyChanged();
5477 internal Style Style
5481 return (Style)GetValue(StyleProperty);
5485 SetValue(StyleProperty, value);
5490 /// [Obsolete("Please do not use! this will be deprecated")]
5492 /// Please do not use! this will be deprecated!
5493 /// Instead please use Padding.
5494 /// <since_tizen> 4 </since_tizen>
5495 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
5496 [EditorBrowsable(EditorBrowsableState.Never)]
5497 public Extents PaddingEX
5501 Extents temp = new Extents(0, 0, 0, 0);
5502 GetProperty(View.Property.PADDING).Get(temp);
5507 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
5508 NotifyPropertyChanged();
5513 /// Perform an action on a visual registered to this view. <br />
5514 /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
5516 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
5517 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
5518 /// <param name="attributes">Optional attributes for the action.</param>
5519 /// <since_tizen> 5 </since_tizen>
5520 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
5522 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
5523 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5526 internal readonly MergedStyle _mergedStyle;
5529 /// Child property to specify desired width
5531 internal int LayoutWidthSpecificationFixed
5536 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5538 NUILog.Error("WidthSpecificationFixed get error!");
5544 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5549 /// Child property to specify desired height
5551 internal int LayoutHeightSpecificationFixed
5556 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5558 NUILog.Error("HeightSpecificationFixed get error!");
5564 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5569 /// Child property to specify desired width, use MatchParent/WrapContent)
5571 internal ChildLayoutData LayoutWidthSpecification
5576 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5578 NUILog.Error("WidthSpecificationFixed get error!");
5580 return (ChildLayoutData)tmp;
5584 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5589 /// Child property to specify desired height, use MatchParent/WrapContent)
5591 internal ChildLayoutData LayoutHeightSpecification
5596 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5598 NUILog.Error("HeightSpecificationFixed get error!");
5600 return (ChildLayoutData)tmp;
5604 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5608 internal float Weight
5612 return (float)GetValue(WeightProperty);
5616 SetValue(WeightProperty, value);
5617 NotifyPropertyChanged();
5621 private bool _backgroundImageSynchronosLoading = false;
5622 internal bool BackgroundImageSynchronosLoading
5626 return _backgroundImageSynchronosLoading;
5630 if (value != _backgroundImageSynchronosLoading)
5633 PropertyMap bgMap = this.Background;
5635 bgMap.Find(Visual.Property.Type)?.Get(out visualType);
5636 if (visualType == (int)Visual.Type.Image)
5638 bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
5640 if (bgUrl.Length != 0)
5642 _backgroundImageSynchronosLoading = value;
5643 bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
5644 this.Background = bgMap;
5650 internal class BackgroundResourceLoadedEventArgs : EventArgs
5652 private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5653 public ResourceLoadingStatusType Status
5666 private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
5667 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
5668 private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
5669 private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
5671 internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
5675 if (_backgroundResourceLoadedEventHandler == null)
5677 _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
5678 this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
5681 _backgroundResourceLoadedEventHandler += value;
5685 _backgroundResourceLoadedEventHandler -= value;
5687 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
5689 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5694 private void OnBackgroundResourceLoaded(IntPtr view)
5696 BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5697 e.Status = (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5699 if (_backgroundResourceLoadedEventHandler != null)
5701 _backgroundResourceLoadedEventHandler(this, e);
5705 internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5707 return (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5714 /// The View layout Direction type.
5716 /// <since_tizen> 4 </since_tizen>
5717 public enum ViewLayoutDirectionType
5722 /// <since_tizen> 4 </since_tizen>
5727 /// <since_tizen> 4 </since_tizen>
5731 internal enum ChildLayoutData
5734 /// Constant which indicates child size should match parent size
5738 /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
5743 internal enum ResourceLoadingStatusType