Class · aurore

aurore::Slider

On this page
aurore/views/slider.hpp
#include <aurore/views/slider.hpp>

class aurore::Slider : public aurore::Box

Constructors 1

Slider()

Functions 11

virtual void onLayout() override

Called when a layout pass ends on that view.

Overrides aurore::View::onLayout

slider.hpp:34
virtual View * getDefaultFocus() override

Returns the default view to focus when focusing this view Typically the view itself or one of its children.

Returning nullptr means that the view is not focusable (and neither are its children)

By default, a view is focusable if the flag is set to true with setFocusable() and if the view is visible.

When pressing a key, the flow is :

  1. starting from the currently focused view's parent, traverse the tree upwards and repeatedly call getNextFocus() on every view until we find a next view to focus or meet the end of the tree
  2. if a view is found, getNextFocus() will internally call getDefaultFocus() for the selected child
  3. give focus to the result, if it exists

Overrides aurore::Box::getDefaultFocus

slider.hpp:35
virtual void draw(NVGcontext *vg,float x,float y,float width,float height,Style style,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::Box::draw

slider.hpp:36
void setProgress(float progress)
float getProgress()
Event< float > * getProgressEvent()
void setStep(float step)
void setDiscreteStep(float step)

When above 0, the D-pad moves the slider by this much a press (held, it repeats), on a grid of that step, instead of gliding at step a second. 0 by default.

slider.hpp:51
Event< float > * getInputProgressEvent()

Fired with the value once the user lets go (the D-pad released, the finger lifted), where getProgressEvent fires at every change: to save or apply a value only once it is chosen.

slider.hpp:58
bool isProgressing()
void setPointerSize(float size)

Also the functions of aurore::Box (53), aurore::View (221).

Static functions 1

static View * create()

Protected functions 3

virtual AccessibilityRole getDefaultAccessibilityRole() override

The view's own role and label when the app gave none.

Overrides aurore::View::getDefaultAccessibilityRole

slider.hpp:70
virtual std::string getDefaultAccessibilityLabel() override

A focusable box says the texts shown in it (getAccessibilityText).

Overrides aurore::Box::getDefaultAccessibilityLabel

slider.hpp:71
virtual std::string getDefaultAccessibilityValue() override

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