TinyMaterialDesign
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
RadioGroup< RGB_T > Class Template Reference

Coordinates a set of RadioButtons so selecting one deselects the rest. Not itself a Widget - each RadioButton must still be added to the Screen individually, e.g.: More...

#include <RadioButton.h>

Public Member Functions

void addButton (RadioButton< RGB_T > &button)
 
int selectedIndex () const
 

Public Attributes

std::function< void(int)> onChange
 

Detailed Description

template<typename RGB_T = TINYMD_DEFAULT_RGB_T>
class tinymd::RadioGroup< RGB_T >

Coordinates a set of RadioButtons so selecting one deselects the rest. Not itself a Widget - each RadioButton must still be added to the Screen individually, e.g.:

RadioGroup<RGB565> group; group.onChange = [](int index) { ... }; for (auto& button : buttons) { screen.addWidget(button); group.addButton(button); }

Member Function Documentation

◆ addButton()

void addButton ( RadioButton< RGB_T > &  button)
inline

◆ selectedIndex()

int selectedIndex ( ) const
inline

Member Data Documentation

◆ onChange

std::function<void(int)> onChange

The documentation for this class was generated from the following file: