JUCE
Public Member Functions | Public Attributes | List of all members
PopupMenu::MenuItemIterator Class Reference

Allows you to iterate through the items in a pop-up menu, and examine their properties. More...

Public Member Functions

 MenuItemIterator (const PopupMenu &menu)
 Creates an iterator that will scan through the items in the specified menu. More...
 
 ~MenuItemIterator ()
 Destructor. More...
 
bool next ()
 Returns true if there is another item, and sets up all this object's member variables to reflect that item's properties. More...
 
void addItemTo (PopupMenu &targetMenu)
 Adds an item to the target menu which has all the properties of this item. More...
 

Public Attributes

String itemName
 
const PopupMenusubMenu
 
int itemId
 
bool isSeparator
 
bool isTicked
 
bool isEnabled
 
bool isCustomComponent
 
bool isSectionHeader
 
const ColourcustomColour
 
const Drawableicon
 
ApplicationCommandManagercommandManager
 

Detailed Description

Allows you to iterate through the items in a pop-up menu, and examine their properties.

To use this, just create one and repeatedly call its next() method. When this returns true, all the member variables of the iterator are filled-out with information describing the menu item. When it returns false, the end of the list has been reached.

Constructor & Destructor Documentation

PopupMenu::MenuItemIterator::MenuItemIterator ( const PopupMenu menu)

Creates an iterator that will scan through the items in the specified menu.

Be careful not to add any items to a menu while it is being iterated, or things could get out of step.

PopupMenu::MenuItemIterator::~MenuItemIterator ( )

Destructor.

Member Function Documentation

bool PopupMenu::MenuItemIterator::next ( )

Returns true if there is another item, and sets up all this object's member variables to reflect that item's properties.

void PopupMenu::MenuItemIterator::addItemTo ( PopupMenu targetMenu)

Adds an item to the target menu which has all the properties of this item.

Member Data Documentation

String PopupMenu::MenuItemIterator::itemName
const PopupMenu* PopupMenu::MenuItemIterator::subMenu
int PopupMenu::MenuItemIterator::itemId
bool PopupMenu::MenuItemIterator::isSeparator
bool PopupMenu::MenuItemIterator::isTicked
bool PopupMenu::MenuItemIterator::isEnabled
bool PopupMenu::MenuItemIterator::isCustomComponent
bool PopupMenu::MenuItemIterator::isSectionHeader
const Colour* PopupMenu::MenuItemIterator::customColour
const Drawable* PopupMenu::MenuItemIterator::icon
ApplicationCommandManager* PopupMenu::MenuItemIterator::commandManager

The documentation for this class was generated from the following file: