morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::ui::MenuEntry Struct Reference

One entry of a menu as a MenuWidget shows it. More...

#include <backend.hpp>

Public Member Functions

bool operator== (MenuEntry const &) const =default
 Memberwise equality, submenus included.

Public Attributes

std::string label
 The caption.
std::string icon
 The icon's name in the theme's icon map; empty shows none.
std::string keys
 The chord shown beside the label; empty shows none.
std::optional< bool > checked
 Engaged: a checkable entry with this mark; nullopt: not checkable.
bool enabled = true
 Whether the entry can be chosen, or its submenu opened.
std::vector< MenuEntry > items
 The submenu; empty for an entry that is chosen.

Detailed Description

One entry of a menu as a MenuWidget shows it.

Definition at line 276 of file backend.hpp.

Member Function Documentation

◆ operator==()

bool morph::ui::MenuEntry::operator== ( MenuEntry const & ) const
default

Memberwise equality, submenus included.

Returns
Whether every field matches.

Member Data Documentation

◆ label

std::string morph::ui::MenuEntry::label

The caption.

Definition at line 278 of file backend.hpp.

◆ icon

std::string morph::ui::MenuEntry::icon

The icon's name in the theme's icon map; empty shows none.

Definition at line 280 of file backend.hpp.

◆ keys

std::string morph::ui::MenuEntry::keys

The chord shown beside the label; empty shows none.

Definition at line 282 of file backend.hpp.

◆ checked

std::optional<bool> morph::ui::MenuEntry::checked

Engaged: a checkable entry with this mark; nullopt: not checkable.

Definition at line 284 of file backend.hpp.

◆ enabled

bool morph::ui::MenuEntry::enabled = true

Whether the entry can be chosen, or its submenu opened.

Definition at line 286 of file backend.hpp.

◆ items

std::vector<MenuEntry> morph::ui::MenuEntry::items

The submenu; empty for an entry that is chosen.

Definition at line 288 of file backend.hpp.


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