MyRP2_ui_core
Loading...
Searching...
No Matches
UIDisplayDevice Class Referenceabstract

This is the abstract class to handle all generic behavior of physical display devices (e.g. OLED screen SSD1306). It derived from Framebuffer. This allows to draw text and graphics directly into the display framebuffer thanks to Framebuffet class text and graphic primitives. More...

#include <ui_core.h>

Inheritance diagram for UIDisplayDevice:

Public Member Functions

 UIDisplayDevice (size_t width, size_t height, FramebufferFormat format=FramebufferFormat::MONO_VLSB, StructFramebufferText txt_cnf={.font=font_8x8})
 Construct a new UIDisplayDevice object.
 
virtual ~UIDisplayDevice ()
 Destroy the UIDisplayDevice object.
 
virtual void show ()=0
 This is an pure virtual member function that all final derived class must implement. It transfers the framebuffer buffer to the entire display screen buffer.
 
virtual void show (Framebuffer *frame, uint8_t anchor_x, uint8_t anchor_y)=0
 This is an pure virtual member function that all final derived class must implement. It transfers the framebuffer buffer to the a part of display screen buffer starting at the (anchor_x, anchor_y) coordinates of the screen , expressed in pixel.
 

Detailed Description

This is the abstract class to handle all generic behavior of physical display devices (e.g. OLED screen SSD1306). It derived from Framebuffer. This allows to draw text and graphics directly into the display framebuffer thanks to Framebuffet class text and graphic primitives.

Definition at line 72 of file ui_core.h.

Constructor & Destructor Documentation

◆ UIDisplayDevice()

UIDisplayDevice::UIDisplayDevice ( size_t width,
size_t height,
FramebufferFormat format = FramebufferFormat::MONO_VLSB,
StructFramebufferText txt_cnf = {.font = font_8x8} )

Construct a new UIDisplayDevice object.

Parameters
widthThe width of physical screen, in pixel.
heightThe height of physical screen, in pixel.
formatThe framebuffer format ... see Framebuffer class FramebufferFormat enumeration
txt_cnfA structure of datga that reflect the framebuffer member related to text primitives

Definition at line 3 of file ui_core.cpp.

◆ ~UIDisplayDevice()

UIDisplayDevice::~UIDisplayDevice ( )
virtual

Destroy the UIDisplayDevice object.

Definition at line 8 of file ui_core.cpp.

Member Function Documentation

◆ show()

virtual void UIDisplayDevice::show ( Framebuffer * frame,
uint8_t anchor_x,
uint8_t anchor_y )
pure virtual

This is an pure virtual member function that all final derived class must implement. It transfers the framebuffer buffer to the a part of display screen buffer starting at the (anchor_x, anchor_y) coordinates of the screen , expressed in pixel.

Parameters
framea pointer to the frame to be displayed
anchor_xthe x (horizontal)starting position of the frame within the display screen, (in pixel)
anchor_ythe y (vertical) starting position of the frame within the display screen, (in pixel)

The documentation for this class was generated from the following files: