Namespace · cadran

cadran::kit

On this page

Classes 4

  • cadran::kit::BarA progress bar, 12 px high: the well, filled in teal up to set; the fill eases to each new value (at once with the motion off).
  • cadran::kit::ChipA rounded chip with a text in the display face (an amount, a period…).
  • cadran::kit::EmptyWhat an empty list shows instead: a card with icon_name in a soft circle, title (why it is empty) and text under it (what will come; may be empty), centred; box takes an action…
  • cadran::kit::MarkA pill's mark: its colour, and a shape that says the same to whom the colours look alike (WCAG 1.4.1): a check for what is on (teal), a triangle for what needs the user (amber,…

Functions 22

NVGcolor color(const char *key)

A theme colour of the boards ("cadran/teal"…), for what draws itself: looked up when drawing, it follows the theme. A view's colour is set by its key instead (View::setThemeColor), to follow a theme change.

cadran_kit.hpp:38
aurore::Label * label(const std::string &text,float size,const char *color_key = "cadran/text")

A label of size px in the theme colour color_key ("cadran/text2"…); several lines when it has to.

cadran_kit.hpp:42
aurore::Label * display(const std::string &text,float size,const char *color_key = "cadran/text")

The same in the boards' display face (Sora; the other scripts from the app's fonts): a dialog's title, a code to read out, a figure.

cadran_kit.hpp:46
CadranIcon * icon(const char *name,float size,const char *color_key = "cadran/text2")

An icon of the boards, size px square.

cadran_kit.hpp:49
aurore::Box * card(bool focusable, bool grow)

A card: the surface, a 1 px line, rounded; focusable takes the focus ring (no highlight fill), and is said as a cell with the texts in it; grow shares a row with its neighbours.

cadran_kit.hpp:54
aurore::Box * top_card(bool grow)

A card at the top of a screen (not a list: no rows), larger, grow shares a row.

cadran_kit.hpp:58
void set_kicker(aurore::Label *label, const std::string &text = "")

A kicker's look, the one every section title and board's line above its headline takes: TEXT_KICKER, the second ink, text in capitals (none: the label's text kept, its look only).

cadran_kit.hpp:62
aurore::Box * kicker(const char *icon_name, const std::string &title)

A kicker with an icon before it, in a card: an icon and a title in capitals.

cadran_kit.hpp:64
aurore::Box * pill(const std::string &text, const char *dot_key)

A pill: a mark of dot_key (its first child) and its text, on a thin border.

cadran_kit.hpp:91
aurore::Box * key(const char *letter, float size = 24)

A controller key as the boards draw it: its letter ("A", "Y", "L") in a round bubble, size px across, no margins.

cadran_kit.hpp:95
aurore::Box * qr(const std::string &payload,float side,const std::string &title,const std::string &caption,float width = 0)

A QR code of payload, side px (dark on white whatever the theme, as phones read it best), its title under it and a caption smaller (either may be empty), centred; width (0: the code's own) keeps cards alike.

cadran_kit.hpp:100
aurore::Box * chip(const std::string &text, float height = 48)
Empty empty(const char *icon_name)
aurore::Box * empty_around(aurore::Label *label, const char *icon_name)

The same around a screen's own label (its XML's, which it fills and shows): the label becomes the card's title, in place, and ui::set_visible on it shows or hides the whole card. Returns the card.

cadran_kit.hpp:148
void wrap(aurore::View *row)

A row whose items go on to the next line when they do not fit (the XML has no attribute for it).

cadran_kit.hpp:152
void fit_button(aurore::Button *button)

A button of such a row laid out by its text at the normal size: the row breaks only where it would at that size, and with the larger text (ui/text_size) the button's text is drawn smaller again, down to its size, rather than pushing the button to a line of its own (aurore::Label::setFontScale). Again after its text changes.

cadran_kit.hpp:159
void fit_head(aurore::Box *row)

A card's head: its title, then its state on the right; the state under the title when a language (or the larger text) leaves no room for both, each whole ("Jugendschutz", not "Jugendschut" over "z").

cadran_kit.hpp:164
void draw_more_below(NVGcontext *vg,aurore::ScrollingFrame *frame,float x,float y,float width,float height,const char *color_key,float corner = 0.0f)

Over the foot of a scrolling frame drawn at (x, y, width, height): the background (color_key) fading in over 32 px while there is more below, so a line cut by the frame's edge reads as "more", not as the end. corner: the radius of the card whose foot the frame's is (a picker's list), the fade then inside its rounded corners and its 1 px border.

cadran_kit.hpp:171
std::string without_chevron(const std::string &value)

"12 changes ›" -> "12 changes"; "›" -> "".

cadran_kit.hpp:175
const char * dot_of(NVGcolor value_color)

The value colour a line was given, as a dot: teal (ok), amber (warn), coral (bad), or the quiet one.

cadran_kit.hpp:179
std::string long_date()

"jeudi 8 octobre", from the console's clock, in the app's language; the same for a "2026-10-08" (the text itself when it is not a date).

cadran_kit.hpp:183
std::string long_date(const std::string &ymd)

Variables 11

constexpr constexpr float RADIUS_ROW = 14

The boards' corners, and the XML's (@style/cadran/radius/<name>, cadran::install_theme): a row on its own, a table, a picker's row (ROW); a game's icon (ICON); a card of a list, a tile (CARD); a screen's top card (TOP); a dialog's and a picker's card (MODAL). A pill is round: half its height.

cadran_kit.hpp:19
constexpr constexpr float RADIUS_ICON = 12
constexpr constexpr float RADIUS_CARD = 20
constexpr constexpr float RADIUS_TOP = 22
constexpr constexpr float RADIUS_MODAL = 24
constexpr constexpr float TEXT_META = 15

The boards' type scale: what is said in passing (a code, a caption, a pill), a section's kicker in capitals, a note under the lines, a line's text, a dialog's paragraph, a dialog's title (in the display face).

cadran_kit.hpp:28
constexpr constexpr float TEXT_KICKER = 16
constexpr constexpr float TEXT_NOTE = 16.5f
constexpr constexpr float TEXT_BODY = 17
constexpr constexpr float TEXT_LEAD = 19
constexpr constexpr float TEXT_TITLE = 23

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