Magnum::Ui::TextLayerEditingStyleUniform struct new in Git master

TextLayer editing style uniform

Instances of this class together with TextLayerCommonEditingStyleUniform contain style properties that are used by the TextLayer shaders to draw the layer editing data such as cursors and selection rectangles, packed in a form that allows direct usage in uniform buffers. Total count of styles is specified with TextLayer::Shared::Configuration::setEditingStyleCount(), uniforms are then uploaded using TextLayer::Shared::setEditingStyle(), style data that aren't used by the shader are passed to the function separately.

Constructors, destructors, conversion operators

TextLayerEditingStyleUniform(DefaultInitT = DefaultInit) explicit constexpr noexcept
Construct with default values.
TextLayerEditingStyleUniform(const Color4& backgroundColor, Float cornerRadius) constexpr
Constructor.
TextLayerEditingStyleUniform(NoInitT) explicit noexcept
Construct without initializing the contents.

Public variables

Color4 backgroundColor
Selection background color.
Float cornerRadius
Corner radius.

Convenience setters

Provided to allow the use of method chaining for populating a structure in a single expression, otherwise equivalent to accessing the fields directly. Also guaranteed to provide backwards compatibility when packing of the actual fields changes.

auto setBackgroundColor(const Color4& color) -> TextLayerEditingStyleUniform&
Set the backgroundColor field.
auto setCornerRadius(Float radius) -> TextLayerEditingStyleUniform&
Set the cornerRadius field.

Function documentation

TextLayerEditingStyleUniform& Magnum::Ui::TextLayerEditingStyleUniform::setBackgroundColor(const Color4& color)

Set the backgroundColor field.

Returns Reference to self (for method chaining)

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

Set the cornerRadius field.

Returns Reference to self (for method chaining)

Variable documentation

Color4 Magnum::Ui::TextLayerEditingStyleUniform::backgroundColor

Selection background color.

Default value is 0xffffffff_srgbf. The selection text color is applied directly to individual glyphs and is thus supplied separately in TextLayer::Shared::setEditingStyle().

Float Magnum::Ui::TextLayerEditingStyleUniform::cornerRadius

Corner radius.

Default value is 0.0f. Note that unlike BaseLayerStyleUniform::cornerRadius this is just a single value for all corners.