1#ifndef DSGC_COMPONENT_H
2#define DSGC_COMPONENT_H
4#ifdef ARDUINO_XRCU_HWV10001
6#include <Adafruit_GFX_Library/Adafruit_GFX.h>
8#include <Adafruit_GFX.h>
11#include "Dimensions.h"
15 class Component :
public Dimensions {
23 Color backgroundColor;
24 Color foregroundColor;
27 Color focusedBackgroundColor;
28 Color focusedForegroundColor;
29 Color focusedBorderColor;
31 Color disabledBackgroundColor;
32 Color disabledForegroundColor;
33 Color disabledBorderColor;
47 virtual Color getCurrentBackgroundColor();
48 virtual Color getCurrentForegroundColor();
49 virtual Color getCurrentBorderColor();
67 virtual void setFocused(
bool focused);
130 virtual void setBackgroundColor(
Color color);
131 virtual void setForegroundColor(
Color color);
132 virtual void setBorderColor(
Color color);
133 virtual void setDisabledBackgroundColor(
Color color);
134 virtual void setDisabledForegroundColor(
Color color);
135 virtual void setDisabledBorderColor(
Color color);
136 virtual void setFocusedBackgroundColor(
Color color);
137 virtual void setFocusedForegroundColor(
Color color);
138 virtual void setFocusedBorderColor(
Color color);
145 virtual void paint();
Definition Adafruit_GFX.h:18
The common interface for colors used by DSGC.
Definition Color.h:21
virtual Color getDisabledForegroundColor()
Gets the foreground color when disabled.
Definition Component.cpp:101
virtual Color getDisabledBackgroundColor()
Gets the background color when disabled.
Definition Component.cpp:97
virtual Color getFocusedBorderColor()
Gets the border color when enabled and focused.
Definition Component.cpp:117
virtual Color getDisabledBorderColor()
Gets the border color when disabled.
Definition Component.cpp:105
virtual bool isEnabled()
Checks whether this component is enabled.
Definition Component.cpp:69
virtual Color getBackgroundColor()
Gets the background color when enabled but not focused.
Definition Component.cpp:85
virtual Color getFocusedBackgroundColor()
Gets the background color when enabled and focused.
Definition Component.cpp:109
virtual void setEnabled(bool enabled)
Sets whether this component is enabled.
Definition Component.cpp:64
virtual Color getFocusedForegroundColor()
Gets the foreground color when enabled and focused.
Definition Component.cpp:113
virtual Color getBorderColor()
Gets the border color when enabled but not focused.
Definition Component.cpp:93
virtual Color getForegroundColor()
Gets the foreground color when enabled but not focused.
Definition Component.cpp:89
virtual void paint()
Paints this component.
Definition Component.cpp:165
virtual void repaint()
Repaints this component.
Definition Component.cpp:169
virtual bool isFocused()
Checks whether this component has focus.
Definition Component.cpp:78