ui::Menu Class Reference

Inheritance diagram for ui::Menu:

Inheritance graph
[legend]
Collaboration diagram for ui::Menu:

Collaboration graph
[legend]
List of all members.

Detailed Description

A menu which holds other MenuItems. Menus are added to the MenuBar, and display PopupMenu's with their children.
Note:
Note that MenuItems added to this Menu, are infact added to a PopupMenu, which is a child of this Menu. This process is invisible to the user.


Public Types

enum  PROPERTYCHANGES { SELECTED = 1, DESELECTED = 2 }

Public Member Functions

 Menu (const std::string &label)
 Menu (Icon *icon, const std::string &label)
void add (MenuItem *menuItem)
void remove (MenuItem *menuItem)
void setPopupMenuVisible (bool visible)
const PopupMenugetPopupMenu () const
bool isPopupMenuVisible () const
virtual bool canHoldPermanentFocus () const


Constructor & Destructor Documentation

ui::Menu::Menu const std::string &  label  ) 
 

Create a new menu with the given text.

Parameters:
str String to use as label for this Menu.


Member Function Documentation

void ui::Menu::add MenuItem menuItem  ) 
 

Add a MenuItem to this menu.

Parameters:
menuItem MenuItem to add to this Menu.

void ui::Menu::remove MenuItem menuItem  ) 
 

Removes a menuitem from this menu.

void ui::Menu::setPopupMenuVisible bool  visible  ) 
 

Set the visible state of the PopupMenu containing the MenuItems. This can be used to programatically set the visibility state of the PopupMenu.

const PopupMenu & ui::Menu::getPopupMenu  )  const
 

Returns the PopupMenu used by this Menu.

bool ui::Menu::isPopupMenuVisible  )  const
 

Returns the visibility state of the PopupMenu and thus the MenuItems contained by this Menu.

bool ui::Menu::canHoldPermanentFocus  )  const [virtual]
 

Returns wether or not this Component can be a permanent focus owner. This is true by default, except for things like MenuItems, where a menu is the permanent focus owner and a menuitem merely a focus owner.

Reimplemented from ui::MenuItem.


Generated on Mon Jun 20 19:41:50 2005 for UI by doxygen 1.3.1 using KingsTools