Loading...
Searching...
No Matches
ml::TextAttribute Struct Reference

A styled attribute range applied to a span of characters. More...

#include <Malena/Graphics/Text/RichTextBuffer.h>

Public Member Functions

 TextAttribute ()

Public Attributes

std::optional< bool > bold
 nullopt = inherit
std::optional< unsigned int > charSize
 nullopt = inherit default size
std::optional< sf::Colorcolor
 nullopt = inherit default color
std::size_t end = 0
 Last character index (exclusive).
const sf::Fontfont
 nullptr = inherit default font
std::optional< bool > italic
 nullopt = inherit
std::size_t start = 0
 First character index (inclusive).
std::optional< bool > underline
 nullopt = inherit

Detailed Description

A styled attribute range applied to a span of characters.

Each field is optional — std::nullopt means "inherit the default from the parent component." Only fields that are explicitly set override the component default.

See also
RichTextBuffer

Definition at line 31 of file RichTextBuffer.h.

Constructor & Destructor Documentation

◆ TextAttribute()

ml::TextAttribute::TextAttribute ( )
inline

Definition at line 43 of file RichTextBuffer.h.

Member Data Documentation

◆ bold

std::optional<bool> ml::TextAttribute::bold

nullopt = inherit

Definition at line 39 of file RichTextBuffer.h.

◆ charSize

std::optional<unsigned int> ml::TextAttribute::charSize

nullopt = inherit default size

Definition at line 37 of file RichTextBuffer.h.

◆ color

std::optional<sf::Color> ml::TextAttribute::color

nullopt = inherit default color

Definition at line 38 of file RichTextBuffer.h.

◆ end

std::size_t ml::TextAttribute::end = 0

Last character index (exclusive).

Definition at line 34 of file RichTextBuffer.h.

◆ font

const sf::Font* ml::TextAttribute::font

nullptr = inherit default font

Definition at line 36 of file RichTextBuffer.h.

◆ italic

std::optional<bool> ml::TextAttribute::italic

nullopt = inherit

Definition at line 40 of file RichTextBuffer.h.

◆ start

std::size_t ml::TextAttribute::start = 0

First character index (inclusive).

Definition at line 33 of file RichTextBuffer.h.

◆ underline

std::optional<bool> ml::TextAttribute::underline

nullopt = inherit

Definition at line 41 of file RichTextBuffer.h.


The documentation for this struct was generated from the following file: