15 #ifndef NINJA_LINE_PRINTER_H_
16 #define NINJA_LINE_PRINTER_H_
Prints lines of text, possibly overprinting previously printed lines if the terminal supports it.
void PrintOrBuffer(const char *data, size_t size)
Print the given data to the console, or buffer it if it is locked.
void set_smart_terminal(bool smart)
bool smart_terminal_
Whether we can do fancy terminal control codes.
void Print(std::string to_print, LineType type)
Overprints the current line.
bool console_locked_
Whether console is locked.
bool have_blank_line_
Whether the caret is at the beginning of a blank line.
void SetConsoleLocked(bool locked)
Lock or unlock the console.
std::string output_buffer_
Buffered console output while console is locked.
bool supports_color_
Whether we can use ISO 6429 (ANSI) color sequences.
std::string line_buffer_
Buffered current line while console is locked.
bool supports_color() const
bool is_smart_terminal() const
void PrintOnNewLine(const std::string &to_print)
Prints a string on a new line, not overprinting previous output.
LineType line_type_
Buffered line type while console is locked.