Merge "Fix some bugs: (1)Change the return type of Window.IsVisible() form void to...
[platform/core/csapi/nui.git] / Tizen.NUI / src / public / 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
28 {
29
30     using System;
31     using System.Runtime.InteropServices;
32
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         ~Popup()
52         {
53             DisposeQueue.Instance.Add(this);
54         }
55
56         public override void Dispose()
57         {
58             if (!Stage.IsInstalled())
59             {
60                 DisposeQueue.Instance.Add(this);
61                 return;
62             }
63
64             lock (this)
65             {
66                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
67                 {
68                     if (swigCMemOwn)
69                     {
70                         swigCMemOwn = false;
71                         NDalicPINVOKE.delete_Popup(swigCPtr);
72                     }
73                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
74                 }
75                 global::System.GC.SuppressFinalize(this);
76                 base.Dispose();
77             }
78         }
79
80
81
82         /// <summary>
83         /// Event arguments that passed via OutsideTouchedEvent
84         /// </summary>
85         public class OutsideTouchedEventArgs : EventArgs
86         {
87         }
88
89         /// <summary>
90         /// Event arguments that passed via ShowingEventArgs
91         /// </summary>
92         public class ShowingEventArgs : EventArgs
93         {
94         }
95
96         /// <summary>
97         /// Event arguments that passed via ShownEventArgs
98         /// </summary>
99         public class ShownEventArgs : EventArgs
100         {
101         }
102
103         /// <summary>
104         /// Event arguments that passed via HidingEventArgs
105         /// </summary>
106         public class HidingEventArgs : EventArgs
107         {
108         }
109
110         /// <summary>
111         /// Event arguments that passed via HiddenEventArgs
112         /// </summary>
113         public class HiddenEventArgs : EventArgs
114         {
115         }
116
117         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
118         private delegate void OutsideTouchedEventCallbackDelegate();
119         private EventHandler<OutsideTouchedEventArgs> _popUpOutsideTouchedEventHandler;
120         private OutsideTouchedEventCallbackDelegate _popUpOutsideTouchedEventCallbackDelegate;
121
122         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
123         private delegate void ShowingEventCallbackDelegate();
124         private EventHandler<ShowingEventArgs> _popUpShowingEventHandler;
125         private ShowingEventCallbackDelegate _popUpShowingEventCallbackDelegate;
126
127         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
128         private delegate void ShownEventCallbackDelegate();
129         private EventHandler<ShownEventArgs> _popUpShownEventHandler;
130         private ShownEventCallbackDelegate _popUpShownEventCallbackDelegate;
131
132         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
133         private delegate void HidingEventCallbackDelegate();
134         private EventHandler<HidingEventArgs> _popUpHidingEventHandler;
135         private HidingEventCallbackDelegate _popUpHidingEventCallbackDelegate;
136
137         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
138         private delegate void HiddenEventCallbackDelegate();
139         private EventHandler<HiddenEventArgs> _popUpHiddenEventHandler;
140         private HiddenEventCallbackDelegate _popUpHiddenEventCallbackDelegate;
141
142         /// <summary>
143         /// Event is sent when user has touched outside of the Dialog.
144         /// </summary>
145         public event EventHandler<OutsideTouchedEventArgs> OutsideTouched
146         {
147             add
148             {
149                 if (_popUpOutsideTouchedEventHandler == null)
150                 {
151                     _popUpOutsideTouchedEventCallbackDelegate = (OnOutsideTouched);
152                     OutsideTouchedSignal().Connect(_popUpOutsideTouchedEventCallbackDelegate);
153                 }
154                 _popUpOutsideTouchedEventHandler += value;
155             }
156             remove
157             {
158                 _popUpOutsideTouchedEventHandler -= value;
159                 if (_popUpOutsideTouchedEventHandler == null && OutsideTouchedSignal().Empty() == false)
160                 {
161                     this.OutsideTouchedSignal().Disconnect(_popUpOutsideTouchedEventCallbackDelegate);
162                 }
163             }
164         }
165
166         // Callback for Popup OutsideTouchedSignal
167         private void OnOutsideTouched()
168         {
169             OutsideTouchedEventArgs e = new OutsideTouchedEventArgs();
170
171             if (_popUpOutsideTouchedEventHandler != null)
172             {
173                 //here we send all data to user event handlers
174                 _popUpOutsideTouchedEventHandler(this, e);
175             }
176         }
177
178         /// <summary>
179         /// Event is sent when the Popup is starting to be shown.
180         /// </summary>
181         public event EventHandler<ShowingEventArgs> Showing
182         {
183             add
184             {
185                 if (_popUpShowingEventHandler == null)
186                 {
187                     _popUpShowingEventCallbackDelegate = (OnShowing);
188                     ShowingSignal().Connect(_popUpShowingEventCallbackDelegate);
189                 }
190                 _popUpShowingEventHandler += value;
191             }
192             remove
193             {
194                 _popUpShowingEventHandler -= value;
195                 if (_popUpShowingEventHandler == null && ShowingSignal().Empty() == false)
196                 {
197                     ShowingSignal().Disconnect(_popUpShowingEventCallbackDelegate);
198                 }
199             }
200         }
201
202         // Callback for ShowingSignal
203         private void OnShowing()
204         {
205             ShowingEventArgs e = new ShowingEventArgs();
206
207             if (_popUpShowingEventHandler != null)
208             {
209                 //here we send all data to user event handlers
210                 _popUpShowingEventHandler(this, e);
211             }
212         }
213
214
215         /// <summary>
216         /// Event is sent when the Popup has been fully displayed.
217         /// </summary>
218         public event EventHandler<ShownEventArgs> Shown
219         {
220             add
221             {
222                 if (_popUpShownEventHandler == null)
223                 {
224                     _popUpShownEventCallbackDelegate = (OnShown);
225                     ShownSignal().Connect(_popUpShownEventCallbackDelegate);
226                 }
227                 _popUpShownEventHandler += value;
228             }
229             remove
230             {
231                 _popUpShownEventHandler -= value;
232                 if (_popUpShownEventHandler == null && ShownSignal().Empty() == false)
233                 {
234                     ShownSignal().Disconnect(_popUpShownEventCallbackDelegate);
235                 }
236             }
237         }
238
239         // Callback for ShownSignal
240         private void OnShown()
241         {
242             ShownEventArgs e = new ShownEventArgs();
243
244             if (_popUpShownEventHandler != null)
245             {
246                 //here we send all data to user event handlers
247                 _popUpShownEventHandler(this, e);
248             }
249         }
250
251         /// <summary>
252         /// Event is sent when the Popup is starting to be hidden.
253         /// </summary>
254         public event EventHandler<HidingEventArgs> Hiding
255         {
256             add
257             {
258                 if (_popUpHidingEventHandler == null)
259                 {
260                     _popUpHidingEventCallbackDelegate = (OnHiding);
261                     HidingSignal().Connect(_popUpHidingEventCallbackDelegate);
262                 }
263                 _popUpHidingEventHandler += value;
264             }
265             remove
266             {
267                 _popUpHidingEventHandler -= value;
268                 if (_popUpHidingEventHandler == null && HidingSignal().Empty() == false)
269                 {
270                     HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate);
271                 }
272             }
273         }
274
275         // Callback for HidingSignal
276         private void OnHiding()
277         {
278             HidingEventArgs e = new HidingEventArgs();
279
280             if (_popUpHidingEventHandler != null)
281             {
282                 //here we send all data to user event handlers
283                 _popUpHidingEventHandler(this, e);
284             }
285         }
286
287         /// <summary>
288         /// Event is sent when the Popup has been completely hidden.
289         /// </summary>
290         public event EventHandler<HiddenEventArgs> Hidden
291         {
292             add
293             {
294                 if (_popUpHiddenEventHandler == null)
295                 {
296                     _popUpHiddenEventCallbackDelegate = (OnHidden);
297                     HiddenSignal().Connect(_popUpHiddenEventCallbackDelegate);
298                 }
299                 _popUpHiddenEventHandler += value;
300             }
301             remove
302             {
303                 _popUpHiddenEventHandler -= value;
304                 if (_popUpHiddenEventHandler == null && HiddenSignal().Empty() == false)
305                 {
306                     HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate);
307                 }
308             }
309         }
310
311         // Callback for HiddenSignal
312         private void OnHidden()
313         {
314             HiddenEventArgs e = new HiddenEventArgs();
315
316             if (_popUpHiddenEventHandler != null)
317             {
318                 //here we send all data to user event handlers
319                 _popUpHiddenEventHandler(this, e);
320             }
321         }
322
323         internal class Property : global::System.IDisposable
324         {
325             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
326             protected bool swigCMemOwn;
327
328             internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
329             {
330                 swigCMemOwn = cMemoryOwn;
331                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
332             }
333
334             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
335             {
336                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
337             }
338
339             ~Property()
340             {
341                 Dispose();
342             }
343
344             public virtual void Dispose()
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(Actor titleActor)
429         {
430             NDalicPINVOKE.Popup_SetTitle(swigCPtr, Actor.getCPtr(titleActor));
431             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
432         }
433
434         internal Actor GetTitle()
435         {
436             Actor ret = new Actor(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(Actor content)
446         {
447             NDalicPINVOKE.Popup_SetContent(swigCPtr, Actor.getCPtr(content));
448             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
449         }
450
451         internal Actor GetContent()
452         {
453             Actor ret = new Actor(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(Actor footer)
463         {
464             NDalicPINVOKE.Popup_SetFooter(swigCPtr, Actor.getCPtr(footer));
465             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
466         }
467
468         internal Actor GetFooter()
469         {
470             Actor ret = new Actor(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                     //Tizen.Log.Error("NUI", "DisplayState get error!");
642                 }
643                 switch (temp)
644                 {
645                     case "SHOWING":
646                         return DisplayStateType.Showing;
647                     case "SHOWN":
648                         return DisplayStateType.Shown;
649                     case "HIDING":
650                         return DisplayStateType.Hiding;
651                     case "HIDDEN":
652                         return DisplayStateType.Hidden;
653                     default:
654                         return DisplayStateType.Hidden;
655                 }
656             }
657             set
658             {
659                 string valueToString = "";
660                 switch (value)
661                 {
662                     case DisplayStateType.Showing:
663                     {
664                         valueToString = "SHOWING";
665                         break;
666                     }
667                     case DisplayStateType.Shown:
668                     {
669                         valueToString = "SHOWN";
670                         break;
671                     }
672                     case DisplayStateType.Hiding:
673                     {
674                         valueToString = "HIDING";
675                         break;
676                     }
677                     case DisplayStateType.Hidden:
678                     {
679                         valueToString = "HIDDEN";
680                         break;
681                     }
682                     default:
683                     {
684                         valueToString = "HIDDEN";
685                         break;
686                     }
687                 }
688                 SetProperty(Popup.Property.DISPLAY_STATE, new Tizen.NUI.PropertyValue(valueToString));
689             }
690         }
691         /// <summary>
692         /// Touch transparent.
693         /// </summary>
694         public bool TouchTransparent
695         {
696             get
697             {
698                 bool temp = false;
699                 GetProperty(Popup.Property.TOUCH_TRANSPARENT).Get(ref temp);
700                 return temp;
701             }
702             set
703             {
704                 SetProperty(Popup.Property.TOUCH_TRANSPARENT, new Tizen.NUI.PropertyValue(value));
705             }
706         }
707         /// <summary>
708         /// Popup tail visibility.
709         /// </summary>
710         public bool TailVisibility
711         {
712             get
713             {
714                 bool temp = false;
715                 GetProperty(Popup.Property.TAIL_VISIBILITY).Get(ref temp);
716                 return temp;
717             }
718             set
719             {
720                 SetProperty(Popup.Property.TAIL_VISIBILITY, new Tizen.NUI.PropertyValue(value));
721             }
722         }
723         /// <summary>
724         /// Popup tail position.
725         /// </summary>
726         public Vector3 TailPosition
727         {
728             get
729             {
730                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
731                 GetProperty(Popup.Property.TAIL_POSITION).Get(temp);
732                 return temp;
733             }
734             set
735             {
736                 SetProperty(Popup.Property.TAIL_POSITION, new Tizen.NUI.PropertyValue(value));
737             }
738         }
739         /// <summary>
740         /// Contextual mode.
741         /// </summary>
742         public ContextualModeType ContextualMode
743         {
744             get
745             {
746                 string temp;
747                 if (GetProperty(Popup.Property.CONTEXTUAL_MODE).Get(out temp) == false)
748                 {
749                     //Tizen.Log.Error("NUI", "ContextualMode get error!");
750                 }
751                 switch (temp)
752                 {
753                     case "NON_CONTEXTUAL":
754                         return ContextualModeType.NonContextual;
755                     case "ABOVE":
756                         return ContextualModeType.Above;
757                     case "RIGHT":
758                         return ContextualModeType.Rright;
759                     case "BELOW":
760                         return ContextualModeType.Below;
761                     case "LEFT":
762                         return ContextualModeType.Left;
763                     default:
764                         return ContextualModeType.Below;
765                 }
766             }
767             set
768             {
769                 string valueToString = "";
770                 switch (value)
771                 {
772                     case ContextualModeType.NonContextual:
773                     {
774                         valueToString = "NON_CONTEXTUAL";
775                         break;
776                     }
777                     case ContextualModeType.Above:
778                     {
779                         valueToString = "ABOVE";
780                         break;
781                     }
782                     case ContextualModeType.Rright:
783                     {
784                         valueToString = "RIGHT";
785                         break;
786                     }
787                     case ContextualModeType.Below:
788                     {
789                         valueToString = "BELOW";
790                         break;
791                     }
792                     case ContextualModeType.Left:
793                     {
794                         valueToString = "LEFT";
795                         break;
796                     }
797                     default:
798                     {
799                         valueToString = "BELOW";
800                         break;
801                     }
802                 }
803                 SetProperty(Popup.Property.CONTEXTUAL_MODE, new Tizen.NUI.PropertyValue(valueToString));
804             }
805         }
806         /// <summary>
807         /// Animation duration.
808         /// </summary>
809         public float AnimationDuration
810         {
811             get
812             {
813                 float temp = 0.0f;
814                 GetProperty(Popup.Property.ANIMATION_DURATION).Get(ref temp);
815                 return temp;
816             }
817             set
818             {
819                 SetProperty(Popup.Property.ANIMATION_DURATION, new Tizen.NUI.PropertyValue(value));
820             }
821         }
822         /// <summary>
823         /// Animation mode.
824         /// </summary>
825         public AnimationModeType AnimationMode
826         {
827             get
828             {
829                 string temp;
830                 if (GetProperty(Popup.Property.ANIMATION_MODE).Get(out temp) == false)
831                 {
832                     //Tizen.Log.Error("NUI", "AnimationMode get error!");
833                 }
834                 switch (temp)
835                 {
836                     case "NONE":
837                         return AnimationModeType.None;
838                     case "ZOOM":
839                         return AnimationModeType.Zoom;
840                     case "FADE":
841                         return AnimationModeType.Fade;
842                     case "CUSTOM":
843                         return AnimationModeType.Custom;
844                     default:
845                         return AnimationModeType.Fade;
846                 }
847             }
848             set
849             {
850                 string valueToString = "";
851                 switch (value)
852                 {
853                     case AnimationModeType.None:
854                     {
855                         valueToString = "NONE";
856                         break;
857                     }
858                     case AnimationModeType.Zoom:
859                     {
860                         valueToString = "ZOOM";
861                         break;
862                     }
863                     case AnimationModeType.Fade:
864                     {
865                         valueToString = "FADE";
866                         break;
867                     }
868                     case AnimationModeType.Custom:
869                     {
870                         valueToString = "CUSTOM";
871                         break;
872                     }
873                     default:
874                     {
875                         valueToString = "FADE";
876                         break;
877                     }
878                 }
879                 SetProperty(Popup.Property.ANIMATION_MODE, new Tizen.NUI.PropertyValue(valueToString));
880             }
881         }
882         /// <summary>
883         /// Entry animation.
884         /// </summary>
885         public PropertyMap EntryAnimation
886         {
887             get
888             {
889                 PropertyMap temp = new PropertyMap();
890                 GetProperty(Popup.Property.ENTRY_ANIMATION).Get(temp);
891                 return temp;
892             }
893             set
894             {
895                 SetProperty(Popup.Property.ENTRY_ANIMATION, new Tizen.NUI.PropertyValue(value));
896             }
897         }
898         /// <summary>
899         /// Exit animation.
900         /// </summary>
901         public PropertyMap ExitAnimation
902         {
903             get
904             {
905                 PropertyMap temp = new PropertyMap();
906                 GetProperty(Popup.Property.EXIT_ANIMATION).Get(temp);
907                 return temp;
908             }
909             set
910             {
911                 SetProperty(Popup.Property.EXIT_ANIMATION, new Tizen.NUI.PropertyValue(value));
912             }
913         }
914         /// <summary>
915         /// Auto hide delay.
916         /// </summary>
917         public int AutoHideDelay
918         {
919             get
920             {
921                 int temp = 0;
922                 GetProperty(Popup.Property.AUTO_HIDE_DELAY).Get(ref temp);
923                 return temp;
924             }
925             set
926             {
927                 SetProperty(Popup.Property.AUTO_HIDE_DELAY, new Tizen.NUI.PropertyValue(value));
928             }
929         }
930         /// <summary>
931         /// Backing enabled.
932         /// </summary>
933         public bool BackingEnabled
934         {
935             get
936             {
937                 bool temp = false;
938                 GetProperty(Popup.Property.BACKING_ENABLED).Get(ref temp);
939                 return temp;
940             }
941             set
942             {
943                 SetProperty(Popup.Property.BACKING_ENABLED, new Tizen.NUI.PropertyValue(value));
944             }
945         }
946         /// <summary>
947         /// Backing color.
948         /// </summary>
949         public Vector4 BackingColor
950         {
951             get
952             {
953                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
954                 GetProperty(Popup.Property.BACKING_COLOR).Get(temp);
955                 return temp;
956             }
957             set
958             {
959                 SetProperty(Popup.Property.BACKING_COLOR, new Tizen.NUI.PropertyValue(value));
960             }
961         }
962         /// <summary>
963         /// Background image.
964         /// </summary>
965         public string PopupBackgroundImage
966         {
967             get
968             {
969                 string temp;
970                 GetProperty(Popup.Property.POPUP_BACKGROUND_IMAGE).Get(out temp);
971                 return temp;
972             }
973             set
974             {
975                 SetProperty(Popup.Property.POPUP_BACKGROUND_IMAGE, new Tizen.NUI.PropertyValue(value));
976             }
977         }
978         /// <summary>
979         /// Background border.
980         /// </summary>
981         public Rectangle PopupBackgroundBorder
982         {
983             get
984             {
985                 Rectangle temp = new Rectangle(0, 0, 0, 0);
986                 GetProperty(Popup.Property.POPUP_BACKGROUND_BORDER).Get(temp);
987                 return temp;
988             }
989             set
990             {
991                 SetProperty(Popup.Property.POPUP_BACKGROUND_BORDER, new Tizen.NUI.PropertyValue(value));
992             }
993         }
994         /// <summary>
995         /// Tail up image.
996         /// </summary>
997         public string TailUpImage
998         {
999             get
1000             {
1001                 string temp;
1002                 GetProperty(Popup.Property.TAIL_UP_IMAGE).Get(out temp);
1003                 return temp;
1004             }
1005             set
1006             {
1007                 SetProperty(Popup.Property.TAIL_UP_IMAGE, new Tizen.NUI.PropertyValue(value));
1008             }
1009         }
1010         /// <summary>
1011         /// Tail down image.
1012         /// </summary>
1013         public string TailDownImage
1014         {
1015             get
1016             {
1017                 string temp;
1018                 GetProperty(Popup.Property.TAIL_DOWN_IMAGE).Get(out temp);
1019                 return temp;
1020             }
1021             set
1022             {
1023                 SetProperty(Popup.Property.TAIL_DOWN_IMAGE, new Tizen.NUI.PropertyValue(value));
1024             }
1025         }
1026         /// <summary>
1027         /// Tail left image.
1028         /// </summary>
1029         public string TailLeftImage
1030         {
1031             get
1032             {
1033                 string temp;
1034                 GetProperty(Popup.Property.TAIL_LEFT_IMAGE).Get(out temp);
1035                 return temp;
1036             }
1037             set
1038             {
1039                 SetProperty(Popup.Property.TAIL_LEFT_IMAGE, new Tizen.NUI.PropertyValue(value));
1040             }
1041         }
1042         /// <summary>
1043         /// Tail right image.
1044         /// </summary>
1045         public string TailRightImage
1046         {
1047             get
1048             {
1049                 string temp;
1050                 GetProperty(Popup.Property.TAIL_RIGHT_IMAGE).Get(out temp);
1051                 return temp;
1052             }
1053             set
1054             {
1055                 SetProperty(Popup.Property.TAIL_RIGHT_IMAGE, new Tizen.NUI.PropertyValue(value));
1056             }
1057         }
1058
1059     }
1060
1061 }