B15F
Board 15 Famulus Edition
|
#include <view.h>
Public Member Functions | |
View (void) | |
virtual | ~View (void) |
virtual void | setTitle (std::string title) |
virtual void | repaint (void) |
virtual void | draw (void)=0 |
virtual call_t | keypress (int &key)=0 |
Static Public Member Functions | |
static void | setWinContext (WINDOW *win) |
static WINDOW * | getWinContext (void) |
static std::vector< std::string > | str_split (const std::string &str, const std::string delim) |
Protected Attributes | |
int | width |
width of view in terminal characters | |
int | height |
height of view in terminal characters | |
int | start_x = 0 |
x offset (characters) in the terminal, used to center the window on repaint() | |
int | start_y = 0 |
y offset (characters) in the terminal, used to center the window on repaint() | |
std::string | title |
title of the view | |
std::vector< call_t > | calls |
calls (function pointers) for different button actions in the view (if any) | |
Static Protected Attributes | |
static WINDOW * | win = nullptr |
static window contexts for all views | |
constexpr static int | KEY_ENT = 10 |
Key value for the Enter key. | |
Base class for multiple views with the ncurses user interface.
|
pure virtual |
Abstract function for drawing ths particular view. Gets overridden in the derived classes to paints for example a promt.
Implemented in ViewInfo, ViewPromt, and ViewSelection.
|
static |
|
pure virtual |
Abstract function for the view to reacted on a keypress. Gets overridden in the derived classes to close for example a view on ESC.
Implemented in ViewInfo, ViewMonitor, ViewPromt, and ViewSelection.
|
virtual |
|
virtual |
|
static |
|
static |