|
LCDGFX LCD display driver
1.2.0
Lightweight graphics library for SSD1306, SSD1325, SSD1327, SSD1331, SSD1351, SH1106, SH1107, IL9163, ST7735, ST7789, ILI9341, PCD8544 displays over I2C/SPI
|
Class implements an integer spinbox widget for lcdgfx library. More...
#include <spinbox.h>
Public Member Functions | |
| LcdGfxSpinbox (const NanoRect &rect, int16_t minValue, int16_t maxValue, int16_t value, int16_t step=1, bool wrap=false) | |
| Creates a spinbox widget. More... | |
| template<typename D > | |
| void | show (D &d) |
| Renders the spinbox on the display: a border with a centered numeric value and "<" ">" arrows on the sides. | |
| void | up () |
| Increments the value (wraps or clamps depending on configuration). | |
| void | down () |
| Decrements the value (wraps or clamps depending on configuration). | |
| void | setValue (int16_t value) |
| Sets the current value, clamped into [min, max]. | |
| int16_t | value () const |
| Returns the current value. | |
| int16_t | minValue () const |
| int16_t | maxValue () const |
| bool | wraps () const |
| const NanoRect & | getRect () const |
Class implements an integer spinbox widget for lcdgfx library.
Up/down keys change the value by a configurable step. Optional wrap mode causes overflow above the max to roll over to the min and vice-versa. Otherwise the value is clamped at the bounds.
| LcdGfxSpinbox::LcdGfxSpinbox | ( | const NanoRect & | rect, |
| int16_t | minValue, | ||
| int16_t | maxValue, | ||
| int16_t | value, | ||
| int16_t | step = 1, |
||
| bool | wrap = false |
||
| ) |
Creates a spinbox widget.
| rect | screen area for the spinbox |
| minValue | minimum value (inclusive) |
| maxValue | maximum value (inclusive) |
| value | initial value (clamped into [min, max]) |
| step | increment / decrement size (must be >= 1) |
| wrap | if true, up/down wrap around the bounds; otherwise they clamp |