Class · cadran

cadran::List

On this page
aurore/cadran/ui/cadran_list.hpp
#include <aurore/cadran/ui/cadran_list.hpp>

class cadran::List

Description

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).

cadran_list.hpp:71
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.

cadran_list.hpp:75

Functions 9

aurore::Box * content() const

The column of lines (nullptr when the tab has none).

cadran_list.hpp:78
aurore::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.

cadran_list.hpp:85
void state(const char *id, const char *color_key)

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:90
void tag(const char *id,const std::string &text,bool warn,const std::string &note = "")

A 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.

cadran_list.hpp:97
Card * wrap(const char *id)

Puts this line (not a cell: a box of text) in a card of its own.

cadran_list.hpp:105
void apply(const std::vector< std::pair< const char *, const char * > > &icons)

Restyles 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.

cadran_list.hpp:109
Card * card_of(const char *id) const

The card holding this cell (after apply()).

cadran_list.hpp:112
void sync()

After 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:117

Static 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).

cadran_list.hpp:122
static void row(aurore::DetailCell *cell,const char *icon = nullptr,bool alone = false)
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:126
static 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:128
static 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).

cadran_list.hpp:131
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.

cadran_list.hpp:135

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