1parse efl_gfx_hint;
2enum Efl.Ui.Popup_Align {
3    [[This is the alignment method for positioning Popup widgets. @since 1.23]]
4    none = 0, [[Popup not aligned.]]
5    center,   [[Popup is aligned to the center of its anchor object.]]
6    left,     [[Popup's left edge is aligned to the left side of its anchor object.]]
7    right,    [[Popup's right edge is aligned to the right side of its anchor object.]]
8    top,      [[Popup's top is aligned to the top of its anchor object.]]
9    bottom    [[Popup's bottom is aligned to the bottom of its anchor object.]]
10}
11
12class Efl.Ui.Popup extends Efl.Ui.Layout_Base implements Efl.Content, Efl.Ui.Focus.Layer,
13                                                               Efl.Ui.Widget_Scrollable_Content
14{
15   [[A styled container widget which overlays a window's contents.
16
17     The Popup widget is a theme-capable container which can be used for various purposes.
18     Regular contents can be set using the @Efl.Content interface, or basic scrollable contents
19     can be set through the @Efl.Ui.Widget_Scrollable_Content mixin API. For contents which
20     should be scrollable but require more fine-grained tuning, it may be necessary for users
21     to set up and provide their own scroller object such as @Efl.Ui.Scroller.
22
23     A Popup widget will create an overlay for the window contents. This overlay is an
24     @Efl.Ui.Popup_Part_Backwall object, which provides functionality for passing events
25     through to the main window while the Popup is active as well as the ability to set
26     background images for the Popup.
27
28     By default, a Popup is positioned by the user through the @Efl.Gfx.Entity.position property.
29     This behavior can be altered by using the @.align and @.anchor properties. Setting the
30     @Efl.Gfx.Entity.position property directly will unset both the @.align and @.anchor properties,
31     and vice versa.
32
33     By default, a Popup will size itself based on the minimum size of its contents through the
34     @Efl.Gfx.Hint interface. A Popup will never size itself smaller than the minimum size of its contents,
35     but by manually setting the @Efl.Gfx.Entity.size property or the @Efl.Gfx.Hint.hint_size_min property,
36     a larger size can be specified.
37
38     Users can set a given Popup widget to close automatically after a specified time using the @.closing_timeout
39     property.
40
41     For a Popup with a more specialized purpose, see @Efl.Ui.Alert_Popup.
42
43     @since 1.23
44   ]]
45   methods {
46      @property align {
47         [[The align property specifies a Popup's current positioning relative to its anchor.
48
49           When set, this property will override any user-provided value for
50           the widget's @Efl.Gfx.Entity.position property.
51         ]]
52         set {
53         }
54         get {
55         }
56         values {
57             type: Efl.Ui.Popup_Align; [[Alignment of the Popup relative to its anchor.
58                                         The default is @Efl.Ui.Popup_Align.none.]]
59         }
60      }
61      @property closing_timeout {
62         [[The closing_timeout property is the time after which the Popup widget will be automatically deleted.
63
64           The timer is initiated at the time when the popup is shown. If the value is changed
65           prior to the timer expiring, the existing timer will be deleted. If the new value is greater than $0,
66           a new timer will be created.
67         ]]
68         set {
69         }
70         get {
71         }
72         values {
73             time: double; [[If greater than $0, the Popup will close automatically after the value in seconds.
74                             The default is to not automatically delete the Popup.]]
75         }
76      }
77      @property anchor {
78         [[The anchor object is the reference object for positioning a Popup
79           using the @.align and @.align_priority properties.
80
81           A Popup will recalculate its alignment relative to its anchor and change its position when:
82           - the anchor object is moved (unless the anchor is a window)
83           - the anchor object is resized
84           - the Popup is resized
85           - the parent window is resized
86
87           If @.anchor.get returns $NULL, the anchor is the parent window of the Popup.
88           If the anchor object is set to $NULL, the Popup will no longer recalculate its alignment or change
89           its position under any circumstance.
90           If the Popup is moved by using @Efl.Gfx.Entity.position.set, $anchor is set $NULL.
91         ]]
92         set {
93         }
94         get {
95         }
96         values {
97            anchor: Efl.Canvas.Object; [[The object which Popup is following. By default this is $NULL.]]
98         }
99      }
100      @property align_priority {
101         [[This is the priority in which alignments will be tested using the anchor object if the value of @.align
102           is determined to be invalid. If a given alignment would result in the popup being partially or fully
103           outside the visible area of the window, it is deemed invalid, and the next alignment is tested
104           until either the priority list is exhausted or a usable alignment is found.
105
106           An alignment will also be deemed invalid if the popup occludes its anchor object,
107           except if @Efl.Ui.Popup_Align.center is specified.
108         ]]
109         set {
110         }
111         get {
112         }
113         values {
114            first: Efl.Ui.Popup_Align;  [[First alignment. The default is @Efl.Ui.Popup_Align.top.]]
115            second: Efl.Ui.Popup_Align; [[Second alignment. The default is @Efl.Ui.Popup_Align.left.]]
116            third: Efl.Ui.Popup_Align;  [[Third alignment. The default is @Efl.Ui.Popup_Align.right.]]
117            fourth: Efl.Ui.Popup_Align; [[Fourth alignment. The default is @Efl.Ui.Popup_Align.bottom.]]
118            fifth: Efl.Ui.Popup_Align;  [[Fifth alignment. The default is @Efl.Ui.Popup_Align.center.]]
119         }
120      }
121   }
122   parts {
123      backwall: Efl.Ui.Popup_Part_Backwall; [[A backwall behind the Popup.]]
124   }
125   implements {
126      Efl.Object.constructor;
127      Efl.Object.destructor;
128      Efl.Object.invalidate;
129      Efl.Canvas.Group.group_calculate;
130      Efl.Gfx.Entity.position { set; }
131      Efl.Gfx.Entity.size { set;}
132      Efl.Gfx.Entity.visible { set; }
133      Efl.Ui.Widget.widget_parent { set; }
134      Efl.Content.content { get; set; }
135      Efl.Content.content_unset;
136      Efl.Part.part_get;
137   }
138   events {
139      backwall,clicked: void; [[This is called whenever the user clicks the backwall part of the Popup.]]
140      timeout: void; [[This is called when Popup times out.]]
141   }
142}
143