EmbAJAX
Simplistic framework for creating and handling displays and controls on a web page served by an embeddable device (Arduino or other microcontroller with Arduino support).
|
A set of radio buttons (mutally exclusive buttons), e.g. for on/off, or low/mid/high, etc. More...
#include <EmbAJAX.h>
Public Member Functions | |
EmbAJAXRadioGroup (const char *id_base, const char *options[NUM], uint8_t selected_option=0) | |
void | selectOption (uint8_t num) |
uint8_t | selectedOption () const |
EmbAJAXBase * | button (uint8_t num) |
Public Member Functions inherited from EmbAJAXContainer< NUM > | |
EmbAJAXContainer (EmbAJAXBase *children[NUM]) | |
void | print () const override |
bool | sendUpdates (uint16_t since, bool first) override |
EmbAJAXElement * | findChild (const char *id) const override final |
Public Member Functions inherited from EmbAJAXBase | |
virtual EmbAJAXElement * | toElement () |
void | setVisible (bool visible) |
void | setEnabled (bool enabled) |
Additional Inherited Members | |
Public Types inherited from EmbAJAXBase | |
enum | Property { Visibility , Enabledness , Value , FirstElementSpecificProperty , HTMLAllowed } |
Static Public Member Functions inherited from EmbAJAXBase | |
static void | setDriver (EmbAJAXOutputDriverBase *driver) |
Protected Member Functions inherited from EmbAJAXContainer< NUM > | |
void | setBasicProperty (uint8_t num, bool status) override |
Protected Member Functions inherited from EmbAJAXBase | |
void | printChildren (EmbAJAXBase **children, size_t num) const |
bool | sendUpdates (EmbAJAXBase **children, size_t num, uint16_t since, bool first) |
EmbAJAXElement * | findChild (EmbAJAXBase **children, size_t num, const char *id) const |
void | printPage (EmbAJAXBase **children, size_t num, const char *_title, const char *_header, uint16_t _min_interval) const |
void | handleRequest (EmbAJAXBase **children, size_t num, void(*change_callback)()) |
Protected Attributes inherited from EmbAJAXContainer< NUM > | |
EmbAJAXBase ** | _children |
Protected Attributes inherited from EmbAJAXRadioGroupBase | |
const char * | _name |
Static Protected Attributes inherited from EmbAJAXBase | |
static EmbAJAXOutputDriverBase * | _driver |
static char | itoa_buf [8] |
constexpr static const char | null_string [1] |
A set of radio buttons (mutally exclusive buttons), e.g. for on/off, or low/mid/high, etc.
You can insert either the whole group into an EmbAJAXPage at once, or - for more flexbile layouting - retrieve the individual buttons using() button, and insert them into the page as independent elements.
|
inline |
ctor.
id_base | the "base" id. Internally, radio buttons with id_s id_base0, id_base1, etc. will be created. |
options | labels for the options. Note: The array of options may be a temporary, but the option-strings themselves will have to be persistent! |
selected_option | index of the default option. 0 by default, for the first option, may be > NUM, for no option selected by default. |
|
inline |
|
inline |
|
inline |
Select / check the option at the given index. All other options in this radio group will become deselected.