JUCE
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
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
 
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
 

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;
...
.withTargetComponent (myComp));
Class used to create a set of options to pass to the show() method.
Definition juce_PopupMenu.h:439
Options withMaximumNumColumns(int maxNumColumns) const
Options withTargetComponent(Component *targetComponent) const
Options withMinimumWidth(int minWidth) const
Creates and displays a popup-menu.
Definition juce_PopupMenu.h:82
int showMenu(const Options &options)
Displays and runs the menu modally, with a set of options.

Member Enumeration Documentation

◆ PopupDirection

Enumerator
upwards 
downwards 

Constructor & Destructor Documentation

◆ Options() [1/2]

PopupMenu::Options::Options ( )

◆ Options() [2/2]

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

Member Function Documentation

◆ operator=()

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

◆ withTargetComponent() [1/2]

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

◆ withTargetComponent() [2/2]

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

◆ withTargetScreenArea()

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

◆ withDeletionCheck()

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

◆ withMinimumWidth()

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

◆ withMinimumNumColumns()

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

◆ withMaximumNumColumns()

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

◆ withStandardItemHeight()

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

◆ withItemThatMustBeVisible()

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

◆ withParentComponent()

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

◆ withPreferredPopupDirection()

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

◆ getParentComponent()

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

◆ getTargetComponent()

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

◆ 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

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