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.
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.
Create a new menu.
The new menu.
Destroy a menu and its entire hierarchy.
void menu_destroy(Menu **menu);
The menu. Will be set to
Launch a menu as secondary or PopUp.
Coordinates of the upper left corner.
Hides a secondary PopUp menu.
void menu_hide(Menu *menu);
Add an item to the menu.
The item to add.
Set status ekOFF for all menu items.
void menu_off_items(Menu *menu);
Get an item from the menu.
The index of the item.