Menu
This page has been automatically translated using the Google Translate API services. We are working on improving texts. Thank you for your understanding and patience.
Functions
Menu* | menu_create (void) |
void | menu_destroy (...) |
void | menu_launch (...) |
void | menu_hide (...) |
void | menu_item (...) |
void | menu_off_items (...) |
MenuItem* | menu_get_item (...) |
uint32_t | menu_size (...) |
A Menu is nothing more than a container (or window) that integrates a series of options, also called items or MenuItems (Figure 1). Each one of them have a short text, optionally an icon and optionally also a keyboard shortcut, such as the classic Ctrl+C/Ctrl+V
to copy and paste. Additionally, an item can house a submenu forming a hierarchy with different levels of depth. In Products you have a sample application that uses menus.
The concept of the menu, like that of the window, exists from the origin of the graphic interfaces. The first computer to incorporate them was the Xerox Alto that appeared in 1973 and its commercial successor the Xerox Star. Concepts still very alive today such as: Menu, Window, Icon, Desk, or Mouse were already present on these computers that served as inspiration to Steve Jobs in the creation of Apple Lisa (Figure 2), predecessor of Machintosh and inspirer of Microsoft Windows.
menu_create ()
Create a new menu.
Menu* menu_create(void);
Return
The new menu.
menu_destroy ()
Destroy a menu and its entire hierarchy.
void menu_destroy(Menu **menu);
menu | The menu. Will be set to |
menu_launch ()
Launch a menu as secondary or PopUp.
void menu_launch(Menu *menu, const V2Df position);
menu | The menu. |
position | Coordinates of the upper left corner. |
menu_hide ()
Hides a secondary PopUp menu.
void menu_hide(Menu *menu);
menu | The menu. |
menu_item ()
Add an item to the menu.
void menu_item(Menu *menu, MenuItem *item);
menu | The menu. |
item | The item to add. |
menu_off_items ()
Set status ekGUI_OFF for all menu items.
void menu_off_items(Menu *menu);
menu | The menu. |
menu_get_item ()
Get an item from the menu.
MenuItem* menu_get_item(Menu *menu, const uint32_t index);
menu | The menu. |
index | The index of the item. |
Return
The item.
menu_size ()
Gets the number of items.
uint32_t menu_size(const Menu *menu);
menu | The menu. |
Return
Number of items.