Mouse:
Filter:
Description
Class methods
prevPos
screenSize
x
all
initClass
start
doActions
free
y
pos
new
initTask
stop
task
xuni
yuni
Inherited class methods
Instance methods
prAdd
xspec
yspec
doAction
printOn
storeArgs
xval
free
name
yval
action
init
Inherited instance methods
Classes (extension)
|
Control
Mouse
Extension
A language side Mouse
Location:
NOT INSTALLED!
See also:
MouseX
Description
Sketch for having an equivalent to MouseX in the language, on guis etc.
First code examples:
// use just the Mouse class (no polling needed): Mouse.pos Mouse.x Mouse.y // start polling - more efficient with multiple instances Mouse.start; // use instances with independent actions: // args are mouse, xval, yval, xraw, yraw Mouse(\a, { |...args| args.postln }); // post just x Mouse(\a, { |mouse, x| x.round(0.0001).postln }); // try to post x and y - but forgot y -> error // -> posts "Mouse(\a).action failed." Mouse(\a, { |mouse, x| [x, y].round(0.0001).postln }); // see the error Mouse(\a).doAction; // fix it Mouse(\a, { |mouse, x, y| [x, y].round(0.0001).postln }); // second mouse instance, use spec for x Mouse(\b, { |mouse, x| x.round(0.01).postln }, [20, 2000, \exp]); Mouse(\a).free; // b remains Mouse(\b).free; Mouse.free; */
⧉
✔
Class Methods
.
prevPos
.
screenSize
.
x
.
all
.
initClass
.
start
.
doActions
.
free
.
y
.
pos
.
new
Arguments:
name
action
xspec
yspec
.
initTask
.
stop
.
task
.
xuni
.
yuni
Inherited class methods
Instance Methods
.
prAdd
.
xspec
.
yspec
.
doAction
.
printOn
Arguments:
str
.
storeArgs
.
xval
.
free
.
name
.
yval
.
action
.
init
Inherited instance methods
helpfile source:
/tmp/scquark_hs/adclib/HelpSource/Classes/Mouse.schelp
link::Classes/Mouse::