11 KiB
AutoConnectButton
Constructor
AutoConnectButton(const char* name = "", const char* value = "", const String& action = String())
- **Parameters**
- nameThe element name.
- valueValue of the element.
- actionNative code of the action script executed when the button is clicked.
Public member variables
name
The element name.
- **Type**
- String
value
Value of the element.
- **Type**
- String
action
HTML native code of the action script to be executed when the button is clicked. It is mostly used with a JavaScript to activate a script.1
- **Type**
- String
Public member functions
typeOf
ACElement_t typeOf(void)
Returns type of AutoConnectElement.
- **Return value**
- AC_Button
AutoConnectCheckbox
Constructor
explicit AutoConnectCheckboxBasis(const char* name = "", const char* value = "", const char* label = "", const bool checked = false)
- **Parameters**
- nameThe element name.
- valueValue of the element.
- labelA label string prefixed to the checkbox.
- checkChecked state of the checkbox.
Public member variables
name
The element name.
- **Type**
- String
value
Value of the element. It becomes a value attribute of an HTML #!html <input type="checkbox">
tag.
- **Type**
- String
label
A label is an optional string. A label is always arranged on the right side of the checkbox. Specification of a label will generate an HTML #!html <label>
tag with an id
attribute. The checkbox and the label are connected by the id attribute.
- **Type**
- String
checked
It indicates the checked status of the checkbox. The value of the checked checkbox element is packed in the query string and sent by submit.
- **Type**
- Boolean
Public member functions
typeOf
ACElement_t typeOf(void)
Returns type of AutoConnectElement.
- **Return value**
- AC_Checkbox
AutoConnectElement
Constructor
AutoConnectElement(const char* name = "", const char* value = "")
- **Parameters**
- nameThe element name.
- valueValue of the element.
Public member variables
name
The element name.
- **Type**
- String
value
Value of the element. It is output as HTML as it is as a source for generating HTML code.
- **Type**
- String
Public member functions
typeOf
ACElement_t typeOf(void)
Returns type of AutoConnectElement.
- **Return value**
- AC_Element
AutoConnectInput
Constructor
AutoConnectInput(const char* name = "", const char* value = "", const char* label = "", const char* pattern = "", const char* placeholder = "")
- **Parameters**
- nameThe element name.
- valueValue of the element.
- labelLabel string.
- patternRegular expression string for checking data format.
- placeholderA placeholder string.
Public member variables
name
The element name.
- **Type**
- String
value
Value of the element. It becomes a value attribute of an HTML #!html <input type="text">
tag. An entered text in the custom Web page will be sent with a query string of the form. The value set before accessing the page is displayed as the initial value.
- **Type**
- String
label
A label is an optional string. A label is always arranged on the left side of the input box. Specification of a label will generate an HTML #!html <label>
tag with an id attribute. The input box and the label are connected by the id attribute.
- **Type**
- String
pattern
A pattern specifies a regular expression that the input-box's value is checked against on form submission.
- **Type**
- String
placeholder
A placeholder is an option string. Specification of a placeholder will generate a placeholder
attribute for the input tag.
- **Type**
- String
Public member functions
typeOf
ACElement_t typeOf(void)
Returns type of AutoConnectElement.
- **Return value**
- AC_Input
AutoConnectRadio
Constructor
AutoConnectRadio(const char* name = "", std::vector<String> const& values = {}, const char* label = "", const ACArrange_t order = AC_Vertical, const uint8_t checked = 0)
- **Parameters**
- nameThe element name.
- valuesAn array of values of the radio buttons. Specifies an [std::vector](https://en.cppreference.com/w/cpp/container/vector) object.
- labelLabel string.
- orderThe direction to arrange the radio buttons.
- checkedAn index to be checked in the radio buttons.
Public member variables
name
The element name.
- **Type**
- String
values
An array of String type for the radio button options. It is an initialization list can be used. The #!html <input type="radio">
tags will be generated from each entry in the values.
- **Type**
- std::vector<String>
label
A label is an optional string. A label will be arranged in the left or top of the radio buttons according to the order.
- **Type**
- String
order
Specifies the direction to arrange the radio buttons. A label will place in the left or the top according to the order. It is a value of ACArrange_t type and accepts one of the following:
AC_Horizontal
: Horizontal arrangement.AC_Vertical
: Vertical arrangement.
- **Type**
- ACArrange_t
checked
Specifies the index number (1-based) of the values to be checked. If this parameter is not specified neither item is checked.
- **Type**
- uint8_t
Public member functions
typeOf
ACElement_t typeOf(void)
Returns type of AutoConnectElement.
- **Return value**
- AC_Radio
add
void add(const String& value)
Adds an option for the radio button.
- **Parameters**
- valueAn option string to add to the radio button.
check
void check(const String& value)
Indicates the check of the specified option for the radio buttons. You can use the check function for checking dynamically with arbitrary of the radio button.
- **Parameters**
- valueAn option string to be checked.
empty
void empty(const size_t reserve = 0)
Clear the array of option strings that AutoConnectRadio has in values. When a reserve parameter is specified, a vector container of that size is reserved.
- **Parameters**
- reserveReserved size of a container for option strings.
operator [ ]
const String& operator[] (const std::size_t n)
Returns the option string of the index specified by n.
- **Parameters**
- nIndex of values array to return.
value
const String& value(void) const
Returns current checked option of the radio buttons.
- **Return value**
- A String of an option current checked. If there is no checked option, a null string returned.
AutoConnectSelect
AutoConnectSubmit
AutoConnectText
-
JavaScript can be inserted into a custom Web page using AutoConnectElement. ↩︎