49 lines
1.0 KiB
C++
49 lines
1.0 KiB
C++
/**
|
|
* @file DisplayProxy.h
|
|
* @author Jens True (jens.chr.true@gmail.com)
|
|
* @brief DisplayProxy header
|
|
* @version 0.1
|
|
* @date 2021-11-10
|
|
*
|
|
* @copyright Copyright (c) 2021
|
|
*
|
|
*/
|
|
#ifndef DISPLAYPROXY_H
|
|
#define DISPLAYPROXY_H
|
|
|
|
/**
|
|
* Generic interface for a graphical display allowing for placement of text.
|
|
* Focused on TUI.
|
|
*/
|
|
class DisplayProxy
|
|
{
|
|
public:
|
|
/**
|
|
* Turn on the display.
|
|
* @return True if successful.
|
|
*/
|
|
virtual bool on() = 0;
|
|
|
|
/**
|
|
* Turn off the display.
|
|
* @return True if successful.
|
|
*/
|
|
virtual bool off() = 0;
|
|
|
|
/**
|
|
* Write a string to the display.
|
|
*
|
|
* @param x Horizontal starting position. From left to right. (0 indexed)
|
|
* @param y Vertical starting position. From top to bottom. (0 indexed)
|
|
* @param text String to write
|
|
* @return True if successful.
|
|
*/
|
|
virtual bool write(int x, int y, const char *text) = 0;
|
|
|
|
/**
|
|
* Clear the entire screen.
|
|
* @return True if successful.
|
|
*/
|
|
virtual bool clear() = 0;
|
|
};
|
|
#endif |