25 return reinterpret_cast<uintptr_t
>(&lhs.
getDisplay()) <
26 reinterpret_cast<uintptr_t
>(&rhs.
getDisplay());
37 ERROR(F(
"Error: This element is already enabled."), 0x9212);
47 ERROR(F(
"Error: This element is already disabled."), 0x9213);
66 template <
class U,
size_t N>
77 template <
class U,
size_t N>
#define BEGIN_CS_NAMESPACE
An interface for elements that draw to a display.
static void enable(DisplayElement &element)
Enable this display element: insert it into the linked list of instances, so it gets drawn to the dis...
static DoublyLinkedList< DisplayElement > elements
static DoublyLinkedList< DisplayElement > & getAll()
Get the list of all DisplayElement instances.
virtual void draw()=0
Draw this DisplayElement to the display buffer.
static void enable(U(&array)[N])
Enable this display element: insert it into the linked list of instances, so it gets drawn to the dis...
virtual bool getDirty() const =0
Check if this DisplayElement has to be re-drawn.
void enable()
Enable this display element: insert it into the linked list of instances, so it gets drawn to the dis...
static void enable(DisplayElement *element)
Enable this display element: insert it into the linked list of instances, so it gets drawn to the dis...
const DisplayInterface & getDisplay() const
Get a const reference to the display that this element draws to.
DisplayElement(DisplayInterface &display)
Create a new DisplayElement.
DisplayInterface & getDisplay()
Get a reference to the display that this element draws to.
virtual ~DisplayElement()
void disable()
Disable this display element: remove it from the linked list of instances, so it no longer gets drawn...
bool isEnabled() const
Check if this display element is enabled.
static void disable(DisplayElement &element)
Disable this display element: remove it from the linked list of instances, so it no longer gets drawn...
static void disable(U(&array)[N])
Disable this display element: remove it from the linked list of instances, so it no longer gets drawn...
static void disable(DisplayElement *element)
Disable this display element: remove it from the linked list of instances, so it no longer gets drawn...
DisplayInterface & display
An interface for displays.
A class that can be inherited from to allow inserting into a DoublyLinkedList.
A class for doubly linked lists.
void append(Node *node)
Append a node to a linked list.
bool couldContain(const Node *node) const
Check if the linked list could contain the given node.
void remove(Node *node)
Remove a node from the linked list.
void insertSorted(Node *node, Compare cmp)
Insert a new node at the correct location into a sorted list.