|
HIPO
4.3.0
High Performance Output data format for experimental physics
|
Styled text element for terminal output with ANSI color support. More...
#include <text.h>
Public Member Functions | |
| Text () | |
| Default constructor. Creates an empty text with default style. More... | |
| Text (std::string text) | |
| Construct a Text with the given string and default style. More... | |
| Text (std::string text, Style style) | |
| Construct a Text with the given string and style. More... | |
| Text & | style (Style style) |
| Set the style for this text. More... | |
| Text & | text (std::string text) |
| Set the text content. More... | |
| std::string | text () |
| Get the text content. More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Text &val) |
| Output the styled text to an output stream. Outputs the style, followed by the text content, followed by a reset decoration. More... | |
Styled text element for terminal output with ANSI color support.
A Text object combines a string with a Style (foreground color, background color, and decorations). When output to a stream, it applies the style before the text and resets the decoration afterwards.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |