Concepts
Josu Igoa edited this page Feb 20, 2023
·
3 revisions
- Layout: Bunch of items
- Item: An element that has a single or multiple states. It is clickable in the client.
- State: Definition of the item status: text, textColor, bgColor, icon and an action list.
- Action: Action which will be fired (can be more than one in a state) in the host computer when the item is pressed in the client.
All the items and their actions are defined in a plain JSON file. Here is a basic one.
There can be two types of item:
- ChangeDir: When clicked goes to the folder with name specified by the
toDir
property. Here goes to the directory named_main_
. - States: When clicked executes the actions in order they are defined in the current
state
fromlist
array. Actions array can be null or empty. After executing the actions and goes to the next element inlist
.
The text in the state can have different size, color and style (bold, italic, underline) parts. The format is {transformer:text to transform}
. The transformer can be:
-
b
: Thetext to transform
will be bold -
i
: Thetext to transform
will be italic -
u
: Thetext to transform
will be underlined -
color.colorName
: Thetext to transform
will be rendered incolorName
color. -
size.fontSize
: Thetext to transform
will be rendered infontSize
size. -
emoji.unicode
: This one has no:
since it doesn't apply to a text. Will render the emoji of theunicode
value, multiple values can be separated with commas (,
). For exampleemoji.1F919,1F3FC
.
The transformers can be chained. For example:
The text is {b:{i:{u:bold, italic and underlined}}}. And this text will be {color.red:{size.50:colored with red and BIG}}