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