From 2ab227e6c11c620edf3211a9f221f0be41951e75 Mon Sep 17 00:00:00 2001 From: Hieromon Ikasamo Date: Tue, 9 Apr 2019 18:08:54 +0900 Subject: [PATCH] Update for v0.9.8 documentation --- mkdocs/acelements.md | 35 ++++++++++++++++++++++++++++++++--- mkdocs/acjson.md | 33 +++++++++++++++++++++++++++++++++ mkdocs/apielements.md | 13 +++++++++++-- mkdocs/changelog.md | 12 +++++++++++- mkdocs/images/acfile.png | Bin 0 -> 4870 bytes mkdocs/index.md | 2 +- 6 files changed, 88 insertions(+), 7 deletions(-) create mode 100644 mkdocs/images/acfile.png diff --git a/mkdocs/acelements.md b/mkdocs/acelements.md index 4d2d91c..3de44b6 100644 --- a/mkdocs/acelements.md +++ b/mkdocs/acelements.md @@ -72,7 +72,21 @@ The enumerators for *ACElement_t* are as follows: - AutoConnectText: **AC_Text** - Uninitialized element: **AC_Unknown** -Furthermore, to convert an entity that is not an AutoConnectElement to its native type, you must [re-interpret](https://en.cppreference.com/w/cpp/language/reinterpret_cast) that type with c++. +Furthermore, to convert an entity that is not an AutoConnectElement to its native type, you must [re-interpret](https://en.cppreference.com/w/cpp/language/reinterpret_cast) that type with c++. Or, you can be coding the sketch more easily with using the [**as**](apielements.md#ast62) function. + +```cpp hl_lines="6" +AutoConnectAux customPage; + +AutoConnectElementVT& elements = customPage.getElements(); +for (AutoConnectElement& elm : elements) { + if (elm.type() == AC_Text) { + AutoConnectText& text = customPage[elm.name].as(); + text.style = "color:gray;"; + // Or, it is also possible to write the code further reduced as follows. + // customPage[elm.name].as().style = "color:gray;"; + } +} +``` ## AutoConnectButton @@ -151,10 +165,10 @@ A checked is a Boolean value and indicates the checked status of the checkbox. T ## AutoConnectFile -AutoConnectFile generates asn HTML `#!html ` tag and a `#!html