efl/src/lib/elementary/elm_menu.eo

107 lines
3.4 KiB
Plaintext

class Elm.Menu (Efl.Ui.Widget, Efl.Ui.Clickable,
Efl.Access.Selection, Efl.Ui.Widget_Focus_Manager, Efl.Ui.Legacy)
{
[[Elementary menu class]]
legacy_prefix: elm_menu;
eo_prefix: elm_obj_menu;
event_prefix: elm_menu;
methods {
@property selected_item {
get {
[[Get the selected item in the widget.]]
}
values {
item: Elm.Widget.Item; [[The selected item or $null.]]
}
}
@property first_item {
get {
[[Get the first item in the widget.]]
}
values {
item: Elm.Widget.Item; [[The first item or $null.]]
}
}
@property last_item {
get {
[[Get the last item in the widget.]]
}
values {
item: Elm.Widget.Item; [[The last item or $null.]]
}
}
@property items {
get {
[[Returns a list of the widget item.]]
return: const(list<Elm.Widget.Item>); [[const list to widget items]]
}
}
relative_move {
[[Move the menu to a new position
Sets the top-left position of the menu to ($x, $y).
Note: $x and $y coordinates are relative to parent.
]]
legacy: elm_menu_move;
params {
@in x: int; [[The new X coordinate]]
@in y: int; [[The new Y coordinate]]
}
}
item_add {
[[Add an item at the end of the given menu widget.
Note: This function does not accept relative icon path.
]]
return: Elm.Widget.Item; [[The new menu item.]]
params {
@in parent: Elm.Widget.Item @optional; [[The parent menu item (optional).]]
@in icon: string @optional; [[An icon display on the item. The icon will be destroyed by the menu.]]
@in label: string; [[The label of the item.]]
@in func: Evas_Smart_Cb @optional; [[Function called when the user select the item.]]
@in data: const(void_ptr) @optional; [[Data sent by the callback.]]
}
}
open {
[[Open a closed menu
Show the menu with no child sub-menus expanded..
]]
}
close {
[[Close a opened menu
Hides the menu and all it's sub-menus.
]]
}
item_separator_add {
[[Add a separator item to menu $obj under $parent.]]
return: Elm.Widget.Item; [[The created item or $null.]]
params {
@in parent: Elm.Widget.Item; [[The item to add the separator under.]]
}
}
}
implements {
class.constructor;
Efl.Object.constructor;
Efl.Object.destructor;
Efl.Gfx.Entity.visible { set; }
Efl.Ui.Widget.widget_parent { get; set; }
Efl.Ui.Widget.theme_apply;
Efl.Ui.L10n.translation_update;
Efl.Ui.Widget_Focus_Manager.focus_manager_create;
Efl.Access.Object.access_children { get; }
Efl.Access.Selection.selected_children_count { get; }
Efl.Access.Selection.selected_child { get; }
Efl.Object.provider_find;
}
events {
dismissed: void; [[Called when menu widget was dismissed]]
/* FIXME: Nobody is emitting this, but they are already in use */
elm,action,block_menu: void; [[Called when menu blocking have been enabled]]
elm,action,unblock_menu: void; [[Called when menu blocking has been disabled]]
}
}