fixed 10922
This commit is contained in:
parent
f1d258f20b
commit
f243a0e617
|
@ -375,13 +375,18 @@ All @tech{MouseEvent}s are represented via strings:
|
||||||
#:contracts
|
#:contracts
|
||||||
([clack-expr
|
([clack-expr
|
||||||
(-> (unsyntax @tech{WorldState})
|
(-> (unsyntax @tech{WorldState})
|
||||||
natural-number/c natural-number/c (unsyntax @tech{MouseEvent})
|
integer? integer? (unsyntax @tech{MouseEvent})
|
||||||
(unsyntax @tech{WorldState}))])]{
|
(unsyntax @tech{WorldState}))])]{
|
||||||
tell DrRacket to call @scheme[clack-expr] on the current world, the current
|
tell DrRacket to call @scheme[clack-expr] on the current world, the current
|
||||||
@scheme[x] and @scheme[y] coordinates of the mouse, and and a
|
@scheme[x] and @scheme[y] coordinates of the mouse, and and a
|
||||||
@tech{MouseEvent} for every (noticeable) action of the mouse by the
|
@tech{MouseEvent} for every (noticeable) action of the mouse by the
|
||||||
computer user. The result of the call becomes the current world.
|
computer user. The result of the call becomes the current world.
|
||||||
|
|
||||||
|
For @scheme["leave"] and @scheme["enter"] events, the coordinates of the
|
||||||
|
mouse click may be outside of the (implicitly) rectangle. That is, the
|
||||||
|
coordinates may be negative or larger than the (implicitly) specified
|
||||||
|
width and height.
|
||||||
|
|
||||||
Note: the computer's software doesn't really notice every single movement
|
Note: the computer's software doesn't really notice every single movement
|
||||||
of the mouse (across the mouse pad). Instead it samples the movements and
|
of the mouse (across the mouse pad). Instead it samples the movements and
|
||||||
signals most of them.}
|
signals most of them.}
|
||||||
|
@ -698,7 +703,7 @@ As mentioned, all event handlers may return @tech{WorldState}s or
|
||||||
#:contracts
|
#:contracts
|
||||||
([clack-expr
|
([clack-expr
|
||||||
(-> (unsyntax @tech{WorldState})
|
(-> (unsyntax @tech{WorldState})
|
||||||
natural-number/c natural-number/c (unsyntax @tech{MouseEvent})
|
integer? integer? (unsyntax @tech{MouseEvent})
|
||||||
(or/c (unsyntax @tech{WorldState}) package?))])]{
|
(or/c (unsyntax @tech{WorldState}) package?))])]{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user