Class

CadranIcon

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

class CadranIcon : public aurore::View

Description

One of Cadran's vector icons (<CadranIcon icon="today"> in XML), drawn as nanovg paths, or as the theme's picture for it (icon.<name>).

Constructors 1

CadranIcon()

Functions 6

void setIcon(const std::string &name)
void setColor(NVGcolor color)
virtual bool getStyleProperty(const std::string &name,aurore::StyleValue *value) override

"color" (setThemeColor, XML color="@theme/…")

Overrides aurore::View::getStyleProperty

cadran_icon.hpp:34
virtual bool setStyleProperty(const std::string &name,const aurore::StyleValue &value) override
void pop()

The icon pops into place (grows from nothing, a little past its size, then settles): a check that was just earned. Nothing with the motion off (ui/effects).

cadran_icon.hpp:39
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:41

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

Static functions 3

static aurore::View * create()
static bool glyph(NVGcontext *vg,const std::string &name,NVGcolor color,float width,float height)

Draws the icon name in color, filling a width by height box at the origin (nvgTranslate first): what a view of its own draws in an icon's place. False when no icon has that name (nothing drawn). The theme's picture for it when it has one (fitted in the box, its ratio kept), once loaded; else the drawing.

cadran_icon.hpp:51
static const std::vector< std::string > & names()

Every icon's name but "mark" (what a theme's icon.<name> may replace).

cadran_icon.hpp:54

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