|
| | Snackbar () |
| |
| | Snackbar (Bounds bounds) |
| |
| void | show (const char *message, const char *actionLabel=nullptr, uint32_t durationMs=4000) |
| |
| void | dismiss () |
| |
| void | draw (tinygpu::ISurface< RGB_T > &target) override |
| |
| bool | onGesture (const tinygpu::GestureEvent &event) override |
| | Handles one gesture event. Returns true if this widget consumed it.
|
| |
| bool | update (uint32_t nowMs) override |
| |
| virtual | ~Widget ()=default |
| |
| virtual void | setTheme (const MaterialTheme< RGB_T > &theme) |
| |
| virtual void | draw (tinygpu::ISurface< RGB_T > &target)=0 |
| |
| virtual bool | onGesture (const tinygpu::GestureEvent &event) |
| | Handles one gesture event. Returns true if this widget consumed it.
|
| |
| virtual bool | update (uint32_t nowMs) |
| |
| virtual bool | isDraggable () const |
| |
| virtual bool | isDraggableAt (int32_t x, int32_t y) const |
| |
| virtual int | childCount () const |
| |
| virtual Widget< RGB_T > * | child (int index) |
| |
| virtual void | drawBackground (tinygpu::ISurface< RGB_T > &target) |
| |
| virtual void | setThemeTint (RGB_T background, RGB_T foreground) |
| |
| virtual bool | isContainer () const |
| | Provides true if the widget is a container.
|
| |
template<typename RGB_T = TINYMD_DEFAULT_RGB_T>
class tinymd::Snackbar< RGB_T >
Transient bottom message bar with an optional single text action.
Not a modal - add it once with Screen::addFixedWidget() (last, so it draws on top) and drive its lifetime with show()/dismiss(); it hides itself automatically after its duration via update(), same mechanism a ripple fade uses. visible stays false until show() is called, so it costs nothing extra when idle - Screen already skips invisible widgets.
| bool update |
( |
uint32_t |
nowMs | ) |
|
|
inlineoverridevirtual |
Called once per frame, before draw(), to advance any time-based animation (ripple fade, indeterminate progress sweep, ...). Returns true if that advance changed anything this widget will draw differently, so Screen can decide whether a redraw is actually needed - see Screen::isDirty(). Default: no-op, not dirty, so widgets that don't animate cost nothing extra.
Reimplemented from Widget< RGB_T >.