JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::PopupMenu::MenuItemIterator Class Reference

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

#include "juce_PopupMenu.h"

Public Member Functions

 MenuItemIterator (const PopupMenu &menu, bool searchRecursively=false)
 Creates an iterator that will scan through the items in the specified menu.
 
 ~MenuItemIterator ()
 Destructor.
 
bool next ()
 Returns true if there is another item, and sets up all this object's member variables to reflect that item's properties.
 
ItemgetItem () const
 Returns a reference to the description of the current item.
 

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.

Definition at line 800 of file juce_PopupMenu.h.

Constructor & Destructor Documentation

◆ MenuItemIterator()

juce::PopupMenu::MenuItemIterator::MenuItemIterator ( const PopupMenu menu,
bool  searchRecursively = false 
)

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.

Parameters
menuthe menu that needs to be scanned
searchRecursivelyif true, all submenus will be recursed into to do an exhaustive search

Definition at line 2337 of file juce_PopupMenu.cpp.

Member Function Documentation

◆ getItem()

PopupMenu::Item & juce::PopupMenu::MenuItemIterator::getItem ( ) const

Returns a reference to the description of the current item.

It is only valid to call this after next() has returned true!

Definition at line 2374 of file juce_PopupMenu.cpp.

◆ next()

bool juce::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.

Definition at line 2345 of file juce_PopupMenu.cpp.


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