|
superclass: event% |
See also Mouse and Keyboard Events.
constructor
(new mouse-event% [event-type event-type] [ [left-down left-down] [middle-down middle-down] [right-down right-down] [x x] [y y] [shift-down shift-down] [control-down control-down] [meta-down meta-down] [alt-down alt-down] [time-stamp time-stamp] [caps-down caps-down] [mod3-down mod3-down] [mod4-down mod4-down] [mod5-down mod5-down]]) → (is-a?/c mouse-event%)
event-type :
(or/c 'enter 'leave 'left-down 'left-up 'middle-down 'middle-up 'right-down 'right-up 'motion) left-down : any/c = #f middle-down : any/c = #f right-down : any/c = #f x : exact-integer? = 0 y : exact-integer? = 0 shift-down : any/c = #f control-down : any/c = #f meta-down : any/c = #f alt-down : any/c = #f time-stamp : exact-integer? = 0 caps-down : any/c = #f mod3-down : any/c = #f mod4-down : any/c = #f mod5-down : any/c = #f
'enter —
mouse pointer entered the window 'leave —
mouse pointer left the window 'left-down —
left mouse button pressed 'left-up —
left mouse button released 'middle-down —
middle mouse button pressed 'middle-up —
middle mouse button released 'right-down —
right mouse button pressed (Mac OS: click with control key pressed) 'right-up —
right mouse button released (Mac OS: release with control key pressed) 'motion —
mouse moved, with or without button(s) pressed
See the corresponding get- and set- methods for information about left-down, middle-down, right-down, x, y, shift-down, control-down, meta-down, alt-down, time-stamp, caps-down, mod3-down, mod4-down, and mod5-down.
Changed in version 1.1 of package gui-lib: Added mod3-down, mod4-down, and mod5-down.
method
(send a-mouse-event button-changed? [button]) → boolean?
button : (or/c 'left 'middle 'right 'any) = 'any
If button is not 'any, then #t is only returned if it is a press or release event for a specific button.
method
(send a-mouse-event button-down? [button]) → boolean?
button : (or/c 'left 'middle 'right 'any) = 'any
If button is not 'any, then #t is only returned if it is a press event for a specific button.
method
(send a-mouse-event button-up? [button]) → boolean?
button : (or/c 'left 'middle 'right 'any) = 'any
If button is not 'any, then #t is only returned if it is a release event for a specific button.
When the mouse button is up, an enter/leave event notifies a window that it will start/stop receiving mouse events. When the mouse button is down, however, the window receiving the mouse-down event receives all mouse events until the button is released; enter/leave events are not sent to other windows, and are not reliably delivered to the click-handling window (since the window can detect movement out of its region via get-x and get-y). See also Mouse and Keyboard Events.
method
(send a-mouse-event get-alt-down) → boolean?
method
(send a-mouse-event get-caps-down) → boolean?
method
(send a-mouse-event get-control-down) → boolean?
On Mac OS, if a control-key press is combined with a mouse button click, the event is reported as a right-button click and get-control-down for the event reports #f.
method
(send a-mouse-event get-event-type)
→
(or/c 'enter 'leave 'left-down 'left-up 'middle-down 'middle-up 'right-down 'right-up 'motion)
method
(send a-mouse-event get-left-down) → boolean?
method
(send a-mouse-event get-meta-down) → boolean?
method
(send a-mouse-event get-middle-down) → boolean?
method
(send a-mouse-event get-mod3-down) → boolean?
Added in version 1.1 of package gui-lib.
method
(send a-mouse-event get-mod4-down) → boolean?
Added in version 1.1 of package gui-lib.
method
(send a-mouse-event get-mod5-down) → boolean?
Added in version 1.1 of package gui-lib.
method
(send a-mouse-event get-right-down) → boolean?
method
(send a-mouse-event get-shift-down) → boolean?
method
(send a-mouse-event get-x) → exact-integer?
method
(send a-mouse-event get-y) → exact-integer?
See entering? for information about enter and leave events while the mouse button is clicked.
method
(send a-mouse-event set-alt-down down?) → void?
down? : any/c
method
(send a-mouse-event set-caps-down down?) → void?
down? : any/c
method
(send a-mouse-event set-control-down down?) → void?
down? : any/c
On Mac OS, if a control-key press is combined with a mouse button click, the event is reported as a right-button click and get-control-down for the event reports #f.
method
(send a-mouse-event set-event-type event-type) → void?
event-type :
(or/c 'enter 'leave 'left-down 'left-up 'middle-down 'middle-up 'right-down 'right-up 'motion)
method
(send a-mouse-event set-left-down down?) → void?
down? : any/c
method
(send a-mouse-event set-meta-down down?) → void?
down? : any/c
method
(send a-mouse-event set-middle-down down?) → void?
down? : any/c
method
(send a-mouse-event set-mod3-down down?) → void?
down? : any/c
Added in version 1.1 of package gui-lib.
method
(send a-mouse-event set-mod4-down down?) → void?
down? : any/c
Added in version 1.1 of package gui-lib.
method
(send a-mouse-event set-mod5-down down?) → void?
down? : any/c
Added in version 1.1 of package gui-lib.
method
(send a-mouse-event set-right-down down?) → void?
down? : any/c
method
(send a-mouse-event set-shift-down down?) → void?
down? : any/c
method
pos : exact-integer?
method
pos : exact-integer?