Class · cadran
cadran::List
On this page
#include <aurore/cadran/ui/cadran_list.hpp>
class cadran::ListDescription
The 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.
Constructors 2
explicit List(aurore::View *tab, bool sub_screen = false) A screen inflated from one of the list XMLs (a ScrollView and its column): a tab (sub_screen false: the rail at its left) or a screen of its own (wider margins).
List(aurore::View *screen, aurore::Box *column) A column built by its screen's own code (column, under screen, whose ids it looks up), its padding left as it is: a list rebuilt as its entries change dresses each new column before showing it.
Functions 9
aurore::Box * content() const The column of lines (nullptr when the tab has none).
cadran_list.hpp:78aurore::Box * tiles( const std::vector< std::pair< const char *, const char * > > &cells,bool status)Turns these cells (direct lines of the column) into tiles on one row, where the first one was: status tiles show a reading (title small, value large, no chevron), the others an action (icon then title on one line, its words on the next, each smaller rather than on two). Before apply(). Returns the row.
A status tile's state beside its value, by its shape and colour as Today's pills: "cadran/teal_fill" a check (as it should be), "cadran/amber_fill" a warning (needs the user); nullptr: none.
cadran_list.hpp:90A status tile's pill under its value ("23.0.1 available"; empty: none): in amber on its amber ground, the tile outlined in amber, when warn (something to do), else in the calm pill colours ("Up to date"); and note under it, smaller ("2 versions behind"; empty: none), in amber when warn. A note without a pill stands alone.
aurore::Box * head(const char *id) const A tile's head (its icon's row, an action tile's title in it too), for a sign at its far end (RowIcon, TabBadge): the tile's corner, not under its value.
cadran_list.hpp:102Card * wrap(const char *id) Puts this line (not a cell: a box of text) in a card of its own.
cadran_list.hpp:105Restyles every other line; icons: cell id -> icon name. A line that opens a screen keeps the app's own "›" at the end of its value.
Card * card_of(const char *id) const The card holding this cell (after apply()).
cadran_list.hpp:112After the tab's refresh(): the headers' titles in capitals again (a tab may set them, e.g. About's "What's new in …"), and a status tile's plain value in the text colour (its warnings keep theirs).
cadran_list.hpp:117Static functions 6
static void section(aurore::Header *header) For the lists a screen fills itself (its own code finds its lines where it put them, so nothing is moved): a section title, and a cell as a row of a card (apply()'s own), or as a card of its own (alone).
static void row_image( aurore::DetailCell *cell,const std::string &image)The same with a picture in its icon's place (a resource, "img/…png": a language's flag), drawn as it is, without the square.
cadran_list.hpp:126static void row_swatch( aurore::DetailCell *cell,const CadranSwatch::Colors &colors)The same with a swatch of colours in its icon's place (CadranSwatch).
cadran_list.hpp:128static void recolor_icon( aurore::DetailCell *cell,const char *icon,const char *color_key,const char *square_key = nullptr)A row's icon (row()'s, at its start) changed: another icon (nullptr: the same), in color_key, on square_key (nullptr: the usual square).
static aurore::Box * rows_in(aurore::Box *list) The box a screen's rows go in: a card in list (made the first time). The screen clears and fills that one.
Read from Aurore's headers by Doxygen at each build · library/include