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