aboutsummaryrefslogtreecommitdiff
path: root/doc/pddp/struct-help.pd
diff options
context:
space:
mode:
authorJonathan Wilkes <jancsika1@users.sourceforge.net>2010-08-25 00:31:27 +0000
committerJonathan Wilkes <jancsika1@users.sourceforge.net>2010-08-25 00:31:27 +0000
commit7d6affca746f49f5ffb2818b8a9ccf9d91388e8f (patch)
treec906633b5bb39eb9b566f5209b2b1eae28703878 /doc/pddp/struct-help.pd
parent2f615ffbf13571a928856b8207d1ea215e857e3f (diff)
revised help docs that conform to the PDDP template
svn path=/trunk/; revision=13942
Diffstat (limited to 'doc/pddp/struct-help.pd')
-rw-r--r--doc/pddp/struct-help.pd162
1 files changed, 162 insertions, 0 deletions
diff --git a/doc/pddp/struct-help.pd b/doc/pddp/struct-help.pd
new file mode 100644
index 00000000..d85f1b5b
--- /dev/null
+++ b/doc/pddp/struct-help.pd
@@ -0,0 +1,162 @@
+#N struct struct-1 float x float y symbol dog array weasel struct-2
+;
+#N struct struct-2 float y;
+#N canvas 0 0 555 619 10;
+#X obj 0 595 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
+14 -228856 -66577 0;
+#X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header struct 3 12 0 18
+-204280 -1 0;
+#X obj 0 189 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13
+-228856 -1 0;
+#N canvas 58 228 494 344 META 0;
+#X text 12 105 PLATFORM windows macosx gnulinux;
+#X text 12 145 LIBRARY internal;
+#X text 12 185 WEBSITE http://crca.ucsd.edu/~msp/;
+#X text 12 65 LICENSE SIBSD;
+#X text 12 165 AUTHOR Miller Puckette;
+#X text 12 245 HELP_PATCH_AUTHORS Updated for Pd version 0.35. Jonathan
+Wilkes revised the patch to conform to the PDDP template for Pd version
+0.42.;
+#X text 12 5 GENRE help;
+#X text 12 45 KEYWORDS control data_structure;
+#X text 12 85 DESCRIPTION declare the fields in a data structure;
+#X text 12 25 NAME struct;
+#X text 12 125 OUTLET_0 click change select deselect displace;
+#X text 12 205 RELEASE_DATE 1997;
+#X text 12 225 RELEASE_VERSION;
+#X restore 500 597 pd META;
+#X obj 0 214 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0
+13 -228856 -1 0;
+#X obj 0 375 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12
+0 13 -228856 -1 0;
+#X obj 0 532 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 8 12
+0 13 -228856 -1 0;
+#N canvas 110 481 428 109 Related_objects 0;
+#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
+14 -204280 -1 0;
+#X text 8 2 [struct] Related Objects;
+#X obj 22 43 filledpolygon;
+#X obj 112 43 drawpolygon;
+#X obj 193 43 plot;
+#X obj 232 43 set;
+#X obj 262 43 get;
+#X obj 293 43 element;
+#X obj 22 73 getsize;
+#X obj 82 73 setsize;
+#X obj 142 73 pointer;
+#X obj 202 73 append;
+#X obj 254 73 sublist;
+#X restore 102 597 pd Related_objects;
+#X obj 78 296 cnv 17 3 72 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
+-162280 0;
+#X obj 483 3 struct;
+#X obj 455 20 pddp/pddplink http://wiki.puredata.info/en/struct -text
+pdpedia: struct;
+#X text 11 23 declare the fields in a data structure;
+#X text 98 193 (none);
+#X text 98 295 click;
+#X text 98 325 select;
+#X text 98 310 change;
+#X text 98 355 displace;
+#X text 98 340 deselect;
+#X text 149 461 float;
+#X text 149 476 symbol;
+#X text 149 491 array;
+#N canvas 106 165 428 349 help-template1 0;
+#X obj 23 43 struct struct-1 float x float y symbol dog array weasel
+struct-2;
+#X text 20 182 This just displays a red square to visualize the data
+structure.;
+#X obj 23 159 filledpolygon 900 0 1 0 0 40 0 40 40 0 40;
+#X obj 23 226 plot weasel 0 1 0 0 10;
+#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
+14 -204280 -1 0;
+#X text 8 2 [struct] Data Stucture Template;
+#X text 21 247 Here we plot the array "weasel" \, which gets displayed
+on top of the red square;
+#X obj 23 78 print;
+#X text 20 99 In this example \, the "struct-1" structure is defined
+in which "x" and "y" are "floats" \, i.e. \, numbers \, but "dog" is
+a symbol and "weasel" is an array of objects of the data structure
+"struct-2".;
+#X text 21 286 To learn about z-ordering with data structures \, open
+the abstraction below:;
+#X obj 24 321 z_ordering_in_data_structures;
+#X connect 0 0 7 0;
+#X restore 101 96 pd help-template1;
+#N canvas 105 189 428 125 help-template2 0;
+#X obj 23 43 struct struct-2 float y;
+#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
+14 -204280 -1 0;
+#X text 8 2 [struct] Data Structure Template;
+#X text 21 67 Here is a data structure which specifies only the floating
+point "y". It's used for the elements of the array shown in the other
+template.;
+#X restore 101 118 pd help-template2;
+#N canvas 59 240 428 307 struct-help-data 0;
+#X scalar struct-1 95 57 symbol \; 17 \; 38 \; 2 \; 39 \; 14 \; \;
+;
+#X scalar struct-1 164 57 symbol \; 17 \; 1 \; 40 \; 2 \; 14 \; \;
+;
+#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
+14 -204280 -1 0;
+#X text 8 2 [struct] Related Objects;
+#X scalar struct-1 239 57 symbol \; 17 \; 38 \; 2 \; 39 \; 14 \; \;
+;
+#X text 19 259 You can also right-click on each square and choose "Properties"
+in both runmode and editmode to see the values associated with each
+scalar.;
+#X text 20 179 In editmode \, you can click on the squares to move
+them. Like other objects in Pd \, you can select multiple scalars and
+move them together (notice the blue bounding box when you select them).
+A [print] object is connected to the outlet of the corresponding [struct]
+for these boxes \, so when you move them with the mouse messages will
+print to the console.;
+#X text 20 117 The three squares above are scalars that are defined
+by the template "help-template1". The zigzag lines are arrays \, the
+elements of which are defined by the template "help-template2". In
+runmode you can click and drag each element to change its value.;
+#X restore 101 168 pd struct-help-data;
+#X text 98 138 To view instances of these data structures \, click
+the patch below:;
+#X text 98 41 The [struct] object is typically put one to a subpatch
+\, and may be accompanied by drawing instructions that define how the
+data will be visualized. Two data structures- "struct-1" and "struct-2"-
+are defined below in subpatches:;
+#X text 169 393 - the name of the struct;
+#N canvas 80 458 429 105 struct_names 0;
+#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
+14 -204280 -1 0;
+#X text 20 39 You can't use "float" as a struct name because Pd has
+a hidden data structure named "float" which it uses for tables and
+"Put menu arrays".;
+#X text 8 2 [struct] Struct Names;
+#X restore 102 541 pd struct_names;
+#X text 172 295 - clicking the object with the mouse in run mode.;
+#X text 172 310 - changing the value of a field in run mode.;
+#X text 172 325 - selecting the object in edit mode.;
+#X text 172 340 - deselecting an object in edit mode.;
+#X text 172 355 - moving a selected object in edit mode.;
+#X text 188 461 - "float foo";
+#X text 188 476 - "symbol foo";
+#X text 188 491 - "array foo bar" \, where "bar" is the name of another
+data structure to be used as a template for elements of the array.
+;
+#X text 99 217 When a scalar is moved or edited with the mouse \, data
+is sent to the outlet of the respective [struct] object. This data
+consists of: a selector that describes the mouse action that was performed
+\, a pointer to the scalar \, and-- optionally-- a number (usually
+an x-coordinate). The selectors below correspond to the following mouse
+actions:;
+#X text 169 411 - all subsequent arguments are used to declare fields.
+Fields may be one of three types-- float \, symbol \, or array. To
+create the field "foo" \, use the syntax below for each type:;
+#X text 81 393 1) symbol atom;
+#X text 81 411 n) symbol atom;
+#X obj 99 560 pddp/pddplink scalar-help.pd;
+#X obj 4 597 pddp/pddplink pddp/help.pd -text help;
+#X obj 98 576 pddp/pddplink all_about_arrays.pd;
+#X obj 257 561 pddp/pddplink ../4.data.structures/06.file.pd -text
+doc/4.data.structures/06.file.pd;
+#X obj 257 576 pddp/pddplink ../4.data.structures/08.selection.pd -text
+doc/4.data.structures/08.selection.pd;