Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::WindowOptions::MenuCommand Struct Reference

#include <window_host.hpp>

Public Types

enum class  AppMenuSection : std::uint8_t { commands , after_about }
 Where an application-menu command (empty menu) sits. More...

Public Attributes

std::string menu
 Top-level menu to place this command under.
std::string title
KeyCode key = KeyCode::unknown
std::uint16_t modifiers = kModNone
std::function< void()> action
AppMenuSection app_menu_section = AppMenuSection::commands

Member Enumeration Documentation

◆ AppMenuSection

Where an application-menu command (empty menu) sits.

commands is the app's own group (Settings…, …) between the About block and Services; after_about places it directly under "About <App>", where macOS apps put "Check for Updates…". Ignored for named menus.

Enumerator
commands 
after_about 

Member Data Documentation

◆ action

std::function<void()> pulp::view::WindowOptions::MenuCommand::action

◆ app_menu_section

AppMenuSection pulp::view::WindowOptions::MenuCommand::app_menu_section = AppMenuSection::commands

◆ key

KeyCode pulp::view::WindowOptions::MenuCommand::key = KeyCode::unknown

◆ menu

std::string pulp::view::WindowOptions::MenuCommand::menu

Top-level menu to place this command under.

Leave EMPTY to place it in the application menu — the one titled after the app itself, laid out About, [after_about], Settings…/app commands, Services, Hide…, Quit. Any other value names (and creates on first use) a menu-bar submenu such as "Window" or "View".

◆ modifiers

std::uint16_t pulp::view::WindowOptions::MenuCommand::modifiers = kModNone

◆ title

std::string pulp::view::WindowOptions::MenuCommand::title

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