|
Aurore
A Switch-like interface for your app, on every screen
|
#include <aurore/cadran/ui/ui.hpp>
Public Types | |
| enum class | Tone { PLAIN , ON , WARN , DANGER } |
Public Member Functions | |
| 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) | |
| Choice & | switched (bool on) |
Public Attributes | |
| std::string | label |
| std::function< void()> | run |
| const char * | icon |
| std::string | detail |
| std::string | group |
| Tone | tone |
| int | toggle = -1 |
| switched(): 1 on, 0 off | |
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.
|
strong |
|
inline |
|
inline |
| std::string ui::Choice::detail |
| std::string ui::Choice::group |
| const char* ui::Choice::icon |
| std::string ui::Choice::label |
| std::function<void()> ui::Choice::run |
| int ui::Choice::toggle = -1 |
switched(): 1 on, 0 off
| Tone ui::Choice::tone |