Struct · ui

ui::Choice

On this page
aurore/cadran/ui/ui.hpp
#include <aurore/cadran/ui/ui.hpp>

struct ui::Choice

Description

A list of things to do, as a sheet (ui/action_sheet.cpp): each line's label, and what it runs once the sheet has closed; its icon (a Cadran icon, nullptr: none), what is set now at its end (detail), its group (a section starts where it changes, its name the kicker above it) and its tone (ON: the detail in teal, WARN: amber, DANGER: a removal, in coral); switched(): a switch at its end, on or off, instead of the detail. A line without run only closes the sheet. subtitle, under the title: what it is about now; image, an NVG image before the title (someone else's, kept). The first line is selected; none, no sheet.

Types 1

enum class Tone
Value
PLAIN
ON
WARN
DANGER

ui.hpp:164

Constructors 1

Choice(std::string text,std::function< void()> action,const char *icon_name = nullptr,std::string detail_text = "",std::string group_name = "",Tone line_tone = Tone::PLAIN)

Functions 1

Choice & switched(bool on)

Attributes 7

std::string label
std::function< void()> run
const char * icon
std::string detail
std::string group
Tone tone
int toggle = -1

Read from Aurore's headers by Doxygen at each build · library/include