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