morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
button_emphasis.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2#pragma once
3
4#include <cstdint>
5
6/// @file
7/// @brief `morph::ui::ButtonEmphasis`: how much a button stands out. The view tree, the authoring API and the backends
8/// share it. Specified in `docs/spec/ui/backend_contract.md`.
9
10namespace morph::ui {
11
12/// @brief How much a button stands out; each backend maps it to its theme.
13enum class ButtonEmphasis : std::uint8_t {
14 Normal, ///< An ordinary action.
15 Primary, ///< The screen's main action.
16 Danger, ///< An action that destroys or cannot be undone.
17 Ghost, ///< An action embedded in other content, with no chrome of its own.
18};
19
20} // namespace morph::ui
ButtonEmphasis
How much a button stands out; each backend maps it to its theme.
@ Primary
The screen's main action.
@ Ghost
An action embedded in other content, with no chrome of its own.
@ Normal
An ordinary action.
@ Danger
An action that destroys or cannot be undone.