morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
button_style.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::ButtonStyle`: whether a button is drawn as a push button or as an entry of a list. The view
8/// tree, the authoring API and the backends share it. Specified in `docs/spec/ui/backend_contract.md`.
9
10namespace morph::ui {
11
12/// @brief How a button is drawn; it behaves the same either way.
13enum class ButtonStyle : std::uint8_t {
14 Push, ///< A framed button as wide as its label.
15 Item, ///< An entry of a list: as wide as its line, its label at the start, unframed, and marked while selected.
16};
17
18} // namespace morph::ui
ButtonStyle
How a button is drawn; it behaves the same either way.
@ Item
An entry of a list: as wide as its line, its label at the start, unframed, and marked while selected.
@ Push
A framed button as wide as its label.