JUCE
|
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... | |
const Item & | getItem () const noexcept |
Returns a reference to the description of the current item. More... | |
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.
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.
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.
|
noexcept |
Returns a reference to the description of the current item.
It is only valid to call this after next() has returned true!