-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for different display sizes added. A plugin can have differen…
…t views for the different display sizes. Which view to use will be decided on compile time by the CONFIG_LED_MATRIX_WIDTH and CONFIG_LED_MATRIX_HEIGHT.
- Loading branch information
Showing
135 changed files
with
8,883 additions
and
2,780 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,112 +1,49 @@ | ||
@startuml | ||
|
||
note as N1 | ||
This diagram shows only the important classes | ||
and interfaces. In case of class attributes and | ||
methods, it may not be complete compared to | ||
sourcecode. | ||
end note | ||
|
||
class YAGfx | ||
class YAGfxCanvas | ||
|
||
class WidgetGroup { | ||
- m_gfx : YAGfx& | ||
- m_widgets : LinkedList<Widget*> | ||
+ WidgetGroup(width : uint16_t, height : uint16_t, x : uint16_t, y : uint16_t) | ||
+ getWidth() const : uint16_t | ||
+ getHeight() const : uint16_t | ||
+ getColor(x : int16_t, y : int16_t) = 0 : Color& | ||
+ getColor(x : int16_t, y : int16_t) const : const Color& | ||
+ addWidget(widget : Widget&) : bool | ||
+ removeWidget(widget : Widget&) : bool | ||
+ children() : const LinkedList<Widget*>& | ||
+ update() : void | ||
+ find(name : const char*) : Widget* | ||
- paint(gfx : YAGfx&) : void | ||
- drawPixel(x : int16_t, y : int16_t, color : uint16_t) : void | ||
} | ||
|
||
YAGfx <|-- WidgetGroup | ||
Widget <|-- WidgetGroup | ||
WidgetGroup o--> Widget | ||
|
||
note right of WidgetGroup | ||
A widget group contains several widgets and | ||
will update them periodically. It ensures | ||
that a widget can not draw over the canvas | ||
borders. | ||
|
||
The widget group itself is a widget too and therefore | ||
can be inside another widget group. | ||
note left of YAGfxCanvas | ||
The widget uses the canvas to draw itself. | ||
end note | ||
|
||
class Widget { | ||
- m_type : const char* | ||
- m_posX : uint16_t | ||
- m_posY : uint16_t | ||
- m_name : const char* | ||
- m_isEnabled : bool | ||
+ move(x : uint16_t, y : uint16_t) : void | ||
+ getPos(x : uint16_t&, y : uint16_t&) const : void | ||
- m_canvas : YAGfxCanvas | ||
- {abstract} paint(gfx : YAGfx&) : void | ||
+ update(gfx : YAGfx&) : void | ||
+ getType() : const char* | ||
+ getName() : const char* | ||
+ setName(name : const char*) : void | ||
+ find(name : const char*) : Widget* | ||
# {abstract} paint(gfx : YAGfx&) = 0 : void | ||
} | ||
|
||
note left of Widget | ||
The base widget contains the | ||
position inside a canvas and declares | ||
the graphics interface. | ||
The base widget provides the common widget functionality. | ||
It contains the width, height and position in the parent canvas. | ||
end note | ||
|
||
class TextWidget { | ||
- m_str : String | ||
- m_textColor : uint16_t | ||
+ setFormatStr(str : const String&) : void | ||
+ getFormatStr() : String | ||
+ getStr() : String | ||
+ setTextColor(color : uint16_t) : void | ||
+ getTextColor() const : uint16_t | ||
+ setFont(font : const GFXfont*) : void | ||
+ getFont() : const GFXfont* | ||
+ {static} setScrollPause(pause : uint32_t) : bool | ||
+ getScrollInfo(isScrollingEnabled : bool&, scrollingCnt : uint32_t&) : bool | ||
YAGfx <|-- YAGfxCanvas | ||
YAGfxCanvas <-- Widget | ||
|
||
class BitmapWidget { | ||
- paint(gfx : YAGfx&) : void | ||
} | ||
class CanvasWidget { | ||
- paint(gfx : YAGfx&) : void | ||
} | ||
|
||
Widget <|-- TextWidget | ||
|
||
class BitmapWidget { | ||
- m_buffer : uint16_t* | ||
- m_width : uint16_t | ||
- m_height : uint16_t | ||
+ set(bitmap : const Color*, width : uint16_t, height : uint16_t) | ||
+ get(width : uint16_t&, height: uint16_t&) : const Color* | ||
+ load(fs : FS&, filename : const String&) : bool | ||
class LampWidget { | ||
- paint(gfx : YAGfx&) : void | ||
} | ||
|
||
Widget <|-- BitmapWidget | ||
class ProgressBar { | ||
- paint(gfx : YAGfx&) : void | ||
} | ||
|
||
class LampWidget { | ||
- m_isOn : bool | ||
- m_colorOff : uint16_t | ||
- m_colorOn : uint16_t | ||
- m_width : uint16_t | ||
+ setOnState(state : bool) : void | ||
+ getOnState() const : bool | ||
+ setColorOff(color : const Color&) : void | ||
+ getColorOff() : const Color& | ||
+ setColorOn(color : const Color&) : void | ||
+ getColorOn() : const Color& | ||
+ setWidth(width : uint16_t) : void | ||
+ getWidth() const : uin16_t | ||
class TextWidget { | ||
- paint(gfx : YAGfx&) : void | ||
} | ||
|
||
Widget <|-- BitmapWidget | ||
Widget <|-- CanvasWidget | ||
Widget <|-- LampWidget | ||
Widget <|-- ProgressBar | ||
Widget <|-- TextWidget | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.