aboutsummaryrefslogtreecommitdiffstats
path: root/docs/Command_Templates.md
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-05-28 20:30:28 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-05-28 20:30:28 -0400
commit3a25db1247cdd37b216a6a095d1999ded383f901 (patch)
tree3f94356c7824007832378cb1e779621892847ff5 /docs/Command_Templates.md
parent4f939c18e9ae86ef39d75b710fd1e0c72b46e927 (diff)
downloadkutter-3a25db1247cdd37b216a6a095d1999ded383f901.tar.gz
kutter-3a25db1247cdd37b216a6a095d1999ded383f901.tar.xz
kutter-3a25db1247cdd37b216a6a095d1999ded383f901.zip
docs: Move description of menu templates to Command_Templates.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'docs/Command_Templates.md')
-rw-r--r--docs/Command_Templates.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/Command_Templates.md b/docs/Command_Templates.md
index f27f4a65..d9533f29 100644
--- a/docs/Command_Templates.md
+++ b/docs/Command_Templates.md
@@ -279,6 +279,30 @@ gcode:
UPDATE_DELAYED_GCODE ID=report_temp DURATION=0
```
+### Menu templates
+
+If a [display config section](Config_Reference.md#display) is enabled,
+then it is possible to customize the menu with
+[menu](Config_Reference.md#menu) config sections.
+
+The following read-only attributes are available in menu templates:
+* `menu.width` - element width (number of display columns)
+* `menu.ns` - element namespace
+* `menu.event` - name of the event that triggered the script
+* `menu.input` - input value, only available in input script context
+
+The following actions are available in menu templates:
+* `menu.back(force, update)`: will execute menu back command, optional
+ boolean parameters `<force>` and `<update>`.
+ * When `<force>` is set True then it will also stop editing. Default
+ value is False.
+ * When `<update>` is set False then parent container items are not
+ updated. Default value is True.
+* `menu.exit(force)` - will execute menu exit command, optional
+ boolean parameter `<force>` default value False.
+ * When `<force>` is set True then it will also stop editing. Default
+ value is False.
+
### Save Variables to disk
<!-- {% raw %} -->