summaryrefslogtreecommitdiff
path: root/server/xml/macros/example.xml
diff options
context:
space:
mode:
authordeva <deva>2010-06-01 13:02:23 +0000
committerdeva <deva>2010-06-01 13:02:23 +0000
commit730eb796bbce6f124be9194f1565b7dda1daddf1 (patch)
tree46387b60fefad222197e3319ed922b23176d4a36 /server/xml/macros/example.xml
parent74a28aa7125be6a603128ad600c98c4882f3b5c2 (diff)
Afdj macros/templates are now located in their own repo.
Diffstat (limited to 'server/xml/macros/example.xml')
-rw-r--r--server/xml/macros/example.xml141
1 files changed, 0 insertions, 141 deletions
diff --git a/server/xml/macros/example.xml b/server/xml/macros/example.xml
deleted file mode 100644
index ff502ed..0000000
--- a/server/xml/macros/example.xml
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<macro name="example" version="1.0" resume="Axis: $.grader}\nCylinder: ${cyl}\nSphere: $.sf}\n">
- <queries>
- <query class="lensmeter" ttl="10000" automap="true"/>
- </queries>
- <maps>
- <map name=.grader">
- -- LUA program
- return math.pi, 1234567890, 'local'
- </map>
- <map name="cyl">
- -- Returning 0, 0 invalidates the result
- value = 0
- timestamp = 0
- source = ''
-
- -- Check for the existence of each level.
- if( lensmeter and
- brillemaaler.odxt and
- brillemaaler.cyl.odxt and
- brillemaaler.cyl.value.odxt and
- brillemaaler.cyl.timestamp.odxt )
- then
- timestamp = brillemaaler.cyl.value.odxt
- value = brillemaaler.cyl.value.odxt
- end
-
- return value, timestamp, source
- </map>
- </maps>
- <scripts>
- <script language="lua" name="theanswer">
- .sf = tonumber(getValue(.sf'))
- .grader = tonumber(getValue(.grader'))
- if(.sf ==.grader )
- then
- setValue('cyl', name)
- return true
- else
- return false
- end
- </script>
- </scripts>
- <widgets name="mainwindow"
- caption="Example Window"
- width="400"
- height="500"
- layout="vbox">
- <frame name="linse_frame" caption="Linser:" layout="vbox">
- <frame name="linse_framea" layout="hbox">
- <icon src="righteye"/>
- <label name="a" width="100" caption="Akse rotation:"/>
- <lineedit name=.grader" regexp="[24]*" map=.grader" lua="theanswer" value="244"/>
- </frame>
- <frame name="linse_frameb" layout="hbox">
- <icon src="lefteye"/>
- <label name="b" width="100" caption="Sphere:"/>
- </frame>
- <frame name="linse_framec" layout="hbox">
- <label name="c" width="100" caption="Cyl:"/>
- <lineedit name="cyl" regexp=".*" map="cyl" value=""/>
- </frame>
- </frame>
- <frame name="linse_frame" caption="FlereLinser:" layout="vbox">
- <multilist name="multilisttest" value="" layout="vbox" format="Sphere: $.sfcombo}, Cyl: ${multcyl}.">
- <frame name="linse_frameb" layout="hbox">
- <label name="b" width="100" caption="Sphere:"/>
- <combobox name=.sfcombo" width="100" value="val_lad" type="search">
- <item caption="sap" value="val_sap"/>
- <item caption="sat" value="val_sat"/>
- <item caption="sad" value="val_sad"/>
- <item caption="rat" value="val_rat"/>
- <item caption="rap" value="val_rap"/>
- <item caption="ram" value="val_ram"/>
- <item caption="rag" value="val_rag"/>
- <item caption="nap" value="val_nap"/>
- <item caption="Nat" value="val_Nat"/>
- <item caption="mat" value="val_mat"/>
- <item caption="map" value="val_map"/>
- <item caption="mad" value="val_mad"/>
- <item caption="lap" value="val_lap"/>
- <item caption="lag" value="val_lag"/>
- <item caption="lad" value="val_lad"/>
- <item caption="fat" value="val_fat"/>
- <item caption="fan" value="val_fan"/>
- <item caption="fad" value="val_fad"/>
- <item caption="fin" value="val_fin"/>
- <item caption="fit" value="val_fit"/>
- <item caption="lid" value="val_lid"/>
- <item caption="lip" value="val_lip"/>
- <item caption="lit" value="val_lit"/>
- <item caption="mid" value="val_mid"/>
- <item caption="mit" value="val_mit"/>
- <item caption="nit" value="val_nit"/>
- <item caption="nip" value="val_nip"/>
- <item caption="rid" value="val_rid"/>
- <item caption="rig" value="val_rig"/>
- <item caption="rim" value="val_rim"/>
- <item caption="rip" value="val_rip"/>
- <item caption="Sid" value="val_Sid"/>
- <item caption="sin" value="val_sin"/>
- <item caption="sip" value="val_sip"/>
- <item caption="log" value="val_log"/>
- <item caption="mom" value="val_mom"/>
- <item caption="mop" value="val_mop"/>
- <item caption="nod" value="val_nod"/>
- <item caption="rod" value="val_rod"/>
- <item caption="Ron" value="val_Ron"/>
- <item caption="rot" value="val_rot"/>
- <item caption="sod" value="val_sod"/>
- <item caption="fun" value="val_fun"/>
- <item caption="mud" value="val_mud"/>
- <item caption="mum" value="val_mum"/>
- <item caption="nut" value="val_nut"/>
- <item caption="rug" value="val_rug"/>
- <item caption="rut" value="val_rut"/>
- <item caption="sum" value="val_sum"/>
- <item caption="sun" value="val_sun"/>
- <item caption="fed" value="val_fed"/>
- <item caption="led" value="val_led"/>
- <item caption="leg" value="val_leg"/>
- <item caption="met" value="val_met"/>
- <item caption="Ned" value="val_Ned"/>
- <item caption="net" value="val_net"/>
- <item caption="bag" value="val_bag"/>
- <item caption="bad" value="val_bad"/>
- <item caption="bam" value="val_bam"/>
- </combobox>
- </frame>
- <frame name="linse_framec" layout="hbox">
- <label name="c" width="100" caption="Cyl:"/>
- <lineedit name="multcyl" width="100" regexp=".*" value=""/>
- </frame>
- </multilist>
- </frame>
- <frame name="buttons" layout="hbox">
- <button name="cancel" caption="Annuller" action="cancel"/>
- <button name="commit" caption="Godkend" action="commit"/>
- </frame>
- </widgets>
-</macro>