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