Control Surface master
MIDI Control Surface library for Arduino
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | List of all members
VPotDisplay< VPot_t > Class Template Reference

#include <Display/MCU/VPotDisplay.hpp>

Detailed Description

template<class VPot_t = Interfaces::MCU::IVPot &>
class MCU::VPotDisplay< VPot_t >
Examples
MCU-OLED-SSD1306-x2.ino, and MCU-OLED-SSD1306.ino.

Definition at line 14 of file VPotDisplay.hpp.

+ Inheritance diagram for VPotDisplay< VPot_t >:
+ Collaboration diagram for VPotDisplay< VPot_t >:

Enabling and disabling display elements

void enable ()
 Enable this display element: insert it into the linked list of instances, so it gets drawn to the display. More...
 
void disable ()
 Disable this display element: remove it from the linked list of instances, so it no longer gets drawn to the display. More...
 
bool isEnabled () const
 Check if this display element is enabled. More...
 
static void enable (DisplayElement *element)
 Enable this display element: insert it into the linked list of instances, so it gets drawn to the display. More...
 
static void enable (DisplayElement &element)
 Enable this display element: insert it into the linked list of instances, so it gets drawn to the display. More...
 
template<class U , size_t N>
static void enable (U(&array)[N])
 Enable this display element: insert it into the linked list of instances, so it gets drawn to the display. More...
 
static void disable (DisplayElement *element)
 Disable this display element: remove it from the linked list of instances, so it no longer gets drawn to the display. More...
 
static void disable (DisplayElement &element)
 Disable this display element: remove it from the linked list of instances, so it no longer gets drawn to the display. More...
 
template<class U , size_t N>
static void disable (U(&array)[N])
 Disable this display element: remove it from the linked list of instances, so it no longer gets drawn to the display. More...
 

Public Member Functions

 VPotDisplay (DisplayInterface &display, VPot_t &&vpot, PixelLocation loc, uint16_t radius, uint16_t innerRadius, uint16_t color)
 
void draw () override
 Draw this DisplayElement to the display buffer. More...
 
bool getDirty () const override
 Check if this DisplayElement has to be re-drawn. More...
 
void setAngleSpacing (float spacing)
 
float getAngleSpacing () const
 
DisplayInterfacegetDisplay ()
 Get a reference to the display that this element draws to. More...
 
const DisplayInterfacegetDisplay () const
 Get a const reference to the display that this element draws to. More...
 

Static Public Member Functions

static DoublyLinkedList< DisplayElement > & getAll ()
 Get the list of all DisplayElement instances. More...
 

Protected Member Functions

void drawVPotSegment (uint8_t segment)
 

Protected Attributes

DisplayInterfacedisplay
 
DisplayElementnext
 
DisplayElementprevious
 

Static Protected Attributes

static DoublyLinkedList< DisplayElementelements
 

Private Attributes

VPot_t vpot
 
int16_t x
 
int16_t y
 
uint16_t radius
 
uint16_t innerRadius
 
uint16_t color
 
float angleSpacing = 0.4887
 

Constructor & Destructor Documentation

◆ VPotDisplay()

VPotDisplay ( DisplayInterface display,
VPot_t &&  vpot,
PixelLocation  loc,
uint16_t  radius,
uint16_t  innerRadius,
uint16_t  color 
)
inline

Definition at line 17 of file VPotDisplay.hpp.

Member Function Documentation

◆ draw()

void draw ( )
inlineoverridevirtual

Draw this DisplayElement to the display buffer.

Implements DisplayElement.

Definition at line 23 of file VPotDisplay.hpp.

◆ getDirty()

bool getDirty ( ) const
inlineoverridevirtual

Check if this DisplayElement has to be re-drawn.

Implements DisplayElement.

Definition at line 36 of file VPotDisplay.hpp.

◆ setAngleSpacing()

void setAngleSpacing ( float  spacing)
inline

Definition at line 38 of file VPotDisplay.hpp.

◆ getAngleSpacing()

float getAngleSpacing ( ) const
inline

Definition at line 39 of file VPotDisplay.hpp.

◆ drawVPotSegment()

void drawVPotSegment ( uint8_t  segment)
inlineprotected

Definition at line 50 of file VPotDisplay.hpp.

◆ enable() [1/4]

void enable ( )
inlineprotectedinherited

Enable this display element: insert it into the linked list of instances, so it gets drawn to the display.

Definition at line 33 of file DisplayElement.hpp.

◆ enable() [2/4]

static void enable ( DisplayElement element)
inlinestaticprotectedinherited

Enable this display element: insert it into the linked list of instances, so it gets drawn to the display.

Definition at line 62 of file DisplayElement.hpp.

◆ enable() [3/4]

static void enable ( DisplayElement element)
inlinestaticprotectedinherited

Enable this display element: insert it into the linked list of instances, so it gets drawn to the display.

Definition at line 64 of file DisplayElement.hpp.

◆ enable() [4/4]

static void enable ( U(&)  array[N])
inlinestaticprotectedinherited

Enable this display element: insert it into the linked list of instances, so it gets drawn to the display.

Definition at line 67 of file DisplayElement.hpp.

◆ disable() [1/4]

void disable ( )
inlineprotectedinherited

Disable this display element: remove it from the linked list of instances, so it no longer gets drawn to the display.

Definition at line 43 of file DisplayElement.hpp.

◆ disable() [2/4]

static void disable ( DisplayElement element)
inlinestaticprotectedinherited

Disable this display element: remove it from the linked list of instances, so it no longer gets drawn to the display.

Definition at line 73 of file DisplayElement.hpp.

◆ disable() [3/4]

static void disable ( DisplayElement element)
inlinestaticprotectedinherited

Disable this display element: remove it from the linked list of instances, so it no longer gets drawn to the display.

Definition at line 75 of file DisplayElement.hpp.

◆ disable() [4/4]

static void disable ( U(&)  array[N])
inlinestaticprotectedinherited

Disable this display element: remove it from the linked list of instances, so it no longer gets drawn to the display.

Definition at line 78 of file DisplayElement.hpp.

◆ isEnabled()

bool isEnabled ( ) const
inlineprotectedinherited

Check if this display element is enabled.

Note
Assumes that the element is not added to a different linked list by the user.

Definition at line 57 of file DisplayElement.hpp.

◆ getDisplay() [1/2]

DisplayInterface & getDisplay ( )
inlineinherited

Get a reference to the display that this element draws to.

Definition at line 95 of file DisplayElement.hpp.

◆ getDisplay() [2/2]

const DisplayInterface & getDisplay ( ) const
inlineinherited

Get a const reference to the display that this element draws to.

Definition at line 97 of file DisplayElement.hpp.

◆ getAll()

static DoublyLinkedList< DisplayElement > & getAll ( )
inlinestaticinherited

Get the list of all DisplayElement instances.

Definition at line 100 of file DisplayElement.hpp.

Member Data Documentation

◆ vpot

VPot_t vpot
private

Definition at line 42 of file VPotDisplay.hpp.

◆ x

int16_t x
private

Definition at line 44 of file VPotDisplay.hpp.

◆ y

int16_t y
private

Definition at line 44 of file VPotDisplay.hpp.

◆ radius

uint16_t radius
private

Definition at line 45 of file VPotDisplay.hpp.

◆ innerRadius

uint16_t innerRadius
private

Definition at line 45 of file VPotDisplay.hpp.

◆ color

uint16_t color
private

Definition at line 45 of file VPotDisplay.hpp.

◆ angleSpacing

float angleSpacing = 0.4887
private

Definition at line 47 of file VPotDisplay.hpp.

◆ display

DisplayInterface& display
protectedinherited

Definition at line 103 of file DisplayElement.hpp.

◆ elements

DoublyLinkedList< DisplayElement > elements
staticprotectedinherited

Definition at line 105 of file DisplayElement.hpp.

◆ next

DisplayElement * next
protectedinherited

Definition at line 324 of file LinkedList.hpp.

◆ previous

DisplayElement * previous
protectedinherited

Definition at line 325 of file LinkedList.hpp.


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