gigawidgets 0.3.55
A wxWidgets-style UI library for the Arduino Giga Display Shield.
 
Loading...
Searching...
No Matches
keyboard.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include <gfxfont.h>
5
6#include "core/color.hpp"
7#include "core/fontsize.hpp"
8#include "keyboard_layout.hpp"
9#include "panel.hpp"
10#include "text.hpp"
11
12namespace ui {
13
19class Keyboard : public Panel {
20 const layout::KeyboardLayout *layout;
21 const GFXfont *font;
22 color_t textColor;
23 color_t buttonColor;
24 color_t backgroundColor;
25 bool shift = false;
26 bool alt = false;
27
28 void rebuild(std::function<Text *(char, color_t)> maketext);
29 void bind(Panel *button);
30
31public:
39 Keyboard(const layout::KeyboardLayout &layout, color_t textColor, color_t buttonColor, color_t backgroundColor);
40
49 Keyboard(const layout::KeyboardLayout &layout, const GFXfont &font, color_t textColor, color_t buttonColor, color_t backgroundColor);
50};
51
52} // namespace ui
A virtual keyboard input widget.
Definition keyboard.hpp:19
Keyboard(const layout::KeyboardLayout &layout, color_t textColor, color_t buttonColor, color_t backgroundColor)
Construct keyboard with text rendered in the built-in font.
Keyboard(const layout::KeyboardLayout &layout, const GFXfont &font, color_t textColor, color_t buttonColor, color_t backgroundColor)
Construct keyboard with text rendered in the given font.
A basic widget that displays a rounded rectangle behind another widget.
Definition panel.hpp:18
Display text to the screen.
Definition text.hpp:18
uint16_t color_t
An RGB565 color value. 5 bits red, 6 bits green, 5 bits blue.
Definition color.hpp:13
A generic interface for keyboard layouts.
Definition keyboard_layout.hpp:10