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).
Public Member Functions | List of all members
EmbAJAXOptionSelect< NUM > Class Template Reference

Drop-down list of selectable options. More...

#include <EmbAJAX.h>

Inheritance diagram for EmbAJAXOptionSelect< NUM >:
Inheritance graph
[legend]
Collaboration diagram for EmbAJAXOptionSelect< NUM >:
Collaboration graph
[legend]

Public Member Functions

 EmbAJAXOptionSelect (const char *id, const char *labels[NUM], uint8_t selected_option=0)
 
void print () const override
 
- Public Member Functions inherited from EmbAJAXOptionSelectBase
void selectOption (uint8_t num)
 
uint8_t selectedOption () const
 
const char * value (uint8_t which=EmbAJAXBase::Value) const override
 
const char * valueProperty (uint8_t which=EmbAJAXBase::Value) const override
 
void updateFromDriverArg (const char *argname) override
 
- Public Member Functions inherited from EmbAJAXElement
 EmbAJAXElement (const char *id)
 
const char * id () const
 
bool sendUpdates (uint16_t since, bool first) override
 
virtual bool valueNeedsEscaping (uint8_t which=EmbAJAXBase::Value) const
 
EmbAJAXElementtoElement () override final
 
- Public Member Functions inherited from EmbAJAXBase
void setVisible (bool visible)
 
void setEnabled (bool enabled)
 
virtual EmbAJAXElementfindChild (const char *id) const
 

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 EmbAJAXOptionSelectBase
 EmbAJAXOptionSelectBase (const char *id, uint8_t current_option)
 
void print (const char *const *_labels, uint8_t NUM) const
 
- Protected Member Functions inherited from EmbAJAXElement
void setBasicProperty (uint8_t num, bool status) override
 
bool basicProperty (uint8_t num) const
 
void setChanged ()
 
bool changed (uint16_t since)
 
void printTextInput (size_t size, const char *value) const
 
- 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)
 
EmbAJAXElementfindChild (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 EmbAJAXOptionSelectBase
uint8_t _current_option
 
- Protected Attributes inherited from EmbAJAXElement
byte _flags
 
const char * _id
 
- Static Protected Attributes inherited from EmbAJAXBase
static EmbAJAXOutputDriverBase_driver
 
static char itoa_buf [8]
 
constexpr static const char null_string [1]
 

Detailed Description

template<size_t NUM>
class EmbAJAXOptionSelect< NUM >

Drop-down list of selectable options.

Drop-down list of selectable options. Most functions of interest are implemented in the base class EmbAJAXOptionSelectBase, you'll only use this class for the constructor.

Constructor & Destructor Documentation

◆ EmbAJAXOptionSelect()

template<size_t NUM>
EmbAJAXOptionSelect< NUM >::EmbAJAXOptionSelect ( const char *  id,
const char *  labels[NUM],
uint8_t  selected_option = 0 
)
inline

ctor.

Parameters
idid for the element
labelslabels for the options. Note: The array of options may be a temporary, but the option-strings themselves will have to be persistent!
selected_optionindex of the default option. 0 by default, for the first option, may be > NUM, for no option selected by default.

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