#N struct template10 float x float y float a float b symbol z;
#N canvas 424 23 448 288 10;
#N canvas 46 12 428 604 template10 0;
#X obj 23 478 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 23 500 t b b;
#X obj 170 554 pointer;
#X msg 50 522 traverse pd-data10 \, bang;
#X obj 22 356 drawpolygon 0 1 20 20 20 -20 -20 -20 -20 20 20 20;
#X obj 22 276 drawcurve -v b 900 2 a(0:100)(0:100) 0 a(0:100)(0:71)
a(0:100)(0:71) 0 a(0:100)(0:100) a(0:100)(0:-71) a(0:100)(0:71) a(0:100)(0:-100)
0 a(0:100)(0:-71) a(0:100)(0:-71) 0 a(0:100)(0:-100) a(0:100)(0:71)
a(0:100)(0:-71) a(0:100)(0:100) 0;
#X obj 22 452 drawnumber b -10 -30 0;
#X text 20 255 "circle" of radius a \, visible when b != 0;
#X obj 23 578 append template10 x y a b;
#X msg 23 554 50 50 10 1;
#X text 19 37 Template demonstrating turning a drawing instruction
on and off.;
#X obj 22 409 loadbang;
#X obj 22 432 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X text 52 430 <- show/hide this drawing instruction;
#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 obj 22 94 route click;
#X obj 22 136 unpack p;
#X obj 22 158 t a a;
#X obj 22 224 set template10 b;
#X obj 22 180 get template10 b;
#X obj 22 202 == 0;
#X text 130 183 By getting and setting the data when;
#X text 129 198 the scalar is clicked \, we're building our;
#X obj 280 220 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X text 129 213 own version of [toggle]:;
#X text 121 138 of actions that are reported to the outlet;
#X text 121 153 when you manipulate a scalar with the mouse.);
#X text 121 123 (See the help patch for [struct] for a list;
#X text 98 93 <-- when the scalar is clicked \, a "click" message;
#X text 122 108 is sent to the outlet of [struct];
#X obj 22 72 struct template10 float x float y float a float b symbol
z;
#X obj 22 381 drawsymbol z -20 35 617;
#X connect 0 0 1 0;
#X connect 1 0 9 0;
#X connect 1 1 3 0;
#X connect 2 0 8 4;
#X connect 3 0 2 0;
#X connect 9 0 8 0;
#X connect 11 0 12 0;
#X connect 12 0 6 0;
#X connect 16 0 17 0;
#X connect 17 0 18 0;
#X connect 18 0 20 0;
#X connect 18 1 19 1;
#X connect 20 0 21 0;
#X connect 21 0 19 0;
#X connect 31 0 16 0;
#X restore 23 201 pd template10;
#N canvas 385 79 324 294 data10 1;
#X scalar template10 102 160 15.493 1 click_me \;;
#X scalar template10 180 161 15 1 and_me! \;;
#X coords 0 294 1 293 0 0 0;
#X restore 23 228 pd data10;
#X text 19 112 To turn a drawing instruction on and off globally \,
send a number to its inlet. By default drawing instructions are initially
visible \, unless given the "-n" flag.;
#X text 20 153 Arrays have the additional possibility of turning on
and off drawing instructions for their individual points as scalars.
Use "-vs z" to make the variable z control this.;
#X obj 1 1 cnv 15 445 20 empty \$0-pddp.cnv.header drawing_visibility
20 10 1 18 -261139 -33289 0;
#X obj 407 2 pddp/pddplink http://puredata.info/dev/pddp -text pddp
;
#X obj 1 266 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 125 WEBSITE http://crca.ucsd.edu/~msp/;
#X text 12 105 AUTHOR Miller Puckette;
#X text 12 85 LIBRARY PDDP;
#X text 12 5 GENRE tutorial;
#X text 12 45 LICENSE SIBSD;
#X text 12 145 HELP_PATCH_AUTHORS Updated for release 0.39. 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 drawing visibility;
#X restore 392 268 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 drawing visibility;
#X text 19 37 Links:;
#X restore 103 268 pd References;
#X obj 6 268 pddp/pddplink ../5.reference/pddp/help.pd -text help;
#X text 19 37 Drawing instructions can be dynamically turned on and
off \, either globally for all data of a given template \, or locally
according to a data field. In this example the [drawcurve] instruction's
arguments contain the leading flag "-v b" meaning that its visibility
is turned on and off by the field b.;
