1
0
MAX7456JSON/lib/DisplayProxy/DisplayProxy.h

49 lines
1.0 KiB
C
Raw Permalink Normal View History

2021-11-10 09:35:27 +00:00
/**
* @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
*
*/
2019-09-04 13:28:38 +00:00
#ifndef DISPLAYPROXY_H
#define DISPLAYPROXY_H
2021-10-28 14:44:20 +00:00
/**
* Generic interface for a graphical display allowing for placement of text.
2021-11-03 10:13:25 +00:00
* Focused on TUI.
2021-10-28 14:44:20 +00:00
*/
2019-09-04 13:28:38 +00:00
class DisplayProxy
{
public:
2021-10-28 14:44:20 +00:00
/**
* Turn on the display.
* @return True if successful.
*/
virtual bool on() = 0;
2021-11-03 10:13:25 +00:00
2021-10-28 14:44:20 +00:00
/**
* 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.
*/
2019-09-04 13:28:38 +00:00
virtual bool write(int x, int y, const char *text) = 0;
2021-11-03 10:13:25 +00:00
2021-10-28 14:44:20 +00:00
/**
* Clear the entire screen.
* @return True if successful.
*/
2019-09-04 13:28:38 +00:00
virtual bool clear() = 0;
};
#endif