Loading...
Searching...
No Matches
juce::PopupMenu::LookAndFeelMethods Struct Referenceabstract

## Detailed Description

This abstract base class is implemented by LookAndFeel classes to provide menu drawing functionality.

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

- juce_gui_basics/menus/juce_PopupMenu.h

Inheritance diagram for juce::PopupMenu::LookAndFeelMethods:

## Public Member Functions

virtual | ~LookAndFeelMethods ()=default
virtual void | drawPopupMenuBackground (Graphics &, int width, int height)
| Fills the background of a popup menu component.
virtual void | drawPopupMenuBackgroundWithOptions (Graphics &, int width, int height, const Options &)=0
| Fills the background of a popup menu component.
virtual void | drawPopupMenuItem (Graphics &, const Rectangle< int > &area, bool isSeparator, bool isActive, bool isHighlighted, bool isTicked, bool hasSubMenu, const String &text, const String &shortcutKeyText, const Drawable *icon, const Colour *textColour)
| Draws one of the items in a popup menu.
virtual void | drawPopupMenuItemWithOptions (Graphics &, const Rectangle< int > &area, bool isHighlighted, const Item &item, const Options &)=0
| Draws one of the items in a popup menu.
virtual void | drawPopupMenuSectionHeader (Graphics &, const Rectangle< int > &, const String &)
virtual void | drawPopupMenuSectionHeaderWithOptions (Graphics &, const Rectangle< int > &area, const String &sectionName, const Options &)=0
virtual Font | getPopupMenuFont ()=0
| Returns the size and style of font to use in popup menus.
virtual void | drawPopupMenuUpDownArrow (Graphics &, int width, int height, bool isScrollUpArrow)
virtual void | drawPopupMenuUpDownArrowWithOptions (Graphics &, int width, int height, bool isScrollUpArrow, const Options &)=0
virtual void | getIdealPopupMenuItemSize (const String &text, bool isSeparator, int standardMenuItemHeight, int &idealWidth, int &idealHeight)
| Finds the best size for an item in a popup menu.
virtual void | getIdealPopupMenuItemSizeWithOptions (const String &text, bool isSeparator, int standardMenuItemHeight, int &idealWidth, int &idealHeight, const Options &)=0
| Finds the best size for an item in a popup menu.
virtual void | getIdealPopupMenuSectionHeaderSizeWithOptions (const String &text, int standardMenuItemHeight, int &idealWidth, int &idealHeight, const Options &)=0
virtual int | getMenuWindowFlags ()=0
virtual void | drawMenuBarBackground (Graphics &, int width, int height, bool isMouseOverBar, MenuBarComponent &)=0
virtual int | getDefaultMenuBarHeight ()=0
virtual int | getMenuBarItemWidth (MenuBarComponent &, int itemIndex, const String &itemText)=0
virtual Font | getMenuBarFont (MenuBarComponent &, int itemIndex, const String &itemText)=0
virtual void | drawMenuBarItem (Graphics &, int width, int height, int itemIndex, const String &itemText, bool isMouseOverItem, bool isMenuOpen, bool isMouseOverBar, MenuBarComponent &)=0
virtual Component * | getParentComponentForMenuOptions (const Options &options)=0
virtual void | preparePopupMenuWindow (Component &newWindow)=0
virtual bool | shouldPopupMenuScaleWithTargetComponent (const Options &options)=0
| Return true if you want your popup menus to scale with the target component's AffineTransform or scale factor.
virtual int | getPopupMenuBorderSize ()
virtual int | getPopupMenuBorderSizeWithOptions (const Options &)=0
virtual void | drawPopupMenuColumnSeparatorWithOptions (Graphics &g, const Rectangle< int > &bounds, const Options &)=0
| Implement this to draw some custom decoration between the columns of the popup menu.
virtual int | getPopupMenuColumnSeparatorWidthWithOptions (const Options &)=0
| Return the amount of space that should be left between popup menu columns.

## Constructors and Destructors

## ~LookAndFeelMethods()

virtual juce::PopupMenu::LookAndFeelMethods::~LookAndFeelMethods | ( |  | ) |

virtual default

## Member Functions

## drawPopupMenuBackground()

virtual void juce::PopupMenu::LookAndFeelMethods::drawPopupMenuBackground | ( | Graphics & | ,
|  | int | width,
|  | int | height )

virtual

Fills the background of a popup menu component.

Reimplemented in juce::LookAndFeel_V1, juce::LookAndFeel_V2, and juce::LookAndFeel_V3.

## drawPopupMenuBackgroundWithOptions()

virtual void juce::PopupMenu::LookAndFeelMethods::drawPopupMenuBackgroundWithOptions | ( | Graphics & | ,
|  | int | width,
|  | int | height,
|  | const Options & | )

pure virtual

Fills the background of a popup menu component.

Implemented in juce::LookAndFeel_V2.

## drawPopupMenuItem()

virtual void juce::PopupMenu::LookAndFeelMethods::drawPopupMenuItem | ( | Graphics & | ,
|  | const Rectangle< int > & | area,
|  | bool | isSeparator,
|  | bool | isActive,
|  | bool | isHighlighted,
|  | bool | isTicked,
|  | bool | hasSubMenu,
|  | const String & | text,
|  | const String & | shortcutKeyText,
|  | const Drawable * | icon,
|  | const Colour * | textColour )

virtual

Draws one of the items in a popup menu.

Reimplemented in juce::LookAndFeel_V2, and juce::LookAndFeel_V4.

## drawPopupMenuItemWithOptions()

virtual void juce::PopupMenu::LookAndFeelMethods::drawPopupMenuItemWithOptions | ( | Graphics & | ,
|  | const Rectangle< int > & | area,
|  | bool | isHighlighted,
|  | const Item & | item,
|  | const Options & | )

pure virtual

Draws one of the items in a popup menu.

Implemented in juce::LookAndFeel_V2.

## drawPopupMenuSectionHeader()

virtual void juce::PopupMenu::LookAndFeelMethods::drawPopupMenuSectionHeader | ( | Graphics & | ,
|  | const Rectangle< int > & | ,
|  | const String & | )

virtual

Reimplemented in juce::LookAndFeel_V2.

## drawPopupMenuSectionHeaderWithOptions()

virtual void juce::PopupMenu::LookAndFeelMethods::drawPopupMenuSectionHeaderWithOptions | ( | Graphics & | ,
|  | const Rectangle< int > & | area,
|  | const String & | sectionName,
|  | const Options & | )

pure virtual

Implemented in juce::LookAndFeel_V2.

## getPopupMenuFont()

virtual Font juce::PopupMenu::LookAndFeelMethods::getPopupMenuFont | ( |  | ) |

pure virtual

Returns the size and style of font to use in popup menus.

Implemented in juce::LookAndFeel_V2.

## drawPopupMenuUpDownArrow()

virtual void juce::PopupMenu::LookAndFeelMethods::drawPopupMenuUpDownArrow | ( | Graphics & | ,
|  | int | width,
|  | int | height,
|  | bool | isScrollUpArrow )

virtual

Reimplemented in juce::LookAndFeel_V2.

## drawPopupMenuUpDownArrowWithOptions()

virtual void juce::PopupMenu::LookAndFeelMethods::drawPopupMenuUpDownArrowWithOptions | ( | Graphics & | ,
|  | int | width,
|  | int | height,
|  | bool | isScrollUpArrow,
|  | const Options & | )

pure virtual

Implemented in juce::LookAndFeel_V2.

## getIdealPopupMenuItemSize()

virtual void juce::PopupMenu::LookAndFeelMethods::getIdealPopupMenuItemSize | ( | const String & | text,
|  | bool | isSeparator,
|  | int | standardMenuItemHeight,
|  | int & | idealWidth,
|  | int & | idealHeight )

virtual

Finds the best size for an item in a popup menu.

Reimplemented in juce::LookAndFeel_V2, and juce::LookAndFeel_V4.

## getIdealPopupMenuItemSizeWithOptions()

virtual void juce::PopupMenu::LookAndFeelMethods::getIdealPopupMenuItemSizeWithOptions | ( | const String & | text,
|  | bool | isSeparator,
|  | int | standardMenuItemHeight,
|  | int & | idealWidth,
|  | int & | idealHeight,
|  | const Options & | )

pure virtual

Finds the best size for an item in a popup menu.

Implemented in juce::LookAndFeel_V2.

## getIdealPopupMenuSectionHeaderSizeWithOptions()

virtual void juce::PopupMenu::LookAndFeelMethods::getIdealPopupMenuSectionHeaderSizeWithOptions | ( | const String & | text,
|  | int | standardMenuItemHeight,
|  | int & | idealWidth,
|  | int & | idealHeight,
|  | const Options & | )

pure virtual

Implemented in juce::LookAndFeel_V2.

## getMenuWindowFlags()

virtual int juce::PopupMenu::LookAndFeelMethods::getMenuWindowFlags | ( |  | ) |

pure virtual

Implemented in juce::LookAndFeel_V2.

## drawMenuBarBackground()

virtual void juce::PopupMenu::LookAndFeelMethods::drawMenuBarBackground | ( | Graphics & | ,
|  | int | width,
|  | int | height,
|  | bool | isMouseOverBar,
|  | MenuBarComponent & | )

pure virtual

Implemented in juce::LookAndFeel_V1, juce::LookAndFeel_V2, juce::LookAndFeel_V3, and juce::LookAndFeel_V4.

References juce::PopupMenu::MenuBarComponent.

## getDefaultMenuBarHeight()

virtual int juce::PopupMenu::LookAndFeelMethods::getDefaultMenuBarHeight | ( |  | ) |

pure virtual

Implemented in juce::LookAndFeel_V2.

## getMenuBarItemWidth()

virtual int juce::PopupMenu::LookAndFeelMethods::getMenuBarItemWidth | ( | MenuBarComponent & | ,
|  | int | itemIndex,
|  | const String & | itemText )

pure virtual

Implemented in juce::LookAndFeel_V2.

References juce::PopupMenu::MenuBarComponent.

## getMenuBarFont()

virtual Font juce::PopupMenu::LookAndFeelMethods::getMenuBarFont | ( | MenuBarComponent & | ,
|  | int | itemIndex,
|  | const String & | itemText )

pure virtual

Implemented in juce::LookAndFeel_V2.

References juce::PopupMenu::MenuBarComponent.

## drawMenuBarItem()

virtual void juce::PopupMenu::LookAndFeelMethods::drawMenuBarItem | ( | Graphics & | ,
|  | int | width,
|  | int | height,
|  | int | itemIndex,
|  | const String & | itemText,
|  | bool | isMouseOverItem,
|  | bool | isMenuOpen,
|  | bool | isMouseOverBar,
|  | MenuBarComponent & | )

pure virtual

Implemented in juce::LookAndFeel_V2, and juce::LookAndFeel_V4.

References juce::PopupMenu::MenuBarComponent.

## getParentComponentForMenuOptions()

virtual Component * juce::PopupMenu::LookAndFeelMethods::getParentComponentForMenuOptions | ( | const Options & | options | ) |

pure virtual

Implemented in juce::LookAndFeel_V2.

## preparePopupMenuWindow()

virtual void juce::PopupMenu::LookAndFeelMethods::preparePopupMenuWindow | ( | Component & | newWindow | ) |

pure virtual

Implemented in juce::LookAndFeel_V2.

## shouldPopupMenuScaleWithTargetComponent()

virtual bool juce::PopupMenu::LookAndFeelMethods::shouldPopupMenuScaleWithTargetComponent | ( | const Options & | options | ) |

pure virtual

Return true if you want your popup menus to scale with the target component's AffineTransform or scale factor.

Implemented in juce::LookAndFeel_V2.

## getPopupMenuBorderSize()

virtual int juce::PopupMenu::LookAndFeelMethods::getPopupMenuBorderSize | ( |  | ) |

virtual

Reimplemented in juce::LookAndFeel_V2.

## getPopupMenuBorderSizeWithOptions()

virtual int juce::PopupMenu::LookAndFeelMethods::getPopupMenuBorderSizeWithOptions | ( | const Options & |  | ) |

pure virtual

Implemented in juce::LookAndFeel_V2.

## drawPopupMenuColumnSeparatorWithOptions()

virtual void juce::PopupMenu::LookAndFeelMethods::drawPopupMenuColumnSeparatorWithOptions | ( | Graphics & | g,
|  | const Rectangle< int > & | bounds,
|  | const Options & | )

pure virtual

Implement this to draw some custom decoration between the columns of the popup menu.

getPopupMenuColumnSeparatorWidthWithOptions must return a positive value in order to display the separator.

Implemented in juce::LookAndFeel_V2.

## getPopupMenuColumnSeparatorWidthWithOptions()

virtual int juce::PopupMenu::LookAndFeelMethods::getPopupMenuColumnSeparatorWidthWithOptions | ( | const Options & |  | ) |

pure virtual

Return the amount of space that should be left between popup menu columns.

Implemented in juce::LookAndFeel_V2.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited