summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/lib/elm_popup.eo
blob: 5e482e775ffb13ec8abc6d011106f35418615a06 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
import elm_general;

enum Elm.Popup.Orient
{
   [[Possible orient values for popup.

     These values should be used in conjunction to elm_popup_orient_set() to
     set the position in which the popup should appear(relative to its parent)
     and in conjunction with elm_popup_orient_get() to know where the popup
     is appearing.
   ]]

   top = 0, [[Popup should appear in the top of parent, default.]]
   center, [[Popup should appear in the center of parent.]]
   bottom, [[Popup should appear in the bottom of parent.]]
   left, [[Popup should appear in the left of parent.]]
   right, [[Popup should appear in the right of parent.]]
   top_left, [[Popup should appear in the top left of parent.]]
   top_right, [[Popup should appear in the top right of parent.]]
   bottom_left, [[Popup should appear in the bottom left of parent.]]
   bottom_right, [[Notify should appear in the bottom right of parent.]]
   last [[Sentinel value, don't use.]]
}


class Elm.Popup (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
{
   eo_prefix: elm_obj_popup;
   methods {
      @property align {
         set {
            /*@
            @brief Set the alignment of the popup object
            Sets the alignment in which the popup will appear in its parent.

            @see elm_popup_align_get()

            @since 1.9
            @ingroup Popup */
         }
         get {
            /*@
            @brief Get the alignment of the popup object
            @see elm_popup_align_set()

            @since 1.9
            @ingroup Popup */
         }
         values {
            horizontal: double; /*@ The horizontal alignment of the popup */
            vertical: double; /*@ The vertical alignment of the popup */
         }
      }
      @property allow_events {
         set {
            /*@
            @brief Sets whether events should be passed to by a click outside.

            Enabling allow event will remove the Blocked event area and events will
            pass to the lower layer objects otherwise they are blocked.

            @ingroup Popup
            @see elm_popup_allow_events_get()
            @note The default value is EINA_FALSE. */
         }
         get {
            /*@
            @brief Returns value indicating whether allow event is enabled or not

            @return @c EINA_FALSE if Blocked event area is present else @c EINA_TRUE

            @ingroup Popup
            @see elm_popup_allow_events_set()
            @note By default the Blocked event area is present */
         }
         values {
            allow: bool; /*@ @c EINA_TRUE Events are passed to lower objects, else not */
         }
      }
      @property content_text_wrap_type {
         set {
            /*@
            @brief Sets the wrapping type of content text packed in content
            area of popup object.

            @ingroup Popup
            @see elm_popup_content_text_wrap_type_get() */
         }
         get {
            /*@
            @brief Returns the wrapping type of content text packed in content area of
            popup object.

            @return wrap type of the content text

            @ingroup Popup
            @see elm_popup_content_text_wrap_type_set */
         }
         values {
            wrap: Elm.Wrap.Type; /*@ wrapping type of type Elm_Wrap_Type */
         }
      }
      @property orient {
         set {
            /*@
            @brief Sets the orientation of the popup in the parent region

            Sets the position in which popup will appear in its parent. By default,
            #ELM_POPUP_ORIENT_CENTER is set.

            @ingroup Popup
            @see @ref Elm_Popup_Orient for possible values. */
         }
         get {
            /*@
            @brief Returns the orientation of Popup

            @return the orientation of the popup

            @ingroup Popup
            @see elm_popup_orient_set()
            @see Elm_Popup_Orient */
         }
         values {
            orient: Elm.Popup.Orient; /*@ the orientation of the popup */
         }
      }
      @property timeout {
         set {
            /*@
            @brief Sets a timeout to hide popup automatically

            This function sets a timeout and starts the timer controlling when the
            popup is hidden. Since calling evas_object_show() on a popup restarts
            the timer controlling when it is hidden, setting this before the
            popup is shown will in effect mean starting the timer when the popup is
            shown. Smart signal "timeout" is called afterwards which can be handled
            if needed.

            @note Set a value <= 0.0 to disable a running timer.

            @note If the value > 0.0 and the popup is previously visible, the
            timer will be started with this value, canceling any running timer.
            @ingroup Popup */
         }
         get {
            /*@
            @brief Returns the timeout value set to the popup (in seconds)

            @return the timeout value

            @ingroup Popup
            @see elm_popup_timeout_set() */
         }
         values {
            timeout: double; /*@ The timeout in seconds */
         }
      }
      item_append {
         /*@
         @brief Add a new item to a Popup object

         Both an item list and a content could not be set at the same time!
         once you add an item, the previous content will be removed.

         @return A handle to the item added or @c NULL, on errors

         @ingroup Popup
         @warning When the first item is appended to popup object, any previous content
         of the content area is deleted. At a time, only one of content, content-text
         and item(s) can be there in a popup content area. */

         return: Elm_Object_Item *;
         params {
            @in label: const(char)*; /*@ The Label of the new item */
            @in icon: Evas.Object * @optional; /*@ Icon to be set on new item */
            @in func: Evas_Smart_Cb @optional; /*@ Convenience function called when item selected */
            @in data: const(void)* @optional; /*@ Data passed to @p func above */
         }
      }
   }
   implements {
      class.constructor;
      Eo.Base.constructor;
      Evas.Object_Smart.del;
      Evas.Object_Smart.add;
      Elm.Widget.focus_direction;
      Elm.Widget.focus_next_manager_is;
      Elm.Widget.theme_apply;
      Elm.Widget.focus_direction_manager_is;
      Elm.Widget.access;
      Elm.Widget.focus_next;
      Elm.Widget.parent.set;
      Elm.Widget.translate;
      Elm.Widget.sub_object_del;
      Elm.Widget.event;
      Elm.Container.content_get;
      Elm.Container.content_set;
      Elm.Container.content_unset;
      Elm.Layout.text_set;
      Elm.Layout.text_get;
      Elm.Layout.sizing_eval;
      Elm_Interface_Atspi_Widget_Action.elm_actions.get;
   }
   events {
      block,clicked;
      timeout;
      item,focused;
      item,unfocused;
      language,changed;
      access,changed;
   }

}