<root>
<function name="generate-menus">
<if-is-not-last>
<submenu dir-for="label">
<attr-connect name="label" function="last-dir" />
<template path="*">
<function-call name="generate-menus" />
</template>
</submenu>
</if-is-not-last>
<if-is-last>
<item dir-for="label,event">
<icon dir-for="icon" width="8" height="8" />
<attr-connect name="label" function="last-dir" />
</item>
</if-is-last>
</function>
<menu>
<template path="/actions/*">
<function-call name="generate-menus" />
</template>
</menu>

<hbox>

<template path="/actions/**" min-weight="500">
<button dir-for="event,label">
<attr-connect name="label" function="last-dir" />
<icon dir-for="icon" />
</button>
</template>
</hbox>
<text-area path="/text" dir-for="input,output">
<template path="changed">
<event />
</template>
</text-area>
</root>
