Class

CadranDigits

A line of text in Cadran's display face (Sora): big figures, card values, chips.

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

class CadranDigits : public aurore::View

Constructors 1

CadranDigits()

Functions 14

void setText(const std::string &text)
const std::string & getText() const
void setFontSize(float size)
void setTextColor(NVGcolor color)
virtual bool getStyleProperty(const std::string &name,aurore::StyleValue *value) override

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

Overrides aurore::View::getStyleProperty

cadran_digits.hpp:23
virtual bool setStyleProperty(const std::string &name,const aurore::StyleValue &value) override
void setFitWidth(float width)

At most that wide: a longer text is drawn smaller to fit (0: never).

cadran_digits.hpp:26
void setFitParent(bool fit)

At most as wide as its parent is laid out: a longer text is drawn smaller to fit, the room beside it whatever the language (fitWidth then follows the parent).

cadran_digits.hpp:30
void setSmallUnits(bool small)

The figures at the font size, the words between them (min, h, a unit in any language) at half of it, on the same baseline: "40 min", "1 h 20" as a dial writes them. A text with no figure keeps one size.

cadran_digits.hpp:34
void setFollowsTextSize(bool follows)

Drawn Preferences › Text size's times larger, as the labels are (ui/text_size); off by default, the figures sized for their place.

cadran_digits.hpp:37
void setRolls(bool rolls)

A new text rolls in from below while the old one leaves upwards (a counter's wheel), once a text was shown; off by default. Nothing with the motion off (ui/effects).

cadran_digits.hpp:41
void remeasure()

The size taken again after the text size changed (ui/text_size).

cadran_digits.hpp:43
virtual void onTextScaleChanged() override

Called on every view of the screens when the text scale changes (Application::setTextScale): a view that measures text marks itself dirty here.

Overrides aurore::View::onTextScaleChanged

cadran_digits.hpp:44
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_digits.hpp:46

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

Static functions 1

static aurore::View * create()

Protected functions 2

virtual aurore::AccessibilityRole getDefaultAccessibilityRole() override

Said as a label's text (a chip, a card say it).

Overrides aurore::View::getDefaultAccessibilityRole

cadran_digits.hpp:53
virtual std::string getDefaultAccessibilityLabel() override

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