Class · aurore

aurore::ThemeDecorations

On this page
aurore/core/theme_decor.hpp
#include <aurore/core/theme_decor.hpp>

class aurore::ThemeDecorations

Description

What a theme decorates the screens with (docs/themes.md, Decorations), in the variant in use: a picture over the surface of an area (the header, the sidebar, the dialogs: View::setThemeArea), strips along the top and bottom edges of the screen, particles. Application draws them; without them nothing is drawn and nothing changes.

The particles move only when motion is allowed (Application::getReduceMotion() false: neither the app's reduced motion nor, with Cadran, its lighter or reduced visual effects or still screenshots), else nothing of them is drawn. They move at PARTICLE_FPS (with redraw on demand, the frames they ask for), and stop after IDLE_SECONDS without input (they fade out, and ask for no frame until the next input). They never take the focus, an input or a touch, and are no view: the layout does not know them.

Only the UI thread calls these.

Static functions 9

static void update(ThemeVariant variant)

The theme or the variant changed (Application): the pictures of variant loaded (those of the theme before stay until they are ready), its particles set up from its colours.

theme_decor.hpp:60
static void drawBackdrop(ThemeArea area,NVGcontext *vg,float x,float y,float width,float height,float radius = 0.0f)

The picture of area (HEADER, SIDEBAR, DIALOG) over x, y, width, height, with corners of radius; nothing without one.

theme_decor.hpp:66
static void drawStrips(NVGcontext *vg,float x,float y,float width,float height)

The strips (decor.top, decor.bottom) along the edges of the screen, the part of them over x, y, width, height.

theme_decor.hpp:72
static void drawParticles(NVGcontext *vg,ParticleLayer layer,float width,float height)

The particles of layer over the screen (width, height: the layout's), where they are now; nothing while they do not run.

theme_decor.hpp:78
static bool step(Time now)

Once per iteration of the main loop, after the input: whether the particles moved since the frame last drawn (a frame is due, with redraw on demand).

theme_decor.hpp:85
static bool particlesRunning()

Whether the particles are shown and moving now: the theme has some, motion is allowed, there was input in the last IDLE_SECONDS (and the time they take to fade out).

theme_decor.hpp:92
static int particleCount()

How many particles the theme in use has (0 without), running or not.

theme_decor.hpp:97
static bool hasPicture(ThemeArea area)

Whether the theme in use has a strip or a backdrop picture loaded.

theme_decor.hpp:102
static void reset()

Lets go of every picture (Application::exit).

theme_decor.hpp:107

Static attributes 3

static constexpr constexpr int MAX_PARTICLES = 60
static constexpr constexpr int PARTICLE_FPS = 30
static constexpr constexpr int IDLE_SECONDS = 60

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