libcsdbg
1.28
C++ exception (and generic) stack trace debug library
|
A set of formatting attributes for VT100 (and compatible) terminals. More...
#include <style.hpp>
Public Types | |
enum | { BOLD = 0x01, DIM = 0x02, UNDERLINED = 0x04, BLINKING = 0x08, INVERTED = 0x10, HIDDEN = 0x20 } |
Text formatting attributes of VT100 terminals. More... | |
enum | { CLEAR = 0x00, GRAY = 0x08, RED = 0x09, GREEN = 0x0A, YELLOW = 0x0B, BLUE = 0x0C, MAGENTA = 0x0D, CYAN = 0x0E, WHITE = 0x0F, BLACK = 0x10 } |
Basic palette of VT100 terminals. More... | |
Public Member Functions | |
style (const i8 *, color_t=WHITE, color_t=CLEAR, attrset_t=0) | |
Object constructor. More... | |
style (const style &) | |
Object copy constructor. More... | |
virtual | ~style () |
Object destructor. More... | |
virtual style * | clone () const |
Object virtual copy constructor. More... | |
virtual const i8 * | name () const |
Get the style name. More... | |
virtual color_t | fgcolor () const |
Get the foreground color. More... | |
virtual color_t | bgcolor () const |
Get the background color. More... | |
virtual attrset_t | attributes () const |
Get the text formatting attributes. More... | |
virtual style & | set_name (const i8 *) |
Set the style name. More... | |
virtual style & | set_fgcolor (color_t) |
Set the foreground color. More... | |
virtual style & | set_bgcolor (color_t) |
Set the background color. More... | |
virtual style & | set_attributes (attrset_t) |
Set the text formatting attributes. More... | |
virtual style & | operator= (const style &) |
Assignment operator. More... | |
virtual bool | is_attr_enabled (attrset_t) const |
Check if a set of text formatting attributes is enabled. More... | |
virtual style & | set_attr_enabled (attrset_t, bool) |
Enable/disable a set of text formatting attributes. More... | |
virtual style & | to_string (string &) const |
Set a string with all the style escape sequences. More... | |
virtual style & | apply (string &) const |
Apply the style to some text. More... | |
Public Member Functions inherited from csdbg::object | |
virtual | ~object ()=0 |
To be implemented. More... | |
virtual const i8 * | class_name () const |
Query the class name of an object descending from csdbg::object. More... | |
Static Public Attributes | |
static enum csdbg::style:: { ... } | vt100_attributes |
Text formatting attributes of VT100 terminals. More... | |
static enum csdbg::style:: { ... } | vt100_palette |
Basic palette of VT100 terminals. More... | |
Protected Attributes | |
i8 * | m_name |
Style name. More... | |
color_t | m_fgcolor |
Foreground (text) color. More... | |
color_t | m_bgcolor |
Background color. More... | |
attrset_t | m_attributes |
Text formatting attribute bitmask. More... | |
A set of formatting attributes for VT100 (and compatible) terminals.