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
EmbAJAXValidatingTextInput< SIZE > Class Template Reference

#include <EmbAJAXValidatingTextInput.h>

Inheritance diagram for EmbAJAXValidatingTextInput< SIZE >:
Inheritance graph
[legend]
Collaboration diagram for EmbAJAXValidatingTextInput< SIZE >:
Collaboration graph
[legend]

Public Member Functions

 EmbAJAXValidatingTextInput (const char *id)
 
void print () const override
 
void setPlaceholder (const char *placeholder)
 
void setPattern (const char *pattern)
 
void setCustomValidationAttributes (const char *attributes)
 
- Public Member Functions inherited from EmbAJAXTextInput< SIZE >
 EmbAJAXTextInput (const char *id)
 
const char * value (uint8_t which=EmbAJAXBase::Value) const override
 
const char * valueProperty (uint8_t which=EmbAJAXBase::Value) const override
 
void setValue (const char *value)
 
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 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 EmbAJAXTextInput< SIZE >
char _value [SIZE]
 
- 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 SIZE>
class EmbAJAXValidatingTextInput< SIZE >

EmbAJAX - Simplistic framework for creating and handling displays and controls on a WebPage served by an Arduino (or other small device).

Copyright (C) 2018 Thomas Friedrichsmeier

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Member Function Documentation

◆ setCustomValidationAttributes()

template<size_t SIZE>
void EmbAJAXValidatingTextInput< SIZE >::setCustomValidationAttributes ( const char *  attributes)
inline

Specify custom attributes (other than placeholder and pattern) to be inserted in the <input>-tag in the generated HTML.

Example:

setCustomAttributes("min=\"1\" max=\"100\"");

◆ setPattern()

template<size_t SIZE>
void EmbAJAXValidatingTextInput< SIZE >::setPattern ( const char *  pattern)
inline

Set a placeholder text (will be shown, when the input is empty)

Example:

setPattern("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"); // IPv4-Address
void setPattern(const char *pattern)
Definition: EmbAJAXValidatingTextInput.h:59

◆ setPlaceholder()

template<size_t SIZE>
void EmbAJAXValidatingTextInput< SIZE >::setPlaceholder ( const char *  placeholder)
inline

Set a placeholder text (will be shown, when the input is empty)


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