ROSE  0.11.145.0
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 374 of file Message.h.

#include <util/Sawyer/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 382 of file Message.h.

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

Constructs an object that specifies only a foreground color.

Definition at line 385 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 388 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 391 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 375 of file Message.h.

AnsiColor Sawyer::Message::ColorSpec::background

Background color, or COLOR_DEFAULT.

Definition at line 376 of file Message.h.


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