ASPiK SDK
VSTGUI::Standalone::IMenuBuilder Class Referenceabstract

#include <imenubuilder.h>

Inheritance diagram for VSTGUI::Standalone::IMenuBuilder:
VSTGUI::Interface VSTGUI::Standalone::MenuBuilderAdapter VSTGUI::Standalone::NoMenuBuilder VSTGUI::Standalone::DrawDeviceTestsCustomization

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
 
virtual bool showCommandInMenu (const Interface &context, const Command &cmd) const =0
 
virtual SortFunction getCommandGroupSortFunction (const Interface &context, const UTF8String &group) const =0
 
virtual bool prependMenuSeparator (const Interface &context, const Command &cmd) const =0
 
- Public Member Functions inherited from VSTGUI::Interface
 Interface (const Interface &)=delete
 
 Interface (Interface &&)=delete
 
Interfaceoperator= (const Interface &)=delete
 
Interfaceoperator= (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 Function Documentation

◆ getCommandGroupSortFunction()

virtual SortFunction VSTGUI::Standalone::IMenuBuilder::getCommandGroupSortFunction ( const Interface context,
const UTF8String group 
) const
pure virtual

return command group sort function

Parameters
contexteither an IApplication or IWindow instance
groupgroup name
Returns
if you want to sort the menu return a SortFunction otherwise return nullptr

Implemented in VSTGUI::Standalone::MenuBuilderAdapter.

◆ prependMenuSeparator()

virtual bool VSTGUI::Standalone::IMenuBuilder::prependMenuSeparator ( const Interface context,
const Command cmd 
) const
pure virtual

should a menu separator prepend a command

Parameters
contexteither an IApplication or IWindow instance
cmdcommand
Returns
true if a menu separator should be prepended before the command

Implemented in VSTGUI::Standalone::MenuBuilderAdapter.

◆ showCommandGroupInMenu()

virtual bool VSTGUI::Standalone::IMenuBuilder::showCommandGroupInMenu ( const Interface context,
const UTF8String group 
) const
pure virtual

should the command group be visible in the menu

Parameters
contexteither an IApplication or IWindow instance
groupgroup name
Returns
true for visible or false for invisible

Implemented in VSTGUI::Standalone::NoMenuBuilder, and VSTGUI::Standalone::MenuBuilderAdapter.

◆ showCommandInMenu()

virtual bool VSTGUI::Standalone::IMenuBuilder::showCommandInMenu ( const Interface context,
const Command cmd 
) const
pure virtual

should the command be visible in the menu

Parameters
contexteither an IApplication or IWindow instance
cmdcommand
Returns
true for visible or false for invisible

Implemented in VSTGUI::Standalone::NoMenuBuilder, and VSTGUI::Standalone::MenuBuilderAdapter.


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