Connect++ 0.1
A fast, readable connection prover for first-order logic.
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
cursor_symbols::Cursor Class Reference

Simple library for doing things involving moving the curser when producing terminal output. More...

#include <cursor.hpp>

Static Public Member Functions

static string up (uint8_t n)
 
static string down (uint8_t n)
 
static string right (uint8_t n)
 
static string left (uint8_t n)
 
static string down_n_lines (uint8_t n)
 
static string up_n_lines (uint8_t n)
 
static string to_column (uint8_t n)
 
static string to (uint8_t n, uint8_t m)
 
static string erase_display (uint8_t n)
 
static string erase_line (uint8_t n)
 

Detailed Description

Simple library for doing things involving moving the curser when producing terminal output.

This is achieved using ANSI escape codes, see:

https://en.wikipedia.org/wiki/ANSI_escape_code#CSIsection

That page is hard to decipher. Suffice to say that the left-hand-side of the table for "CSI introducers" is interpreted as follows:

\033[ n A - move curser n places up. \033[ n B - move curser n places down.

... and so on. Colours are then the "Set Graphic Rendition" part that appears as "CSI n m" and translates to ""\033[ n m".

Member Function Documentation

◆ erase_display()

static string cursor_symbols::Cursor::erase_display ( uint8_t  n)
inlinestatic

0 - to screen end. 1 - to screen beginning. 2 - whole screen. 3 - 2 + erase scrolling back buffer.

◆ erase_line()

static string cursor_symbols::Cursor::erase_line ( uint8_t  n)
inlinestatic

0 - to end. 1 - to beginning. 2 - whole line.

◆ to()

static string cursor_symbols::Cursor::to ( uint8_t  n,
uint8_t  m 
)
inlinestatic

Origin is top left corner. n is row and m is column.


The documentation for this class was generated from the following files: