Side navigation rail: a narrow vertical column of 3-7 exclusive destinations, each an icon with a label underneath and a pill highlight behind the selected icon - the tablet/landscape counterpart of NavigationBar.
More...
#include <NavigationRail.h>
template<typename RGB_T = TINYMD_DEFAULT_RGB_T>
class tinymd::NavigationRail< RGB_T >
Side navigation rail: a narrow vertical column of 3-7 exclusive destinations, each an icon with a label underneath and a pill highlight behind the selected icon - the tablet/landscape counterpart of NavigationBar.
Register with Screen::addFixedWidget() so it stays pinned to the side of the viewport while scrollable content behind it scrolls.
◆ NavigationRail() [1/2]
◆ NavigationRail() [2/2]
◆ addDestination()
| void addDestination |
( |
IconPainter< RGB_T > |
icon, |
|
|
const char * |
label |
|
) |
| |
|
inline |
◆ draw()
| void draw |
( |
tinygpu::ISurface< RGB_T > & |
target | ) |
|
|
inlineoverridevirtual |
Renders the widget into target using colors/fonts/tokens from its own theme (see theme()/setTheme()).
Implements Widget< RGB_T >.
◆ onGesture()
| bool onGesture |
( |
const tinygpu::GestureEvent & |
event | ) |
|
|
inlineoverridevirtual |
Handles one gesture event. Returns true if this widget consumed it.
Reimplemented from Widget< RGB_T >.
◆ selectedIndex()
| int selectedIndex |
( |
| ) |
const |
|
inline |
◆ setSelectedIndex()
| void setSelectedIndex |
( |
int |
index | ) |
|
|
inline |
◆ onChange
| std::function<void(int)> onChange |
The documentation for this class was generated from the following file: