Describes a popup menu item.  
 More...
#include <juce_PopupMenu.h>
|  | 
|  | Item () | 
|  | Creates a null item. 
 | 
|  | 
|  | Item (String text) | 
|  | Creates an item with the given text. 
 | 
|  | 
|  | Item (const Item &) | 
|  | 
| Item & | operator= (const Item &) | 
|  | 
|  | Item (Item &&) | 
|  | 
| Item & | operator= (Item &&) | 
|  | 
| Item & | setTicked (bool shouldBeTicked=true) &noexcept | 
|  | Sets the isTicked flag (and returns a reference to this item to allow chaining). 
 | 
|  | 
| Item & | setEnabled (bool shouldBeEnabled) &noexcept | 
|  | Sets the isEnabled flag (and returns a reference to this item to allow chaining). 
 | 
|  | 
| Item & | setAction (std::function< void()> action) &noexcept | 
|  | Sets the action property (and returns a reference to this item to allow chaining). 
 | 
|  | 
| Item & | setID (int newID) &noexcept | 
|  | Sets the itemID property (and returns a reference to this item to allow chaining). 
 | 
|  | 
| Item & | setColour (Colour) &noexcept | 
|  | Sets the colour property (and returns a reference to this item to allow chaining). 
 | 
|  | 
| Item & | setCustomComponent (ReferenceCountedObjectPtr< CustomComponent > customComponent) &noexcept | 
|  | Sets the customComponent property (and returns a reference to this item to allow chaining). 
 | 
|  | 
| Item & | setImage (std::unique_ptr< Drawable >) &noexcept | 
|  | Sets the image property (and returns a reference to this item to allow chaining). 
 | 
|  | 
| Item && | setTicked (bool shouldBeTicked=true) &&noexcept | 
|  | Sets the isTicked flag (and returns a reference to this item to allow chaining). 
 | 
|  | 
| Item && | setEnabled (bool shouldBeEnabled) &&noexcept | 
|  | Sets the isEnabled flag (and returns a reference to this item to allow chaining). 
 | 
|  | 
| Item && | setAction (std::function< void()> action) &&noexcept | 
|  | Sets the action property (and returns a reference to this item to allow chaining). 
 | 
|  | 
| Item && | setID (int newID) &&noexcept | 
|  | Sets the itemID property (and returns a reference to this item to allow chaining). 
 | 
|  | 
| Item && | setColour (Colour) &&noexcept | 
|  | Sets the colour property (and returns a reference to this item to allow chaining). 
 | 
|  | 
| Item && | setCustomComponent (ReferenceCountedObjectPtr< CustomComponent > customComponent) &&noexcept | 
|  | Sets the customComponent property (and returns a reference to this item to allow chaining). 
 | 
|  | 
| Item && | setImage (std::unique_ptr< Drawable >) &&noexcept | 
|  | Sets the image property (and returns a reference to this item to allow chaining). 
 | 
|  | 
Describes a popup menu item. 
◆ Item() [1/4]
      
        
          | PopupMenu::Item::Item | ( |  | ) |  | 
      
 
Creates a null item. 
You'll need to set some fields after creating an Item before you can add it to a PopupMenu 
 
 
◆ Item() [2/4]
      
        
          | PopupMenu::Item::Item | ( | String | text | ) |  | 
      
 
Creates an item with the given text. 
This constructor also initialises the itemID to -1, which makes it suitable for creating lambda-based item actions. 
 
 
◆ Item() [3/4]
      
        
          | PopupMenu::Item::Item | ( | const Item & |  | ) |  | 
      
 
 
◆ Item() [4/4]
      
        
          | PopupMenu::Item::Item | ( | Item && |  | ) |  | 
      
 
 
◆ operator=() [1/2]
      
        
          | Item & PopupMenu::Item::operator= | ( | const Item & |  | ) |  | 
      
 
 
◆ operator=() [2/2]
      
        
          | Item & PopupMenu::Item::operator= | ( | Item && |  | ) |  | 
      
 
 
◆ setTicked() [1/2]
  
  | 
        
          | Item & PopupMenu::Item::setTicked | ( | bool | shouldBeTicked = true | ) | & |  | noexcept | 
 
Sets the isTicked flag (and returns a reference to this item to allow chaining). 
 
 
◆ setEnabled() [1/2]
  
  | 
        
          | Item & PopupMenu::Item::setEnabled | ( | bool | shouldBeEnabled | ) | & |  | noexcept | 
 
Sets the isEnabled flag (and returns a reference to this item to allow chaining). 
 
 
◆ setAction() [1/2]
  
  | 
        
          | Item & PopupMenu::Item::setAction | ( | std::function< void()> | action | ) | & |  | noexcept | 
 
Sets the action property (and returns a reference to this item to allow chaining). 
 
 
◆ setID() [1/2]
  
  | 
        
          | Item & PopupMenu::Item::setID | ( | int | newID | ) | & |  | noexcept | 
 
Sets the itemID property (and returns a reference to this item to allow chaining). 
 
 
◆ setColour() [1/2]
Sets the colour property (and returns a reference to this item to allow chaining). 
 
 
◆ setCustomComponent() [1/2]
Sets the customComponent property (and returns a reference to this item to allow chaining). 
 
 
◆ setImage() [1/2]
  
  | 
        
          | Item & PopupMenu::Item::setImage | ( | std::unique_ptr< Drawable > |  | ) | & |  | noexcept | 
 
Sets the image property (and returns a reference to this item to allow chaining). 
 
 
◆ setTicked() [2/2]
  
  | 
        
          | Item && PopupMenu::Item::setTicked | ( | bool | shouldBeTicked = true | ) | && |  | noexcept | 
 
Sets the isTicked flag (and returns a reference to this item to allow chaining). 
 
 
◆ setEnabled() [2/2]
  
  | 
        
          | Item && PopupMenu::Item::setEnabled | ( | bool | shouldBeEnabled | ) | && |  | noexcept | 
 
Sets the isEnabled flag (and returns a reference to this item to allow chaining). 
 
 
◆ setAction() [2/2]
  
  | 
        
          | Item && PopupMenu::Item::setAction | ( | std::function< void()> | action | ) | && |  | noexcept | 
 
Sets the action property (and returns a reference to this item to allow chaining). 
 
 
◆ setID() [2/2]
  
  | 
        
          | Item && PopupMenu::Item::setID | ( | int | newID | ) | && |  | noexcept | 
 
Sets the itemID property (and returns a reference to this item to allow chaining). 
 
 
◆ setColour() [2/2]
Sets the colour property (and returns a reference to this item to allow chaining). 
 
 
◆ setCustomComponent() [2/2]
Sets the customComponent property (and returns a reference to this item to allow chaining). 
 
 
◆ setImage() [2/2]
  
  | 
        
          | Item && PopupMenu::Item::setImage | ( | std::unique_ptr< Drawable > |  | ) | && |  | noexcept | 
 
Sets the image property (and returns a reference to this item to allow chaining). 
 
 
◆ text
◆ itemID
      
        
          | int PopupMenu::Item::itemID = 0 | 
      
 
The menu item's ID. 
This must not be 0 if you want the item to be triggerable, but if you're attaching an action callback to the item, you can set the itemID to -1 to indicate that it isn't actively needed. 
 
 
◆ action
      
        
          | std::function<void()> PopupMenu::Item::action | 
      
 
An optional function which should be invoked when this menu item is triggered. 
 
 
◆ subMenu
      
        
          | std::unique_ptr<PopupMenu> PopupMenu::Item::subMenu | 
      
 
A sub-menu, or nullptr if there isn't one. 
 
 
◆ image
      
        
          | std::unique_ptr<Drawable> PopupMenu::Item::image | 
      
 
A drawable to use as an icon, or nullptr if there isn't one. 
 
 
◆ customComponent
A custom component for the item to display, or nullptr if there isn't one. 
 
 
◆ customCallback
A custom callback for the item to use, or nullptr if there isn't one. 
 
 
◆ commandManager
A command manager to use to automatically invoke the command, or nullptr if none is specified. 
 
 
◆ shortcutKeyDescription
      
        
          | String PopupMenu::Item::shortcutKeyDescription | 
      
 
An optional string describing the shortcut key for this item. 
This is only used for displaying at the right-hand edge of a menu item - the menu won't attempt to actually catch or process the key. If you supply a commandManager parameter then the menu will attempt to fill-in this field automatically. 
 
 
◆ colour
      
        
          | Colour PopupMenu::Item::colour | 
      
 
A colour to use to draw the menu text. 
By default this is transparent black, which means that the LookAndFeel should choose the colour. 
 
 
◆ isEnabled
      
        
          | bool PopupMenu::Item::isEnabled = true | 
      
 
True if this menu item is enabled. 
 
 
◆ isTicked
      
        
          | bool PopupMenu::Item::isTicked = false | 
      
 
True if this menu item should have a tick mark next to it. 
 
 
◆ isSeparator
      
        
          | bool PopupMenu::Item::isSeparator = false | 
      
 
True if this menu item is a separator line. 
 
 
◆ isSectionHeader
      
        
          | bool PopupMenu::Item::isSectionHeader = false | 
      
 
True if this menu item is a section header. 
 
 
◆ shouldBreakAfter
      
        
          | bool PopupMenu::Item::shouldBreakAfter = false | 
      
 
True if this is the final item in the current column. 
 
 
The documentation for this struct was generated from the following file: