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