|
Aurore
A Switch-like interface for your app, on every screen
|
#include <chrono>#include <cstdint>#include <functional>#include <initializer_list>#include <string>#include <utility>#include <vector>#include <aurore.hpp>#include <aurore/cadran/ui/cadran_text.hpp>#include <aurore/cadran/ui/format_text.hpp>#include <aurore/cadran/ui/guarded.hpp>#include <aurore/cadran/ui/prefs.hpp>#include <aurore/cadran/view/cadran_icon.hpp>Go to the source code of this file.
Classes | |
| struct | ui::CheckLine |
| A line of checklist_body(). More... | |
| struct | ui::Choice |
Namespaces | |
| namespace | ui |
Typedefs | |
| using | ui::Swatch = CadranSwatch::Colors |
A row's colours in pick()'s swatches (CadranSwatch). | |
Enumerations | |
| enum class | ui::Toast { ui::Info , ui::Done , ui::Refused } |
| enum class | ui::Check { ui::Ok , ui::Warn , ui::Bad , ui::Info , ui::Header } |
Functions | |
| void | ui::use_font_for (const std::string &locale) |
| void | ui::notify (const std::string &text, Toast kind=Toast::Info) |
| void | ui::refuse (const std::string &text) |
| void | ui::error (const std::string &text) |
| void | ui::error (const std::string &what, const std::string &why) |
what failed because of why (a path, a message from the network…). | |
| void | ui::show_failure (const cadran_text::Failure &f) |
| void | ui::replace_screen (aurore::Activity *next) |
| void | ui::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 | ui::confirm_danger (const std::string &body, const std::string &confirm_label, std::function< void()> on_yes) |
| void | ui::info (const std::string &body) |
| void | ui::qr_dialog (const std::string &body, const std::string &url) |
| aurore::Box * | ui::check_row (const CheckLine &line, float size=17) |
One of them: the mark, then the text (size px). | |
| aurore::Box * | ui::checklist_body (const std::string &title, const std::vector< CheckLine > &lines, const std::string ¬e="", const std::string &subtitle="") |
| void | ui::notice (const char *icon, Check tone, const std::string &title, const std::string &text) |
| void | ui::hold_confirm (aurore::Box *body, const std::string &hold_label, std::function< void()> on_yes, std::function< void()> on_no=nullptr) |
| aurore::Dialog * | ui::dialog (const std::string &text) |
| aurore::Dialog * | ui::dialog (const std::string &text, aurore::View *below) |
| aurore::Dialog * | ui::box_dialog (aurore::Box *body) |
| void | ui::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 | ui::add_cancel (aurore::Dialog *dialog, std::function< void()> cancel) |
| void | ui::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 | ui::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) |
| void | ui::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 | ui::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. | |
| bool | ui::is_sheet (aurore::View *view) |
| The sheet those open: its view, on top of the activities' stack. | |
| void | ui::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. | |
| void | ui::show_writable (aurore::DetailCell *cell, bool writable, const char *title_key="cadran/text", const char *detail_key="cadran/text2") |
| void | ui::set_visible (aurore::View *view, bool visible) |
| void | ui::set_visible_all (std::initializer_list< std::pair< aurore::View *, bool > > changes) |
| void | ui::set_text (aurore::Label *label, const std::string &text) |
| void | ui::set_detail (aurore::DetailCell *cell, const std::string &text) |
| void | ui::batch_layout (aurore::Box *box, const std::function< void()> &fill) |
| void | ui::keep_focus (aurore::Activity *activity, aurore::View *fallback=nullptr) |
| bool | ui::has_focus (aurore::Activity *activity) |
| bool | ui::on_top (aurore::Activity *activity) |
| aurore::Activity * | ui::main_screen () |
| The main screen, wherever it is in the stack; nullptr before it opens. | |
| void | ui::open_tab (int position, const std::string &row="") |
| void | ui::refresh_shown_tab () |
| void | ui::go_to_tab (aurore::View *from, int position) |
| void | ui::open_screen (aurore::View *content, const std::string &title) |
| void | ui::quick_settings (std::function< void()> after=nullptr) |
| bool | ui::save_prefs () |
| void | ui::pick_language (std::function< void()> after=nullptr) |
| void | ui::pick_theme (std::function< void()> after=nullptr) |
| void | ui::pick_palette (std::function< void()> after=nullptr) |
| std::string | ui::palette_name () |
| void | ui::pick_text_size (std::function< void()> after=nullptr) |
| std::string | ui::text_size_name (bool tile=false) |
| void | ui::pick_rail (std::function< void()> after=nullptr) |
| std::string | ui::rail_name () |
| std::string | ui::language_name (bool tile=false) |
| std::string | ui::theme_name (bool tile=false) |