Simple-Log  alpha-v0.7
sl::log::ConsoleTextStyle Struct Reference

Collection of possible style and color options for text printed onto the console. More...

#include <ConsoleSink.hpp>

Public Types

enum class  Color {
  black = 0 , red , green , yellow ,
  blue , magenta , cyan , gray ,
  standard , brightBlack , brightRed , brightGreen ,
  brightYellow , brightBlue , brightMagenta , brightCyan ,
  brightGray
}
 
enum class  Style {
  standard = 0 , bold , dim , italic ,
  underline , reversed = 7 , crossed = 9
}
 

Public Attributes

Style style = Style::standard
 determines the style More...
 
Color textColor = Color::standard
 determines the text color More...
 
Color bgColor = Color::standard
 determines the background color More...
 

Detailed Description

Collection of possible style and color options for text printed onto the console.

Each enum type will be casted to the third-party lib "rang" counterpart, which is responsible for all of the troublesome work. Some style options might not work on every console.

Go to https://github.com/agauniyal/rang/tree/master if you are interested about all the details.

Version
since alpha-0.6

Member Enumeration Documentation

◆ Color

Enumerator
black 
red 
green 
yellow 
blue 
magenta 
cyan 
gray 
standard 
brightBlack 
brightRed 
brightGreen 
brightYellow 
brightBlue 
brightMagenta 
brightCyan 
brightGray 
Examples
ColorizedConsoleLogging/main.cpp.

◆ Style

Enumerator
standard 
bold 
dim 
italic 
underline 
reversed 
crossed 
Examples
ColorizedConsoleLogging/main.cpp.

Member Data Documentation

◆ bgColor

Color sl::log::ConsoleTextStyle::bgColor = Color::standard

determines the background color

◆ style

Style sl::log::ConsoleTextStyle::style = Style::standard

determines the style

◆ textColor

Color sl::log::ConsoleTextStyle::textColor = Color::standard

determines the text color


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