GCC Middle and Back End API Reference
|
#include <types.h>
Public Member Functions | |
styled_string ()=default | |
styled_string (style_manager &sm, const char *str) | |
styled_string (cppchar_t cppchar, bool emoji=false) | |
styled_string (styled_string &&)=default | |
styled_string & | operator= (styled_string &&)=default |
styled_string (const styled_string &)=delete | |
styled_string & | operator= (const styled_string &)=delete |
styled_string | copy () const |
bool | operator== (const styled_string &other) const |
static styled_string static styled_string size_t | size () const |
styled_unichar | operator[] (size_t idx) const |
std::vector< styled_unichar >::const_iterator | begin () const |
std::vector< styled_unichar >::const_iterator | end () const |
int | calc_canvas_width () const |
void | append (const styled_string &suffix) |
void | set_url (style_manager &sm, const char *url) |
Static Public Member Functions | |
static styled_string | from_fmt (style_manager &sm, printer_fn format_decoder, const char *fmt,...) ATTRIBUTE_GCC_PPDIAG(3 |
static styled_string static styled_string | from_fmt_va (style_manager &sm, printer_fn format_decoder, const char *fmt, va_list *args) ATTRIBUTE_GCC_PPDIAG(3 |
Private Attributes | |
std::vector< styled_unichar > | m_chars |
|
explicitdefault |
Referenced by append(), copy(), from_fmt(), from_fmt_va(), operator=(), operator=(), operator==(), styled_string(), and styled_string().
|
explicit |
class text_art::styled_string.
Construct a styled_string from STR. STR is assumed to be UTF-8 encoded and 0-terminated. Parse SGR formatting chars from being in-band (within in the sequence of chars) to being out-of-band, as style elements. We only support parsing the subset of SGR chars that can be emitted by pretty-print.cc
References m_chars.
References text_art::style::id_plain, and m_chars.
|
default |
References styled_string().
|
delete |
References styled_string().
void styled_string::append | ( | const styled_string & | suffix | ) |
References begin(), end(), m_chars, and styled_string().
|
inline |
int styled_string::calc_canvas_width | ( | ) | const |
References m_chars.
|
inline |
References m_chars, and styled_string().
|
inline |
|
static |
References ap, from_fmt_va(), and styled_string().
|
static |
References errno, pp_format(), pp_format_decoder(), pp_formatted_text(), pp_output_formatted_text(), pp_show_color(), pretty_printer::set_url_format(), styled_string(), and URL_FORMAT_DEFAULT.
Referenced by from_fmt(), and text_art::tree_widget::from_fmt().
|
delete |
References styled_string().
|
default |
References styled_string().
|
inline |
References m_chars, and styled_string().
|
inline |
References m_chars.
void styled_string::set_url | ( | style_manager & | sm, |
const char * | url ) |
|
inline |
|
private |
Referenced by append(), begin(), calc_canvas_width(), copy(), end(), operator==(), operator[](), set_url(), size(), styled_string(), and styled_string().