Norman Feske a61bd71a4f Terminal multiplexer
The new terminal_mux server is able to provide multiple terminal
sessions over one terminal-client session. The user can switch
between the different sessions using the keyboard shortcut C-y,
which brings up an ncurses-based menu.
2013-02-25 16:45:47 +01:00

61 lines
905 B
C++

/*
* \brief C++ wrapper for ncurses API
* \author Norman Feske
* \date 2013-02-21
*/
#ifndef _NCURSES_CXX_H_
#define _NCURSES_CXX_H_
class Ncurses
{
private:
unsigned _columns;
unsigned _lines;
public:
class Window
{
private:
struct Ncurses_window;
friend class Ncurses;
Ncurses_window * const _window;
int _w;
Window(unsigned x, unsigned y, unsigned w, unsigned h);
public:
void move_cursor(unsigned x, unsigned y);
void print_char(unsigned long const c, bool highlight, bool inverse);
void refresh();
void erase();
void horizontal_line(int line);
};
Window *create_window(int x, int y, int w, int h);
void do_update();
Ncurses();
void cursor_visible(bool);
int read_character();
unsigned columns() const { return _columns; }
unsigned lines() const { return _lines; }
};
#endif /* _NCURSES_CXX_H_ */