Magnum::Ui::StyleConfiguration class

Style configuration.

Constructors, destructors, conversion operators

StyleConfiguration() explicit
Default constructor.

Public functions

auto fontSize() const -> Float
Font size.
auto setFontSize(Float size) -> StyleConfiguration&
Set font size.
auto borderWidth() const -> Float
Border width.
auto setBorderWidth(Float width) -> StyleConfiguration&
Set border width.
auto cornerRadius() const -> Float
Corner radius.
auto setCornerRadius(Float radius) -> StyleConfiguration&
Set corner radius.
auto cornerSmoothnessIn() const -> Float
Corner smoothness inside.
auto setCornerSmoothnessIn(Float smoothness) -> StyleConfiguration&
Set corner smoothness inside.
auto cornerSmoothnessOut() const -> Float
Corner smoothness outside.
auto setCornerSmoothnessOut(Float smoothness) -> StyleConfiguration&
Set corner smoothness outside.
auto padding() const -> Vector2
Padding inside of a widget.
auto setPadding(const Vector2& padding) -> StyleConfiguration&
Set padding inside of a widget.
auto margin() const -> Vector2
Margin between widgets.
auto setMargin(const Vector2& margin) -> StyleConfiguration&
Set margin between widgets.
auto backgroundColor(Type type, Style style, State state) const -> Color4
Background color.
auto setBackgroundColor(Type type, Style style, State state, const Color4& color) -> StyleConfiguration&
Set background color.
auto topFillColor(Type type, Style style, State state) const -> Color4
Top fill color.
auto setTopFillColor(Type type, Style style, State state, const Color4& color) -> StyleConfiguration&
Set top fill color.
auto bottomFillColor(Type type, Style style, State state) const -> Color4
Bottom fill color.
auto setBottomFillColor(Type type, Style style, State state, const Color4& color) -> StyleConfiguration&
Set bottom fill color.
auto borderColor(Type type, Style style, State state) const -> Color4
Border color.
auto setBorderColor(Type type, Style style, State state, const Color4& color) -> StyleConfiguration&
Set border color.
auto textColor(Type type, Style style, State state) const -> Color4
Text color.
auto setTextColor(Type type, Style style, State state, const Color4& color) -> StyleConfiguration&
Set text color.
void pack(GL::Buffer& backgroundUniforms, GL::Buffer& foregroundUniforms, GL::Buffer& textUniforms) const
Pack style configuration into OpenGL uniform buffers.

Function documentation

Magnum::Ui::StyleConfiguration::StyleConfiguration() explicit

Default constructor.

Sets everything to zero or transparent.

StyleConfiguration& Magnum::Ui::StyleConfiguration::setFontSize(Float size)

Set font size.

Returns Reference to self (for method chaining)

StyleConfiguration& Magnum::Ui::StyleConfiguration::setBorderWidth(Float width)

Set border width.

Returns Reference to self (for method chaining)

StyleConfiguration& Magnum::Ui::StyleConfiguration::setCornerRadius(Float radius)

Set corner radius.

Returns Reference to self (for method chaining)

StyleConfiguration& Magnum::Ui::StyleConfiguration::setCornerSmoothnessIn(Float smoothness)

Set corner smoothness inside.

Returns Reference to self (for method chaining)

StyleConfiguration& Magnum::Ui::StyleConfiguration::setCornerSmoothnessOut(Float smoothness)

Set corner smoothness outside.

Returns Reference to self (for method chaining)

StyleConfiguration& Magnum::Ui::StyleConfiguration::setPadding(const Vector2& padding)

Set padding inside of a widget.

Returns Reference to self (for method chaining)

StyleConfiguration& Magnum::Ui::StyleConfiguration::setMargin(const Vector2& margin)

Set margin between widgets.

Returns Reference to self (for method chaining)

Color4 Magnum::Ui::StyleConfiguration::backgroundColor(Type type, Style style, State state) const

Background color.

Expects that given combination is supported.

StyleConfiguration& Magnum::Ui::StyleConfiguration::setBackgroundColor(Type type, Style style, State state, const Color4& color)

Set background color.

Returns Reference to self (for method chaining)

Expects that given combination is supported.

Color4 Magnum::Ui::StyleConfiguration::topFillColor(Type type, Style style, State state) const

Top fill color.

Expects that given combination is supported.

StyleConfiguration& Magnum::Ui::StyleConfiguration::setTopFillColor(Type type, Style style, State state, const Color4& color)

Set top fill color.

Returns Reference to self (for method chaining)

Top color of the fill gradient. Expects that given combination is supported.

Color4 Magnum::Ui::StyleConfiguration::bottomFillColor(Type type, Style style, State state) const

Bottom fill color.

Expects that given combination is supported.

StyleConfiguration& Magnum::Ui::StyleConfiguration::setBottomFillColor(Type type, Style style, State state, const Color4& color)

Set bottom fill color.

Returns Reference to self (for method chaining)

Bottom color of the fill gradient. Expects that given combination is supported.

Color4 Magnum::Ui::StyleConfiguration::borderColor(Type type, Style style, State state) const

Border color.

Expects that given combination is supported.

StyleConfiguration& Magnum::Ui::StyleConfiguration::setBorderColor(Type type, Style style, State state, const Color4& color)

Set border color.

Returns Reference to self (for method chaining)

Expects that given combination is supported.

Color4 Magnum::Ui::StyleConfiguration::textColor(Type type, Style style, State state) const

Text color.

Expects that given combination is supported.

StyleConfiguration& Magnum::Ui::StyleConfiguration::setTextColor(Type type, Style style, State state, const Color4& color)

Set text color.

Returns Reference to self (for method chaining)

Expects that given combination is supported.