summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_menu.eo
blob: a82a82ece6a2ea7102b269f7f14d99538d0e1504 (plain)
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
class Elm.Menu (Elm.Widget, Evas.Clickable_Interface, Elm.Interface.Atspi.Selection)
{
   legacy_prefix: elm_menu;
   eo_prefix: elm_obj_menu;
   methods {
      @property selected_item {
         get {
            [[Get the selected item in the menu.]]
            return: Elm.Widget.Item *; [[The selected item or $null.]]
         }
      }
      @property items {
         get {
            [[Returns a list of the item's items.]]
            return: const(list<Elm.Widget.Item *>)*;
         }
      }
      @property first_item {
         get {
            [[Get the first item in the menu.]]
            return: Elm.Widget.Item *;
         }
      }
      @property last_item {
         get {
            [[Get the last item in the menu.]]
            return: Elm.Widget.Item *;
         }
      }
      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.
         ]]
         params {
            @in x: Evas.Coord; [[The new position.]]
            @in y: Evas.Coord; [[The new position.]]
         }
      }
      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: const(char)* @optional; [[An icon display on the item. The icon will be destroyed by the menu.]]
            @in label: const(char)*; [[The label of the item.]]
            @in func: Evas_Smart_Cb @optional; [[Function called when the user select the item.]]
            @in data: const(void)* @optional; [[Data sent by the callback.]]
         }
      }
      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;
      Eo.Base.constructor;
      Eo.Base.destructor;
      Evas.Object.Smart.show;
      Evas.Object.Smart.add;
      Evas.Object.Smart.del;
      Elm.Widget.widget_parent;
      Elm.Widget.theme_apply;
      Elm.Widget.translate;
      Elm.Interface.Atspi_Accessible.children.get;
      Elm.Interface.Atspi.Selection.selected_children_count.get;
      Elm.Interface.Atspi.Selection.selected_child.get;
   }
   events {
      dismissed;
      elm,action,block_menu;
      elm,action,unblock_menu;
   }

}