B15F
Board 15 Famulus Edition
|
#include <view_info.h>
Public Member Functions | |
virtual void | setText (std::string text) |
virtual void | setLabelClose (std::string label) |
virtual void | setCall (call_t call) |
virtual void | draw (void) override |
virtual call_t | keypress (int &key) override |
![]() | |
View (void) | |
virtual | ~View (void) |
virtual void | setTitle (std::string title) |
virtual void | repaint (void) |
Protected Attributes | |
std::string | text |
std::string | label_close |
int | close_offset_x = 0 |
int | close_offset_y = 0 |
![]() | |
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 | |
constexpr static int | text_offset_x = 2 |
constexpr static int | text_offset_y = 3 |
![]() | |
static WINDOW * | win = nullptr |
static window contexts for all views | |
constexpr static int | KEY_ENT = 10 |
Key value for the Enter key. | |
Additional Inherited Members | |
![]() | |
static void | setWinContext (WINDOW *win) |
static WINDOW * | getWinContext (void) |
static std::vector< std::string > | str_split (const std::string &str, const std::string delim) |
View for simple text message output.
Definition at line 8 of file view_info.h.
|
overridevirtual |
Abstract function for drawing ths particular view. Gets overridden in the derived classes to paints for example a promt.
Implements View.
Definition at line 23 of file view_info.cpp.
|
overridevirtual |
Abstract function for the view to reacted on a keypress. Gets overridden in the derived classes to close for example a view on ESC.
Implements View.
Reimplemented in ViewMonitor.
Definition at line 37 of file view_info.cpp.