2015-07-06 02:21:26 -07:00
|
|
|
enum Elm.Ctxpopup.Direction
|
|
|
|
{
|
2015-07-08 07:49:38 -07:00
|
|
|
[[Direction in which to show the popup.]]
|
2015-07-06 02:21:26 -07:00
|
|
|
down, [[Ctxpopup show appear below clicked area.]]
|
|
|
|
right, [[Ctxpopup show appear to the right of the clicked area.]]
|
|
|
|
left, [[Ctxpopup show appear to the left of the clicked area.]]
|
|
|
|
up, [[Ctxpopup show appear above the clicked area.]]
|
|
|
|
unknown [[Ctxpopup does not determine it's direction yet.]]
|
|
|
|
}
|
|
|
|
|
2017-08-07 19:48:31 -07:00
|
|
|
class Elm.Ctxpopup (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action,
|
2017-08-09 22:55:30 -07:00
|
|
|
Efl.Ui.Menu)
|
2014-03-20 06:06:33 -07:00
|
|
|
{
|
2016-11-21 08:55:43 -08:00
|
|
|
[[Elementary context popup class]]
|
2016-05-12 09:06:04 -07:00
|
|
|
legacy_prefix: elm_ctxpopup;
|
2014-03-20 06:06:33 -07:00
|
|
|
eo_prefix: elm_obj_ctxpopup;
|
2016-05-17 09:14:47 -07:00
|
|
|
event_prefix: elm_ctxpopup;
|
2015-05-07 09:32:53 -07:00
|
|
|
methods {
|
2017-08-09 22:55:30 -07:00
|
|
|
@property horizontal {
|
|
|
|
set {
|
|
|
|
[[Change the ctxpopup's orientation to horizontal or vertical.]]
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
[[Get the value of current ctxpopup object's orientation.
|
|
|
|
|
|
|
|
See also @.horizontal.set.
|
|
|
|
]]
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
horizontal: bool; [[$true for horizontal mode, $false for vertical.]]
|
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property auto_hide_disabled {
|
2014-03-20 06:06:33 -07:00
|
|
|
set {
|
2015-07-27 02:18:37 -07:00
|
|
|
[[Set ctxpopup auto hide mode triggered by ctxpopup policy.
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
Use this function when user wants ctxpopup not to hide automatically.
|
|
|
|
By default, ctxpopup is dismissed whenever mouse clicked its background area, language is changed,
|
|
|
|
and its parent geometry is updated(changed).
|
|
|
|
Not to hide ctxpopup automatically, disable auto hide function by calling this API,
|
|
|
|
then ctxpopup won't be dismissed in those scenarios.
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
Default value of disabled is $false.
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
See also @.auto_hide_disabled.get.
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
@since 1.9
|
|
|
|
]]
|
2014-03-20 06:06:33 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-27 02:18:37 -07:00
|
|
|
[[Get ctxpopup auto hide mode triggered by ctxpopup policy.
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
See also @.auto_hide_disabled.set for more information.
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
@since 1.9
|
|
|
|
]]
|
2014-03-20 06:06:33 -07:00
|
|
|
}
|
|
|
|
values {
|
2016-11-21 08:55:43 -08:00
|
|
|
disabled: bool; [[Auto hide enable/disable.]]
|
2014-03-20 06:06:33 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property hover_parent {
|
2014-03-20 06:06:33 -07:00
|
|
|
set {
|
2015-07-27 02:18:37 -07:00
|
|
|
[[Set the Ctxpopup's parent
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
Set the parent object.
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
Note: \@ref elm_ctxpopup_add will automatically call this function
|
|
|
|
with its $parent argument.
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
See also \@ref elm_ctxpopup_add,
|
|
|
|
\@ref elm_hover_parent_set.
|
|
|
|
]]
|
2014-03-20 06:06:33 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-27 02:18:37 -07:00
|
|
|
[[Get the Ctxpopup's parent
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
See also @.hover_parent.set for more information
|
|
|
|
]]
|
2014-03-20 06:06:33 -07:00
|
|
|
}
|
|
|
|
values {
|
2016-06-20 21:26:15 -07:00
|
|
|
parent: Efl.Canvas.Object; [[The parent to use.]]
|
2014-03-20 06:06:33 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property direction_priority {
|
2014-03-20 06:06:33 -07:00
|
|
|
set {
|
2015-07-27 02:18:37 -07:00
|
|
|
[[Set the direction priority of a ctxpopup.
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
This functions gives a chance to user to set the priority of ctxpopup
|
|
|
|
showing direction. This doesn't guarantee the ctxpopup will appear in the
|
|
|
|
requested direction.
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
See also @.Direction.
|
|
|
|
]]
|
2014-03-20 06:06:33 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-27 02:18:37 -07:00
|
|
|
[[Get the direction priority of a ctxpopup.
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
See also @.direction_priority.set for more information.
|
|
|
|
]]
|
2014-03-20 06:06:33 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-07-27 02:18:37 -07:00
|
|
|
first: Elm.Ctxpopup.Direction; [[1st priority of direction]]
|
|
|
|
second: Elm.Ctxpopup.Direction; [[2nd priority of direction]]
|
|
|
|
third: Elm.Ctxpopup.Direction; [[3th priority of direction]]
|
|
|
|
fourth: Elm.Ctxpopup.Direction; [[4th priority of direction]]
|
2014-03-20 06:06:33 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property direction {
|
2014-03-20 06:06:33 -07:00
|
|
|
get {
|
2015-07-27 02:18:37 -07:00
|
|
|
[[Get the current direction of a ctxpopup.
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
Warning: Once the ctxpopup showed up, the direction would be determined
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
]]
|
2016-11-21 08:55:43 -08:00
|
|
|
return: Elm.Ctxpopup.Direction(Elm.Ctxpopup.Direction.unknown); [[Direction]]
|
2014-03-20 06:06:33 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
dismiss {
|
2015-07-27 02:18:37 -07:00
|
|
|
[[Dismiss a ctxpopup object
|
2014-03-20 06:06:33 -07:00
|
|
|
|
|
|
|
Use this function to simulate clicking outside of the ctxpopup to dismiss it.
|
|
|
|
In this way, the ctxpopup will be hidden and the "clicked" signal will be
|
2015-07-27 02:18:37 -07:00
|
|
|
emitted.]]
|
2014-03-20 06:06:33 -07:00
|
|
|
|
|
|
|
}
|
|
|
|
clear {
|
2015-07-27 02:18:37 -07:00
|
|
|
[[Clear all items in the given ctxpopup object.]]
|
2014-03-20 06:06:33 -07:00
|
|
|
}
|
2017-08-09 22:12:08 -07:00
|
|
|
item_insert_before {
|
|
|
|
[[Insert a new item to a ctxpopup object before item $before.
|
|
|
|
|
|
|
|
See also elm_object_content_set.
|
|
|
|
|
|
|
|
@since 1.21
|
|
|
|
]]
|
|
|
|
return: Elm.Widget.Item; [[A handle to the item added or $null, on errors.]]
|
|
|
|
|
|
|
|
params {
|
|
|
|
@in before: Elm.Widget.Item; [[The ctxpopup item to insert before.]]
|
|
|
|
@in label: string; [[The Label of the new item]]
|
|
|
|
@in icon: Efl.Canvas.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_ptr) @optional; [[Data passed to $func]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
item_insert_after {
|
|
|
|
[[Insert a new item to a ctxpopup object after item $after.
|
|
|
|
|
|
|
|
See also elm_object_content_set.
|
|
|
|
|
|
|
|
@since 1.21
|
|
|
|
]]
|
|
|
|
return: Elm.Widget.Item; [[A handle to the item added or $null, on errors.]]
|
|
|
|
|
|
|
|
params {
|
|
|
|
@in after: Elm.Widget.Item; [[The ctxpopup item to insert after.]]
|
|
|
|
@in label: string; [[The Label of the new item]]
|
|
|
|
@in icon: Efl.Canvas.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_ptr) @optional; [[Data passed to $func]]
|
|
|
|
}
|
|
|
|
}
|
2014-03-20 06:06:33 -07:00
|
|
|
item_append {
|
2015-07-27 02:18:37 -07:00
|
|
|
[[Add a new item to a ctxpopup object.
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
Warning:Ctxpopup can't hold both an item list and a content at the same
|
|
|
|
time. When an item is added, any previous content will be removed.
|
2014-03-20 06:06:33 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
See also \@ref elm_object_content_set.
|
|
|
|
]]
|
2016-05-23 07:41:28 -07:00
|
|
|
return: Elm.Widget.Item; [[A handle to the item added or $null, on errors.]]
|
2014-03-20 06:06: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-07-27 02:18: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]]
|
2014-07-03 04:05:28 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
item_prepend {
|
2015-07-27 02:18:37 -07:00
|
|
|
[[Prepend a new item to a ctxpopup object.
|
2014-07-03 04:05:28 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
Warning: Ctxpopup can't hold both an item list and a content at the same
|
|
|
|
time. When an item is added, any previous content will be removed.
|
2014-07-03 04:05:28 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
See also \@ref elm_object_content_set.
|
2014-07-03 04:05:28 -07:00
|
|
|
|
2015-07-27 02:18:37 -07:00
|
|
|
@since 1.11
|
|
|
|
]]
|
2016-05-23 07:41:28 -07:00
|
|
|
return: Elm.Widget.Item; [[A handle to the item added or $null, on errors.]]
|
2014-07-03 04:05:28 -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-07-27 02:18: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]]
|
2014-03-20 06:06: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;
|
2016-12-27 10:15:41 -08:00
|
|
|
Elm.Widget.widget_parent { set; }
|
2015-04-22 04:33:10 -07:00
|
|
|
Elm.Widget.focus_direction;
|
|
|
|
Elm.Widget.focus_direction_manager_is;
|
|
|
|
Elm.Widget.focus_next_manager_is;
|
|
|
|
Elm.Widget.focus_next;
|
2017-08-23 22:06:32 -07:00
|
|
|
Elm.Widget.on_disabled_update;
|
2017-08-23 04:41:37 -07:00
|
|
|
Elm.Widget.widget_sub_object_add;
|
2015-04-22 04:33:10 -07:00
|
|
|
Elm.Widget.translate;
|
|
|
|
Elm.Widget.theme_apply;
|
2017-01-01 23:48:17 -08:00
|
|
|
Elm.Widget.widget_event;
|
2016-12-27 10:15:41 -08:00
|
|
|
Efl.Ui.Menu.selected_item { get; }
|
|
|
|
Efl.Ui.Menu.first_item { get; }
|
|
|
|
Efl.Ui.Menu.last_item { get; }
|
|
|
|
Efl.Ui.Menu.items { get; }
|
|
|
|
Elm.Interface.Atspi_Widget_Action.elm_actions { get; }
|
|
|
|
Elm.Interface.Atspi_Accessible.state_set { get; }
|
2016-05-24 04:40:18 -07:00
|
|
|
Efl.Part.part;
|
2014-03-20 06:06:33 -07:00
|
|
|
}
|
|
|
|
events {
|
2016-11-21 08:55:43 -08:00
|
|
|
dismissed; [[Called when context popup was dismissed]]
|
2017-09-13 19:59:44 -07:00
|
|
|
geometry,update: const(ptr(Eina.Rect)); [[Called when context popup geometry was updated]]
|
2014-03-20 06:06:33 -07:00
|
|
|
}
|
|
|
|
}
|