29namespace kaycxx::term {
32class input_mode_stack;
418 std::ostream& stream_;
421 bool formatting_enabled_;
424 bool commands_enabled_;
427 std::unique_ptr<detail::input_mode_stack> input_modes_;
Defines ANSI control sequence handling modes.
ansi_mode
Selects which ANSI/VT formatting and terminal commands are emitted.
Definition ansi_mode.hpp:16
Defines the basic 16-color terminal palette.
Terminal output and input helper.
Definition terminal.hpp:40
void clear_cell()
Clears a cell at the cursor position.
void delete_cells(int cells)
Deletes cells at the cursor position.
void clear_cells(int cells)
Clears cells at the cursor position.
std::string read_key()
Reads one key from the terminal.
void delete_cell()
Deletes a cell at the cursor position.
void insert_line()
Inserts a single line at the cursor row.
bool commands_enabled() const noexcept
Checks whether ANSI/VT terminal commands are enabled for this terminal.
void clear_line_to_start()
Clears from the beginning of the current line to the cursor position.
void reset_scroll_region()
Resets the vertical scrolling region to the whole screen.
void clear_line_to_end()
Clears from the cursor position to the end of the current line.
void delete_line()
Deletes a single line at the cursor row.
void scroll_down(int lines)
Scrolls the current scrolling region down by multiple lines.
void leave_alternate_screen()
Leaves the alternate screen buffer.
void clear_screen_to_start()
Clears from the beginning of the screen to the cursor position.
void disable_wrap()
Disables terminal autowrap mode.
terminal & operator<<(std::ios_base &(*manipulator)(std::ios_base &))
Writes an ios_base manipulator.
terminal & operator<<(std::ios &(*manipulator)(std::ios &))
Writes an ios manipulator.
void clear_screen_to_end()
Clears from the cursor position to the end of the screen.
terminal(std::ostream &stream=std::cout, ansi_mode mode=ansi_mode::automatic)
Creates a terminal helper for an output stream.
void scroll_down()
Scrolls the current scrolling region down by one line.
terminal & operator<<(std::ostream &(*manipulator)(std::ostream &))
Writes an ostream manipulator.
void hide_cursor()
Hides the terminal cursor.
void clear_screen()
Clears the visible screen without moving the cursor.
bool pop_input_mode()
Pops and restores the previously pushed input state.
void insert_cell()
Inserts a blank cell at the cursor position.
void delete_lines(int lines)
Deletes multiple lines at the cursor row.
void set_cursor_style(cursor_style style)
Sets the terminal cursor style.
void pop_title()
Pops the previously pushed terminal title.
void move_by(int columns, int rows)
Moves the cursor relative to its current position.
terminal & operator<<(color_style value)
Writes a foreground or background color style.
void clear_scrollback()
Clears the terminal scrollback buffer when supported by the terminal.
terminal & operator<<(T const &value)
Writes a raw stream value.
Definition terminal.hpp:72
void move_to(int column, int row)
Moves the cursor to an absolute position.
void insert_cells(int cells)
Inserts blank cells at the cursor position.
~terminal()
Destroys the terminal helper.
void enable_wrap()
Enables terminal autowrap mode.
void enter_alternate_screen()
Enters the alternate screen buffer.
terminal & operator<<(hyperlink const &link)
Writes a terminal hyperlink.
void clear_line()
Clears the current line without moving the cursor.
terminal_size size() const
Returns the current terminal size.
void set_scroll_region(int top, int bottom)
Sets the vertical scrolling region.
void save_cursor()
Saves the current cursor position.
void scroll_up()
Scrolls the current scrolling region up by one line.
void restore_cursor()
Restores the previously saved cursor position.
terminal & operator<<(sgr value)
Writes an SGR style command.
void move_to_column(int column)
Moves the cursor to a column on the current row.
void push_title(std::string_view title)
Pushes the current terminal title and sets a new title.
void show_cursor()
Shows the terminal cursor.
void scroll_up(int lines)
Scrolls the current scrolling region up by multiple lines.
bool push_input_mode(input_mode mode)
Pushes the current input state and applies a new input mode.
bool formatting_enabled() const noexcept
Checks whether ANSI/VT formatting is enabled for this terminal.
void insert_lines(int lines)
Inserts multiple lines at the cursor row.
Defines foreground and background color styling helpers.
Defines terminal cursor style values.
cursor_style
Terminal cursor display style.
Definition cursor_style.hpp:16
Defines terminal hyperlink output helpers.
Defines indexed 256-color terminal colors.
Defines RGB true-color terminal colors.
Defines SGR terminal style commands.
Basic terminal palette color.
Definition basic_color.hpp:21
Color style command written to a terminal.
Definition color_style.hpp:18
Terminal hyperlink value.
Definition hyperlink.hpp:19
Indexed terminal palette color.
Definition indexed_color.hpp:18
RGB terminal color.
Definition rgb_color.hpp:18
Select Graphic Rendition command.
Definition sgr.hpp:16
Terminal dimensions in character cells.
Definition terminal_size.hpp:16
Defines terminal size values.