#N struct template1 float x float y float z float q;
#N canvas 424 19 448 426 10;
#N canvas 395 77 297 180 data 0;
#X scalar template1 50 100 30 9 \;;
#X scalar template1 150 100 -20 900 \;;
#X restore 24 316 pd data;
#N canvas 390 118 428 272 template1 0;
#X obj 22 67 filledpolygon 244 q 5 0 0 20 z 40 0;
#X obj 22 42 struct template1 float x float y float z float q;
#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -261139 -33289 0;
#X text 7 2 Data Structure template;
#X text 19 92 This subpatch acts as a template which describes the
data structure. The [struct] associates a name with this template ("template1")
and specifies four floating point values named x \, y \, z \, and q.
The [filledpolygon] is a drawing instruction. Templates should have
only one [struct] object but may have any number of drawing instructions.
;
#X text 19 178 The arguments to [filledpolygon] are interior color
\, border color \, border width \, and then the points of the polygon.
Arguments which are symbols ("q" and "z" in this case) mean to take
the values from the data structure. Other values are constant. The
position of the object is automatically controlled by fields named
"x" and "y".;
#X restore 24 341 pd template1;
#X text 19 89 The positions \, border color \, and altitude of each
triangle are numeric values which can control \, or be controlled by
\, other elements of the patch.;
#X text 21 290 subpatches:;
#X text 20 259 Data is not persistent. If you save a Pd patch and reopen
it \, the "data" isn't preserved.;
#X text 19 36 This patch shows a simple data window with two objects
in it. The objects' data structures and appearances are defined by
the "template1" subpatch. This kind of object is called a "scalar."
;
#X text 20 195 Scalars are described by "templates" \, which are subwindows.
The subwindows are found by their name \, in this case "template1."
The template describes what form the data take and how it is shown.
It's possible to mix data of many different templates in the same collection.
;
#X obj 1 1 cnv 15 445 20 empty \$0-pddp.cnv.header scalars 20 10 1
18 -261139 -33289 0;
#X obj 407 2 pddp/pddplink http://puredata.info/dev/pddp -text pddp
;
#X obj 1 404 cnv 15 445 20 empty \$0-pddp.cnv.footer empty 20 12 0
14 -233017 -33289 0;
#N canvas 44 246 494 284 META 0;
#X text 12 85 PLATFORM windows macosx gnulinux;
#X text 12 165 WEBSITE http://crca.ucsd.edu/~msp/;
#X text 12 205 RELEASE_VERSION 0.41.4;
#X text 12 185 RELEASE_DATE 2009-06-12;
#X text 12 145 AUTHOR Miller Puckette;
#X text 12 125 LIBRARY PDDP;
#X text 12 5 GENRE tutorial;
#X text 12 45 LICENSE SIBSD;
#X text 12 105 DATATYPE float;
#X text 12 225 HELP_PATCH_AUTHORS Updated for release 0.35. Jonathan
Wilkes revised the patch to conform to the PDDP template for Pd version
0.42.;
#X text 12 25 KEYWORDS data_structure GUI;
#X text 12 65 DESCRIPTION scalars;
#X restore 392 406 pd META;
#N canvas 13 202 428 190 References 0;
#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -261139 -33289 0;
#X text 7 2 scalars - Related Help Documents;
#X restore 103 406 pd References;
#X obj 6 406 pddp/pddplink ../5.reference/pddp/help.pd -text help;
#X text 20 131 When the data window is locked (not in edit mode) you
can drag the apex of either triangle up or down to change the altitude
(you should see the cursor change with dragging is meaningful.) In
edit (unlocked) mode \, you can move the entire triangles around \,
or cut \, copy \, and paste them.;
#N canvas 10 147 428 250 init 0;
#X obj 229 171 pointer;
#X obj 22 173 append template1 x y z q;
#X msg 229 113 \; pd-data clear;
#X msg 229 149 traverse pd-data \, bang;
#X obj 119 114 t b b b;
#X msg 119 73 bang;
#X obj 119 42 loadbang;
#X text 153 73 click here to re-initialize;
#X text 19 203 This subpatch sets up the "data" window with two objects.
How this works will get explained later.;
#X msg 22 150 50 100 30 9 \, 150 100 -20 900;
#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -261139 -33289 0;
#X text 7 2 Data Structure Initialization Patch;
#X connect 0 0 1 4;
#X connect 3 0 0 0;
#X connect 4 0 9 0;
#X connect 4 1 3 0;
#X connect 4 2 2 0;
#X connect 5 0 4 0;
#X connect 6 0 5 0;
#X connect 9 0 1 0;
#X restore 24 366 pd init;
