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