Class

CadranSwatch

On this page
aurore/cadran/view/cadran_icon.hpp
#include <aurore/cadran/view/cadran_icon.hpp>

class CadranSwatch : public aurore::View

Description

A few colours shown in an icon's place, the size of a row's icon square (cadran::List::row): a palette's in its picker (ui::pick()'s swatches). A rounded square of background, ring as a border inside it, motif (a CadranIcon's name; "sparkle" when it has none or an unknown one) in ink; around it a hairline in the theme's cadran/line, so that a dark swatch still shows on a dark sheet. With a picture (a theme's preview), that picture instead, cover-fitted in the rounded square with the hairline: decoded on the decode thread when the swatch is made (ThemeImages), the colours shown until it is ready, or when it cannot be read; freed with the swatch.

Nested classes

Constructors 1

explicit CadranSwatch(Colors colors)

Functions 1

virtual void draw(NVGcontext *vg,float x,float y,float width,float height,aurore::Style style,aurore::FrameContext *ctx) override

Called by frame() to draw the view onscreen. Views should not draw outside of their bounds (they may be clipped if they do so).

Overrides aurore::View::draw

cadran_icon.hpp:86

Also the functions of aurore::View (221).

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