Represents a 2D grid of LEDs on a block device.
Public Member Functions | |
LEDGrid (Block &) | |
virtual | ~LEDGrid () |
Destructor. More... | |
virtual int | getNumColumns () const =0 |
Returns the number of columns in the LED grid. More... | |
virtual int | getNumRows () const =0 |
Returns the number of rows in the LED grid. More... | |
void | setRenderer (Renderer::Ptr newRenderer) noexcept |
Set the visualiser that will create visuals for this block (nullptr for none). More... | |
Renderer::Ptr | getRenderer () const noexcept |
Returns the visualiser currently attached to this block (nullptr for none). More... | |
Public Attributes | |
Block & | block |
The device that this LEDGrid belongs to. More... | |
Classes | |
struct | Renderer |
An interface to use for LEDGrid rendering. More... | |
LEDGrid::LEDGrid | ( | Block & | ) |
|
virtual |
Destructor.
|
pure virtual |
Returns the number of columns in the LED grid.
|
pure virtual |
Returns the number of rows in the LED grid.
|
noexcept |
Set the visualiser that will create visuals for this block (nullptr for none).
Note that the LEDGrid will NOT take ownership of this object, so the caller must ensure that it doesn't get deleted while in use here.
|
noexcept |
Returns the visualiser currently attached to this block (nullptr for none).