2015-07-08 04:42:17 -07:00
|
|
|
import elm_general;
|
|
|
|
|
2015-07-06 08:31:07 -07:00
|
|
|
enum Elm.Popup.Orient
|
|
|
|
{
|
2015-07-08 07:49:38 -07:00
|
|
|
[[Possible orient values for popup.
|
|
|
|
|
2015-07-06 08:31:07 -07:00
|
|
|
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.]]
|
2016-10-24 10:57:13 -07:00
|
|
|
last [[Sentinel value to indicate last enum field during iteration]]
|
2015-07-06 08:31:07 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-15 18:31:26 -08:00
|
|
|
class Elm.Popup (Efl.Ui.Layout, Efl.Ui.Focus.Layer, Efl.Access.Widget.Action)
|
2014-03-25 05:00:33 -07:00
|
|
|
{
|
2016-11-21 08:58:40 -08:00
|
|
|
[[Elementary popup class]]
|
2016-05-12 09:06:04 -07:00
|
|
|
legacy_prefix: elm_popup;
|
2014-03-25 05:00:33 -07:00
|
|
|
eo_prefix: elm_obj_popup;
|
2016-05-17 09:14:47 -07:00
|
|
|
event_prefix: elm_popup;
|
2015-05-07 09:32:53 -07:00
|
|
|
methods {
|
|
|
|
@property align {
|
2014-03-25 05:00:33 -07:00
|
|
|
set {
|
2015-08-07 06:24:37 -07:00
|
|
|
[[Set the alignment of the popup object.
|
2014-03-25 05:00:33 -07:00
|
|
|
|
2015-08-07 06:24:37 -07:00
|
|
|
Sets the alignment in which the popup will appear in its parent.
|
2014-03-25 05:00:33 -07:00
|
|
|
|
2015-08-07 06:24:37 -07:00
|
|
|
@since 1.9
|
|
|
|
]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-08-07 06:24:37 -07:00
|
|
|
[[Get the alignment of the popup object.
|
2014-03-25 05:00:33 -07:00
|
|
|
|
2015-08-07 06:24:37 -07:00
|
|
|
@since 1.9
|
|
|
|
]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-08-07 06:24:37 -07:00
|
|
|
horizontal: double; [[The horizontal alignment of the popup.]]
|
|
|
|
vertical: double; [[The vertical alignment of the popup.]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property allow_events {
|
2014-03-25 05:00:33 -07:00
|
|
|
set {
|
2015-08-07 06:24:37 -07:00
|
|
|
[[Sets whether events should be passed to by a click outside.
|
2014-03-25 05:00:33 -07:00
|
|
|
|
2015-08-07 06:24:37 -07:00
|
|
|
Enabling allow event will remove the Blocked event area and
|
|
|
|
events will pass to the lower layer objects otherwise they
|
|
|
|
are blocked.
|
2014-03-25 05:00:33 -07:00
|
|
|
|
2015-08-07 06:24:37 -07:00
|
|
|
Note: The default value is $false.
|
|
|
|
]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-08-07 06:24:37 -07:00
|
|
|
[[Returns value indicating whether allow event is enabled or not.]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-08-07 06:24:37 -07:00
|
|
|
allow: bool; [[If $true, events are passed to lower objects.]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property content_text_wrap_type {
|
2015-08-07 06:24:37 -07:00
|
|
|
[[Control the wrapping type of content text packed in content
|
2014-03-25 05:00:33 -07:00
|
|
|
area of popup object.
|
2015-08-07 06:24:37 -07:00
|
|
|
]]
|
|
|
|
set {}
|
|
|
|
get {}
|
2014-03-25 05:00:33 -07:00
|
|
|
values {
|
2015-08-07 06:24:37 -07:00
|
|
|
wrap: Elm.Wrap.Type; [[Wrapping type of type Elm_Wrap_Type.]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property orient {
|
2014-03-25 05:00:33 -07:00
|
|
|
set {
|
2015-08-07 06:24:37 -07:00
|
|
|
[[Sets the orientation of the popup in the parent region.
|
2014-03-25 05:00:33 -07:00
|
|
|
|
2015-08-07 06:24:37 -07:00
|
|
|
Sets the position in which popup will appear in its parent.
|
|
|
|
By default, #ELM_POPUP_ORIENT_CENTER is set.
|
|
|
|
]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-08-07 06:24:37 -07:00
|
|
|
[[Returns the orientation of the popup.]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-08-07 06:24:37 -07:00
|
|
|
orient: Elm.Popup.Orient; [[The orientation of the popup.]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property timeout {
|
2014-03-25 05:00:33 -07:00
|
|
|
set {
|
2015-08-07 06:24:37 -07:00
|
|
|
[[Sets a timeout to hide popup automatically
|
2014-03-25 05:00:33 -07:00
|
|
|
|
2015-08-07 06:24:37 -07:00
|
|
|
This function sets a timeout and starts the timer controlling
|
|
|
|
when the popup is hidden. Since calling \@ref 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.
|
2014-03-25 05:00:33 -07:00
|
|
|
|
2015-08-07 06:24:37 -07:00
|
|
|
Note: Set a value <= 0.0 to disable a running timer.
|
2014-03-25 05:00:33 -07:00
|
|
|
|
2015-08-07 06:24:37 -07:00
|
|
|
Note: If the value > 0.0 and the popup is previously visible,
|
|
|
|
the timer will be started with this value, canceling any
|
|
|
|
running timer.
|
|
|
|
]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-08-07 06:24:37 -07:00
|
|
|
[[Returns the timeout value set to the popup (in seconds).]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-08-07 06:24:37 -07:00
|
|
|
timeout: double; [[The timeout in seconds.]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
}
|
2015-08-15 08:32:33 -07:00
|
|
|
@property scrollable {
|
|
|
|
set {
|
|
|
|
[[Enable or disable scroller in popup content area
|
|
|
|
|
|
|
|
Normally content area does not contain scroller.
|
|
|
|
|
2015-08-17 09:22:14 -07:00
|
|
|
@since 1.15.1
|
2015-08-15 08:32:33 -07:00
|
|
|
]]
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
[[Get the scrollable state of popup content area
|
|
|
|
|
|
|
|
Normally content area does not contain scroller.
|
|
|
|
|
2015-08-17 09:22:14 -07:00
|
|
|
@since 1.15.1
|
2015-08-15 08:32:33 -07:00
|
|
|
]]
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
scroll: bool; [[$true if it is to be scrollable, $false otherwise.]]
|
|
|
|
}
|
|
|
|
}
|
2014-03-25 05:00:33 -07:00
|
|
|
item_append {
|
2015-08-07 06:24:37 -07:00
|
|
|
[[Add a new item to a Popup object
|
2014-03-25 05:00:33 -07:00
|
|
|
|
2015-08-07 06:24:37 -07:00
|
|
|
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.
|
2014-03-25 05:00:33 -07:00
|
|
|
|
2015-08-07 06:24:37 -07:00
|
|
|
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.
|
|
|
|
]]
|
2016-05-23 07:41:28 -07:00
|
|
|
return: Elm.Widget.Item; [[A handle to the item added or $null on errors.]]
|
2014-03-25 05:00:33 -07:00
|
|
|
params {
|
2016-05-31 08:02:26 -07:00
|
|
|
@in label: string; [[The Label of the new item.]]
|
2016-06-20 21:26:15 -07:00
|
|
|
@in icon: Efl.Canvas.Object @optional; [[Icon to be set on new item.]]
|
2015-08-07 06:24:37 -07:00
|
|
|
@in func: Evas_Smart_Cb @optional; [[Convenience function called when item selected.]]
|
2016-06-02 04:54:59 -07:00
|
|
|
@in data: const(void_ptr) @optional; [[Data passed to $func above.]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
}
|
2015-12-30 20:08:28 -08:00
|
|
|
dismiss {
|
2016-01-06 09:39:48 -08:00
|
|
|
[[Dismiss a Popup object.
|
|
|
|
@since 1.17
|
|
|
|
]]
|
2015-12-30 20:08:28 -08:00
|
|
|
}
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
implements {
|
2014-06-20 02:47:39 -07:00
|
|
|
class.constructor;
|
2016-08-10 07:23:04 -07:00
|
|
|
Efl.Object.constructor;
|
2015-04-22 04:33:10 -07:00
|
|
|
Elm.Widget.theme_apply;
|
2017-08-23 23:31:05 -07:00
|
|
|
Elm.Widget.on_access_update;
|
2016-12-27 10:15:41 -08:00
|
|
|
Elm.Widget.widget_parent { set; }
|
2017-09-21 23:13:16 -07:00
|
|
|
Efl.Ui.Translatable.translation_update;
|
2017-08-23 04:41:37 -07:00
|
|
|
Elm.Widget.widget_sub_object_del;
|
2017-01-01 23:48:17 -08:00
|
|
|
Elm.Widget.widget_event;
|
2017-08-03 01:24:50 -07:00
|
|
|
Efl.Canvas.Layout_Signal.signal_emit;
|
2017-11-15 18:31:26 -08:00
|
|
|
Efl.Access.Widget.Action.elm_actions { get; }
|
2017-10-18 18:13:54 -07:00
|
|
|
Efl.Access.state_set { get; }
|
2017-11-13 16:52:46 -08:00
|
|
|
Efl.Access.name { get; }
|
2016-05-24 04:40:18 -07:00
|
|
|
Efl.Part.part;
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
events {
|
2016-11-21 08:58:40 -08:00
|
|
|
block,clicked; [[Called when popup was clicked]]
|
|
|
|
timeout; [[Called when popup timed out]]
|
|
|
|
item,focused; [[Called when popup got focus]]
|
|
|
|
item,unfocused; [[Called when popup lost focus]]
|
|
|
|
dismissed; [[Called when popup was dismissed]]
|
2014-03-25 05:00:33 -07:00
|
|
|
}
|
|
|
|
}
|