68 Color(
const std::string& fg,
const std::string& bg)
83 : m_fg(
std::move(fg)), m_bg(
std::move(bg))
112 void parse(
const std::string& str);
123 std::vector<std::string> wrap(
const std::string& str,
unsigned int columns);
125 void parseSetAttributes(
const std::string& str);
205 bool getSize(
int* columns,
int* rows);
std::string m_lineWrapOnStr
24-step grayscale starts here
std::string standardColorCode()
Escape codes for standard colors.
SimpleColor
Simple colors.
bool getSize(int *columns, int *rows)
Get current window size.
void setForegroundColor(uint32_t color)
Set 24-bit foreground color.
void setSimpleBackground(SimpleColor color)
std::map< std::string, SpecialKey > m_specialKeys
void moveCursorToStartOfLine()
Move cursor to start of the line.
Color color(SimpleColor code)
void setBackgroundColor(uint32_t color)
Set 24-bit background color.
std::chrono::steady_clock::time_point m_escapeStartTime
std::string m_lineWrapOffStr
void setSimplePair(SimpleColor fg, SimpleColor bg)
std::string m_currentEscapeStr
const std::string & backgroundCode() const
void setLineWrap(bool on)
void clearToEndOfLine()
Clear characters from cursor to end of line.
void setStandardColors()
Reset fg + bg to standard terminal colors.
void setCursorVisible()
restore cursor
void setSimpleForeground(SimpleColor color)
Color(const std::string &fg, const std::string &bg)
Encapsulates terminal control.
void moveCursorUp(int numLines)
Move cursor up by numLines.
bool has256Colors() const
void setWindowTitle(const std::string &title)
void setCursorInvisible()
hide cursor
const std::string & foregroundCode() const
Terminal escape sequence parser.
Style(Color fg, Color bg)
unsigned int m_currentEscapeAbortIdx
void clearWindowTitle(const std::string &backup)
bool m_currentEscapeAborted