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