|
Uni20
Asynchronous tensor and runtime library.
|
Callable style wrapper that builds styled presentation text. More...
#include <presentation.hpp>
Public Member Functions | |
| styled_text | operator() (char const *text) const |
| Build a styled text span from literal text. | |
| template<typename... Args> requires (sizeof...(Args) > 0) | |
| styled_text | operator() (fmt::format_string< Args... > format, Args &&... args) const |
Format text with fmt and apply this style. | |
| styled_text | operator() (semantic_glyph glyph) const |
| Build a styled semantic glyph span. | |
| styled_text | operator() (semantic_glyph glyph, char const *text) const |
| Build a styled semantic glyph followed by styled literal text. | |
| template<typename... Args> requires (sizeof...(Args) > 0) | |
| styled_text | operator() (semantic_glyph glyph, fmt::format_string< Args... > format, Args &&... args) const |
| Build a styled semantic glyph followed by formatted styled text. | |
| styled_text | operator() (semantic_glyph glyph, std::string_view text) const |
| Build a styled semantic glyph followed by styled literal text. | |
| styled_text | operator() (std::string_view text) const |
| Build a styled text span from literal text. | |
| template<typename T > requires (!std::is_convertible_v<T &&, std::string_view> && !std::same_as<std::remove_cvref_t<T>, semantic_glyph>) | |
| styled_text | operator() (T &&value) const |
Format one non-string value with fmt and apply this style. | |
| terminal::TerminalStyle const & | terminal_style () const noexcept |
| Return the terminal style metadata carried by this wrapper. | |
| text_style ()=default | |
| Construct an empty style wrapper. | |
| text_style (char const *spec) | |
| Construct from a terminal style specification string. | |
| text_style (std::string_view spec) | |
| Construct from a terminal style specification string. | |
| text_style (terminal::TerminalStyle style) | |
| Construct from an existing terminal style. | |
Callable style wrapper that builds styled presentation text.
text_style keeps style metadata attached to spans without rendering ANSI escape sequences. Final renderers still apply color, charset, glyph, and display-width policy.
|
default |
Construct an empty style wrapper.
|
inlineexplicit |
Construct from an existing terminal style.
| style | Terminal style metadata to apply to generated spans. |
|
inlineexplicit |
Construct from a terminal style specification string.
| spec | Style specification such as "Red;Bold". |
|
inlineexplicit |
Construct from a terminal style specification string.
| spec | Style specification such as "Red;Bold". |
|
inline |
Build a styled text span from literal text.
| text | Null-terminated text payload encoded as UTF-8. |
|
inline |
Format text with fmt and apply this style.
| Args | Format argument types. |
| format | Compile-time checked format string. |
| args | Format arguments. |
|
inline |
Build a styled semantic glyph span.
| glyph | Semantic glyph to render according to policy. |
|
inline |
Build a styled semantic glyph followed by styled literal text.
| glyph | Semantic glyph to render according to policy. |
| text | Null-terminated text payload encoded as UTF-8. |
|
inline |
Build a styled semantic glyph followed by formatted styled text.
| Args | Format argument types. |
| glyph | Semantic glyph to render according to policy. |
| format | Compile-time checked format string. |
| args | Format arguments. |
|
inline |
Build a styled semantic glyph followed by styled literal text.
| glyph | Semantic glyph to render according to policy. |
| text | Text payload encoded as UTF-8. |
|
inline |
Build a styled text span from literal text.
| text | Text payload encoded as UTF-8. |
|
inline |
Format one non-string value with fmt and apply this style.
| T | Value type. |
| value | Value to format with the default {} formatter. |
|
inlinenoexcept |
Return the terminal style metadata carried by this wrapper.