source: trunk/examples/zoo/drawing/tool.xml @ 3636

Last change on this file since 3636 was 3636, checked in by mmc, 9 years ago

Fixed the drawing widget to handle notifications from outside widgets, so
that canvas items react to value changes. Also added tooltips for drawing
items.

Nudged the next/back buttons for the pager in a bit, so they're a little
easier to press in the iPad app.

Fixed the Ruby template for the builder to include the overwrite/append flag.

  • Property svn:mime-type set to application/xml
File size: 6.1 KB
Line 
1<?xml version="1.0"?>
2<run>
3 <tool>
4  <title>drawing</title>
5  <about>Example of a Rappture &lt;drawing&gt; object.
6
7Strings are bits of text--single line or multiple lines.
8The description appears in a tooltip when you hover over the string control with your mouse.
9
10When you click the Simulate button, the input strings will be used to generate output strings.
11  </about>
12  <command>
13    tclsh @tool/drawing.tcl @driver
14  </command>
15  <layout>wizard</layout>
16 </tool>
17 <input>
18    <boolean id="trapezoid_top">
19      <about> <label>Enable trapezoid top</label> </about>
20      <default>off</default>
21    </boolean>
22  <drawing>
23   <about>
24    <label>Title</label>
25    <description>This text will be used as the title for all plots.</description>
26   </about>
27   <background>
28    <color>#FFFCDA</color>
29    <coordinates>-.1 0 1.1 1</coordinates>
30    <width>800</width>
31    <height>500</height>
32   </background>
33   <substitutions>
34    <variable>
35     <name>string</name>
36     <path>input.string(indeck)</path>
37    </variable>
38    <variable>
39     <name>feature_height</name>
40     <path>input.number(feature_height)</path>
41    </variable>
42    <variable>
43     <name>feature_length</name>
44     <path>input.number(feature_length)</path>
45    </variable>
46    <variable>
47     <name>trapezoid_top</name>
48     <path>input.number(trapezoid_top)</path>
49    </variable>
50    <variable>
51     <name>substrate_length</name>
52     <path>input.number(substrate_length)</path>
53    </variable>
54    <variable>
55     <name>analysis</name>
56     <path>input.choice(analysis)</path>
57    </variable>
58   </substitutions>
59   <components>
60    <grid>
61     <xcoords>0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1</xcoords>
62     <ycoords>.2 .3 .4 .5 .6 .7</ycoords>
63     <color>grey70</color>
64     <linewidth>1</linewidth>
65     <dash>4 2</dash>
66    </grid>
67    <line id="feature_length">
68     <coords>.25 .72 .75 .72</coords>
69     <color>black</color>
70     <linewidth>2</linewidth>
71     <arrow>both</arrow>
72    </line>
73    <text id="feature_length">
74     <coords>.5 .73</coords>
75     <color>black</color>
76     <text>Feature Length = ${feature_length}</text>
77     <font>Arial 11</font>
78     <anchor>n</anchor>
79     <hotspot>inline</hotspot>
80    </text>
81    <line id="feature_height">
82     <coords>.76 .4 .76 .7</coords>
83     <color>black</color>
84     <linewidth>2</linewidth>
85     <arrow>both</arrow>
86    </line>
87    <text id="feature_height">
88     <coords>.77 .48</coords>
89     <color>black</color>
90     <text>Feature
91Height = ${feature_height}</text>
92     <font>Arial 11</font>
93     <anchor>nw</anchor>
94    </text>
95    <line id="substrate_length">
96     <coords>0 .8 1 .8</coords>
97     <color>black</color>
98     <linewidth>2</linewidth>
99     <arrow>both</arrow>
100    </line>
101    <text id="substrate_length">
102     <coords>.5 .81</coords>
103     <color>black</color>
104     <text>Substrate Length = ${substrate_length}</text>
105     <font>Arial 11</font>
106     <hotspot>inline</hotspot>
107     <anchor>n</anchor>
108    </text>
109    <line id="trapezoid_top">
110     <coords>.35 .38 .65 .38</coords>
111     <color>black</color>
112     <linewidth>2</linewidth>
113     <arrow>both</arrow>
114    </line>
115    <text id="trapezoid_top">
116     <coords>.5 .35</coords>
117     <color>black</color>
118     <text>Length of Trapezoid Top = ${trapezoid_top}</text>
119     <font>Arial 11</font>
120     <anchor>s</anchor>
121     <hotspot>inline</hotspot>
122    </text>
123    <line id="polyline">
124     <coords>0 .7 .25 .7 .35 .4 .65 .4 .75 .7 1 .7</coords>
125     <color>red</color>
126     <linewidth>2</linewidth>
127    </line>
128    <rectangle id="border">
129     <coords>-0.05 0.05 0.3 0.35</coords>
130     <outline>black</outline>
131     <linewidth>5</linewidth>
132    </rectangle>
133    <picture id="analysis">
134     <coords>-0.05 0.05 0.3 0.35</coords>
135     <contents>file://images/${analysis}_F-d.png</contents>
136    </picture>
137    <text id="analysis">
138     <coords>.125 .36</coords>
139     <color>black</color>
140     <text>${analysis}</text>
141     <font>Arial 11</font>
142     <anchor>n</anchor>
143    </text>
144    <text id="string">
145     <coords>-.03 .85</coords>
146     <color>black</color>
147     <text>${string}</text>
148     <font>Arial 11</font>
149     <anchor>nw</anchor>
150     <hotspot>inline</hotspot>
151    </text>
152   </components>
153  </drawing>
154  <number id="feature_height">
155   <about>
156    <label>Feature Height</label>
157    <description>Height of feature.</description>
158   </about>
159   <units>nm</units>
160   <min>10</min>
161   <max>70</max>
162   <default>30</default>
163  </number>
164  <number id="feature_length">
165   <about>
166    <label>Feature Length</label>
167    <description>Length of feature.</description>
168   </about>
169   <units>nm</units>
170   <min>10</min>
171   <max>100</max>
172   <default>50</default>
173  </number>
174  <number id="substrate_length">
175   <about>
176    <label>Substrate Length</label>
177    <description>Length of substrate.</description>
178   </about>
179   <units>nm</units>
180   <min>10</min>
181   <max>500</max>
182   <default>100</default>
183  </number>
184  <number id="trapezoid_top">
185   <about>
186    <label>Trapezoid Top</label>
187    <description>Width of the Trapezoid Top.</description>
188    <enable>input.boolean(trapezoid_top)</enable>
189   </about>
190   <units>nm</units>
191   <min>10</min>
192   <max>70</max>
193   <default>30</default>
194  </number>
195  <choice id="analysis">
196   <about>
197    <label>Type of Analysis</label>
198    <description>Determines the type of analysis to perform.</description>
199   </about>
200   <option>
201    <about>
202     <label>Hertz</label>
203     <description>Hertz analysis</description>
204    </about>
205   </option>
206   <option>
207    <about>
208     <label>LinCon</label>
209     <description>LinCon analysis</description>
210    </about>
211   </option>
212   <option>
213    <about>
214     <label>Chadwick</label>
215     <description>Chadwick analysis</description>
216    </about>
217   </option>
218   <option>
219    <about>
220     <label>DMT</label>
221     <description>DMT analysis</description>
222    </about>
223   </option>
224   <default>Chadwick</default>
225  </choice>
226  <string id="indeck">
227   <about>
228    <label>Input</label>
229    <description>This is the control file for the program.</description>
230    <hints>EXAMPLE:  .print ac vm(11) mag(i(vcc))</hints>
231   </about>
232   <size>40x10</size>
233   <default>Enter your SPICE commands
234in this area.  Right-click
235for a menu of editing options.</default>
236  </string>
237 </input>
238</run>
Note: See TracBrowser for help on using the repository browser.