` tag. A `#!html style` attribute will be attached if a [style](#style) parameter is passed.
@@ -361,7 +448,7 @@ AutoConnectText generates an HTML `#!html
` tag. A `#!html style` attribute
###
Constructor
```cpp
-AutoConnectText(const char* name, const char* value, const char* style, const char* format)
+AutoConnectText(const char* name, const char* value, const char* style, const char* format, const ACPosterior_t post)
```
###
name
@@ -378,7 +465,11 @@ A `style` specifies the qualification style to give to the content and can use t
###
format
-A `format` is a pointer to a null-terminated multibyte string specifying how to interpret the value. It specifies the conversion format when outputting values. The format string conforms to C-style printf library functions, but depends on the espressif sdk implementation. The conversion specification is valid only in **%s** format. (Left and Right justification, width are also valid.)
+A `format` is a pointer to a null-terminated multi byte string specifying how to interpret the value. It specifies the conversion format when outputting values. The format string conforms to C-style printf library functions, but depends on the Espressif's SDK implementation. The conversion specification is valid only in **%s** format. (Left and Right justification, width are also valid.)
+
+###
post
+
+Specifies a tag to add behind the HTML code generated from the element. The default values is `AC_Tag_None`.
## How to coding for the elements
@@ -388,23 +479,25 @@ Variables of each AutoConnetElement can be declared with macros. By using the ma
[^2]: The square brackets in the syntax are optional parameters, the stroke is a selection parameter, the bold fonts are literal.
-ACElement ( *name*
\[ , *value*
\] )
+ACElement ( *name*
\[ , *value*
\] \[ ,
**AC\_Tag\_None** |
**AC\_Tag\_BR** |
**AC\_Tag\_P** \] )
-ACButton ( *name*
\[ , *value*
\] \[ , *action*
\] )
+ACButton ( *name*
\[ , *value*
\] \[ , *action*
\] \[ ,
**AC\_Tag\_None** |
**AC\_Tag\_BR** |
**AC\_Tag\_P** \] )
-ACCheckbox ( *name*
\[ , *value*
\] \[ , *label*
\] \[ , **true** | **false**
\] )
+ACCheckbox ( *name*
\[ , *value*
\] \[ , *label*
\] \[ ,
**true** |
**false** \] \[ ,
**AC_Infront** |
**AC_Behind** \] \[ ,
**AC\_Tag\_None** |
**AC\_Tag\_BR** |
**AC\_Tag\_P** \] )
+
+ACFile ( *name*
\[ , *value*
\] \[ , *label*
\] \[ ,
**AC\_File\_FS** |
**AC\_File\_SD** |
**AC\_File\_Extern** \] \[ ,
**AC\_Tag\_None** |
**AC\_Tag\_BR** |
**AC\_Tag\_P** \] )
-ACFile ( *name*
\[ , *value*
\] \[ , *label*
\] \[ , **AC\_File\_FS** | **AC\_File\_SD** | **AC\_File\_Extern**
\] )
+ACInput ( *name*
\[ , *value*
\] \[ , *label*
\] \[ , *pattern*
\] \[ , *placeholder*
\] \[ ,
**AC\_Tag\_None** |
**AC\_Tag\_BR** |
**AC\_Tag\_P** \] )
-ACInput ( *name*
\[ , *value*
\] \[ , *label*
\] \[ , *pattern*
\] \[ , *placeholder*
\] )
+ACRadio ( *name*
\[ , *values*
\] \[ , *label*
\] \[ ,
**AC\_Horizontal ** |
**AC\_Vertical** \] \[ , *checked*
\] \[ ,
**AC\_Tag\_None** |
**AC\_Tag\_BR** |
**AC\_Tag\_P** \] )
-ACRadio ( *name*
\[ , *values*
\] \[ , *label*
\] \[ , **AC\_Horizontal** | **AC\_Vertical**
\] \[ , *checked*
\] )
+ACSelect ( *name*
\[ , *options*
\] \[ , *label*
\] \[ ,
**AC\_Tag\_None** |
**AC\_Tag\_BR** |
**AC\_Tag\_P** \] )
-ACSelect ( *name*
\[ , *options*
\] \[ , *label*
\] )
+ACStyle ( *name*
\[ , *value*
\] )
-ACSubmit ( *name*
\[ , *value*
\] \[ , *uri*
\] )
+ACSubmit ( *name*
\[ , *value*
\] \[ , *uri*
\] \[ ,
**AC\_Tag\_None** |
**AC\_Tag\_BR** |
**AC\_Tag\_P** \] )
-ACText ( *name*
\[ , *value*
\] \[ , *style*
\] \[ , *format*
\] )
+ACText ( *name*
\[ , *value*
\] \[ , *style*
\] \[ , *format*
\] \[ ,
**AC\_Tag\_None** |
**AC\_Tag\_BR** |
**AC\_Tag\_P** \] )
!!! memo "Declaration macro usage"
For example, *AutoConnectText* can be declared using macros.
diff --git a/mkdocs/apielements.md b/mkdocs/apielements.md
index f85f473..9f653c6 100644
--- a/mkdocs/apielements.md
+++ b/mkdocs/apielements.md
@@ -3,13 +3,14 @@
###
Constructor
```cpp
-AutoConnectButton(const char* name = "", const char* value = "", const String& action = String())
+AutoConnectButton(const char* name = "", const char* value = "", const String& action = String(), const ACPosterior_t post = AC_Tag_None)
```
**Parameters**
name The element name.
value Value of the element.
action Native code of the action script executed when the button is clicked.
+ post Specifies the tag to be output afterward the element.
###
Public member variables
@@ -40,6 +41,19 @@ The element name.
String
+####
post
+
+Specifies a tag to add behind the HTML code generated from the element.
+
+ **Type**
+ ACPosterior_t
+
+- **`AC_Tag_None`** : No generate additional tags.
+- **`AC_Tag_BR`** : Add a ` ` tag to the end of the element.
+- **`AC_Tag_P`** : Include the element in the ` ~
` tag.
+
+
+
####
value
Value of the element.
@@ -66,7 +80,7 @@ Returns type of AutoConnectElement.
###
Constructor
```cpp
- explicit AutoConnectCheckboxBasis(const char* name = "", const char* value = "", const char* label = "", const bool checked = false)
+ explicit AutoConnectCheckboxBasis(const char* name = "", const char* value = "", const char* label = "", const bool checked = false, const ACPosterior_t post = AC_Tag_BR)
```
**Parameters**
@@ -74,6 +88,7 @@ Returns type of AutoConnectElement.
value Value of the element.
label A label string prefixed to the checkbox.
check Checked state of the checkbox.
+ post Specifies the tag to be output afterward the element.
###
Public member variables
@@ -110,6 +125,19 @@ The element name.
String
+####
post
+
+Specifies a tag to add behind the HTML code generated from the element.
+
+ **Type**
+ ACPosterior_t
+
+- **`AC_Tag_None`** : No generate additional tags.
+- **`AC_Tag_BR`** : Add a ` ` tag to the end of the element.
+- **`AC_Tag_P`** : Include the element in the ` ~
` tag.
+
+
+
####
value
Value of the element. It becomes a value attribute of an HTML `#!html
` tag.
@@ -136,12 +164,13 @@ Returns type of AutoConnectElement.
###
Constructor
```cpp
-AutoConnectElement(const char* name = "", const char* value = "")
+AutoConnectElement(const char* name = "", const char* value = "", const ACPosterior_t post = AC_Tag_None)
```
**Parameters**
name The element name.
value Value of the element.
+ post Specifies the tag to be output afterward the element.
###
Public member variables
@@ -170,6 +199,19 @@ Value of the element. It is output as HTML as it is as a source for generating H
String
+####
post
+
+Specifies a tag to add behind the HTML code generated from the element.
+
+ **Type**
+ ACPosterior_t
+
+- **`AC_Tag_None`** : No generate additional tags.
+- **`AC_Tag_BR`** : Add a ` ` tag to the end of the element.
+- **`AC_Tag_P`** : Include the element in the ` ~
` tag.
+
+
+
###
Public member functions
####
typeOf
@@ -191,7 +233,7 @@ AutoConnectElement& as
(void)
Casts the reference to the AutoConnectElement the specified type.
**Parameter**
- T The element type. AutoConnectElements type such as [AutoConnectButton](apielements.md#autoconnectbutton), [AutoConnectCheckbox](apielements.md#autoconnectcheckbox), [AutoConnectFile](apielements.md#autoconnectfile), [AutoConnectInput](apielements.md#autoconnectinput), [AutoConnectRadio](apielements.md#autoconnectradio), [AutoConnectSelect](apielements.md#autoconnectselect), [AutoConnectSubmit](apielements.md#autoconnectsubmit), [AutoConnectText](apielements.md#autoconnecttext).
+ T The element type. AutoConnectElements type such as [AutoConnectButton](apielements.md#autoconnectbutton), [AutoConnectCheckbox](apielements.md#autoconnectcheckbox), [AutoConnectFile](apielements.md#autoconnectfile), [AutoConnectInput](apielements.md#autoconnectinput), [AutoConnectRadio](apielements.md#autoconnectradio), [AutoConnectSelect](apielements.md#autoconnectselect), [AutoConnectStyle](apielements.md#autoconnectstyle),[AutoConnectSubmit](apielements.md#autoconnectsubmit), [AutoConnectText](apielements.md#autoconnecttext).
**Return value**
A reference to the AutoConnectElement with actual type.
@@ -201,7 +243,7 @@ Casts the reference to the AutoConnectElement the specified type.
### Constructor
```cpp
-AutoConnectFile(const char* name = "", const char* value = "", const char* label = "", const ACFile_t store = AC_File_FS)
+AutoConnectFile(const char* name = "", const char* value = "", const char* label = "", const ACFile_t store = AC_File_FS, const ACPosterior_t post = AC_Tag_BR)
```
**Parameters**
@@ -209,7 +251,7 @@ AutoConnectFile(const char* name = "", const char* value = "", const char* label
value File name to be upload.
label Label string.
store The **ACFile_t** enumerator that represents the media to save the uploaded file.
-
+ post Specifies the tag to be output afterward the element.
### Public member variables
@@ -246,6 +288,19 @@ The element name.
String
+#### post
+
+Specifies a tag to add behind the HTML code generated from the element.
+
+ **Type**
+ ACPosterior_t
+
+- **`AC_Tag_None`** : No generate additional tags.
+- **`AC_Tag_BR`** : Add a ` ` tag to the end of the element.
+- **`AC_Tag_P`** : Include the element in the ` ~
` tag.
+
+
+
#### size
Size of the uploading file.
@@ -293,7 +348,7 @@ Returns type of AutoConnectFile.
### Constructor
```cpp
-AutoConnectInput(const char* name = "", const char* value = "", const char* label = "", const char* pattern = "", const char* placeholder = "")
+AutoConnectInput(const char* name = "", const char* value = "", const char* label = "", const char* pattern = "", const char* placeholder = "", const ACPosterior_t post = AC_Tag_BR)
```
**Parameters**
@@ -302,6 +357,7 @@ AutoConnectInput(const char* name = "", const char* value = "", const char* labe
label Label string.
pattern Regular expression string for checking data format.
placeholder A placeholder string.
+ post Specifies the tag to be output afterward the element.
### Public member variables
@@ -354,6 +410,19 @@ A placeholder is an option string. Specification of a placeholder will generate
String
+#### post
+
+Specifies a tag to add behind the HTML code generated from the element.
+
+ **Type**
+ ACPosterior_t
+
+- **`AC_Tag_None`** : No generate additional tags.
+- **`AC_Tag_BR`** : Add a ` ` tag to the end of the element.
+- **`AC_Tag_P`** : Include the element in the ` ~
` tag.
+
+
+
### Public member functions
#### isValid
@@ -384,7 +453,7 @@ Returns type of AutoConnectElement.
### Constructor
```cpp
-AutoConnectRadio(const char* name = "", std::vector const& values = {}, const char* label = "", const ACArrange_t order = AC_Vertical, const uint8_t checked = 0)
+AutoConnectRadio(const char* name = "", std::vector const& values = {}, const char* label = "", const ACArrange_t order = AC_Vertical, const uint8_t checked = 0, const ACPosterior_t post = AC_Tag_BR)
```
**Parameters**
@@ -393,6 +462,7 @@ AutoConnectRadio(const char* name = "", std::vector const& values = {},
label Label string.
order The direction to arrange the radio buttons.
checked An index to be checked in the radio buttons.
+ post Specifies the tag to be output afterward the element.
### Public member variables
@@ -441,6 +511,19 @@ Specifies the direction to arrange the radio buttons. A label will place in the
+#### post
+
+Specifies a tag to add behind the HTML code generated from the element.
+
+ **Type**
+ ACPosterior_t
+
+- **`AC_Tag_None`** : No generate additional tags.
+- **`AC_Tag_BR`** : Add a ` ` tag to the end of the element.
+- **`AC_Tag_P`** : Include the element in the ` ~
` tag.
+
+
+
#### values
An array of String type for the radio button options. It is an initialization list can be used. The `#!html ` tags will be generated from each entry in the values.
@@ -537,7 +620,7 @@ Returns current checked option of the radio buttons.
### Constructor
```cpp
-AutoConnectSelect(const char* name = "", std::vector const& options = {}, const char* label = "", const uint8_t selected = 0)
+AutoConnectSelect(const char* name = "", std::vector const& options = {}, const char* label = "", const uint8_t selected = 0, const ACPosterior_t post = AC_Tag_BR)
```
**Parameters**
@@ -545,6 +628,7 @@ AutoConnectSelect(const char* name = "", std::vector const& options = {}
options An array of options of the select element. Specifies a [std::vector](https://en.cppreference.com/w/cpp/container/vector) object.
label Label string.
selected An option should be pre-selected when the page loads.
+ post Specifies the tag to be output afterward the element.
### Public member variables
@@ -581,6 +665,19 @@ An array of String type for the selection options. It is an initialization list
std::vector<String>
+#### post
+
+Specifies a tag to add behind the HTML code generated from the element.
+
+ **Type**
+ ACPosterior_t
+
+- **`AC_Tag_None`** : No generate additional tags.
+- **`AC_Tag_BR`** : Add a ` ` tag to the end of the element.
+- **`AC_Tag_P`** : Include the element in the ` ~
` tag.
+
+
+
#### selected
A `selected` is an optional value. Specifies 1-based index value of an options array that an option should be pre-selected when the page loads.
@@ -672,18 +769,71 @@ Returns current selected option of the select list.
A String of an option current selected. If there is no select option, a null string returned.
+## AutoConnectStyle
+
+### Constructor
+
+```cpp
+AutoConnectStyle(const char* name = "", const char* value = "")
+```
+
+ **Parameters**
+ name The element name.
+ value Raw CSS code to insert into a style block in a custom web page to generate.
+
+
+### Public member variables
+
+#### enable
+
+Enable HTML tag generation for the element. AutoConnect will generate the element into HTML only if the enable attribute is true.
+
+ **Type**
+ boolean
+
+
+#### name
+
+The element name.
+
+ **Type**
+ String
+
+
+#### value
+
+Raw CSS code to insert into a style block in a custom web page to generate.
+
+ **Type**
+ String
+
+
+### Public member functions
+
+#### typeOf
+
+```cpp
+ACElement_t typeOf(void)
+```
+Returns type of AutoConnectElement.
+
+ **Return value**
+ AC_Style
+
+
## AutoConnectSubmit
### Constructor
```cpp
-AutoConnectSubmit(const char* name = "", const char* value ="", char* uri = "")
+AutoConnectSubmit(const char* name = "", const char* value ="", char* uri = "", const ACPosterior_t post = AC_Tag_None)
```
**Parameters**
name The element name.
value The name of the submit button as an HTML `#!html ` tag, it will also be the label of the button.
uri Destination URI.
+ post Specifies the tag to be output afterward the element.
### Public member variables
@@ -704,6 +854,19 @@ The element name.
String
+#### post
+
+Specifies a tag to add behind the HTML code generated from the element.
+
+ **Type**
+ ACPosterior_t
+
+- **`AC_Tag_None`** : No generate additional tags.
+- **`AC_Tag_BR`** : Add a ` ` tag to the end of the element.
+- **`AC_Tag_P`** : Include the element in the ` ~
` tag.
+
+
+
#### uri
Destination URI.
@@ -738,7 +901,7 @@ Returns type of AutoConnectElement.
### Constructor
```cpp
-AutoConnectText(const char* name = "", const char* value = "", const char* style = "", const char* format = "")
+AutoConnectText(const char* name = "", const char* value = "", const char* style = "", const char* format = "", const ACPosterior_t post = AC_Tag_None)
```
**Parameters**
@@ -746,6 +909,7 @@ AutoConnectText(const char* name = "", const char* value = "", const char* style
value String of content for the text element.
style A style code with CSS format that qualifiers the text.
format A pointer to a null-terminated multibyte string specifying how to interpret the value. It specifies the conversion format when outputting values. The format string conforms to C-style printf library functions
+ post Specifies the tag to be output afterward the element.
### Public member variables
@@ -774,6 +938,19 @@ The element name.
String
+#### post
+
+Specifies a tag to add behind the HTML code generated from the element.
+
+ **Type**
+ ACPosterior_t
+
+- **`AC_Tag_None`** : No generate additional tags.
+- **`AC_Tag_BR`** : Add a ` ` tag to the end of the element.
+- **`AC_Tag_P`** : Include the element in the ` ~
` tag.
+
+
+
#### style
A style code with CSS format that qualifiers the text.
diff --git a/mkdocs/changelog.md b/mkdocs/changelog.md
index 5f56fcc..d025091 100644
--- a/mkdocs/changelog.md
+++ b/mkdocs/changelog.md
@@ -1,10 +1,18 @@
+#### [0.9.11] July 13, 2019
+- Supports new element as AutoConnectSytle that can insert the custom CSS into AutoConnectAux page.
+- Supports that ` ` tags can now be added to each element.
+- Supports that able to place the checkbox label forward or backward.
+- Supports flicker signal output according to the status of WiFi_mode.
+- Supports [**AutoConnectAux::fetchElement**](apiaux.md#fetchelement) function to retrieve inputted element values via a custom Web page.
+- Fixed bug in AutoConnectCredential when offset is >256.
+
#### [0.9.10] June 12, 2019
- Fixed the unable to get AutoConnectElemets values in the sketch with ESP8266 arduino core 2.5.2.
#### [0.9.9] May 25, 2019
- Supports ESP8266 Arduino core 2.5.2.
- Menu text/background color can be statically customized.
-- Added the [enable](achandling.html#enable-autoconnectelements-during-the-sketch-execution) attribute to the AutoConnectElements. This attribute gives dynamically change to the element activation during the sketch executing.
+- Added the [enable](achandling.md#enable-autoconnectelements-during-the-sketch-execution) attribute to the AutoConnectElements. This attribute gives dynamically change to the element activation during the sketch executing.
- Added ID attribute to HTML tag generated from AutoConnectText.
- Fixed the input box layout collapsed.
- Fixed that the decoration of AutoConnectButton was disabled.