Class · aurore

aurore::Button

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

class aurore::Button : public aurore::Box

Constructors 1

Button()

Functions 12

virtual void onFocusGained() override

Fired when focus is gained.

Overrides aurore::Box::onFocusGained

button.hpp:150
virtual void onFocusLost() override

Fired when focus is lost.

Overrides aurore::Box::onFocusLost

button.hpp:151
void setStyle(const ButtonStyle *style)

Sets the style of the button. can be a pointer to one of the BUTTONSTYLE constants or any other user created style.

button.hpp:159
void setState(ButtonState state)

Sets the state of the button.

button.hpp:164
ButtonState getState()

Gets the state of the button.

button.hpp:169
void setText(std::string text)

Sets the text of the button.

button.hpp:174
void setFontSize(float value)

Sets the font sise of the button.

button.hpp:179
void setTextColor(NVGcolor color)

Override style text color of the button.

button.hpp:184
std::string getText()

Returns the text of the button

button.hpp:189
virtual bool getStyleProperty(const std::string &name,StyleValue *value) override

The style properties the states and transitions work on, by name: backgroundColor, borderColor, lineColor (colours), borderThickness, cornerRadius, alpha, scale (numbers); a Label adds textColor, a Rectangle color, a Button textColor. Only properties that are drawn, never laid out. A subclass adds its own by overriding both and calling the base for the others.

Overrides aurore::View::getStyleProperty

button.hpp:192
virtual bool setStyleProperty(const std::string &name,const StyleValue &value) override
virtual bool setBoundText(const std::string &text) override

Sets the view's text, for bind="text: …"; false when it has none.

Overrides aurore::View::setBoundText

button.hpp:194

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

Static functions 1

static View * create()

Protected functions 2

virtual AccessibilityRole getDefaultAccessibilityRole() override

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

Overrides aurore::View::getDefaultAccessibilityRole

button.hpp:197
virtual std::string getDefaultAccessibilityLabel() override

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

Overrides aurore::Box::getDefaultAccessibilityLabel

button.hpp:198

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