Merge remote-tracking branch 'widget-control/tizen'
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / UIComponents / Popup.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16
17 namespace Tizen.NUI.UIComponents
18 {
19
20     using System;
21     using System.Runtime.InteropServices;
22     using Tizen.NUI.BaseComponents;
23
24     /// <summary>
25     /// The Popup widget provides a configurable pop-up dialog with built-in layout of three main fields.
26     /// </summary>
27     public class Popup : View
28     {
29         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
30
31         internal Popup(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Popup_SWIGUpcast(cPtr), cMemoryOwn)
32         {
33             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
34         }
35
36         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Popup obj)
37         {
38             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
39         }
40
41
42         protected override void Dispose(DisposeTypes type)
43         {
44             if (disposed)
45             {
46                 return;
47             }
48
49             if (type == DisposeTypes.Explicit)
50             {
51                 //Called by User
52                 //Release your own managed resources here.
53                 //You should release all of your own disposable objects here.
54
55             }
56
57             //Release your own unmanaged resources here.
58             //You should not access any managed member here except static instance.
59             //because the execution order of Finalizes is non-deterministic.
60
61             if (swigCPtr.Handle != global::System.IntPtr.Zero)
62             {
63                 if (swigCMemOwn)
64                 {
65                     swigCMemOwn = false;
66                     NDalicPINVOKE.delete_Popup(swigCPtr);
67                 }
68                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
69             }
70
71             base.Dispose(type);
72         }
73
74
75
76
77         /// <summary>
78         /// Event arguments that passed via OutsideTouchedEvent
79         /// </summary>
80         public class TouchedOutsideEventArgs : EventArgs
81         {
82         }
83
84         /// <summary>
85         /// Event arguments that passed via ShowingEventArgs
86         /// </summary>
87         public class ShowingEventArgs : EventArgs
88         {
89         }
90
91         /// <summary>
92         /// Event arguments that passed via ShownEventArgs
93         /// </summary>
94         public class ShownEventArgs : EventArgs
95         {
96         }
97
98         /// <summary>
99         /// Event arguments that passed via HidingEventArgs
100         /// </summary>
101         public class HidingEventArgs : EventArgs
102         {
103         }
104
105         /// <summary>
106         /// Event arguments that passed via HiddenEventArgs
107         /// </summary>
108         public class HiddenEventArgs : EventArgs
109         {
110         }
111
112         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
113         private delegate void OutsideTouchedEventCallbackDelegate();
114         private EventHandler<TouchedOutsideEventArgs> _popUpOutsideTouchedEventHandler;
115         private OutsideTouchedEventCallbackDelegate _popUpOutsideTouchedEventCallbackDelegate;
116
117         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
118         private delegate void ShowingEventCallbackDelegate();
119         private EventHandler<ShowingEventArgs> _popUpShowingEventHandler;
120         private ShowingEventCallbackDelegate _popUpShowingEventCallbackDelegate;
121
122         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
123         private delegate void ShownEventCallbackDelegate();
124         private EventHandler<ShownEventArgs> _popUpShownEventHandler;
125         private ShownEventCallbackDelegate _popUpShownEventCallbackDelegate;
126
127         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
128         private delegate void HidingEventCallbackDelegate();
129         private EventHandler<HidingEventArgs> _popUpHidingEventHandler;
130         private HidingEventCallbackDelegate _popUpHidingEventCallbackDelegate;
131
132         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
133         private delegate void HiddenEventCallbackDelegate();
134         private EventHandler<HiddenEventArgs> _popUpHiddenEventHandler;
135         private HiddenEventCallbackDelegate _popUpHiddenEventCallbackDelegate;
136
137         /// <summary>
138         /// Event is sent when user has touched outside of the Dialog.
139         /// </summary>
140         public event EventHandler<TouchedOutsideEventArgs> TouchedOutside
141         {
142             add
143             {
144                 if (_popUpOutsideTouchedEventHandler == null)
145                 {
146                     _popUpOutsideTouchedEventCallbackDelegate = (OnOutsideTouched);
147                     OutsideTouchedSignal().Connect(_popUpOutsideTouchedEventCallbackDelegate);
148                 }
149                 _popUpOutsideTouchedEventHandler += value;
150             }
151             remove
152             {
153                 _popUpOutsideTouchedEventHandler -= value;
154                 if (_popUpOutsideTouchedEventHandler == null && OutsideTouchedSignal().Empty() == false)
155                 {
156                     this.OutsideTouchedSignal().Disconnect(_popUpOutsideTouchedEventCallbackDelegate);
157                 }
158             }
159         }
160
161         // Callback for Popup OutsideTouchedSignal
162         private void OnOutsideTouched()
163         {
164             TouchedOutsideEventArgs e = new TouchedOutsideEventArgs();
165
166             if (_popUpOutsideTouchedEventHandler != null)
167             {
168                 //here we send all data to user event handlers
169                 _popUpOutsideTouchedEventHandler(this, e);
170             }
171         }
172
173         /// <summary>
174         /// Event is sent when the Popup is starting to be shown.
175         /// </summary>
176         public event EventHandler<ShowingEventArgs> Showing
177         {
178             add
179             {
180                 if (_popUpShowingEventHandler == null)
181                 {
182                     _popUpShowingEventCallbackDelegate = (OnShowing);
183                     ShowingSignal().Connect(_popUpShowingEventCallbackDelegate);
184                 }
185                 _popUpShowingEventHandler += value;
186             }
187             remove
188             {
189                 _popUpShowingEventHandler -= value;
190                 if (_popUpShowingEventHandler == null && ShowingSignal().Empty() == false)
191                 {
192                     ShowingSignal().Disconnect(_popUpShowingEventCallbackDelegate);
193                 }
194             }
195         }
196
197         // Callback for ShowingSignal
198         private void OnShowing()
199         {
200             ShowingEventArgs e = new ShowingEventArgs();
201
202             if (_popUpShowingEventHandler != null)
203             {
204                 //here we send all data to user event handlers
205                 _popUpShowingEventHandler(this, e);
206             }
207         }
208
209
210         /// <summary>
211         /// Event is sent when the Popup has been fully displayed.
212         /// </summary>
213         public event EventHandler<ShownEventArgs> Shown
214         {
215             add
216             {
217                 if (_popUpShownEventHandler == null)
218                 {
219                     _popUpShownEventCallbackDelegate = (OnShown);
220                     ShownSignal().Connect(_popUpShownEventCallbackDelegate);
221                 }
222                 _popUpShownEventHandler += value;
223             }
224             remove
225             {
226                 _popUpShownEventHandler -= value;
227                 if (_popUpShownEventHandler == null && ShownSignal().Empty() == false)
228                 {
229                     ShownSignal().Disconnect(_popUpShownEventCallbackDelegate);
230                 }
231             }
232         }
233
234         // Callback for ShownSignal
235         private void OnShown()
236         {
237             ShownEventArgs e = new ShownEventArgs();
238
239             if (_popUpShownEventHandler != null)
240             {
241                 //here we send all data to user event handlers
242                 _popUpShownEventHandler(this, e);
243             }
244         }
245
246         /// <summary>
247         /// Event is sent when the Popup is starting to be hidden.
248         /// </summary>
249         public event EventHandler<HidingEventArgs> Hiding
250         {
251             add
252             {
253                 if (_popUpHidingEventHandler == null)
254                 {
255                     _popUpHidingEventCallbackDelegate = (OnHiding);
256                     HidingSignal().Connect(_popUpHidingEventCallbackDelegate);
257                 }
258                 _popUpHidingEventHandler += value;
259             }
260             remove
261             {
262                 _popUpHidingEventHandler -= value;
263                 if (_popUpHidingEventHandler == null && HidingSignal().Empty() == false)
264                 {
265                     HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate);
266                 }
267             }
268         }
269
270         // Callback for HidingSignal
271         private void OnHiding()
272         {
273             HidingEventArgs e = new HidingEventArgs();
274
275             if (_popUpHidingEventHandler != null)
276             {
277                 //here we send all data to user event handlers
278                 _popUpHidingEventHandler(this, e);
279             }
280         }
281
282         /// <summary>
283         /// Event is sent when the Popup has been completely hidden.
284         /// </summary>
285         public event EventHandler<HiddenEventArgs> Hidden
286         {
287             add
288             {
289                 if (_popUpHiddenEventHandler == null)
290                 {
291                     _popUpHiddenEventCallbackDelegate = (OnHidden);
292                     HiddenSignal().Connect(_popUpHiddenEventCallbackDelegate);
293                 }
294                 _popUpHiddenEventHandler += value;
295             }
296             remove
297             {
298                 _popUpHiddenEventHandler -= value;
299                 if (_popUpHiddenEventHandler == null && HiddenSignal().Empty() == false)
300                 {
301                     HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate);
302                 }
303             }
304         }
305
306         // Callback for HiddenSignal
307         private void OnHidden()
308         {
309             HiddenEventArgs e = new HiddenEventArgs();
310
311             if (_popUpHiddenEventHandler != null)
312             {
313                 //here we send all data to user event handlers
314                 _popUpHiddenEventHandler(this, e);
315             }
316         }
317
318         internal class Property
319         {
320             internal static readonly int TITLE = NDalicPINVOKE.Popup_Property_TITLE_get();
321             internal static readonly int CONTENT = NDalicPINVOKE.Popup_Property_CONTENT_get();
322             internal static readonly int FOOTER = NDalicPINVOKE.Popup_Property_FOOTER_get();
323             internal static readonly int DISPLAY_STATE = NDalicPINVOKE.Popup_Property_DISPLAY_STATE_get();
324             internal static readonly int TOUCH_TRANSPARENT = NDalicPINVOKE.Popup_Property_TOUCH_TRANSPARENT_get();
325             internal static readonly int TAIL_VISIBILITY = NDalicPINVOKE.Popup_Property_TAIL_VISIBILITY_get();
326             internal static readonly int TAIL_POSITION = NDalicPINVOKE.Popup_Property_TAIL_POSITION_get();
327             internal static readonly int CONTEXTUAL_MODE = NDalicPINVOKE.Popup_Property_CONTEXTUAL_MODE_get();
328             internal static readonly int ANIMATION_DURATION = NDalicPINVOKE.Popup_Property_ANIMATION_DURATION_get();
329             internal static readonly int ANIMATION_MODE = NDalicPINVOKE.Popup_Property_ANIMATION_MODE_get();
330             internal static readonly int ENTRY_ANIMATION = NDalicPINVOKE.Popup_Property_ENTRY_ANIMATION_get();
331             internal static readonly int EXIT_ANIMATION = NDalicPINVOKE.Popup_Property_EXIT_ANIMATION_get();
332             internal static readonly int AUTO_HIDE_DELAY = NDalicPINVOKE.Popup_Property_AUTO_HIDE_DELAY_get();
333             internal static readonly int BACKING_ENABLED = NDalicPINVOKE.Popup_Property_BACKING_ENABLED_get();
334             internal static readonly int BACKING_COLOR = NDalicPINVOKE.Popup_Property_BACKING_COLOR_get();
335             internal static readonly int POPUP_BACKGROUND_IMAGE = NDalicPINVOKE.Popup_Property_POPUP_BACKGROUND_IMAGE_get();
336             internal static readonly int POPUP_BACKGROUND_BORDER = NDalicPINVOKE.Popup_Property_POPUP_BACKGROUND_BORDER_get();
337             internal static readonly int TAIL_UP_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_UP_IMAGE_get();
338             internal static readonly int TAIL_DOWN_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_DOWN_IMAGE_get();
339             internal static readonly int TAIL_LEFT_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_LEFT_IMAGE_get();
340             internal static readonly int TAIL_RIGHT_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_RIGHT_IMAGE_get();
341         }
342
343         /// <summary>
344         /// Create the Popup.
345         /// </summary>
346         public Popup() : this(NDalicPINVOKE.Popup_New(), true)
347         {
348             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
349
350         }
351
352         [Obsolete("Please do not use! this will be deprecated")]
353         public new static Popup DownCast(BaseHandle handle)
354         {
355             Popup ret =  Registry.GetManagedBaseHandleFromNativePtr(handle) as Popup;
356             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
357             return ret;
358         }
359
360         /// <summary>
361         /// Sets a title for this Popup.
362         /// </summary>
363         /// <param name="titleView">The actor to set a title</param>
364         public void SetTitle(View titleView)
365         {
366             NDalicPINVOKE.Popup_SetTitle(swigCPtr, View.getCPtr(titleView));
367             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
368         }
369
370         internal View GetTitle()
371         {
372             IntPtr cPtr = NDalicPINVOKE.Popup_GetTitle(swigCPtr);
373             View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
374
375             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
376             return ret;
377         }
378
379         /// <summary>
380         /// Sets the content actor.
381         /// </summary>
382         /// <param name="content">The actor to use</param>
383         public void SetContent(View content)
384         {
385             NDalicPINVOKE.Popup_SetContent(swigCPtr, View.getCPtr(content));
386             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
387         }
388
389         internal View GetContent()
390         {
391             IntPtr cPtr = NDalicPINVOKE.Popup_GetContent(swigCPtr);
392             View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
393
394             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
395             return ret;
396         }
397
398         /// <summary>
399         /// Sets the actor to use for a footer in this Popup.
400         /// </summary>
401         /// <param name="footer">The footer actor to be added to this Popup</param>
402         public void SetFooter(View footer)
403         {
404             NDalicPINVOKE.Popup_SetFooter(swigCPtr, View.getCPtr(footer));
405             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
406         }
407
408         internal View GetFooter()
409         {
410             IntPtr cPtr = NDalicPINVOKE.Popup_GetFooter(swigCPtr);
411             View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
412
413             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
414             return ret;
415         }
416
417         /// <summary>
418         /// Sets the display state of Popup.<br>
419         /// There are 4 total display states.<br>
420         /// Only 2 can be set, but all four can be read for better inspection of the current popup state.<br>
421         /// <br>
422         /// The other two states are getable, but not setable and are there for consistency.<br>
423         /// <br>
424         /// | Value    | Setting the state              | Getting the state              |<br>
425         /// |----------|--------------------------------|--------------------------------|<br>
426         /// | SHOWN    | Show the popup                 | The popup is fully shown       |<br>
427         /// | HIDDEN   | Hide the popup                 | The popup is fully hidden      |<br>
428         /// | SHOWING  |                                | The popup is transitioning in  |<br>
429         /// | HIDING   |                                | The popup is transitioning out |<br>
430         /// <br>
431         /// All 4 state changes cause notifications via 4 respective signals that can be connected to.<br>
432         /// </summary>
433         /// <param name="displayState">The desired display state to change to</param>
434         public void SetDisplayState(Popup.DisplayStateType displayState)
435         {
436             NDalicPINVOKE.Popup_SetDisplayState(swigCPtr, (int)displayState);
437             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
438         }
439
440         internal Popup.DisplayStateType GetDisplayState()
441         {
442             Popup.DisplayStateType ret = (Popup.DisplayStateType)NDalicPINVOKE.Popup_GetDisplayState(swigCPtr);
443             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
444             return ret;
445         }
446
447         internal VoidSignal OutsideTouchedSignal()
448         {
449             VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_OutsideTouchedSignal(swigCPtr), false);
450             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
451             return ret;
452         }
453
454         internal VoidSignal ShowingSignal()
455         {
456             VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_ShowingSignal(swigCPtr), false);
457             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
458             return ret;
459         }
460
461         internal VoidSignal ShownSignal()
462         {
463             VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_ShownSignal(swigCPtr), false);
464             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
465             return ret;
466         }
467
468         internal VoidSignal HidingSignal()
469         {
470             VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_HidingSignal(swigCPtr), false);
471             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
472             return ret;
473         }
474
475         internal VoidSignal HiddenSignal()
476         {
477             VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_HiddenSignal(swigCPtr), false);
478             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
479             return ret;
480         }
481
482         /// <summary>
483         /// The display states of the Popup.
484         /// </summary>
485         public enum DisplayStateType
486         {
487             Showing,
488             Shown,
489             Hiding,
490             Hidden
491         }
492
493         /// <summary>
494         /// The animation mode within popup.<br>
495         /// Choose from a predefined mode or "CUSTOM" to use the ANIMATION_IN and ANIMATION_OUT properties.<br>
496         /// </summary>
497         public enum AnimationModeType
498         {
499             None,
500             Zoom,
501             Fade,
502             Custom
503         }
504
505         /// <summary>
506         /// Types of contextual layout.<br>
507         /// The Popup is positioned adjacent to it's parent in the direction specified by this mode.<br>
508         /// NON_CONTEXTUAL disables any contextual positioning.<br>
509         /// </summary>
510         public enum ContextualModeType
511         {
512             NonContextual,
513             Above,
514             Rright,
515             Below,
516             Left
517         }
518
519         /// <summary>
520         /// Popup title.
521         /// </summary>
522         public PropertyMap Title
523         {
524             get
525             {
526                 PropertyMap temp = new PropertyMap();
527                 GetProperty(Popup.Property.TITLE).Get(temp);
528                 return temp;
529             }
530             set
531             {
532                 SetProperty(Popup.Property.TITLE, new Tizen.NUI.PropertyValue(value));
533             }
534         }
535         /// <summary>
536         /// Popup content.
537         /// </summary>
538         public PropertyMap Content
539         {
540             get
541             {
542                 PropertyMap temp = new PropertyMap();
543                 GetProperty(Popup.Property.CONTENT).Get(temp);
544                 return temp;
545             }
546             set
547             {
548                 SetProperty(Popup.Property.CONTENT, new Tizen.NUI.PropertyValue(value));
549             }
550         }
551         /// <summary>
552         /// Popup footer.
553         /// </summary>
554         public PropertyMap Footer
555         {
556             get
557             {
558                 PropertyMap temp = new PropertyMap();
559                 GetProperty(Popup.Property.FOOTER).Get(temp);
560                 return temp;
561             }
562             set
563             {
564                 SetProperty(Popup.Property.FOOTER, new Tizen.NUI.PropertyValue(value));
565             }
566         }
567         /// <summary>
568         /// Popup display state.
569         /// </summary>
570         public DisplayStateType DisplayState
571         {
572             get
573             {
574                 string temp;
575                 if (GetProperty(Popup.Property.DISPLAY_STATE).Get(out temp) == false)
576                 {
577                     NUILog.Error("DisplayState get error!");
578                 }
579                 switch (temp)
580                 {
581                     case "SHOWING":
582                         return DisplayStateType.Showing;
583                     case "SHOWN":
584                         return DisplayStateType.Shown;
585                     case "HIDING":
586                         return DisplayStateType.Hiding;
587                     case "HIDDEN":
588                         return DisplayStateType.Hidden;
589                     default:
590                         return DisplayStateType.Hidden;
591                 }
592             }
593             set
594             {
595                 string valueToString = "";
596                 switch (value)
597                 {
598                     case DisplayStateType.Showing:
599                         {
600                             valueToString = "SHOWING";
601                             break;
602                         }
603                     case DisplayStateType.Shown:
604                         {
605                             valueToString = "SHOWN";
606                             break;
607                         }
608                     case DisplayStateType.Hiding:
609                         {
610                             valueToString = "HIDING";
611                             break;
612                         }
613                     case DisplayStateType.Hidden:
614                         {
615                             valueToString = "HIDDEN";
616                             break;
617                         }
618                     default:
619                         {
620                             valueToString = "HIDDEN";
621                             break;
622                         }
623                 }
624                 SetProperty(Popup.Property.DISPLAY_STATE, new Tizen.NUI.PropertyValue(valueToString));
625             }
626         }
627         /// <summary>
628         /// Touch transparent.
629         /// </summary>
630         public bool TouchTransparent
631         {
632             get
633             {
634                 bool temp = false;
635                 GetProperty(Popup.Property.TOUCH_TRANSPARENT).Get(out temp);
636                 return temp;
637             }
638             set
639             {
640                 SetProperty(Popup.Property.TOUCH_TRANSPARENT, new Tizen.NUI.PropertyValue(value));
641             }
642         }
643         /// <summary>
644         /// Popup tail visibility.
645         /// </summary>
646         public bool TailVisibility
647         {
648             get
649             {
650                 bool temp = false;
651                 GetProperty(Popup.Property.TAIL_VISIBILITY).Get(out temp);
652                 return temp;
653             }
654             set
655             {
656                 SetProperty(Popup.Property.TAIL_VISIBILITY, new Tizen.NUI.PropertyValue(value));
657             }
658         }
659         /// <summary>
660         /// Popup tail position.
661         /// </summary>
662         public Vector3 TailPosition
663         {
664             get
665             {
666                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
667                 GetProperty(Popup.Property.TAIL_POSITION).Get(temp);
668                 return temp;
669             }
670             set
671             {
672                 SetProperty(Popup.Property.TAIL_POSITION, new Tizen.NUI.PropertyValue(value));
673             }
674         }
675         /// <summary>
676         /// Contextual mode.
677         /// </summary>
678         public ContextualModeType ContextualMode
679         {
680             get
681             {
682                 string temp;
683                 if (GetProperty(Popup.Property.CONTEXTUAL_MODE).Get(out temp) == false)
684                 {
685                     NUILog.Error("ContextualMode get error!");
686                 }
687                 switch (temp)
688                 {
689                     case "NON_CONTEXTUAL":
690                         return ContextualModeType.NonContextual;
691                     case "ABOVE":
692                         return ContextualModeType.Above;
693                     case "RIGHT":
694                         return ContextualModeType.Rright;
695                     case "BELOW":
696                         return ContextualModeType.Below;
697                     case "LEFT":
698                         return ContextualModeType.Left;
699                     default:
700                         return ContextualModeType.Below;
701                 }
702             }
703             set
704             {
705                 string valueToString = "";
706                 switch (value)
707                 {
708                     case ContextualModeType.NonContextual:
709                         {
710                             valueToString = "NON_CONTEXTUAL";
711                             break;
712                         }
713                     case ContextualModeType.Above:
714                         {
715                             valueToString = "ABOVE";
716                             break;
717                         }
718                     case ContextualModeType.Rright:
719                         {
720                             valueToString = "RIGHT";
721                             break;
722                         }
723                     case ContextualModeType.Below:
724                         {
725                             valueToString = "BELOW";
726                             break;
727                         }
728                     case ContextualModeType.Left:
729                         {
730                             valueToString = "LEFT";
731                             break;
732                         }
733                     default:
734                         {
735                             valueToString = "BELOW";
736                             break;
737                         }
738                 }
739                 SetProperty(Popup.Property.CONTEXTUAL_MODE, new Tizen.NUI.PropertyValue(valueToString));
740             }
741         }
742         /// <summary>
743         /// Animation duration.
744         /// </summary>
745         public float AnimationDuration
746         {
747             get
748             {
749                 float temp = 0.0f;
750                 GetProperty(Popup.Property.ANIMATION_DURATION).Get(out temp);
751                 return temp;
752             }
753             set
754             {
755                 SetProperty(Popup.Property.ANIMATION_DURATION, new Tizen.NUI.PropertyValue(value));
756             }
757         }
758         /// <summary>
759         /// Animation mode.
760         /// </summary>
761         public AnimationModeType AnimationMode
762         {
763             get
764             {
765                 string temp;
766                 if (GetProperty(Popup.Property.ANIMATION_MODE).Get(out temp) == false)
767                 {
768                     NUILog.Error("AnimationMode get error!");
769                 }
770                 switch (temp)
771                 {
772                     case "NONE":
773                         return AnimationModeType.None;
774                     case "ZOOM":
775                         return AnimationModeType.Zoom;
776                     case "FADE":
777                         return AnimationModeType.Fade;
778                     case "CUSTOM":
779                         return AnimationModeType.Custom;
780                     default:
781                         return AnimationModeType.Fade;
782                 }
783             }
784             set
785             {
786                 string valueToString = "";
787                 switch (value)
788                 {
789                     case AnimationModeType.None:
790                         {
791                             valueToString = "NONE";
792                             break;
793                         }
794                     case AnimationModeType.Zoom:
795                         {
796                             valueToString = "ZOOM";
797                             break;
798                         }
799                     case AnimationModeType.Fade:
800                         {
801                             valueToString = "FADE";
802                             break;
803                         }
804                     case AnimationModeType.Custom:
805                         {
806                             valueToString = "CUSTOM";
807                             break;
808                         }
809                     default:
810                         {
811                             valueToString = "FADE";
812                             break;
813                         }
814                 }
815                 SetProperty(Popup.Property.ANIMATION_MODE, new Tizen.NUI.PropertyValue(valueToString));
816             }
817         }
818         /// <summary>
819         /// Entry animation.
820         /// </summary>
821         public PropertyMap EntryAnimation
822         {
823             get
824             {
825                 PropertyMap temp = new PropertyMap();
826                 GetProperty(Popup.Property.ENTRY_ANIMATION).Get(temp);
827                 return temp;
828             }
829             set
830             {
831                 SetProperty(Popup.Property.ENTRY_ANIMATION, new Tizen.NUI.PropertyValue(value));
832             }
833         }
834         /// <summary>
835         /// Exit animation.
836         /// </summary>
837         public PropertyMap ExitAnimation
838         {
839             get
840             {
841                 PropertyMap temp = new PropertyMap();
842                 GetProperty(Popup.Property.EXIT_ANIMATION).Get(temp);
843                 return temp;
844             }
845             set
846             {
847                 SetProperty(Popup.Property.EXIT_ANIMATION, new Tizen.NUI.PropertyValue(value));
848             }
849         }
850         /// <summary>
851         /// Auto hide delay.
852         /// </summary>
853         public int AutoHideDelay
854         {
855             get
856             {
857                 int temp = 0;
858                 GetProperty(Popup.Property.AUTO_HIDE_DELAY).Get(out temp);
859                 return temp;
860             }
861             set
862             {
863                 SetProperty(Popup.Property.AUTO_HIDE_DELAY, new Tizen.NUI.PropertyValue(value));
864             }
865         }
866         /// <summary>
867         /// Backing enabled.
868         /// </summary>
869         public bool BackingEnabled
870         {
871             get
872             {
873                 bool temp = false;
874                 GetProperty(Popup.Property.BACKING_ENABLED).Get(out temp);
875                 return temp;
876             }
877             set
878             {
879                 SetProperty(Popup.Property.BACKING_ENABLED, new Tizen.NUI.PropertyValue(value));
880             }
881         }
882         /// <summary>
883         /// Backing color.
884         /// </summary>
885         public Vector4 BackingColor
886         {
887             get
888             {
889                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
890                 GetProperty(Popup.Property.BACKING_COLOR).Get(temp);
891                 return temp;
892             }
893             set
894             {
895                 SetProperty(Popup.Property.BACKING_COLOR, new Tizen.NUI.PropertyValue(value));
896             }
897         }
898         /// <summary>
899         /// Background image.
900         /// </summary>
901         public string PopupBackgroundImage
902         {
903             get
904             {
905                 string temp;
906                 GetProperty(Popup.Property.POPUP_BACKGROUND_IMAGE).Get(out temp);
907                 return temp;
908             }
909             set
910             {
911                 SetProperty(Popup.Property.POPUP_BACKGROUND_IMAGE, new Tizen.NUI.PropertyValue(value));
912             }
913         }
914         /// <summary>
915         /// Background border.
916         /// </summary>
917         public Rectangle PopupBackgroundBorder
918         {
919             get
920             {
921                 Rectangle temp = new Rectangle(0, 0, 0, 0);
922                 GetProperty(Popup.Property.POPUP_BACKGROUND_BORDER).Get(temp);
923                 return temp;
924             }
925             set
926             {
927                 SetProperty(Popup.Property.POPUP_BACKGROUND_BORDER, new Tizen.NUI.PropertyValue(value));
928             }
929         }
930         /// <summary>
931         /// Tail up image.
932         /// </summary>
933         public string TailUpImage
934         {
935             get
936             {
937                 string temp;
938                 GetProperty(Popup.Property.TAIL_UP_IMAGE).Get(out temp);
939                 return temp;
940             }
941             set
942             {
943                 SetProperty(Popup.Property.TAIL_UP_IMAGE, new Tizen.NUI.PropertyValue(value));
944             }
945         }
946         /// <summary>
947         /// Tail down image.
948         /// </summary>
949         public string TailDownImage
950         {
951             get
952             {
953                 string temp;
954                 GetProperty(Popup.Property.TAIL_DOWN_IMAGE).Get(out temp);
955                 return temp;
956             }
957             set
958             {
959                 SetProperty(Popup.Property.TAIL_DOWN_IMAGE, new Tizen.NUI.PropertyValue(value));
960             }
961         }
962         /// <summary>
963         /// Tail left image.
964         /// </summary>
965         public string TailLeftImage
966         {
967             get
968             {
969                 string temp;
970                 GetProperty(Popup.Property.TAIL_LEFT_IMAGE).Get(out temp);
971                 return temp;
972             }
973             set
974             {
975                 SetProperty(Popup.Property.TAIL_LEFT_IMAGE, new Tizen.NUI.PropertyValue(value));
976             }
977         }
978         /// <summary>
979         /// Tail right image.
980         /// </summary>
981         public string TailRightImage
982         {
983             get
984             {
985                 string temp;
986                 GetProperty(Popup.Property.TAIL_RIGHT_IMAGE).Get(out temp);
987                 return temp;
988             }
989             set
990             {
991                 SetProperty(Popup.Property.TAIL_RIGHT_IMAGE, new Tizen.NUI.PropertyValue(value));
992             }
993         }
994
995     }
996
997 }