libcsdbg  1.28
C++ exception (and generic) stack trace debug library
csdbg::style Class Reference

A set of formatting attributes for VT100 (and compatible) terminals. More...

#include <style.hpp>

+ Inheritance diagram for csdbg::style:
+ Collaboration diagram for csdbg::style:

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 styleclone () const
 Object virtual copy constructor. More...
 
virtual const i8name () 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 styleset_name (const i8 *)
 Set the style name. More...
 
virtual styleset_fgcolor (color_t)
 Set the foreground color. More...
 
virtual styleset_bgcolor (color_t)
 Set the background color. More...
 
virtual styleset_attributes (attrset_t)
 Set the text formatting attributes. More...
 
virtual styleoperator= (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 styleset_attr_enabled (attrset_t, bool)
 Enable/disable a set of text formatting attributes. More...
 
virtual styleto_string (string &) const
 Set a string with all the style escape sequences. More...
 
virtual styleapply (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 i8class_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

i8m_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...
 

Detailed Description

A set of formatting attributes for VT100 (and compatible) terminals.

See Also
csdbg::parser
5.7 Using the stack trace parser (syntax highlighter)

Definition at line 20 of file style.hpp.


The documentation for this class was generated from the following files: