libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
FullScreenItemMenu.h
Go to the documentation of this file.
1#pragma once
2
3#include "AbstractMenu.h"
4
5namespace daisy
6{
26{
27 public:
46 bool allowEntering = true);
47
55
56 // inherited from UiPage
57 void Draw(const UiCanvasDescriptor& canvas) override;
58
59 private:
60 uint16_t canvasIdToDrawTo_ = UI::invalidCanvasId;
61
63 // Drawing routines
65 virtual int GetTopRowHeight(int displayHeight) const;
66 virtual void DrawTextItem(OneBitGraphicsDisplay& display,
67 bool isVertical,
70 const char* itemText) const;
71 virtual void DrawCheckboxItem(OneBitGraphicsDisplay& display,
72 bool isVertical,
75 const char* itemText,
76 const bool& isCheckboxTicked) const;
77 virtual void DrawValueItem(OneBitGraphicsDisplay& display,
78 bool isVertical,
81 const char* itemText,
82 const MappedValue& value,
83 bool isEditing) const;
84 virtual void DrawOpenUiPageItem(OneBitGraphicsDisplay& display,
85 bool isVertical,
88 const char* itemText) const;
89
90 virtual void DrawCloseMenuItem(OneBitGraphicsDisplay& display,
91 bool isVertical,
94 const char* itemText) const;
95 virtual void DrawTopRow(OneBitGraphicsDisplay& display,
96 bool isVertical,
97 int currentIndex,
98 int numItemsTotal,
99 const char* text,
101 bool isSelected) const;
102 virtual Rectangle DrawUDArrowsAndGetRemRect(OneBitGraphicsDisplay& display,
104 bool upAvailable,
105 bool downAvailable) const;
106 virtual Rectangle DrawLRArrowsAndGetRemRect(OneBitGraphicsDisplay& display,
108 bool leftAvailable,
109 bool rightAvailable) const;
110
111 virtual void DrawValueText(OneBitGraphicsDisplay& display,
112 bool isVertical,
113 const char* text,
115 bool isBeingEdited) const;
116 virtual FontDef GetValueFont(const char* textToDraw,
117 const Rectangle& availableSpace) const;
118
119 virtual FontDef GetNameFont(const char* textToDraw,
120 const Rectangle& availableSpace) const;
121};
122} // namespace daisy
Base class for complex menus.
Definition AbstractMenu.h:56
Orientation
Definition AbstractMenu.h:65
A menu page for small screens.
Definition FullScreenItemMenu.h:26
void Draw(const UiCanvasDescriptor &canvas) override
void Init(const AbstractMenu::ItemConfig *items, uint16_t numItems, AbstractMenu::Orientation orientation=AbstractMenu::Orientation::leftRightSelectUpDownModify, bool allowEntering=true)
void SetOneBitGraphicsDisplayToDrawTo(uint16_t canvasId)
Definition leddriver.h:33
Definition MappedValue.h:12
Definition display.h:20
Definition graphics_common.h:22
static constexpr uint16_t invalidCanvasId
Definition UI.h:392
Hardware defines and helpers for daisy field platform.
Definition index.h:2
Definition oled_fonts.h:17
Definition AbstractMenu.h:139
A descriptor for a canvas in the UI system.
Definition UI.h:34