Control Surface master
MIDI Control Surface library for Arduino
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | List of all members
LCDDisplay Class Reference

#include <Display/MCU/LCDDisplay.hpp>

Detailed Description

Displays the text of the Mackie Control Universal LCD screen for a single track.

Often used for track names.

Examples
MCU-OLED-SSD1306-x2.ino.

Definition at line 18 of file LCDDisplay.hpp.

+ Inheritance diagram for LCDDisplay:
+ Collaboration diagram for LCDDisplay:

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

 LCDDisplay (DisplayInterface &display, LCD<> &lcd, const OutputBank &bank, uint8_t track, PixelLocation loc, uint8_t textSize, uint16_t color)
 Constructor. More...
 
 LCDDisplay (DisplayInterface &display, LCD<> &lcd, const OutputBank &bank, uint8_t track, uint8_t line, PixelLocation loc, uint8_t textSize, uint16_t color)
 Constructor. More...
 
 LCDDisplay (DisplayInterface &display, LCD<> &lcd, uint8_t track, PixelLocation loc, uint8_t textSize, uint16_t color)
 Constructor. More...
 
 LCDDisplay (DisplayInterface &display, LCD<> &lcd, uint8_t track, uint8_t line, PixelLocation loc, uint8_t textSize, uint16_t color)
 Constructor. More...
 
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...
 
bool separateTracks () const
 Check if the display contains a message for each track separately. More...
 
void setLine (uint8_t line)
 Set the line number of the LCD to display. More...
 
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 Attributes

DisplayInterfacedisplay
 
DisplayElementnext
 
DisplayElementprevious
 

Static Protected Attributes

static DoublyLinkedList< DisplayElementelements
 

Private Attributes

LCDlcd
 
const OutputBankbank = nullptr
 
uint8_t track
 
uint8_t line
 
int16_t x
 
int16_t y
 
uint8_t size
 
uint16_t color
 

Constructor & Destructor Documentation

◆ LCDDisplay() [1/4]

LCDDisplay ( DisplayInterface display,
LCD<> &  lcd,
const OutputBank bank,
uint8_t  track,
PixelLocation  loc,
uint8_t  textSize,
uint16_t  color 
)
inline

Constructor.

Parameters
displayA reference to the display that this element will be drawn to.
lcdA reference to the MCU LCD MIDI input element that listens for incoming MIDI display data.
bankThe bank that determines the active track to be displayed.
trackThe track number to display [1, 8].
locThe location on the display where to start drawing the text.
textSizeThe font size to use for drawing the text.
colorThe color of the text to draw.

Definition at line 39 of file LCDDisplay.hpp.

◆ LCDDisplay() [2/4]

LCDDisplay ( DisplayInterface display,
LCD<> &  lcd,
const OutputBank bank,
uint8_t  track,
uint8_t  line,
PixelLocation  loc,
uint8_t  textSize,
uint16_t  color 
)
inline

Constructor.

Parameters
displayA reference to the display that this element will be drawn to.
lcdA reference to the MCU LCD MIDI input element that listens for incoming MIDI display data.
bankThe bank that determines the active track to be displayed.
trackThe track number to display [1, 8].
lineThe line of the MCU display to display [1, 2].
locThe location on the display where to start drawing the text.
textSizeThe font size to use for drawing the text.
colorThe color of the text to draw.

Definition at line 66 of file LCDDisplay.hpp.

◆ LCDDisplay() [3/4]

LCDDisplay ( DisplayInterface display,
LCD<> &  lcd,
uint8_t  track,
PixelLocation  loc,
uint8_t  textSize,
uint16_t  color 
)
inline

Constructor.

Parameters
displayA reference to the display that this element will be drawn to.
lcdA reference to the MCU LCD MIDI input element that listens for incoming MIDI display data.
trackThe track number to display [1, 8].
locThe location on the display where to start drawing the text.
textSizeThe font size to use for drawing the text.
colorThe color of the text to draw.

Definition at line 89 of file LCDDisplay.hpp.

◆ LCDDisplay() [4/4]

LCDDisplay ( DisplayInterface display,
LCD<> &  lcd,
uint8_t  track,
uint8_t  line,
PixelLocation  loc,
uint8_t  textSize,
uint16_t  color 
)
inline

Constructor.

Parameters
displayA reference to the display that this element will be drawn to.
lcdA reference to the MCU LCD MIDI input element that listens for incoming MIDI display data.
trackThe track number to display [1, 8].
lineThe line of the MCU display to display [1, 2].
locThe location on the display where to start drawing the text.
textSizeThe font size to use for drawing the text.
colorThe color of the text to draw.

Definition at line 113 of file LCDDisplay.hpp.

Member Function Documentation

◆ draw()

void draw ( )
inlineoverridevirtual

Draw this DisplayElement to the display buffer.

Implements DisplayElement.

Definition at line 119 of file LCDDisplay.hpp.

◆ getDirty()

bool getDirty ( ) const
inlineoverridevirtual

Check if this DisplayElement has to be re-drawn.

Implements DisplayElement.

Definition at line 144 of file LCDDisplay.hpp.

◆ separateTracks()

bool separateTracks ( ) const
inline

Check if the display contains a message for each track separately.

On the original Mackie Control surfaces, the LCD display consists of two 56-character lines, where each of the 8 channels has 7 characters. If the LCD is used to display a message for each channel separately, the seventh character of each channel is always a space, as separation between the channels.

Return values
trueThe display contains a message for each track separately, and the messages are separated by spaces.
falseThe display contains a message that spans across multiple tracks, without separating spaces between the tracks.

Definition at line 163 of file LCDDisplay.hpp.

◆ setLine()

void setLine ( uint8_t  line)
inline

Set the line number of the LCD to display.

Parameters
lineEither 1 or 2.

Definition at line 175 of file LCDDisplay.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

◆ lcd

LCD& lcd
private

Definition at line 178 of file LCDDisplay.hpp.

◆ bank

const OutputBank* bank = nullptr
private

Definition at line 179 of file LCDDisplay.hpp.

◆ track

uint8_t track
private

Definition at line 180 of file LCDDisplay.hpp.

◆ line

uint8_t line
private

Definition at line 181 of file LCDDisplay.hpp.

◆ x

int16_t x
private

Definition at line 182 of file LCDDisplay.hpp.

◆ y

int16_t y
private

Definition at line 182 of file LCDDisplay.hpp.

◆ size

uint8_t size
private

Definition at line 183 of file LCDDisplay.hpp.

◆ color

uint16_t color
private

Definition at line 184 of file LCDDisplay.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: