JUCE: PopupMenu::LookAndFeelMethods Struct Reference

JUCE

Public Member Functions | List of all members
PopupMenu::LookAndFeelMethods Struct Referenceabstract

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

Inheritance diagram for PopupMenu::LookAndFeelMethods:

## Public Member Functions
virtual | ~LookAndFeelMethods ()=default
virtual void | drawPopupMenuBackground (Graphics &, int width, int height)=0
| Fills the background of a popup menu component. More...
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)=0
| Draws one of the items in a popup menu. More...
virtual void | drawPopupMenuSectionHeader (Graphics &, const Rectangle< int > &area, const String &sectionName)=0
virtual Font | getPopupMenuFont ()=0
| Returns the size and style of font to use in popup menus. More...
virtual void | drawPopupMenuUpDownArrow (Graphics &, int width, int height, bool isScrollUpArrow)=0
virtual void | getIdealPopupMenuItemSize (const String &text, bool isSeparator, int standardMenuItemHeight, int &idealWidth, int &idealHeight)=0
| Finds the best size for an item in a popup menu. More...
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 PopupMenu::Options &options)=0
virtual void | preparePopupMenuWindow (Component &newWindow)=0
virtual bool | shouldPopupMenuScaleWithTargetComponent (const PopupMenu::Options &options)=0
| Return true if you want your popup menus to scale with the target component's AffineTransform or scale factor. More...
virtual int | getPopupMenuBorderSize ()=0

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ ~LookAndFeelMethods()

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

## Member Function Documentation

## ◆ drawPopupMenuBackground()

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

Fills the background of a popup menu component.

Implemented in LookAndFeel_V2, LookAndFeel_V1, and LookAndFeel_V3.

## ◆ drawPopupMenuItem()

virtual void 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
| ) |  |
| pure virtual

Draws one of the items in a popup menu.

Implemented in LookAndFeel_V4, and LookAndFeel_V2.

## ◆ drawPopupMenuSectionHeader()

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

Implemented in LookAndFeel_V2.

## ◆ getPopupMenuFont()

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

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

Implemented in LookAndFeel_V2.

## ◆ drawPopupMenuUpDownArrow()

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

Implemented in LookAndFeel_V2.

## ◆ getIdealPopupMenuItemSize()

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

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

Implemented in LookAndFeel_V4, and LookAndFeel_V2.

## ◆ getMenuWindowFlags()

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

Implemented in LookAndFeel_V2.

## ◆ drawMenuBarBackground()

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

Implemented in LookAndFeel_V3, LookAndFeel_V4, LookAndFeel_V2, and LookAndFeel_V1.

## ◆ getDefaultMenuBarHeight()

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

Implemented in LookAndFeel_V2.

## ◆ getMenuBarItemWidth()

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

Implemented in LookAndFeel_V2.

## ◆ getMenuBarFont()

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

Implemented in LookAndFeel_V2.

## ◆ drawMenuBarItem()

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

Implemented in LookAndFeel_V4, and LookAndFeel_V2.

## ◆ getParentComponentForMenuOptions()

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

Implemented in LookAndFeel_V2.

## ◆ preparePopupMenuWindow()

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

Implemented in LookAndFeel_V2.

## ◆ shouldPopupMenuScaleWithTargetComponent()

virtual bool PopupMenu::LookAndFeelMethods::shouldPopupMenuScaleWithTargetComponent | ( | const PopupMenu::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 LookAndFeel_V2.

## ◆ getPopupMenuBorderSize()

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

Implemented in LookAndFeel_V2.

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

- juce_PopupMenu.h