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