JUCE
Loading...
Searching...
No Matches
PopupMenu::Options Class Reference

Class used to create a set of options to pass to the show() method. More...

#include <juce_PopupMenu.h>

Public Types

enum class  PopupDirection { upwards , downwards }
 

Public Member Functions

 Options ()
 
 Options (const Options &)=default
 
Optionsoperator= (const Options &)=default
 
Options withTargetComponent (Component *targetComponent) const
 
Options withTargetComponent (Component &targetComponent) const
 
Options withTargetScreenArea (Rectangle< int > targetArea) const
 
Options withDeletionCheck (Component &componentToWatchForDeletion) const
 
Options withMinimumWidth (int minWidth) const
 
Options withMinimumNumColumns (int minNumColumns) const
 
Options withMaximumNumColumns (int maxNumColumns) const
 
Options withStandardItemHeight (int standardHeight) const
 
Options withItemThatMustBeVisible (int idOfItemToBeVisible) const
 
Options withParentComponent (Component *parentComponent) const
 
Options withPreferredPopupDirection (PopupDirection direction) const
 
Options withInitiallySelectedItem (int idOfItemToBeSelected) const
 
ComponentgetParentComponent () const noexcept
 
ComponentgetTargetComponent () const noexcept
 
bool hasWatchedComponentBeenDeleted () const noexcept
 
Rectangle< int > getTargetScreenArea () const noexcept
 
int getMinimumWidth () const noexcept
 
int getMaximumNumColumns () const noexcept
 
int getMinimumNumColumns () const noexcept
 
int getStandardItemHeight () const noexcept
 
int getItemThatMustBeVisible () const noexcept
 
PopupDirection getPreferredPopupDirection () const noexcept
 
int getInitiallySelectedItemId () const noexcept
 

Detailed Description

Class used to create a set of options to pass to the show() method.

You can chain together a series of calls to this class's methods to create a set of whatever options you want to specify. E.g.

PopupMenu menu;
...
menu.showMenu (PopupMenu::Options().withMinimumWidth (100)
.withTargetComponent (myComp));
Class used to create a set of options to pass to the show() method.
Definition juce_PopupMenu.h:450
Options withMaximumNumColumns(int maxNumColumns) const
Options withTargetComponent(Component *targetComponent) const
Options withMinimumWidth(int minWidth) const
PopupMenu()=default
Creates an empty popup menu.

Member Enumeration Documentation

◆ PopupDirection

Enumerator
upwards 
downwards 

Constructor & Destructor Documentation

◆ Options() [1/2]

◆ Options() [2/2]

PopupMenu::Options::Options ( const Options & )
default

References Options().

Member Function Documentation

◆ operator=()

Options & PopupMenu::Options::operator= ( const Options & )
default

References Options().

◆ withTargetComponent() [1/2]

Options PopupMenu::Options::withTargetComponent ( Component * targetComponent) const

References Component, and Options().

◆ withTargetComponent() [2/2]

Options PopupMenu::Options::withTargetComponent ( Component & targetComponent) const

References Component, and Options().

◆ withTargetScreenArea()

Options PopupMenu::Options::withTargetScreenArea ( Rectangle< int > targetArea) const

References Options().

◆ withDeletionCheck()

Options PopupMenu::Options::withDeletionCheck ( Component & componentToWatchForDeletion) const

References Component, and Options().

◆ withMinimumWidth()

Options PopupMenu::Options::withMinimumWidth ( int minWidth) const

References Options().

◆ withMinimumNumColumns()

Options PopupMenu::Options::withMinimumNumColumns ( int minNumColumns) const

References Options().

◆ withMaximumNumColumns()

Options PopupMenu::Options::withMaximumNumColumns ( int maxNumColumns) const

References Options().

◆ withStandardItemHeight()

Options PopupMenu::Options::withStandardItemHeight ( int standardHeight) const

References Options().

◆ withItemThatMustBeVisible()

Options PopupMenu::Options::withItemThatMustBeVisible ( int idOfItemToBeVisible) const

References Options().

◆ withParentComponent()

Options PopupMenu::Options::withParentComponent ( Component * parentComponent) const

References Component, and Options().

◆ withPreferredPopupDirection()

Options PopupMenu::Options::withPreferredPopupDirection ( PopupDirection direction) const

References Options().

◆ withInitiallySelectedItem()

Options PopupMenu::Options::withInitiallySelectedItem ( int idOfItemToBeSelected) const

References Options().

◆ getParentComponent()

Component * PopupMenu::Options::getParentComponent ( ) const
noexcept

References Component.

◆ getTargetComponent()

Component * PopupMenu::Options::getTargetComponent ( ) const
noexcept

References Component.

◆ hasWatchedComponentBeenDeleted()

bool PopupMenu::Options::hasWatchedComponentBeenDeleted ( ) const
noexcept

◆ getTargetScreenArea()

Rectangle< int > PopupMenu::Options::getTargetScreenArea ( ) const
noexcept

◆ getMinimumWidth()

int PopupMenu::Options::getMinimumWidth ( ) const
noexcept

◆ getMaximumNumColumns()

int PopupMenu::Options::getMaximumNumColumns ( ) const
noexcept

◆ getMinimumNumColumns()

int PopupMenu::Options::getMinimumNumColumns ( ) const
noexcept

◆ getStandardItemHeight()

int PopupMenu::Options::getStandardItemHeight ( ) const
noexcept

◆ getItemThatMustBeVisible()

int PopupMenu::Options::getItemThatMustBeVisible ( ) const
noexcept

◆ getPreferredPopupDirection()

PopupDirection PopupMenu::Options::getPreferredPopupDirection ( ) const
noexcept

◆ getInitiallySelectedItemId()

int PopupMenu::Options::getInitiallySelectedItemId ( ) const
noexcept

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