#include <DrawableDashboard.h>
Public Types | |
enum | DashAlign { TITLE_LEFT_VALUE_LEFT , TITLE_LEFT_VALUE_RIGHT , NO_TITLE_VALUE_LEFT , NO_TITLE_VALUE_RIGHT , TITLE_RIGHT_VALUE_LEFT , TITLE_RIGHT_VALUE_RIGHT } |
Public Member Functions | |
DashDrawParameters (color_t fgColor_, color_t bgColor_, const GFXfont *font_, DashAlign align=TITLE_RIGHT_VALUE_RIGHT) | |
Creates a dash parameter that has a background, foreground, font, and alignment. In this case the font is an Adafruit graphics font via tcUnicodeHelper. More... | |
DashDrawParameters (color_t fgColor_, color_t bgColor_, const UnicodeFont *font_, DashAlign align=TITLE_RIGHT_VALUE_RIGHT) | |
Creates a dash parameter that has a background, foreground, font, and alignment. In this case the font is a tcUnicode font. More... | |
DashDrawParameters (color_t fgColor_, color_t bgColor_, const NativeFontDesc &font_, DashAlign align=TITLE_RIGHT_VALUE_RIGHT) | |
Creates a dash parameter that has a background, foreground, font, and alignment. In this case the font is a native font that works with the library directly. More... | |
bool | isTitleDrawn () |
bool | isTitleLeftAlign () |
bool | isValueLeftAlign () |
const DeviceFontDrawingMode & | getFontMode () const |
virtual color_t | getBgColor (MenuItem *item, bool updated) |
virtual color_t | getFgColor (MenuItem *item, bool updated) |
virtual color_t | getTitleBgColor (MenuItem *item, bool updated) |
virtual color_t | getTitleFgColor (MenuItem *item, bool updated) |
Protected Attributes | |
DashAlign | alignment |
color_t | fgColor |
color_t | bgColor |
DeviceFontDrawingMode | fontMode |
Base class for draw parameters, used for static items that do not change. This class stores the alignment of text, the font and colors are stored in this item. Fonts can be either Adafruit or TcUnicode.
Controls the alignment of an item in the dashboard. Options are fairly self-explanatory.
DashDrawParameters::DashDrawParameters | ( | color_t | fgColor_, |
color_t | bgColor_, | ||
const GFXfont * | font_, | ||
DashAlign | align = TITLE_RIGHT_VALUE_RIGHT |
||
) |
Creates a dash parameter that has a background, foreground, font, and alignment. In this case the font is an Adafruit graphics font via tcUnicodeHelper.
fgColor_ | the foreground color |
bgColor_ | the background color |
font_ | the font to draw with |
align | the alignment |
DashDrawParameters::DashDrawParameters | ( | color_t | fgColor_, |
color_t | bgColor_, | ||
const UnicodeFont * | font_, | ||
DashAlign | align = TITLE_RIGHT_VALUE_RIGHT |
||
) |
Creates a dash parameter that has a background, foreground, font, and alignment. In this case the font is a tcUnicode font.
fgColor_ | the foreground color |
bgColor_ | the background color |
font_ | the font to draw with |
align | the alignment |
DashDrawParameters::DashDrawParameters | ( | color_t | fgColor_, |
color_t | bgColor_, | ||
const NativeFontDesc & | font_, | ||
DashAlign | align = TITLE_RIGHT_VALUE_RIGHT |
||
) |
Creates a dash parameter that has a background, foreground, font, and alignment. In this case the font is a native font that works with the library directly.
fgColor_ | the foreground color |
bgColor_ | the background color |
font_ | the font to draw with |
align | the alignment |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
the background color method is overloaded, each implementation has a different way of handling it.
Reimplemented in DashDrawParametersUpdate.
|
inlinevirtual |
the foreground color method is overloaded, each implementation has a different way of handling it.
Reimplemented in DashDrawParametersUpdate.
|
inlinevirtual |
the background title color method is overloaded, each implementation has a different way of handling it.
|
inlinevirtual |
the foreground title color method is overloaded, each implementation has a different way of handling it.