|
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 a value slider widget for lcdgfx library. More...
#include <slider.h>
Public Member Functions | |
| LcdGfxSlider (const NanoRect &rect, int16_t minValue, int16_t maxValue, int16_t value, int16_t step=1, LcdGfxSliderOrientation orientation=LcdGfxSliderOrientation::Horizontal) | |
| Creates a slider widget. More... | |
| template<typename D > | |
| void | show (D &d) |
| Renders the slider on the display. More... | |
| void | up () |
| Increments value by one step (clamped to max). | |
| void | down () |
| Decrements value by one step (clamped to min). | |
| 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 |
| Returns the configured minimum. | |
| int16_t | maxValue () const |
| Returns the configured maximum. | |
| const NanoRect & | getRect () const |
| Returns the rectangle area used by the slider. | |
Class implements a value slider widget for lcdgfx library.
Renders a track with a knob that represents the current value within [min, max]. Works with monochrome and color displays - drawing uses only the generic NanoDisplayOps API.
| LcdGfxSlider::LcdGfxSlider | ( | const NanoRect & | rect, |
| int16_t | minValue, | ||
| int16_t | maxValue, | ||
| int16_t | value, | ||
| int16_t | step = 1, |
||
| LcdGfxSliderOrientation | orientation = LcdGfxSliderOrientation::Horizontal |
||
| ) |
Creates a slider widget.
| rect | screen area for the slider |
| minValue | minimum value (inclusive) |
| maxValue | maximum value (inclusive) |
| value | initial value (clamped into [min, max]) |
| step | increment / decrement size for up()/down() (must be >= 1) |
| orientation | Horizontal or Vertical |
|
inline |