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