ROSE 0.11.145.192
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 <Sawyer/Message.h>

Public Member Functions

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

Public Attributes

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

Constructor & Destructor Documentation

◆ ColorSpec() [1/3]

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

Constructs an object with default foreground and background colors.

Definition at line 382 of file Message.h.

References Sawyer::Message::COLOR_DEFAULT.

◆ ColorSpec() [2/3]

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

Constructs an object that specifies only a foreground color.

Definition at line 385 of file Message.h.

References Sawyer::Message::COLOR_DEFAULT.

◆ ColorSpec() [3/3]

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

◆ isDefault()

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

◆ foreground

AnsiColor Sawyer::Message::ColorSpec::foreground

Foreground color, or COLOR_DEFAULT.

Definition at line 375 of file Message.h.

◆ background

AnsiColor Sawyer::Message::ColorSpec::background

Background color, or COLOR_DEFAULT.

Definition at line 376 of file Message.h.

◆ bold

boost::tribool Sawyer::Message::ColorSpec::bold

Use ANSI "bold" attribute?

Definition at line 378 of file Message.h.


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