help.anubis
2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
* Created by PyramIDE.
* User: フランスのトトロ aka (David RENÉ)
* Date: 13/02/2016
* Time: 10:12
* © David RENÉ
*/
transmit tools/basis.anubis
transmit system/muscle.anubis
transmit calexium_lib/CXM_message_constants.anubis
transmit calexium_lib/web/CXM_json.anubis
transmit hayamiki_lib/model/types/hk_help_text.anubis
public define String
/* Return the Anubis source of the type component
*/
to_Anubis_source
(
HK_Help_Text help
)=
if help is
{
no_help_text then "no_help_text",
help_text_TAG(tag) then "help_text_TAG(\""+tag+"\")",
help_text(str) then "help_text(\""+str+"\")"
}.
/* *
_HK_HELP_TEXT message format:
=============================
+----------------+-----------+--------------------------------
| name | type | description
+----------------+-----------+--------------------------------
| "hk_help_text" | String | type of the help text. It sould be
"no_help"
"TAG" ____
"text" __ |
______________________________________|_|
|
--> TAG or text:
+---------+-----------+--------------------------------
| name | type | description
+---------+-----------+--------------------------------
| "value" | String | String name of the 16x16 icon.
*/
public define JsonValue
to_JSON
(
HK_Help_Text hk_help
)=
with members =
if hk_help is
{
no_help_text then [ json_member("hk_help_text", json_string("no_help"))
],
help_text_TAG(tag) then [ json_member("hk_help_text", json_string("TAG")),
json_member("value", json_string(tag))
]
help_text(value) then [ json_member("hk_help_text", json_string("text")),
json_member("value", json_string(value))
]
},
json_object("_HK_HELP_TEXT", members).