MySQL 8.0.39
Source Code Documentation
vt100.h File Reference
#include "harness_export.h"
#include <array>
#include <cstdint>
#include <string>
#include <tuple>

Go to the source code of this file.

Namespaces

namespace  Vt100
 
namespace  Vt100::anonymous_namespace{vt100.h}
 

Typedefs

using Vt100::value_type = uint16_t
 
using Vt100::Rgb = std::array< uint8_t, 3 >
 

Enumerations

enum class  Vt100::Color {
  Vt100::Black = 0 , Vt100::Red , Vt100::Green , Vt100::Yellow ,
  Vt100::Blue , Vt100::Magenta , Vt100::Cyan , Vt100::White ,
  Vt100::BrightBlack = 60 + Black , Vt100::BrightRed = 60 + Red , Vt100::BrightGreen = 60 + Green , Vt100::BrightYellow = 60 + Yellow ,
  Vt100::BrightBlue = 60 + Blue , Vt100::BrightMagenta = 60 + Magenta , Vt100::BrightCyan = 60 + Cyan , Vt100::BrightWhite = 60 + White
}
 colors as used in Render. More...
 
enum class  Vt100::Render {
  Vt100::Default = 0 , Vt100::Bold = 1 , Vt100::Faint = 2 , Vt100::Italic = 3 ,
  Vt100::Underline = 4 , Vt100::SlowBlink = 5 , Vt100::RapidBlink = 6 , Vt100::Inverse = 7 ,
  Vt100::Conceal = 8 , Vt100::CrossedOut = 9 , Vt100::FontDefault = 10 , Vt100::Font1 = 11 ,
  Vt100::Font2 = 12 , Vt100::Font3 = 13 , Vt100::Font4 = 14 , Vt100::Font5 = 15 ,
  Vt100::Font6 = 16 , Vt100::Font7 = 17 , Vt100::Font8 = 18 , Vt100::Font9 = 19 ,
  Vt100::Fraktur = 20 , Vt100::DoublyUnderline = 21 , Vt100::Normal = 22 , Vt100::NoItalic = 20 + Italic ,
  Vt100::NoUnderline = 20 + Underline , Vt100::NoBlink = 20 + SlowBlink , Vt100::NoInverse = 20 + Inverse , Vt100::NoConceal = 20 + Conceal ,
  Vt100::NoCrossedOut = 20 + CrossedOut , Vt100::ForegroundBlack = kRenderForegroundOffset + static_cast<int>(Color::Black) , Vt100::ForegroundRed = kRenderForegroundOffset + static_cast<int>(Color::Red) , Vt100::ForegroundGreen = kRenderForegroundOffset + static_cast<int>(Color::Green) ,
  Vt100::ForegroundYellow = kRenderForegroundOffset + static_cast<int>(Color::Yellow) , Vt100::ForegroundBlue = kRenderForegroundOffset + static_cast<int>(Color::Blue) , Vt100::ForegroundMagenta , Vt100::ForegroundCyan = kRenderForegroundOffset + static_cast<int>(Color::Cyan) ,
  Vt100::ForegroundWhite = kRenderForegroundOffset + static_cast<int>(Color::White) , Vt100::ForegroundExtended = kRenderForegroundOffset + 8 , Vt100::ForegroundDefault = kRenderForegroundOffset + 9 , Vt100::BackgroundBlack = kRenderBackgroundOffset + static_cast<int>(Color::Black) ,
  Vt100::BackgroundRed = kRenderBackgroundOffset + static_cast<int>(Color::Red) , Vt100::BackgroundGreen = kRenderBackgroundOffset + static_cast<int>(Color::Green) , Vt100::BackgroundYellow = kRenderBackgroundOffset + static_cast<int>(Color::Yellow) , Vt100::BackgroundBlue = kRenderBackgroundOffset + static_cast<int>(Color::Blue) ,
  Vt100::BackgroundMagenta , Vt100::BackgroundCyan = kRenderBackgroundOffset + static_cast<int>(Color::Cyan) , Vt100::BackgroundWhite = kRenderBackgroundOffset + static_cast<int>(Color::White) , Vt100::BackgroundExtended = kRenderBackgroundOffset + 8 ,
  Vt100::BackgroundDefault = kRenderBackgroundOffset + 9 , Vt100::Framed = 51 , Vt100::Encircled = 52 , Vt100::Overlined = 53 ,
  Vt100::NotFramed = 54 , Vt100::NotOverlined = 55 , Vt100::IdeogramUnderline = 60 , Vt100::IdeogramDoubleUnderline = 61 ,
  Vt100::IdeogramOverline = 62 , Vt100::IdeogramDoubleOverline = 63 , Vt100::IdeogramStressMarking = 64 , Vt100::NoIdeogram = 65 ,
  Vt100::ForegroundBrightBlack , Vt100::ForegroundBrightRed , Vt100::ForegroundBrightGreen , Vt100::ForegroundBrightYellow ,
  Vt100::ForegroundBrightBlue , Vt100::ForegroundBrightMagenta , Vt100::ForegroundBrightCyan , Vt100::ForegroundBrightWhite ,
  Vt100::BackgroundBrightBlack , Vt100::BackgroundBrightRed , Vt100::BackgroundBrightGreen , Vt100::BackgroundBrightYellow ,
  Vt100::BackgroundBrightBlue , Vt100::BackgroundBrightMagenta , Vt100::BackgroundBrightCyan , Vt100::BackgroundBrightWhite
}
 types of "Character Attributes". More...
 
enum class  Vt100::Csi {
  Vt100::ICH = '@' , Vt100::CUU = 'A' , Vt100::CUD = 'B' , Vt100::CUF = 'C' ,
  Vt100::CUB = 'D' , Vt100::CNL = 'E' , Vt100::CPL = 'F' , Vt100::CHA = 'G' ,
  Vt100::CUP = 'H' , Vt100::CHT = 'I' , Vt100::ED = 'J' , Vt100::EL = 'K' ,
  Vt100::IL = 'L' , Vt100::DL = 'M' , Vt100::DCH = 'P' , Vt100::SU = 'S' ,
  Vt100::SD = 'T' , Vt100::ECH = 'X' , Vt100::CBT = 'Z' , Vt100::DA = 'c' ,
  Vt100::VPA = 'd' , Vt100::HVP = 'f' , Vt100::TBC = 'g' , Vt100::SM = 'h' ,
  Vt100::MC = 'i' , Vt100::RM = 'l' , Vt100::SGR = 'm' , Vt100::DSR = 'n' ,
  Vt100::STR = 'p' , Vt100::DECSTBM = 'r' , Vt100::SC = 's' , Vt100::DECRARA = 't' ,
  Vt100::SR = 'u' , Vt100::DECCRA = 'v' , Vt100::DECEFR = 'w' , Vt100::DECREQTPARM = 'x' ,
  Vt100::DECERA = 'z' , Vt100::DECSLE = '{' , Vt100::DECRQLP = '|'
}
 
enum class  Vt100::Erase { Vt100::LeftAndCur = 0 , Vt100::RightAndCur , Vt100::All }
 

Functions

std::string HARNESS_EXPORT Vt100::render (Render r)
 get 'text rendering attributes' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::foreground (Color c)
 get 'change foreground color' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::foreground (const Rgb &rgb)
 get 'change foreground color' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::foreground (uint8_t ndx)
 get 'change foreground color ESC' sequence. More...
 
std::string HARNESS_EXPORT Vt100::background (Color c)
 get 'change background color' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::background (const Rgb &rgb)
 get 'change background color' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::background (uint8_t ndx)
 get 'change background color' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::reset ()
 get 'reset attributes' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::cursor_up (Vt100::value_type n=1)
 get 'cursor up' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::cursor_down (Vt100::value_type n=1)
 get 'cursor down' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::cursor_forward (Vt100::value_type n=1)
 get 'cursor forward' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::cursor_back (Vt100::value_type n=1)
 get 'cursor back' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::cursor_next_line (Vt100::value_type n=1)
 get 'cursor next line' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::cursor_prev_line (Vt100::value_type n=1)
 get 'cursor previous line' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::cursor_abs_col (Vt100::value_type col=1)
 get 'set cursor absolute position' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::cursor_abs_row (Vt100::value_type row=1)
 get 'set cursor absolute row' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::cursor_abs_pos (Vt100::value_type row=1, Vt100::value_type col=1)
 get 'set cursor to absolute row' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::erase_in_display (Vt100::Erase n=Vt100::Erase::LeftAndCur)
 get 'erase in display' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::erase_in_line (Vt100::Erase n=Vt100::Erase::LeftAndCur)
 get 'erase in line' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::scroll_up (Vt100::value_type n=1)
 get 'scroll up' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::scroll_down (Vt100::value_type n=1)
 get 'scroll down' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::save_cursor_pos ()
 get 'save cursor position' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::restore_cursor_pos ()
 get 'restore cursor position' ESC sequence. More...
 
std::string HARNESS_EXPORT Vt100::window_title (const std::string &title)
 get 'set window title' ESC sequence. More...
 

Variables

constexpr uint8_t Vt100::anonymous_namespace{vt100.h}::kRenderForegroundOffset = 30
 
constexpr uint8_t Vt100::anonymous_namespace{vt100.h}::kRenderBackgroundOffset = kRenderForegroundOffset + 10