Debian Codegraph @

blockly/demos/toolbox/index.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Blockly Demo: Toolbox</title>
6 <script src="../../blockly_compressed.js"></script>
7 <script src="../../blocks_compressed.js"></script>
8 <script src="../../msg/js/en.js"></script>
9 <style>
10 body {
11 background-color: #fff;
12 font-family: sans-serif;
13 }
14 h1 {
15 font-weight: normal;
16 font-size: 140%;
17 }
18 </style>
19 </head>
20 <body>
21 <h1><a href="https://developers.google.com/blockly/">Blockly</a> &gt;
22 <a href="../index.html">Demos</a> &gt; Toolbox</h1>
23
24 <p>This is a demo of a complex category structure for the toolbox.</p>
25
26 <p>&rarr; More info on the <a href="https://developers.google.com/blockly/installation/toolbox">Toolbox</a>...</p>
27
28 <div id="blocklyDiv" style="height: 600px; width: 800px;"></div>
29
30 <xml id="toolbox" style="display: none">
31 <category name="Logic">
32 <category name="If">
33 <block type="controls_if"></block>
34 <block type="controls_if">
35 <mutation else="1"></mutation>
36 </block>
37 <block type="controls_if">
38 <mutation elseif="1" else="1"></mutation>
39 </block>
40 </category>
41 <category name="Boolean">
42 <block type="logic_compare"></block>
43 <block type="logic_operation"></block>
44 <block type="logic_negate"></block>
45 <block type="logic_boolean"></block>
46 <block type="logic_null"></block>
47 <block type="logic_ternary"></block>
48 </category>
49 </category>
50 <category name="Loops">
51 <block type="controls_repeat_ext">
52 <value name="TIMES">
53 <block type="math_number">
54 <field name="NUM">10</field>
55 </block>
56 </value>
57 </block>
58 <block type="controls_whileUntil"></block>
59 <block type="controls_for">
60 <field name="VAR">i</field>
61 <value name="FROM">
62 <block type="math_number">
63 <field name="NUM">1</field>
64 </block>
65 </value>
66 <value name="TO">
67 <block type="math_number">
68 <field name="NUM">10</field>
69 </block>
70 </value>
71 <value name="BY">
72 <block type="math_number">
73 <field name="NUM">1</field>
74 </block>
75 </value>
76 </block>
77 <block type="controls_forEach"></block>
78 <block type="controls_flow_statements"></block>
79 </category>
80 <category name="Math">
81 <block type="math_number"></block>
82 <block type="math_arithmetic"></block>
83 <block type="math_single"></block>
84 <block type="math_trig"></block>
85 <block type="math_constant"></block>
86 <block type="math_number_property"></block>
87 <block type="math_change">
88 <value name="DELTA">
89 <block type="math_number">
90 <field name="NUM">1</field>
91 </block>
92 </value>
93 </block>
94 <block type="math_round"></block>
95 <block type="math_on_list"></block>
96 <block type="math_modulo"></block>
97 <block type="math_constrain">
98 <value name="LOW">
99 <block type="math_number">
100 <field name="NUM">1</field>
101 </block>
102 </value>
103 <value name="HIGH">
104 <block type="math_number">
105 <field name="NUM">100</field>
106 </block>
107 </value>
108 </block>
109 <block type="math_random_int">
110 <value name="FROM">
111 <block type="math_number">
112 <field name="NUM">1</field>
113 </block>
114 </value>
115 <value name="TO">
116 <block type="math_number">
117 <field name="NUM">100</field>
118 </block>
119 </value>
120 </block>
121 <block type="math_random_float"></block>
122 </category>
123 <category name="Lists">
124 <block type="lists_create_empty"></block>
125 <block type="lists_create_with"></block>
126 <block type="lists_repeat">
127 <value name="NUM">
128 <block type="math_number">
129 <field name="NUM">5</field>
130 </block>
131 </value>
132 </block>
133 <block type="lists_length"></block>
134 <block type="lists_isEmpty"></block>
135 <block type="lists_indexOf"></block>
136 <block type="lists_getIndex"></block>
137 <block type="lists_setIndex"></block>
138 </category>
139 <category name="Variables" custom="VARIABLE"></category>
140 <category name="Functions" custom="PROCEDURE"></category>
141 <sep></sep>
142 <category name="Library" expanded="true">
143 <category name="Randomize">
144 <block type="procedures_defnoreturn">
145 <mutation>
146 <arg name="list"></arg>
147 </mutation>
148 <field name="NAME">randomize</field>
149 <statement name="STACK">
150 <block type="controls_for" inline="true">
151 <field name="VAR">x</field>
152 <value name="FROM">
153 <block type="math_number">
154 <field name="NUM">1</field>
155 </block>
156 </value>
157 <value name="TO">
158 <block type="lists_length" inline="false">
159 <value name="VALUE">
160 <block type="variables_get">
161 <field name="VAR">list</field>
162 </block>
163 </value>
164 </block>
165 </value>
166 <value name="BY">
167 <block type="math_number">
168 <field name="NUM">1</field>
169 </block>
170 </value>
171 <statement name="DO">
172 <block type="variables_set" inline="false">
173 <field name="VAR">y</field>
174 <value name="VALUE">
175 <block type="math_random_int" inline="true">
176 <value name="FROM">
177 <block type="math_number">
178 <field name="NUM">1</field>
179 </block>
180 </value>
181 <value name="TO">
182 <block type="lists_length" inline="false">
183 <value name="VALUE">
184 <block type="variables_get">
185 <field name="VAR">list</field>
186 </block>
187 </value>
188 </block>
189 </value>
190 </block>
191 </value>
192 <next>
193 <block type="variables_set" inline="false">
194 <field name="VAR">temp</field>
195 <value name="VALUE">
196 <block type="lists_getIndex" inline="true">
197 <mutation statement="false" at="true"></mutation>
198 <field name="MODE">GET</field>
199 <field name="WHERE">FROM_START</field>
200 <value name="AT">
201 <block type="variables_get">
202 <field name="VAR">y</field>
203 </block>
204 </value>
205 <value name="VALUE">
206 <block type="variables_get">
207 <field name="VAR">list</field>
208 </block>
209 </value>
210 </block>
211 </value>
212 <next>
213 <block type="lists_setIndex" inline="false">
214 <value name="AT">
215 <block type="variables_get">
216 <field name="VAR">y</field>
217 </block>
218 </value>
219 <value name="LIST">
220 <block type="variables_get">
221 <field name="VAR">list</field>
222 </block>
223 </value>
224 <value name="TO">
225 <block type="lists_getIndex" inline="true">
226 <mutation statement="false" at="true"></mutation>
227 <field name="MODE">GET</field>
228 <field name="WHERE">FROM_START</field>
229 <value name="AT">
230 <block type="variables_get">
231 <field name="VAR">x</field>
232 </block>
233 </value>
234 <value name="VALUE">
235 <block type="variables_get">
236 <field name="VAR">list</field>
237 </block>
238 </value>
239 </block>
240 </value>
241 <next>
242 <block type="lists_setIndex" inline="false">
243 <value name="AT">
244 <block type="variables_get">
245 <field name="VAR">x</field>
246 </block>
247 </value>
248 <value name="LIST">
249 <block type="variables_get">
250 <field name="VAR">list</field>
251 </block>
252 </value>
253 <value name="TO">
254 <block type="variables_get">
255 <field name="VAR">temp</field>
256 </block>
257 </value>
258 </block>
259 </next>
260 </block>
261 </next>
262 </block>
263 </next>
264 </block>
265 </statement>
266 </block>
267 </statement>
268 </block>
269 </category>
270 <category name="Jabberwocky">
271 <block type="text_print">
272 <value name="TEXT">
273 <block type="text">
274 <field name="TEXT">'Twas brillig, and the slithy toves</field>
275 </block>
276 </value>
277 <next>
278 <block type="text_print">
279 <value name="TEXT">
280 <block type="text">
281 <field name="TEXT"> Did gyre and gimble in the wabe:</field>
282 </block>
283 </value>
284 <next>
285 <block type="text_print">
286 <value name="TEXT">
287 <block type="text">
288 <field name="TEXT">All mimsy were the borogroves,</field>
289 </block>
290 </value>
291 <next>
292 <block type="text_print">
293 <value name="TEXT">
294 <block type="text">
295 <field name="TEXT"> And the mome raths outgrabe.</field>
296 </block>
297 </value>
298 </block>
299 </next>
300 </block>
301 </next>
302 </block>
303 </next>
304 </block>
305 <block type="text_print">
306 <value name="TEXT">
307 <block type="text">
308 <field name="TEXT">"Beware the Jabberwock, my son!</field>
309 </block>
310 </value>
311 <next>
312 <block type="text_print">
313 <value name="TEXT">
314 <block type="text">
315 <field name="TEXT"> The jaws that bite, the claws that catch!</field>
316 </block>
317 </value>
318 <next>
319 <block type="text_print">
320 <value name="TEXT">
321 <block type="text">
322 <field name="TEXT">Beware the Jubjub bird, and shun</field>
323 </block>
324 </value>
325 <next>
326 <block type="text_print">
327 <value name="TEXT">
328 <block type="text">
329 <field name="TEXT"> The frumious Bandersnatch!"</field>
330 </block>
331 </value>
332 </block>
333 </next>
334 </block>
335 </next>
336 </block>
337 </next>
338 </block>
339 </category>
340 </category>
341 </xml>
342
343 <script>
344 var workspace = Blockly.inject('blocklyDiv',
345 {media: '../../media/',
346 toolbox: document.getElementById('toolbox')});
347 </script>
348
349 </body>
350 </html>