10#include <initializer_list>
55void error(
const std::string& what,
const std::string& why);
66void confirm(
const std::string& body,
const std::string& confirm_label,
67 std::function<
void()> on_yes, std::function<
void()> on_no =
nullptr,
bool danger =
false);
70void confirm_danger(
const std::string& body,
const std::string& confirm_label, std::function<
void()> on_yes);
71void info(
const std::string& body);
74void qr_dialog(
const std::string& body,
const std::string& url);
98 const std::string& subtitle =
"");
101void notice(
const char* icon,
Check tone,
const std::string& title,
const std::string&
text);
107 std::function<
void()> on_no =
nullptr);
140void pick(
const std::string& title,
const std::vector<std::string>& values,
int selected,
141 std::function<
void(
int)> on_pick,
bool checked =
true,
const std::vector<std::string>& details = {},
142 const std::vector<std::string>& icons = {},
const std::vector<Swatch>& swatches = {});
146void pick_grid(
const std::string& title,
const std::vector<std::string>& values,
const std::vector<std::string>& icons,
147 int selected, std::function<
void(
int)> on_pick,
int columns = 4);
151void pick_marked(
const std::string& title,
const std::vector<std::string>& values,
const std::vector<bool>& marks,
152 int focus, std::function<
void(
int)> on_pick,
const std::vector<std::string>& details = {});
171 Choice(std::string
text, std::function<
void()> action,
const char* icon_name =
nullptr, std::string detail_text =
"",
174 ,
run(std::move(action))
176 ,
detail(std::move(detail_text))
177 ,
group(std::move(group_name))
183 this->
toggle = on ? 1 : 0;
187 std::function<void()>
run;
195void pick_actions(
const std::string& title,
const std::vector<Choice>& choices,
const std::string& subtitle =
"",
201void prompt_text(
const std::string& header,
const std::string& initial,
int max_len,
202 std::function<
void(std::string)> on_value);
209 const char* detail_key =
"cadran/text2");
253void open_tab(
int position,
const std::string& row =
"");
Definition activity.hpp:45
Generic FlexBox layout.
Definition box.hpp:74
Definition cell_detail.hpp:28
Definition action_sheet.hpp:11
void info(const std::string &body)
void confirm(const std::string &body, const std::string &confirm_label, std::function< void()> on_yes, std::function< void()> on_no=nullptr, bool danger=false)
void error(const std::string &text)
void replace_screen(aurore::Activity *next)
void qr_dialog(const std::string &body, const std::string &url)
void use_font_for(const std::string &locale)
void batch_layout(aurore::Box *box, const std::function< void()> &fill)
std::string language_name(bool tile=false)
void set_text(aurore::Label *label, const std::string &text)
aurore::Box * checklist_body(const std::string &title, const std::vector< CheckLine > &lines, const std::string ¬e="", const std::string &subtitle="")
void open_tab(int position, const std::string &row="")
std::string text_size_name(bool tile=false)
void show_writable(aurore::DetailCell *cell, bool writable, const char *title_key="cadran/text", const char *detail_key="cadran/text2")
void on_cancel(aurore::Dialog *dialog, std::function< void()> on_cancel)
B closes dialog and runs on_cancel (Aurore's own B only closes it).
void notify(const std::string &text, Toast kind=Toast::Info)
void set_detail(aurore::DetailCell *cell, const std::string &text)
void prompt_text(const std::string &header, const std::string &initial, int max_len, std::function< void(std::string)> on_value)
The system keyboard for a text. The callback only on confirm.
bool is_sheet(aurore::View *view)
The sheet those open: its view, on top of the activities' stack.
void show_failure(const cadran_text::Failure &f)
Toast
Definition ui.hpp:39
aurore::Activity * main_screen()
The main screen, wherever it is in the stack; nullptr before it opens.
void pick_palette(std::function< void()> after=nullptr)
void pick_text_size(std::function< void()> after=nullptr)
void open_screen(aurore::View *content, const std::string &title)
aurore::Dialog * dialog(const std::string &text)
void quick_settings(std::function< void()> after=nullptr)
void pick_rail(std::function< void()> after=nullptr)
aurore::Dialog * box_dialog(aurore::Box *body)
void add_cancel(aurore::Dialog *dialog, std::function< void()> cancel)
void notice(const char *icon, Check tone, const std::string &title, const std::string &text)
void hold_confirm(aurore::Box *body, const std::string &hold_label, std::function< void()> on_yes, std::function< void()> on_no=nullptr)
aurore::Box * check_row(const CheckLine &line, float size=17)
One of them: the mark, then the text (size px).
std::string theme_name(bool tile=false)
void pick_theme(std::function< void()> after=nullptr)
void set_visible_all(std::initializer_list< std::pair< aurore::View *, bool > > changes)
void set_visible(aurore::View *view, bool visible)
void pick(const std::string &title, const std::vector< std::string > &values, int selected, std::function< void(int)> on_pick, bool checked=true, const std::vector< std::string > &details={}, const std::vector< std::string > &icons={}, const std::vector< Swatch > &swatches={})
void pick_actions(const std::string &title, const std::vector< Choice > &choices, const std::string &subtitle="", int image=0)
The sheet of choices (see Choice) under title.
void keep_focus(aurore::Activity *activity, aurore::View *fallback=nullptr)
void pick_grid(const std::string &title, const std::vector< std::string > &values, const std::vector< std::string > &icons, int selected, std::function< void(int)> on_pick, int columns=4)
bool has_focus(aurore::Activity *activity)
void pick_language(std::function< void()> after=nullptr)
void confirm_danger(const std::string &body, const std::string &confirm_label, std::function< void()> on_yes)
bool on_top(aurore::Activity *activity)
void go_to_tab(aurore::View *from, int position)
std::string palette_name()
void pick_marked(const std::string &title, const std::vector< std::string > &values, const std::vector< bool > &marks, int focus, std::function< void(int)> on_pick, const std::vector< std::string > &details={})
void refuse(const std::string &text)
Check
Definition ui.hpp:80
@ Header
not a check: the name of the panel of lines after it
Definition cadran_icon.hpp:76
Definition cadran_text.hpp:34
A line of checklist_body().
Definition ui.hpp:89
Check state
Definition ui.hpp:90
std::string text
Definition ui.hpp:91
Tone
Definition ui.hpp:165
Tone tone
Definition ui.hpp:191
std::function< void()> run
Definition ui.hpp:187
std::string group
Definition ui.hpp:190
const char * icon
Definition ui.hpp:188
int toggle
switched(): 1 on, 0 off
Definition ui.hpp:192
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)
Definition ui.hpp:171
Choice & switched(bool on)
Definition ui.hpp:181
std::string label
Definition ui.hpp:186
std::string detail
Definition ui.hpp:189