From b4a2f0570e3708941674a36906ee557b01984d60 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Mon, 12 Dec 2005 21:10:48 +0000 Subject: [PATCH] indexed world svn: r1600 --- teachpack/htdp/Docs/world.thtml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/teachpack/htdp/Docs/world.thtml b/teachpack/htdp/Docs/world.thtml index 37e9c745b9..21fb2ee42c 100644 --- a/teachpack/htdp/Docs/world.thtml +++ b/teachpack/htdp/Docs/world.thtml @@ -4,18 +4,18 @@

The teachpack provides two kinds of functions. The first four allow students to simulate a small world of animated drawings and games:

-
  • big-bang : Number Number Number World -> true
    +
  • {(idx big-bang)} : Number Number Number World -> true
    (big-bang width height n w) creates and shows a width x height canvas, starts the clock, makes it tick every n seconds, and makes w the first world -
  • on-tick-event : (World -> World) -> true
    +
  • {(idx on-tick-event)} : (World -> World) -> true
    (on-tick-event tock) means that DrScheme must call tock on the current world every time the clock ticks; it uses the result as the next world -
  • on-key-event : (World KeyEvent -> World) -> true
    +
  • {(idx on-key-event)} : (World KeyEvent -> World) -> true
    (on-key-event change) means that DrScheme must call change on the current world and a (representation of the) keyevent for every keystroke the programmer (user of the computer) makes; it uses @@ -33,32 +33,32 @@ students to simulate a small world of animated drawings and games: or the events of releasing a key on the keypad. -
  • on-redraw : (World -> Image) -> true
    +
  • {(idx on-redraw)} : (World -> Image) -> true
    (on-tick-event world->image) means that DrScheme calls world->image whenever the canvas must be redrawn; the result is displayed in the teachpack's canvas -
  • end-of-time String u Symbol : -> World
    When DrScheme +
  • {(idx end-of-time)} : String u Symbol -> World
    When DrScheme evaluates (end-of-time), it stops the clock and displays the given string or symbol; no further tick events, key events, or redraw events take place until the world is created again.
  • The rest are functions for creating scenes:

    -
  • nw:rectangle : Number Number Mode Color -> Image
    +
  • {(idx nw:rectangle)} : Number Number Mode Color -> Image
    (nw:rectangle width height mode color) creates a width x height rectangle, solid or outlined, with its anchor in the NW corner -
  • empty-scene : Number Number -> Scene
    +
  • {(idx empty-scene)} : Number Number -> Scene
    (empty-scene width height) creates a width x height "scene" (frame with origin in NW) -
  • place-image : Image Number Number Scence -> Scene
    +
  • {(idx place-image)} : Image Number Number Scence -> Scene
    (place-image image x y scene) places image at (x,y) into scene; (x,y) are comp. graph. coordinates -
  • run-movie : (Listof Image) -> true
    +
  • {(idx run-movie)} : (Listof Image) -> true
    (run-movie loi) shows the list of images in loi, time-delayed