summaryrefslogtreecommitdiff
path: root/src/lib/elm_menu.eo
blob: 6bac7d08c05ad7d79f851ea95cef04d35cbc9076 (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
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
class Elm_Menu (Elm_Widget, Evas.Clickable_Interface)
{
   eo_prefix: elm_obj_menu;
   properties {
      selected_item {
         get {
            /*@
            @brief Get the selected item in the menu

            @return The selected item, or NULL if none

            @see elm_menu_item_selected_get()
            @see elm_menu_item_selected_set()

            @ingroup Menu */
            return Elm_Object_Item *;
         }
      }
      items {
         get {
            /*@
            @brief Returns a list of @p item's items.

            @return An Eina_List* of @p item's items

            @ingroup Menu */
            return const Eina_List *;
         }
      }
      first_item {
         get {
            /*@
            @brief Get the first item in the menu

            @return The first item, or NULL if none

            @ingroup Menu */
            return Elm_Object_Item *;
         }
      }
      last_item {
         get {
            /*@
            @brief Get the last item in the menu

            @return The last item, or NULL if none

            @ingroup Menu */
            return Elm_Object_Item *;
         }
      }
   }
   methods {
      move {
         /*@
         @brief Move the menu to a new position

         Sets the top-left position of the menu to (@p x,@p y).

         @note @p x and @p y coordinates are relative to parent.

         @ingroup Menu */

         params {
            @in Evas_Coord x; /*@ The new position. */
            @in Evas_Coord y; /*@ The new position. */
         }
      }
      item_add {
         /*@
         @brief Add an item at the end of the given menu widget

         @return Returns the new item.

         @note This function does not accept relative icon path.

         @ingroup Menu */

         return Elm_Object_Item *;
         params {
            @in Elm_Object_Item *parent; /*@ The parent menu item (optional) */
            @in const char *icon; /*@ An icon display on the item. The icon will be destroyed by the menu. */
            @in const char *label; /*@ The label of the item. */
            @in Evas_Smart_Cb func; /*@ Function called when the user select the item. */
            @in const void *data; /*@ Data sent by the callback. */
         }
      }
      close {
         /*@
         @brief Close a opened menu

         @return void

         Hides the menu and all it's sub-menus.

         @ingroup Menu */

      }
      item_separator_add {
         /*@
         @brief Add a separator item to menu @p obj under @p parent.

         @return The created item or NULL on failure

         This is item is a @ref Separator.

         @ingroup Menu */

         return Elm_Object_Item *;
         params {
            @in Elm_Object_Item *parent; /*@ The item to add the separator under */
         }
      }
   }
   implements {
      class.constructor;
      Eo.Base.constructor;
      Evas.Object_Smart.show;
      Evas.Object_Smart.add;
      Evas.Object_Smart.del;
      Elm_Widget.parent;
      Elm_Widget.theme_apply;
      Elm_Widget.translate;
   }
   events {
      language,changed;
      access,changed;
   }

}