SatCat5
gui_display.h File Reference

Detailed Description

"Display" and "Canvas" API for rendering text and graphics

The Display API is the parent class for a user-defined display device driver. Child classes implement the "draw(...)" method to accept each each new command. An optional "scroll(...)" method can also be used for moving a predefined viewport, if the display supports such a feature.

The Canvas class provides user access for generating individual commands. It provides methods for drawing icons, rectangles, text, etc. Operations may be executed immediately or through a buffer. The latter is useful for I2C and SPI displays with limited bandwidth for updates.

The DrawCmd ("draw command") class defines single primitive command. Most functions paste data onto a rectangular pixel region, suitable for most generic display devices. Each operation is relative to a "write cursor" that defines location and color parameters.

Definition in file gui_display.h.

#include <satcat5/gui_icons.h>
#include <satcat5/log.h>
#include <satcat5/pkt_buffer.h>
#include <satcat5/polling.h>
Include dependency graph for gui_display.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  satcat5::gui::Cursor
 Cursor object tracks position and foreground/background colors. More...
 
union  satcat5::gui::DrawArg
 Argument for a draw command (see below). More...
 
class  satcat5::gui::DrawCmd
 Each "draw command" updates a rectangular region of pixels. More...
 
class  satcat5::gui::Display
 Required API for display devices. More...
 
class  satcat5::gui::Canvas
 User-facing interface for drawing graphical elements on a screen. More...
 
struct  satcat5::gui::LogColors
 Color parameters for the LogToDisplay class. More...
 
class  satcat5::gui::LogToDisplay
 Service for forwarding Log events to a display adapter. More...