#N canvas 532 45 559 579 10;
#X obj 2 288 cnv 3 550 3 empty empty inlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 2 411 cnv 3 550 3 empty empty outlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 2 522 cnv 3 550 3 empty empty arguments 8 12 0 13 #dcdcdc #000000 0;
#X obj 74 298 cnv 17 3 105 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 74 420 cnv 17 3 17 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 74 440 cnv 17 3 17 empty empty 1 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 74 460 cnv 17 3 17 empty empty 2 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 74 480 cnv 17 3 17 empty empty 3 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 74 500 cnv 17 3 17 empty empty 4 5 9 0 16 #dcdcdc #9c9c9c 0;
#X text 172 530 (none);
#X obj 2 553 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 0;
#X msg 152 180 poll;
#X obj 142 217 cyclone/mousestate, f 39;
#X text 126 297 bang;
#X text 159 422 -;
#X text 119 422 float;
#X text 159 441 -;
#X text 119 441 float;
#X text 159 461 -;
#X text 119 461 float;
#X text 159 481 -;
#X text 119 481 float;
#X text 159 501 -;
#X text 119 501 float;
#X msg 142 152 nopoll;
#X obj 110 175 bng 18 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X text 370 260 delta y;
#X obj 373 242 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X obj 315 242 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X text 312 259 delta x;
#X obj 257 242 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X obj 199 242 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X text 200 259 x pos;
#X text 260 259 y pos;
#X obj 142 240 tgl 18 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X text 133 259 click;
#X text 126 314 poll;
#X text 114 330 nopoll;
#X obj 205 185 metro 500;
#X obj 205 162 tgl 15 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X text 126 375 zero;
#X text 120 390 reset;
#N canvas 764 242 530 289 examples 0;
#X text 180 33 Report mouse data:;
#X text 48 81 on pressing the mouse button:;
#X text 268 80 on releasing the mouse button:;
#X obj 96 168 cyclone/mousestate, f 24;
#X floatatom 131 200 4 0 0 0 - - - 0;
#X floatatom 166 200 4 0 0 0 - - - 0;
#X floatatom 201 199 4 0 0 0 - - - 0;
#X floatatom 237 199 4 0 0 0 - - - 0;
#X obj 124 115 tgl 18 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X obj 131 225 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 166 225 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 201 224 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 237 225 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 124 141 select 1;
#X obj 299 170 cyclone/mousestate, f 24;
#X floatatom 334 202 4 0 0 0 - - - 0;
#X floatatom 369 202 4 0 0 0 - - - 0;
#X floatatom 404 201 4 0 0 0 - - - 0;
#X floatatom 440 201 4 0 0 0 - - - 0;
#X obj 327 117 tgl 18 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X obj 334 227 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 369 227 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 404 226 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 440 227 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 327 143 select 0;
#X connect 3 0 8 0;
#X connect 3 1 4 0;
#X connect 3 2 5 0;
#X connect 3 3 6 0;
#X connect 3 4 7 0;
#X connect 4 0 9 0;
#X connect 5 0 10 0;
#X connect 6 0 11 0;
#X connect 7 0 12 0;
#X connect 8 0 13 0;
#X connect 13 0 3 0;
#X connect 14 0 19 0;
#X connect 14 1 15 0;
#X connect 14 2 16 0;
#X connect 14 3 17 0;
#X connect 14 4 18 0;
#X connect 15 0 20 0;
#X connect 16 0 21 0;
#X connect 17 0 22 0;
#X connect 18 0 23 0;
#X connect 19 0 24 0;
#X connect 24 0 14 0;
#X restore 474 248 pd examples;
#X text 159 297 - polls position data, f 61;
#X text 159 330 - does not poll position data (only via bang), f 61;
#X text 174 422 click status: 1 <button is pressed> \, 0 <button is released>;
#X text 159 314 - poll position data automatically when mouse cursor moves, f 61;
#N canvas 833 157 417 462 modes 0;
#X text 23 61 Mode 0 (default) uses "screen-relative coordinates" \, where (0 \, 0) is the top left corner of the primary display.;
#X obj 133 328 cyclone/mousestate;
#X obj 133 294 cyclone/loadmess poll;
#X msg 89 259 mode \$1;
#X obj 89 203 vradio 15 1 0 3 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0;
#X text 112 202 mode 0: screen relative;
#X text 112 217 mode 1: patch relative;
#X text 112 232 mode 2: front-most patch relative;
#X obj 159 406 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X text 160 423 x pos;
#X text 186 380 y pos;
#X text 21 14 There are 3 different modes in [mousestate] that define what the coordinate (0 \, 0) of the (x \, y) position point is in relation to.;
#X obj 185 362 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X text 209 404 horizontal;
#X text 234 362 vertical;
#X text 23 97 Mode 1 uses "patch-relative coordinates" \, where (0 \, 0) is the top left corner of the patch area where the object is.;
#X text 23 136 Mode 2 uses "front-most patch-relative coordinates" \, where (0 \, 0) is the top left corner of the front patch - try by selectring the parent patch for example.;
#X connect 1 1 8 0;
#X connect 1 2 12 0;
#X connect 2 0 1 0;
#X connect 3 0 1 0;
#X connect 4 0 3 0;
#X restore 491 225 pd modes;
#X text 223 162 polling on/off with [metro];
#X text 159 375 - sets current position to (0 \, 0) of Pd's coordinate system, f 61;
#X text 78 346 mode <float>;
#X text 158 346 -;
#X text 72 87 [mousestate] reports click status \, cursor position coordinates and cursor delta. The click report is always given (and sampled every 50 ms) \, the rest needs to be polled.;
#X text 174 441 cursor 'x' (horizontal) position (in pixels), f 59;
#X text 174 461 cursor 'y' (vertical) position (in pixels), f 59;
#X text 174 481 delta 'x' (position difference in pixels) from last poll, f 59;
#X text 174 501 delta 'y' (position difference in pixels) from last poll, f 59;
#X msg 70 177 zero;
#X msg 28 177 reset;
#X text 159 390 - resets (0 \, 0) coordinates to the default, f 61;
#X text 171 346 sets mode \, which defines the coordinate (0 \, 0) point in relation to (0: screen \, 1: patch window \, 2: front most window), f 62;
#X obj 1 3 ./header mousestate;
#X text 38 64 Retrieve mouse data;
#X connect 11 0 12 0;
#X connect 12 0 34 0;
#X connect 12 1 31 0;
#X connect 12 2 30 0;
#X connect 12 3 28 0;
#X connect 12 4 27 0;
#X connect 24 0 12 0;
#X connect 25 0 12 0;
#X connect 38 0 12 0;
#X connect 39 0 38 0;
#X connect 57 0 12 0;
#X connect 58 0 12 0;
