Menu¶
Inherited: None
Description¶
The Menu class represents a graphical user interface (GUI) menu that contains a list of options or actions that users can select. It provides a way to organize and display commands or choices in a structured manner, typically within a dropdown or context menu format. Menus are essential in GUI design for providing users with accessible options and actions within an application.
Public Methods¶
Static Methods¶
None
Methods Description¶
void Menu::addSection (TString & text)
Adds a section to the menu with the specified text.
void Menu::addWidget (Widget * widget)
Adds a widget to the menu.
void Menu::hide ()
Hides the menu.
TString Menu::itemText (int index)
Returns the text of the item at the specified index.
Frame * Menu::selected () const
Returns the selection frame for the menu;
See also setSelected().
void Menu::setSelected (Frame * frame)
Sets the selection frame for the menu;
See also selected().
void Menu::setTitle (TString & title)
Sets the title of the menu.
See also title().
void Menu::show (Vector2 & position)
Displays the menu at the specified position.
TString Menu::title () const
Returns the title of the menu.
See also setTitle().