2 * Copyright(c) 2017 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.BaseComponents;
22 namespace Tizen.NUI.UIComponents
25 /// The Popup widget provides a configurable popup dialog with a built-in layout of three main fields.
27 /// <since_tizen> 3 </since_tizen>
28 public class Popup : View
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
32 internal Popup(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Popup_SWIGUpcast(cPtr), cMemoryOwn)
34 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
37 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Popup obj)
39 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
45 /// <param name="type">The dispose type</param>
46 /// <since_tizen> 3 </since_tizen>
47 protected override void Dispose(DisposeTypes type)
54 if (type == DisposeTypes.Explicit)
57 //Release your own managed resources here.
58 //You should release all of your own disposable objects here.
62 //Release your own unmanaged resources here.
63 //You should not access any managed member here except static instance.
64 //because the execution order of Finalizes is non-deterministic.
67 if (_popUpHiddenEventCallbackDelegate != null)
69 HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate);
72 if (_popUpHidingEventCallbackDelegate != null)
74 HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate);
78 if (_popUpShownEventCallbackDelegate != null)
80 ShownSignal().Disconnect(_popUpShownEventCallbackDelegate);
83 if (_popUpShowingEventCallbackDelegate != null)
85 ShowingSignal().Disconnect(_popUpShowingEventCallbackDelegate);
88 if (_popUpOutsideTouchedEventCallbackDelegate != null)
90 this.OutsideTouchedSignal().Disconnect(_popUpOutsideTouchedEventCallbackDelegate);
93 if (swigCPtr.Handle != global::System.IntPtr.Zero)
98 NDalicPINVOKE.delete_Popup(swigCPtr);
100 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
110 /// Event arguments that passed via the OutsideTouchedEvent.
112 /// <since_tizen> 3 </since_tizen>
113 public class TouchedOutsideEventArgs : EventArgs
118 /// Event arguments that passed via the ShowingEventArgs.
120 /// <since_tizen> 3 </since_tizen>
121 public class ShowingEventArgs : EventArgs
126 /// Event arguments that passed via the ShownEventArgs.
128 /// <since_tizen> 3 </since_tizen>
129 public class ShownEventArgs : EventArgs
134 /// Event arguments that passed via the HidingEventArgs.
136 /// <since_tizen> 3 </since_tizen>
137 public class HidingEventArgs : EventArgs
142 /// Event arguments that passed via the HiddenEventArgs.
144 /// <since_tizen> 3 </since_tizen>
145 public class HiddenEventArgs : EventArgs
149 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
150 private delegate void OutsideTouchedEventCallbackDelegate();
151 private EventHandler<TouchedOutsideEventArgs> _popUpOutsideTouchedEventHandler;
152 private OutsideTouchedEventCallbackDelegate _popUpOutsideTouchedEventCallbackDelegate;
154 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
155 private delegate void ShowingEventCallbackDelegate();
156 private EventHandler<ShowingEventArgs> _popUpShowingEventHandler;
157 private ShowingEventCallbackDelegate _popUpShowingEventCallbackDelegate;
159 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
160 private delegate void ShownEventCallbackDelegate();
161 private EventHandler<ShownEventArgs> _popUpShownEventHandler;
162 private ShownEventCallbackDelegate _popUpShownEventCallbackDelegate;
164 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
165 private delegate void HidingEventCallbackDelegate();
166 private EventHandler<HidingEventArgs> _popUpHidingEventHandler;
167 private HidingEventCallbackDelegate _popUpHidingEventCallbackDelegate;
169 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
170 private delegate void HiddenEventCallbackDelegate();
171 private EventHandler<HiddenEventArgs> _popUpHiddenEventHandler;
172 private HiddenEventCallbackDelegate _popUpHiddenEventCallbackDelegate;
175 /// An event is sent when the user has touched outside the dialog.
177 /// <since_tizen> 3 </since_tizen>
178 public event EventHandler<TouchedOutsideEventArgs> TouchedOutside
182 if (_popUpOutsideTouchedEventHandler == null)
184 _popUpOutsideTouchedEventCallbackDelegate = (OnOutsideTouched);
185 OutsideTouchedSignal().Connect(_popUpOutsideTouchedEventCallbackDelegate);
187 _popUpOutsideTouchedEventHandler += value;
191 _popUpOutsideTouchedEventHandler -= value;
192 if (_popUpOutsideTouchedEventHandler == null && OutsideTouchedSignal().Empty() == false)
194 this.OutsideTouchedSignal().Disconnect(_popUpOutsideTouchedEventCallbackDelegate);
199 // Callback for Popup OutsideTouchedSignal
200 private void OnOutsideTouched()
202 TouchedOutsideEventArgs e = new TouchedOutsideEventArgs();
204 if (_popUpOutsideTouchedEventHandler != null)
206 //here we send all data to user event handlers
207 _popUpOutsideTouchedEventHandler(this, e);
212 /// An event is sent when the popup starts showing.
214 /// <since_tizen> 3 </since_tizen>
215 public event EventHandler<ShowingEventArgs> Showing
219 if (_popUpShowingEventHandler == null)
221 _popUpShowingEventCallbackDelegate = (OnShowing);
222 ShowingSignal().Connect(_popUpShowingEventCallbackDelegate);
224 _popUpShowingEventHandler += value;
228 _popUpShowingEventHandler -= value;
229 if (_popUpShowingEventHandler == null && ShowingSignal().Empty() == false)
231 ShowingSignal().Disconnect(_popUpShowingEventCallbackDelegate);
236 // Callback for ShowingSignal
237 private void OnShowing()
239 ShowingEventArgs e = new ShowingEventArgs();
241 if (_popUpShowingEventHandler != null)
243 //here we send all data to user event handlers
244 _popUpShowingEventHandler(this, e);
250 /// An event is sent when the popup has been fully displayed.
252 /// <since_tizen> 3 </since_tizen>
253 public event EventHandler<ShownEventArgs> Shown
257 if (_popUpShownEventHandler == null)
259 _popUpShownEventCallbackDelegate = (OnShown);
260 ShownSignal().Connect(_popUpShownEventCallbackDelegate);
262 _popUpShownEventHandler += value;
266 _popUpShownEventHandler -= value;
267 if (_popUpShownEventHandler == null && ShownSignal().Empty() == false)
269 ShownSignal().Disconnect(_popUpShownEventCallbackDelegate);
274 // Callback for ShownSignal
275 private void OnShown()
277 ShownEventArgs e = new ShownEventArgs();
279 if (_popUpShownEventHandler != null)
281 //here we send all data to user event handlers
282 _popUpShownEventHandler(this, e);
287 /// An event is sent when the popup starts to hide.
289 /// <since_tizen> 3 </since_tizen>
290 public event EventHandler<HidingEventArgs> Hiding
294 if (_popUpHidingEventHandler == null)
296 _popUpHidingEventCallbackDelegate = (OnHiding);
297 HidingSignal().Connect(_popUpHidingEventCallbackDelegate);
299 _popUpHidingEventHandler += value;
303 _popUpHidingEventHandler -= value;
304 if (_popUpHidingEventHandler == null && HidingSignal().Empty() == false)
306 HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate);
311 // Callback for HidingSignal
312 private void OnHiding()
314 HidingEventArgs e = new HidingEventArgs();
316 if (_popUpHidingEventHandler != null)
318 //here we send all data to user event handlers
319 _popUpHidingEventHandler(this, e);
324 /// An event is sent when the popup has been completely hidden.
326 /// <since_tizen> 3 </since_tizen>
327 public event EventHandler<HiddenEventArgs> Hidden
331 if (_popUpHiddenEventHandler == null)
333 _popUpHiddenEventCallbackDelegate = (OnHidden);
334 HiddenSignal().Connect(_popUpHiddenEventCallbackDelegate);
336 _popUpHiddenEventHandler += value;
340 _popUpHiddenEventHandler -= value;
341 if (_popUpHiddenEventHandler == null && HiddenSignal().Empty() == false)
343 HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate);
348 // Callback for HiddenSignal
349 private void OnHidden()
351 HiddenEventArgs e = new HiddenEventArgs();
353 if (_popUpHiddenEventHandler != null)
355 //here we send all data to user event handlers
356 _popUpHiddenEventHandler(this, e);
360 internal new class Property
362 internal static readonly int TITLE = NDalicPINVOKE.Popup_Property_TITLE_get();
363 internal static readonly int CONTENT = NDalicPINVOKE.Popup_Property_CONTENT_get();
364 internal static readonly int FOOTER = NDalicPINVOKE.Popup_Property_FOOTER_get();
365 internal static readonly int DISPLAY_STATE = NDalicPINVOKE.Popup_Property_DISPLAY_STATE_get();
366 internal static readonly int TOUCH_TRANSPARENT = NDalicPINVOKE.Popup_Property_TOUCH_TRANSPARENT_get();
367 internal static readonly int TAIL_VISIBILITY = NDalicPINVOKE.Popup_Property_TAIL_VISIBILITY_get();
368 internal static readonly int TAIL_POSITION = NDalicPINVOKE.Popup_Property_TAIL_POSITION_get();
369 internal static readonly int CONTEXTUAL_MODE = NDalicPINVOKE.Popup_Property_CONTEXTUAL_MODE_get();
370 internal static readonly int ANIMATION_DURATION = NDalicPINVOKE.Popup_Property_ANIMATION_DURATION_get();
371 internal static readonly int ANIMATION_MODE = NDalicPINVOKE.Popup_Property_ANIMATION_MODE_get();
372 internal static readonly int ENTRY_ANIMATION = NDalicPINVOKE.Popup_Property_ENTRY_ANIMATION_get();
373 internal static readonly int EXIT_ANIMATION = NDalicPINVOKE.Popup_Property_EXIT_ANIMATION_get();
374 internal static readonly int AUTO_HIDE_DELAY = NDalicPINVOKE.Popup_Property_AUTO_HIDE_DELAY_get();
375 internal static readonly int BACKING_ENABLED = NDalicPINVOKE.Popup_Property_BACKING_ENABLED_get();
376 internal static readonly int BACKING_COLOR = NDalicPINVOKE.Popup_Property_BACKING_COLOR_get();
377 internal static readonly int POPUP_BACKGROUND_IMAGE = NDalicPINVOKE.Popup_Property_POPUP_BACKGROUND_IMAGE_get();
378 internal static readonly int POPUP_BACKGROUND_BORDER = NDalicPINVOKE.Popup_Property_POPUP_BACKGROUND_BORDER_get();
379 internal static readonly int TAIL_UP_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_UP_IMAGE_get();
380 internal static readonly int TAIL_DOWN_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_DOWN_IMAGE_get();
381 internal static readonly int TAIL_LEFT_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_LEFT_IMAGE_get();
382 internal static readonly int TAIL_RIGHT_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_RIGHT_IMAGE_get();
386 /// Creates the popup.
388 /// <since_tizen> 3 </since_tizen>
389 public Popup() : this(NDalicPINVOKE.Popup_New(), true)
391 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
396 /// Sets the title for this popup.
398 /// <param name="titleView">The actor to set the title.</param>
399 /// <since_tizen> 3 </since_tizen>
400 public void SetTitle(View titleView)
402 NDalicPINVOKE.Popup_SetTitle(swigCPtr, View.getCPtr(titleView));
403 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
406 internal View GetTitle()
408 //to fix memory leak issue, match the handle count with native side.
409 IntPtr cPtr = NDalicPINVOKE.Popup_GetTitle(swigCPtr);
410 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
411 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
412 NDalicPINVOKE.delete_BaseHandle(CPtr);
413 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
415 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
420 /// Sets the content actor.
422 /// <param name="content">The actor to use.</param>
423 /// <since_tizen> 3 </since_tizen>
424 public void SetContent(View content)
426 NDalicPINVOKE.Popup_SetContent(swigCPtr, View.getCPtr(content));
427 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
430 internal View GetContent()
432 //to fix memory leak issue, match the handle count with native side.
433 IntPtr cPtr = NDalicPINVOKE.Popup_GetContent(swigCPtr);
434 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
435 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
436 NDalicPINVOKE.delete_BaseHandle(CPtr);
437 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
439 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
444 /// Sets the actor to use for the footer in this popup.
446 /// <param name="footer">The footer actor to be added to this popup.</param>
447 /// <since_tizen> 3 </since_tizen>
448 public void SetFooter(View footer)
450 NDalicPINVOKE.Popup_SetFooter(swigCPtr, View.getCPtr(footer));
451 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
454 internal View GetFooter()
456 //to fix memory leak issue, match the handle count with native side.
457 IntPtr cPtr = NDalicPINVOKE.Popup_GetFooter(swigCPtr);
458 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
459 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
460 NDalicPINVOKE.delete_BaseHandle(CPtr);
461 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
463 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
468 /// Sets the display state of popup.<br />
469 /// There are 4 total display states.<br />
470 /// Only 2 can be set, but all four can be read for better inspection of the current popup state.<br />
472 /// The other two states are getable, but not setable, and are there for consistency.<br />
474 /// | Value | Setting the state | Getting the state |<br />
475 /// |----------|--------------------------------|--------------------------------|<br />
476 /// | SHOWN | Show the popup | The popup is fully shown |<br />
477 /// | HIDDEN | Hide the popup | The popup is fully hidden |<br />
478 /// | SHOWING | | The popup is transitioning in |<br />
479 /// | HIDING | | The popup is transitioning out |<br />
481 /// All 4 states changes cause notifications via 4 respective signals that can be connected to.<br />
483 /// <param name="displayState">The desired display state to change to.</param>
484 /// <since_tizen> 3 </since_tizen>
485 public void SetDisplayState(Popup.DisplayStateType displayState)
487 NDalicPINVOKE.Popup_SetDisplayState(swigCPtr, (int)displayState);
488 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
491 internal Popup.DisplayStateType GetDisplayState()
493 Popup.DisplayStateType ret = (Popup.DisplayStateType)NDalicPINVOKE.Popup_GetDisplayState(swigCPtr);
494 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
498 internal VoidSignal OutsideTouchedSignal()
500 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_OutsideTouchedSignal(swigCPtr), false);
501 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
505 internal VoidSignal ShowingSignal()
507 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_ShowingSignal(swigCPtr), false);
508 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
512 internal VoidSignal ShownSignal()
514 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_ShownSignal(swigCPtr), false);
515 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
519 internal VoidSignal HidingSignal()
521 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_HidingSignal(swigCPtr), false);
522 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
526 internal VoidSignal HiddenSignal()
528 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_HiddenSignal(swigCPtr), false);
529 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
534 /// The display states of the popup.
536 /// <since_tizen> 3 </since_tizen>
537 public enum DisplayStateType
540 /// The popup is transitioning in
542 /// <since_tizen> 3 </since_tizen>
545 /// The popup is fully shown
547 /// <since_tizen> 3 </since_tizen>
550 /// The popup is transitioning out
552 /// <since_tizen> 3 </since_tizen>
555 /// The popup is fully hidden
557 /// <since_tizen> 3 </since_tizen>
562 /// The animation modes within the popup.<br />
563 /// Choose from a predefined mode or "CUSTOM" to use the ANIMATION_IN and ANIMATION_OUT properties.<br />
565 /// <since_tizen> 3 </since_tizen>
566 public enum AnimationModeType
571 /// <since_tizen> 3 </since_tizen>
574 /// Popup zooms in and out animating the scale property.
576 /// <since_tizen> 3 </since_tizen>
579 /// Popup fades in and out
581 /// <since_tizen> 3 </since_tizen>
584 /// Use the EntryAnimation and ExitAnimation animation properties.
586 /// <since_tizen> 3 </since_tizen>
591 /// The types of the contextual layout.<br />
592 /// The popup is positioned adjacent to it's parent in the direction specified by this mode.<br />
593 /// NON_CONTEXTUAL disables any contextual positioning.<br />
595 /// <since_tizen> 3 </since_tizen>
596 public enum ContextualModeType
599 /// any contextual positioning
601 /// <since_tizen> 3 </since_tizen>
606 /// <since_tizen> 3 </since_tizen>
611 /// <since_tizen> 3 </since_tizen>
616 /// <since_tizen> 3 </since_tizen>
621 /// <since_tizen> 3 </since_tizen>
628 /// <since_tizen> 3 </since_tizen>
629 public PropertyMap Title
633 PropertyMap temp = new PropertyMap();
634 GetProperty(Popup.Property.TITLE).Get(temp);
639 SetProperty(Popup.Property.TITLE, new Tizen.NUI.PropertyValue(value));
643 /// The popup content.
645 /// <since_tizen> 3 </since_tizen>
646 public PropertyMap Content
650 PropertyMap temp = new PropertyMap();
651 GetProperty(Popup.Property.CONTENT).Get(temp);
656 SetProperty(Popup.Property.CONTENT, new Tizen.NUI.PropertyValue(value));
660 /// The popup footer.
662 /// <since_tizen> 3 </since_tizen>
663 public PropertyMap Footer
667 PropertyMap temp = new PropertyMap();
668 GetProperty(Popup.Property.FOOTER).Get(temp);
673 SetProperty(Popup.Property.FOOTER, new Tizen.NUI.PropertyValue(value));
677 /// The popup display state.
679 /// <since_tizen> 3 </since_tizen>
680 public DisplayStateType DisplayState
685 if (GetProperty(Popup.Property.DISPLAY_STATE).Get(out temp) == false)
687 NUILog.Error("DisplayState get error!");
692 return DisplayStateType.Showing;
694 return DisplayStateType.Shown;
696 return DisplayStateType.Hiding;
698 return DisplayStateType.Hidden;
700 return DisplayStateType.Hidden;
705 string valueToString = "";
708 case DisplayStateType.Showing:
710 valueToString = "SHOWING";
713 case DisplayStateType.Shown:
715 valueToString = "SHOWN";
718 case DisplayStateType.Hiding:
720 valueToString = "HIDING";
723 case DisplayStateType.Hidden:
725 valueToString = "HIDDEN";
730 valueToString = "HIDDEN";
734 SetProperty(Popup.Property.DISPLAY_STATE, new Tizen.NUI.PropertyValue(valueToString));
738 /// The touch transparent.
740 /// <since_tizen> 3 </since_tizen>
741 public bool TouchTransparent
746 GetProperty(Popup.Property.TOUCH_TRANSPARENT).Get(out temp);
751 SetProperty(Popup.Property.TOUCH_TRANSPARENT, new Tizen.NUI.PropertyValue(value));
755 /// The popup tail visibility.
757 /// <since_tizen> 3 </since_tizen>
758 public bool TailVisibility
763 GetProperty(Popup.Property.TAIL_VISIBILITY).Get(out temp);
768 SetProperty(Popup.Property.TAIL_VISIBILITY, new Tizen.NUI.PropertyValue(value));
772 /// The popup tail position.
774 /// <since_tizen> 3 </since_tizen>
775 public Vector3 TailPosition
779 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
780 GetProperty(Popup.Property.TAIL_POSITION).Get(temp);
785 SetProperty(Popup.Property.TAIL_POSITION, new Tizen.NUI.PropertyValue(value));
789 /// The contextual mode.
791 /// <since_tizen> 3 </since_tizen>
792 public ContextualModeType ContextualMode
797 if (GetProperty(Popup.Property.CONTEXTUAL_MODE).Get(out temp) == false)
799 NUILog.Error("ContextualMode get error!");
803 case "NON_CONTEXTUAL":
804 return ContextualModeType.NonContextual;
806 return ContextualModeType.Above;
808 return ContextualModeType.Rright;
810 return ContextualModeType.Below;
812 return ContextualModeType.Left;
814 return ContextualModeType.Below;
819 string valueToString = "";
822 case ContextualModeType.NonContextual:
824 valueToString = "NON_CONTEXTUAL";
827 case ContextualModeType.Above:
829 valueToString = "ABOVE";
832 case ContextualModeType.Rright:
834 valueToString = "RIGHT";
837 case ContextualModeType.Below:
839 valueToString = "BELOW";
842 case ContextualModeType.Left:
844 valueToString = "LEFT";
849 valueToString = "BELOW";
853 SetProperty(Popup.Property.CONTEXTUAL_MODE, new Tizen.NUI.PropertyValue(valueToString));
857 /// The animation duration.
859 /// <since_tizen> 3 </since_tizen>
860 public float AnimationDuration
865 GetProperty(Popup.Property.ANIMATION_DURATION).Get(out temp);
870 SetProperty(Popup.Property.ANIMATION_DURATION, new Tizen.NUI.PropertyValue(value));
874 /// The animation mode.
876 /// <since_tizen> 3 </since_tizen>
877 public AnimationModeType AnimationMode
882 if (GetProperty(Popup.Property.ANIMATION_MODE).Get(out temp) == false)
884 NUILog.Error("AnimationMode get error!");
889 return AnimationModeType.None;
891 return AnimationModeType.Zoom;
893 return AnimationModeType.Fade;
895 return AnimationModeType.Custom;
897 return AnimationModeType.Fade;
902 string valueToString = "";
905 case AnimationModeType.None:
907 valueToString = "NONE";
910 case AnimationModeType.Zoom:
912 valueToString = "ZOOM";
915 case AnimationModeType.Fade:
917 valueToString = "FADE";
920 case AnimationModeType.Custom:
922 valueToString = "CUSTOM";
927 valueToString = "FADE";
931 SetProperty(Popup.Property.ANIMATION_MODE, new Tizen.NUI.PropertyValue(valueToString));
935 /// The entry animation.
937 /// <since_tizen> 3 </since_tizen>
938 public PropertyMap EntryAnimation
942 PropertyMap temp = new PropertyMap();
943 GetProperty(Popup.Property.ENTRY_ANIMATION).Get(temp);
948 SetProperty(Popup.Property.ENTRY_ANIMATION, new Tizen.NUI.PropertyValue(value));
952 /// The exit animation.
954 /// <since_tizen> 3 </since_tizen>
955 public PropertyMap ExitAnimation
959 PropertyMap temp = new PropertyMap();
960 GetProperty(Popup.Property.EXIT_ANIMATION).Get(temp);
965 SetProperty(Popup.Property.EXIT_ANIMATION, new Tizen.NUI.PropertyValue(value));
969 /// The auto hide delay.
971 /// <since_tizen> 3 </since_tizen>
972 public int AutoHideDelay
977 GetProperty(Popup.Property.AUTO_HIDE_DELAY).Get(out temp);
982 SetProperty(Popup.Property.AUTO_HIDE_DELAY, new Tizen.NUI.PropertyValue(value));
986 /// The backing enabled.
988 /// <since_tizen> 3 </since_tizen>
989 public bool BackingEnabled
994 GetProperty(Popup.Property.BACKING_ENABLED).Get(out temp);
999 SetProperty(Popup.Property.BACKING_ENABLED, new Tizen.NUI.PropertyValue(value));
1003 /// The backing color.
1005 /// <since_tizen> 3 </since_tizen>
1006 public Vector4 BackingColor
1010 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1011 GetProperty(Popup.Property.BACKING_COLOR).Get(temp);
1016 SetProperty(Popup.Property.BACKING_COLOR, new Tizen.NUI.PropertyValue(value));
1020 /// The background image.
1022 /// <since_tizen> 3 </since_tizen>
1023 public string PopupBackgroundImage
1028 GetProperty(Popup.Property.POPUP_BACKGROUND_IMAGE).Get(out temp);
1033 SetProperty(Popup.Property.POPUP_BACKGROUND_IMAGE, new Tizen.NUI.PropertyValue(value));
1037 /// The background border.
1039 /// <since_tizen> 3 </since_tizen>
1040 public Rectangle PopupBackgroundBorder
1044 Rectangle temp = new Rectangle(0, 0, 0, 0);
1045 GetProperty(Popup.Property.POPUP_BACKGROUND_BORDER).Get(temp);
1050 SetProperty(Popup.Property.POPUP_BACKGROUND_BORDER, new Tizen.NUI.PropertyValue(value));
1054 /// The tail up image.
1056 /// <since_tizen> 3 </since_tizen>
1057 public string TailUpImage
1062 GetProperty(Popup.Property.TAIL_UP_IMAGE).Get(out temp);
1067 SetProperty(Popup.Property.TAIL_UP_IMAGE, new Tizen.NUI.PropertyValue(value));
1071 /// The tail down image.
1073 /// <since_tizen> 3 </since_tizen>
1074 public string TailDownImage
1079 GetProperty(Popup.Property.TAIL_DOWN_IMAGE).Get(out temp);
1084 SetProperty(Popup.Property.TAIL_DOWN_IMAGE, new Tizen.NUI.PropertyValue(value));
1088 /// The tail left image.
1090 /// <since_tizen> 3 </since_tizen>
1091 public string TailLeftImage
1096 GetProperty(Popup.Property.TAIL_LEFT_IMAGE).Get(out temp);
1101 SetProperty(Popup.Property.TAIL_LEFT_IMAGE, new Tizen.NUI.PropertyValue(value));
1105 /// The tail right image.
1107 /// <since_tizen> 3 </since_tizen>
1108 public string TailRightImage
1113 GetProperty(Popup.Property.TAIL_RIGHT_IMAGE).Get(out temp);
1118 SetProperty(Popup.Property.TAIL_RIGHT_IMAGE, new Tizen.NUI.PropertyValue(value));