Macros | |
#define | ELM_MENU_CLASS elm_menu_class_get() |
Elementary menu class. | |
#define | ELM_MENU_EVENT_DISMISSED (&(_ELM_MENU_EVENT_DISMISSED)) |
Called when menu widget was dismissed. | |
#define | ELM_MENU_EVENT_ELM_ACTION_BLOCK_MENU (&(_ELM_MENU_EVENT_ELM_ACTION_BLOCK_MENU)) |
Called when menu blocking have been enabled. | |
#define | ELM_MENU_EVENT_ELM_ACTION_UNBLOCK_MENU (&(_ELM_MENU_EVENT_ELM_ACTION_UNBLOCK_MENU)) |
Called when menu blocking has been disabled. | |
Functions | |
EOAPI void | elm_obj_menu_move (Eo *obj, int x, int y) |
Move the menu to a new position. More... | |
EOAPI Elm_Widget_Item * | elm_obj_menu_item_add (Eo *obj, Elm_Widget_Item *parent, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) |
Add an item at the end of the given menu widget. More... | |
EOAPI void | elm_obj_menu_open (Eo *obj) |
Open a closed menu. More... | |
EOAPI void | elm_obj_menu_close (Eo *obj) |
Close a opened menu. More... | |
EOAPI Elm_Widget_Item * | elm_obj_menu_item_separator_add (Eo *obj, Elm_Widget_Item *parent) |
Add a separator item to menu obj under parent . More... | |
void | elm_menu_move (Elm_Menu *obj, int x, int y) |
Move the menu to a new position. More... | |
Elm_Widget_Item * | elm_menu_item_add (Elm_Menu *obj, Elm_Widget_Item *parent, const char *icon, const char *label, Evas_Smart_Cb func, const void *data) |
Add an item at the end of the given menu widget. More... | |
void | elm_menu_open (Elm_Menu *obj) |
Open a closed menu. More... | |
void | elm_menu_close (Elm_Menu *obj) |
Close a opened menu. More... | |
Elm_Widget_Item * | elm_menu_item_separator_add (Elm_Menu *obj, Elm_Widget_Item *parent) |
Add a separator item to menu obj under parent . More... | |
Evas_Object * | elm_menu_add (Evas_Object *parent) |
Add a new menu to the parent. More... | |
void | elm_menu_parent_set (Evas_Object *obj, Evas_Object *parent) |
Set the parent for the given menu widget. More... | |
Evas_Object * | elm_menu_parent_get (const Evas_Object *obj) |
Get the parent for the given menu widget. More... | |
Elm_Widget_Item * | elm_menu_selected_item_get (const Evas_Object *obj) |
Get the selected item in the menu. More... | |
const Eina_List * | elm_menu_items_get (const Evas_Object *obj) |
Returns a list of the item's items. | |
Elm_Widget_Item * | elm_menu_first_item_get (const Evas_Object *obj) |
Get the first item in the menu. | |
Elm_Widget_Item * | elm_menu_last_item_get (const Evas_Object *obj) |
Get the last item in the menu. | |
A menu is a list of items displayed above its parent. When the menu is showing its parent is darkened. Each item can have a sub-menu. The menu object can be used to display a menu on a right click event, in a toolbar, anywhere.
Signals that you can add callbacks for are:
"clicked"
- the user clicked the empty space in the menu to dismiss. "dismissed"
- the user clicked the empty space in the menu to dismiss (since 1.8) "language,changed"
- the program's language changed (since 1.9)Default content parts of the menu items that you can use for are:
"default"
- A main content of the menu itemDefault text parts of the menu items that you can use for are:
"default"
- A label in the menu itemSupported elm_object_item common APIs.
EOAPI void elm_obj_menu_move | ( | Eo * | obj, |
int | x, | ||
int | y | ||
) |
Move the menu to a new position.
Sets the top-left position of the menu to ($x, y
).
x
and y
coordinates are relative to parent.[in] | x | The new X coordinate |
[in] | y | The new Y coordinate |
Referenced by elm_menu_move().
EOAPI Elm_Widget_Item* elm_obj_menu_item_add | ( | Eo * | obj, |
Elm_Widget_Item * | parent, | ||
const char * | icon, | ||
const char * | label, | ||
Evas_Smart_Cb | func, | ||
const void * | data | ||
) |
Add an item at the end of the given menu widget.
[in] | parent | The parent menu item (optional). |
[in] | icon | An icon display on the item. The icon will be destroyed by the menu. |
[in] | label | The label of the item. |
[in] | func | Function called when the user select the item. |
[in] | data | Data sent by the callback. |
Referenced by elm_menu_item_add().
EOAPI void elm_obj_menu_open | ( | Eo * | obj | ) |
EOAPI void elm_obj_menu_close | ( | Eo * | obj | ) |
EOAPI Elm_Widget_Item* elm_obj_menu_item_separator_add | ( | Eo * | obj, |
Elm_Widget_Item * | parent | ||
) |
Add a separator item to menu obj
under parent
.
[in] | parent | The item to add the separator under. |
null
. Referenced by elm_menu_item_separator_add().
void elm_menu_move | ( | Elm_Menu * | obj, |
int | x, | ||
int | y | ||
) |
Move the menu to a new position.
Sets the top-left position of the menu to ($x, y
).
x
and y
coordinates are relative to parent.[in] | x | The new X coordinate |
[in] | y | The new Y coordinate |
References elm_obj_menu_move().
Elm_Widget_Item* elm_menu_item_add | ( | Elm_Menu * | obj, |
Elm_Widget_Item * | parent, | ||
const char * | icon, | ||
const char * | label, | ||
Evas_Smart_Cb | func, | ||
const void * | data | ||
) |
Add an item at the end of the given menu widget.
[in] | parent | The parent menu item (optional). |
[in] | icon | An icon display on the item. The icon will be destroyed by the menu. |
[in] | label | The label of the item. |
[in] | func | Function called when the user select the item. |
[in] | data | Data sent by the callback. |
References elm_obj_menu_item_add().
void elm_menu_open | ( | Elm_Menu * | obj | ) |
Open a closed menu.
Show the menu with no child sub-menus expanded..
References elm_obj_menu_open().
void elm_menu_close | ( | Elm_Menu * | obj | ) |
Elm_Widget_Item* elm_menu_item_separator_add | ( | Elm_Menu * | obj, |
Elm_Widget_Item * | parent | ||
) |
Add a separator item to menu obj
under parent
.
[in] | parent | The item to add the separator under. |
null
. References elm_obj_menu_item_separator_add().
Evas_Object* elm_menu_add | ( | Evas_Object * | parent | ) |
Add a new menu to the parent.
parent | The parent object. |
Referenced by elm_win_main_menu_get().
void elm_menu_parent_set | ( | Evas_Object * | obj, |
Evas_Object * | parent | ||
) |
Set the parent for the given menu widget.
obj | The menu object. |
parent | The new parent. |
References eina_list_append(), EINA_LIST_FOREACH, eina_list_free(), elm_hover_parent_set(), EVAS_CALLBACK_DEL, EVAS_CALLBACK_RESIZE, evas_object_event_callback_add(), and evas_object_event_callback_del_full().
Evas_Object* elm_menu_parent_get | ( | const Evas_Object * | obj | ) |
Get the parent for the given menu widget.
obj | The menu object. |
Elm_Widget_Item* elm_menu_selected_item_get | ( | const Evas_Object * | obj | ) |
Get the selected item in the menu.
null
.