ROSE  0.9.10.103
Public Member Functions | Public Attributes | List of all members
Sawyer::Message::ColorSpec Struct Reference

Description

ANSI Color specification for text written to a terminal.

Thread safety: This object uses no global state, but is otherwise not thread-safe except where noted.

Definition at line 372 of file Message.h.

#include <Message.h>

Public Member Functions

 ColorSpec ()
 Constructs an object with default foreground and background colors. More...
 
 ColorSpec (AnsiColor fg)
 Constructs an object that specifies only a foreground color. More...
 
 ColorSpec (AnsiColor fg, AnsiColor bg, bool bold)
 Constructs an object with fully-specified colors. More...
 
bool isDefault () const
 Returns true if this object is in its default-constructed state. More...
 

Public Attributes

AnsiColor foreground
 Foreground color, or COLOR_DEFAULT. More...
 
AnsiColor background
 Background color, or COLOR_DEFAULT. More...
 
boost::tribool bold
 Use ANSI "bold" attribute?
 

Constructor & Destructor Documentation

Sawyer::Message::ColorSpec::ColorSpec ( )
inline

Constructs an object with default foreground and background colors.

Definition at line 380 of file Message.h.

Sawyer::Message::ColorSpec::ColorSpec ( AnsiColor  fg)
inlineexplicit

Constructs an object that specifies only a foreground color.

Definition at line 383 of file Message.h.

Sawyer::Message::ColorSpec::ColorSpec ( AnsiColor  fg,
AnsiColor  bg,
bool  bold 
)
inline

Constructs an object with fully-specified colors.

Definition at line 386 of file Message.h.

Member Function Documentation

bool Sawyer::Message::ColorSpec::isDefault ( ) const
inline

Returns true if this object is in its default-constructed state.

Definition at line 389 of file Message.h.

References Sawyer::Message::COLOR_DEFAULT.

Member Data Documentation

AnsiColor Sawyer::Message::ColorSpec::foreground

Foreground color, or COLOR_DEFAULT.

Definition at line 373 of file Message.h.

AnsiColor Sawyer::Message::ColorSpec::background

Background color, or COLOR_DEFAULT.

Definition at line 374 of file Message.h.


The documentation for this struct was generated from the following file: