Namespace

cadran

On this page

Namespaces 2

Classes 6

  • cadran::CardA card of the lists: a rounded surface with a 1 px border (accent, the line colour unless set) drawn behind its rows, the rows' separators kept on all but the last visible one.
  • cadran::ListThe Cadran look of a list screen built as usual: its headers as kickers, its cells in cards with icons, chevrons and switches, a few cells as tiles.
  • cadran::PillModeA mode of the app the main screen's pill says over what every screen says, as long as it lasts (ui::hooks' pill fills it in; read-only is Aurore's own): its text, icon and…
  • cadran::ProgressA dialog's body while something measurable is under way, left-aligned: a head (an image, hidden until it is given one; what is under way, small; a title cut to one line), a…
  • cadran::SwitchThe boards' switch, drawn from a BooleanCell's state each frame (so it follows the cell whoever changes it).
  • cadran::TimeButtonA time of day chosen with the stick among times (minutes after midnight, in order, evenly apart): up / down the next or the one before, L / R an hour (or a tap on the arrows),…

Functions 25

void start()

Once Aurore has started (Application::init): the console's theme and language kept, the strings loaded in the preferences' language. The app sets ui::hooks and calls ui::use_prefs before.

cadran.hpp:35
void start_window()

Once the window is there (Application::createWindow): the preferences' font and theme, the palettes, the text size, and the views and screens that take Cadran's look from then on: the footer's hints, the header's version badge and settings, every screen's header and list, and the main screen (an AppletFrame holding a TabFrame) with its rail.

cadran.hpp:41
void install_theme()

The boards' two palettes on Aurore's two variants (dark: navy; light: cool white), the rail's metrics and the display font: before any view.

cadran_frame.hpp:18
void style_header(aurore::AppletFrame *frame,const char *icon,const std::string &text,bool filled,bool with_date)

A frame's header after the boards: the mark for the app icon, the title at 24, a pill at the right (icon and text; filled teal, else a bordered one) and, when asked, the date.

cadran_frame.hpp:22
void install_screens()

From then on, every screen but the main one gets the header after the boards (the mark, the title) and its list in cards (cadran::List), the first time it takes the focus.

cadran_frame.hpp:26
void style_rail(aurore::View *tab_frame)

A TabFrame's sidebar as the boards' rail: an icon before each label, the active tab on a teal pill; open, on its icons, or folding by itself as ui::prefs() says (ui::RAILS).

cadran_frame.hpp:30
void apply_rail()

ui::prefs().rail changed (an app's Preferences › Sidebar): the main screen's rail after it, at once.

cadran_frame.hpp:33
void style_frame(aurore::AppletFrame *frame, aurore::View *tab_frame)

Both, for the main screen.

cadran_frame.hpp:35
bool is_main_frame(aurore::View *frame)

Whether frame is a main screen: it holds a TabFrame (or a view with the id "main_tabs"). install_screens() styles it with style_frame() the first time it takes the focus, unless the app did already.

cadran_frame.hpp:39
bool is_standalone_screen(aurore::View *frame)

Whether frame is a screen of its own, not a step from the one under it (a child's screen): no "Console ›" crumb before its title, no version badge after it. The app says so with ui::hooks' standalone_screen, or by a view with the id "cadran/standalone" in the screen.

cadran_frame.hpp:44
void set_pill(const std::string &text,const char *icon = "check",Tone tone = Tone::OK)
void refresh_pill()

The pill again after a mode changed (ui::hooks' pill, read-only).

cadran_frame.hpp:69
aurore::View * make_glow(float cx,float cy,float radius,const char *color_key)

The soft glow of the boards, an absolute full-screen view to add first in a frame: a radial gradient of color_key centred on (cx, cy), radius wide. Nothing with the lighter effects (cadran/ui/effects), without the glow (ui::prefs) or with AURORE_CADRAN_NOGLOW=1 (ui::env_flag).

cadran_frame.hpp:74
std::string upper(const std::string &text)

"Sécurité" -> "SÉCURITÉ": ASCII, Latin-1, œ and Cyrillic (the catalogs' scripts with a case); anything else is kept.

cadran_list.hpp:28
void add_note(const std::string &key,const char *icon,bool warn = false)

A paragraph of the app's that dialog_body() draws as a note, with icon (in amber with warn): one whose text starts as the text of the i18n key key does, up to its first "{}". The note kinds are the app's: added once at start-up.

cadran_modal.hpp:40
aurore::Box * dialog_body(const std::string &text)

A dialog's text laid out as the boards do (ui::dialog), left-aligned: its question as a title, a paragraph made with cadran_text::table as a table (its mark says so, not its words), the notes the app adds (add_note) at the bottom, small, each with its icon; any other paragraph as text.

cadran_modal.hpp:46
aurore::Label * dialog_title(const std::string &text)

A dialog's title as dialog_body sets it (the display face, 23 px).

cadran_modal.hpp:49
aurore::Box * dialog_badge(const char *icon,const char *color_key,const char *soft_key)

A round badge before a title: icon in color_key on soft_key.

cadran_modal.hpp:51
void style_dialog(aurore::Dialog *dialog,Emphasis emphasis = Emphasis::NONE)

dialog as a card, its buttons as pills. Once: a dressed dialog is left as it is (every screen that takes the focus comes through here, see install_screens). Call it after the dialog's last addButton. DANGER and FAILURE also put a coral warning before a dialog_body's title.

cadran_modal.hpp:57
void style_edit_text_dialog(aurore::EditTextDialog *dialog)

The desktop's text field (aurore::EditTextDialog) as a dialog's card, its title in it over the text. Once, as style_dialog (install_screens).

cadran_modal.hpp:61
void style_button(aurore::Button *button,Emphasis emphasis = Emphasis::NONE)

A button of a dialog's own, not of its row (one that must act before the dialog closes): a pill as style_dialog draws them, plain unless PRIMARY or DANGER.

cadran_modal.hpp:66
aurore::Box * wait_body(const std::string &text)

A dialog's body while something is under way: a spinner, and what is being done under it, centred.

cadran_modal.hpp:70
Progress progress_body(const std::string &heading,const std::string &title,const std::string &note = "")
void prompt_time(const std::string &header,std::vector< int > times,int initial,TimeButton off,TimeButton other,std::function< void(int)> on_value)
aurore::View * toast_icon(bool done)

A toast's icon: a check for something done, a warning for something not done.

cadran_modal.hpp:108

Enums 2

enum class Tone

The main screen's header pill: its text, or hidden when empty (each screen says what it has to: "Library up to date", "Play timer on"…), its icon, and its tone: amber for a state that needs the user, coral for something off that should be on. While the app writes nothing (ui::hooks' read_only), the pill says so instead, whatever the screen.

Value
OK
WARN
DANGER

cadran_frame.hpp:50

enum class Emphasis
ValueDescription
NONE

OK in teal, any other button plain.

PRIMARY

the last button is the confirmation: teal

DANGER

the same, in coral

FAILURE

something asked did not happen: the coral warning before the title, the buttons as NONE's

cadran_modal.hpp:27

Variables 3

constexpr constexpr float DIALOG_BUTTONS = 80

Under a dressed dialog's content: its button row (a 56 px pill and 24 px below), and what the card keeps from the screen's top and bottom.

cadran_modal.hpp:22
constexpr constexpr float DIALOG_MARGIN = 24
constexpr constexpr float PICKER_CORNER = 24

A picker's card: the radius of its corners.

kit::RADIUS_MODAL

cadran_modal.hpp:25

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