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