GCC Middle and Back End API Reference
|
#include <types.h>
Data Structures | |
struct | color |
Public Types | |
enum class | named_color { DEFAULT , BLACK , RED , GREEN , YELLOW , BLUE , MAGENTA , CYAN , WHITE } |
typedef unsigned char | id_t |
Public Member Functions | |
style () | |
bool | operator== (const style &other) const |
style & | set_style_url (const char *url) |
Static Public Member Functions | |
static void | print_changes (pretty_printer *pp, const style &old_style, const style &new_style) |
Data Fields | |
bool | m_bold |
bool | m_underscore |
bool | m_blink |
bool | m_reverse |
color | m_fg_color |
color | m_bg_color |
std::vector< cppchar_t > | m_url |
Static Public Attributes | |
static const id_t | id_plain = 0 |
A combination of attributes describing how to style a text cell. We only support those attributes mentioned in invoke.texi: - bold, - underscore, - blink, - inverse, - colors for foreground and background: - default color - named colors - 16-color mode colors (the "bright" variants) - 88-color mode - 256-color mode plus URLs.
typedef unsigned char text_art::style::id_t |
|
strong |
|
inline |
References DEFAULT, false, m_bg_color, m_blink, m_bold, m_fg_color, m_reverse, m_underscore, and m_url.
Referenced by operator==(), and print_changes().
References m_bg_color, m_blink, m_bold, m_fg_color, m_reverse, m_underscore, m_url, and style().
|
static |
class text_art::style.
See https://www.ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf GRCM - GRAPHIC RENDITION COMBINATION MODE can be "REPLACING" or "CUMULATIVE", which affects whether we need to respecify all attributes at each SGR, or can accumulate them. Looks like we can't rely on the value of this, so we have to emit a single SGR for all changes, with a "0" reset at the front, forcing it to be effectively replacing.
References COLOR_BLINK, COLOR_BOLD, COLOR_NONE, COLOR_UNDERSCORE, ensure_separator(), gcc_assert, gcc_unreachable, pretty_printer::get_url_format(), m_bg_color, m_blink, m_bold, m_fg_color, m_underscore, m_url, pp_end_url(), pp_show_color(), pp_string(), pp_unicode_character(), text_art::style::color::print_sgr(), SGR_END, SGR_START, style(), pretty_printer::supports_urls_p(), URL_FORMAT_BEL, URL_FORMAT_NONE, and URL_FORMAT_ST.
Referenced by text_art::style_manager::print_any_style_changes().
style & style::set_style_url | ( | const char * | url | ) |
|
static |
Referenced by text_art::canvas::get_final_x_in_row(), and text_art::styled_string::styled_string().
color text_art::style::m_bg_color |
Referenced by operator==(), print_changes(), and style().
bool text_art::style::m_blink |
Referenced by operator==(), print_changes(), and style().
bool text_art::style::m_bold |
Referenced by operator==(), print_changes(), and style().
color text_art::style::m_fg_color |
Referenced by operator==(), print_changes(), and style().
bool text_art::style::m_reverse |
Referenced by operator==(), and style().
bool text_art::style::m_underscore |
Referenced by operator==(), print_changes(), and style().
std::vector<cppchar_t> text_art::style::m_url |
Referenced by operator==(), print_changes(), set_style_url(), and style().