|
#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.
|
|
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 item
Default text parts of the menu items that you can use for are:
"default"
- A label in the menu item
Supported elm_object_item common APIs.
- See also
- Menu Example
◆ elm_obj_menu_selected_item_get()
Get the selected item in the widget.
- Parameters
-
- Returns
- The selected item or
null
.
◆ elm_obj_menu_first_item_get()
Get the first item in the widget.
- Parameters
-
- Returns
- The first item or
null
.
◆ elm_obj_menu_last_item_get()
Get the last item in the widget.
- Parameters
-
- Returns
- The last item or
null
.
◆ elm_obj_menu_items_get()
EOAPI const Eina_List * elm_obj_menu_items_get |
( |
const Eo * |
obj | ) |
|
Returns a list of the widget item.
- Parameters
-
- Returns
- const list to widget items
◆ elm_obj_menu_relative_move()
EOAPI void elm_obj_menu_relative_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
).
- Note
x
and y
coordinates are relative to parent.
- Parameters
-
[in] | obj | The object. |
[in] | x | The new X coordinate |
[in] | y | The new Y coordinate |
◆ elm_obj_menu_item_add()
Add an item at the end of the given menu widget.
- Note
- This function does not accept relative icon path.
- Parameters
-
[in] | obj | The object. |
[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. |
- Returns
- The new menu item.
◆ elm_obj_menu_open()
EOAPI void elm_obj_menu_open |
( |
Eo * |
obj | ) |
|
Open a closed menu.
Show the menu with no child sub-menus expanded..
- Parameters
-
◆ elm_obj_menu_close()
EOAPI void elm_obj_menu_close |
( |
Eo * |
obj | ) |
|
Close a opened menu.
Hides the menu and all it's sub-menus.
- Parameters
-
◆ elm_obj_menu_item_separator_add()
Add a separator item to menu obj
under parent
.
- Parameters
-
[in] | obj | The object. |
[in] | parent | The item to add the separator under. |
- Returns
- The created item or
null
.
◆ elm_menu_add()
◆ elm_menu_parent_set()
Set the parent for the given menu widget.
- Parameters
-
obj | The menu object. |
parent | The new parent. |
◆ elm_menu_parent_get()