VSTGUI: IMenuBuilder Class Reference

VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | List of all members
IMenuBuilder Class Referenceabstract
Standalone Library

Menu builder interface. More...

Inheritance diagram for IMenuBuilder:

## Public Types
using | SortFunction = std::function< bool(const UTF8String &lhs, const UTF8String &rhs)>

## Public Member Functions
virtual bool | showCommandGroupInMenu (const Interface &context, const UTF8String &group) const =0
| should the command group be visible in the menu
virtual bool | showCommandInMenu (const Interface &context, const Command &cmd) const =0
| should the command be visible in the menu
virtual SortFunction | getCommandGroupSortFunction (const Interface &context, const UTF8String &group) const =0
| return command group sort function
virtual bool | prependMenuSeparator (const Interface &context, const Command &cmd) const =0
| should a menu separator prepend a command
Public Member Functions inherited from Interface
virtual | ~Interface () noexcept
| Interface ()=default
| Interface (const Interface &)=delete
| Interface (Interface &&)=delete
Interface & | operator= (const Interface &)=delete
Interface & | operator= (Interface &&)=delete
template<typename T >
const auto | dynamicCast () const
template<typename T >
auto | dynamicCast ()

## Detailed Description

Menu builder interface.

Application delegates can implement this interface to customize the visibility and order of commands shown in the menu of the application or window. On platforms where the menu is sitting in the window, the window controllers menu builder is used if it has one. The context parameter of the methods is either an IApplication or IWindow.

## Member Typedef Documentation

using SortFunction = std::function<bool (const UTF8String& lhs, const UTF8String& rhs)>

## Member Function Documentation

virtual SortFunction getCommandGroupSortFunction | ( | const Interface & | context,
|  | const UTF8String & | group
| ) |  | const
| pure virtual

return command group sort function

Parameters

  context | either an IApplication or IWindow instance
  group | group name

Returns
  if you want to sort the menu return a SortFunction otherwise return nullptr

Implemented in MenuBuilderAdapter.

virtual bool prependMenuSeparator | ( | const Interface & | context,
|  | const Command & | cmd
| ) |  | const
| pure virtual

should a menu separator prepend a command

Parameters

  context | either an IApplication or IWindow instance
  cmd | command

Returns
  true if a menu separator should be prepended before the command

Implemented in MenuBuilderAdapter.

virtual bool showCommandGroupInMenu | ( | const Interface & | context,
|  | const UTF8String & | group
| ) |  | const
| pure virtual

should the command group be visible in the menu

Parameters

  context | either an IApplication or IWindow instance
  group | group name

Returns
  true for visible or false for invisible

Implemented in NoMenuBuilder, and MenuBuilderAdapter.

virtual bool showCommandInMenu | ( | const Interface & | context,
|  | const Command & | cmd
| ) |  | const
| pure virtual

should the command be visible in the menu

Parameters

  context | either an IApplication or IWindow instance
  cmd | command

Returns
  true for visible or false for invisible

Implemented in NoMenuBuilder, and MenuBuilderAdapter.

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

- imenubuilder.h