#N canvas 409 37 562 646 10;
#X obj 3 358 cnv 3 550 3 empty empty inlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 3 481 cnv 3 550 3 empty empty outlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 3 592 cnv 3 550 3 empty empty arguments 8 12 0 13 #dcdcdc #000000 0;
#X obj 75 368 cnv 17 3 105 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 75 490 cnv 17 3 17 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 75 510 cnv 17 3 17 empty empty 1 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 75 530 cnv 17 3 17 empty empty 2 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 75 550 cnv 17 3 17 empty empty 3 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 75 570 cnv 17 3 17 empty empty 4 5 9 0 16 #dcdcdc #9c9c9c 0;
#X text 173 600 (none);
#X obj 3 623 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 0;
#X msg 153 180 poll;
#X obj 143 217 cyclone/mousestate, f 39;
#X text 127 367 bang;
#X text 160 492 -;
#X text 120 492 float;
#X text 160 511 -;
#X text 120 511 float;
#X text 160 531 -;
#X text 120 531 float;
#X text 160 551 -;
#X text 120 551 float;
#X text 160 571 -;
#X text 120 571 float;
#X msg 143 152 nopoll;
#X obj 111 175 bng 18 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X text 371 260 delta y;
#X obj 374 242 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X obj 316 242 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X text 313 259 delta x;
#X obj 258 242 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X obj 200 242 nbx 4 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X text 201 259 x pos;
#X text 261 259 y pos;
#X obj 143 240 tgl 18 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X text 134 259 click;
#X text 127 384 poll;
#X text 115 400 nopoll;
#X obj 206 185 metro 500;
#X obj 206 162 tgl 15 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X text 127 445 zero;
#X text 121 460 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 475 238 pd examples;
#X text 160 367 - polls position data, f 61;
#X text 160 400 - does not poll position data (only via bang), f 61;
#X text 175 492 click status: 1 <button is pressed> \, 0 <button is released>;
#X text 160 384 - 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 492 215 pd modes;
#X text 224 162 polling on/off with [metro];
#X text 160 445 - sets current position to (0 \, 0) of Pd's coordinate system, f 61;
#X text 79 416 mode <float>;
#X text 159 416 -;
#X text 73 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 175 511 cursor 'x' (horizontal) position (in pixels), f 59;
#X text 175 531 cursor 'y' (vertical) position (in pixels), f 59;
#X text 175 551 delta 'x' (position difference in pixels) from last poll, f 59;
#X text 175 571 delta 'y' (position difference in pixels) from last poll, f 59;
#X msg 71 177 zero;
#X msg 29 177 reset;
#X text 160 460 - resets (0 \, 0) coordinates to the default, f 61;
#X text 172 416 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 2 3 ./header mousestate;
#X text 39 64 Retrieve mouse data;
#X text 59 309 see also:;
#X obj 399 323 open-else;
#X text 442 301 click;
#X msg 399 301 mouse;
#X text 130 304 Plugdata users or those with ELSE can also use [else/mouse] as an alternative, f 42;
#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;
#X connect 66 0 64 0;
