Public Member Functions | |
| __init__ (self) | |
| set_mousebuttonlist (self) | |
| set_timeout (self) | |
| set_visible (self) | |
| set_pos (self) | |
| get_pos (self) | |
| get_clicked (self) | |
| get_pressed (self) | |
A mouse for collecting responses
| pygaze._mouse.basemouse.BaseMouse.__init__ | ( | self | ) |
Initializes mouse object
arguments
None
keyword arguments
mousebuttonlist -- list of mouse buttons that are allowed (e.g.
[1,3] for left and right button) or None to
allow all buttons (default =
MOUSEBUTTONLIST)
timeout -- time in milliseconds after which None is returned
on a call to get_clicked method when no click is
registered (default = MOUSETIMEOUT)
visible -- Boolean indicating if mouse should be visible or not
(default = False)
| pygaze._mouse.basemouse.BaseMouse.get_clicked | ( | self | ) |
Waits for mouse clicks
arguments
None
keyword arguments
mousebuttonlist -- list of mouse buttons that are allowed (e.g.
[1,3] for left and right button); None to
allow all buttons or 'default' to use the
mbuttonlist property (default = 'default')
timeout -- time in milliseconds after which None is returned
when no click is registered; None for no timeout or
'default' to use the timeout property (default =
'default')
returns
mousebutton, clickpos, clicktime -- mousebutton is an integer,
indicating which button has
been pressed or None when no
button has been pressed;
clickpos is an (x,y) position
tuple or None when no click
was registered;
clicktime is the time
(measured from expbegintime) a
buttonpress or a timeout
occured
Reimplemented in pygaze._mouse.osmouse.OSMouse, pygaze._mouse.psychopymouse.PsychoPyMouse, and pygaze._mouse.pygamemouse.PyGameMouse.
| pygaze._mouse.basemouse.BaseMouse.get_pos | ( | self | ) |
Returns mouse position
arguments
None
keyword arguments
None
returns
mpos -- a (x,y) position tuple, assuming top left is (0,0)
Reimplemented in pygaze._mouse.osmouse.OSMouse, pygaze._mouse.psychopymouse.PsychoPyMouse, and pygaze._mouse.pygamemouse.PyGameMouse.
| pygaze._mouse.basemouse.BaseMouse.get_pressed | ( | self | ) |
Returns the current state of the mouse buttons
arguments
None
keyword arguments
None
returns
statelist -- a list of Booleans indicating which mousebutton is
down (e.g. [1,0,0] when only button 1 is pressed on
a three-button-mouse)
Reimplemented in pygaze._mouse.osmouse.OSMouse, pygaze._mouse.psychopymouse.PsychoPyMouse, and pygaze._mouse.pygamemouse.PyGameMouse.
| pygaze._mouse.basemouse.BaseMouse.set_mousebuttonlist | ( | self | ) |
Set a list of accepted mouse buttons
arguments
None
keyword arguments
mousebuttonlist -- list of mouse buttons that are allowed (e.g.
[1,3] for left and right button) or None to
allow all buttons (default = None)
returns
None -- sets mbuttonlist property
Reimplemented in pygaze._mouse.osmouse.OSMouse, pygaze._mouse.psychopymouse.PsychoPyMouse, and pygaze._mouse.pygamemouse.PyGameMouse.
| pygaze._mouse.basemouse.BaseMouse.set_pos | ( | self | ) |
Set the mouse position
arguments
None
keyword arguments
pos -- an (x,y) position tuple, assuming top left is (0,0)
(default = (0,0))
returns
None -- sets the mouse position
Reimplemented in pygaze._mouse.osmouse.OSMouse, pygaze._mouse.psychopymouse.PsychoPyMouse, and pygaze._mouse.pygamemouse.PyGameMouse.
| pygaze._mouse.basemouse.BaseMouse.set_timeout | ( | self | ) |
Set a timeout (in milliseconds)
arguments
None
keyword arguments
timeout -- time in milliseconds after which None is returned
on a call to get_clicked method when no click is
registered (default = None)
returns
None -- sets timeout property
Reimplemented in pygaze._mouse.osmouse.OSMouse, pygaze._mouse.psychopymouse.PsychoPyMouse, and pygaze._mouse.pygamemouse.PyGameMouse.
| pygaze._mouse.basemouse.BaseMouse.set_visible | ( | self | ) |
Sets the visibility of the cursor
arguments
None
keyword arguments
visible -- Boolean indicating if mouse should be visible or not
(default = False)
returns
None -- sets visible property
Reimplemented in pygaze._mouse.osmouse.OSMouse, pygaze._mouse.psychopymouse.PsychoPyMouse, and pygaze._mouse.pygamemouse.PyGameMouse.