summaryrefslogtreecommitdiff
path: root/client/widgets/metawidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'client/widgets/metawidget.h')
-rw-r--r--client/widgets/metawidget.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/client/widgets/metawidget.h b/client/widgets/metawidget.h
index ac18b91..c6bf5d0 100644
--- a/client/widgets/metawidget.h
+++ b/client/widgets/metawidget.h
@@ -38,13 +38,19 @@
* Meta Widget
* @extends widget
* @tag metawidget
+ * @screenshot An example of a metawidget with two inner widgets. The metawidget is not in itself visible.
+ * <metawidget layout="vbox" name="dims" format="''" storechildren="true">
+ * <lineedit name="test1" value="test"/>
+ * <checkbox name="test2" value="ja" truevalue="ja" falsevalue="nej"
+ * caption="Og svaret er?"/>
+ * </metawidget>
* @container
- * This widget is simply a caotainer compositing its value from the widgets
+ * This widget is simply a container compositing its value from the widgets
* within it. The value of the widget cannot be set and its value attribute is
* therefore ignored.
* @example An example of how to use metawidget with two inner widgets:
- * <metawidget layout="vbox" name="dims" format="${test1}: ${test2}"
- * storechildren="true">
+ * <metawidget layout="vbox" name="dims" storechildren="true"
+ * format="return widget('test1'):value() .. ': ' .. widget('test2'):value()">
* <lineedit name="test1" value="test"/>
* <checkbox name="test2" value="ja" truevalue="ja" falsevalue="nej"
* caption="Og svaret er?"/>
@@ -52,7 +58,7 @@
* @att layout the layout of the widget. Can be one of 'vbox' or 'hbox'.
* @att storechildren This attribute indicates wether the child widgets should
* be stored on macro commit. It can be either 'true' or 'false'.
- * @att format This attribute comtains lua code. The return value of the code
+ * @att format This attribute contains lua code. The return value of the code
* is the resulting value of the meta widget.
* @att layout The layout assigned to the widget. Can be one of 'hbox' or
* 'vbox'.