diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2000-04-14 09:46:08 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2000-04-14 09:46:08 +0000 |
commit | 515f99114e9d82af2adfa2d200c6970480897787 (patch) | |
tree | 331ebc1703fc52a0b8b9dcfc72a56ee61dd8a347 /otherlibs/labltk/example | |
parent | 43ea4c20e60aa9f50519b78f48b3b15d59feb255 (diff) |
Ordre des parametres plus naturel
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3086 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/labltk/example')
-rw-r--r-- | otherlibs/labltk/example/clock.ml | 17 | ||||
-rw-r--r-- | otherlibs/labltk/example/demo.ml | 4 | ||||
-rw-r--r-- | otherlibs/labltk/example/eyes.ml | 2 |
3 files changed, 10 insertions, 13 deletions
diff --git a/otherlibs/labltk/example/clock.ml b/otherlibs/labltk/example/clock.ml index 7c8d21311..cefd78495 100644 --- a/otherlibs/labltk/example/clock.ml +++ b/otherlibs/labltk/example/clock.ml @@ -82,8 +82,8 @@ class clock ~parent = object (self) (* Redraw everything *) method redraw = - Canvas.coords_set ~coords:[ 1; 1; width - 2; height - 2 ] - canvas (`Tag "cadran"); + Canvas.coords_set canvas (`Tag "cadran") + ~coords:[ 1; 1; width - 2; height - 2 ]; self#draw_figures; self#draw_arrows (Unix.localtime (Unix.time ())) @@ -107,22 +107,19 @@ class clock ~parent = object (self) let hangle = float (rflag * (tm.Unix.tm_hour * 60 + tm.Unix.tm_min) - 180) *. pi /. 360. in - Canvas.coords_set + Canvas.coords_set canvas (`Tag "hours") ~coords:[ self#x 0.; self#y 0.; - self#x (cos hangle /. 2.); self#y (sin hangle /. 2.) ] - canvas (`Tag "hours"); + self#x (cos hangle /. 2.); self#y (sin hangle /. 2.) ]; Canvas.configure_line ~width:(min width height / 50) canvas (`Tag "minutes"); let mangle = float (rflag * tm.Unix.tm_min - 15) *. pi /. 30. in - Canvas.coords_set + Canvas.coords_set canvas (`Tag "minutes") ~coords:[ self#x 0.; self#y 0.; - self#x (cos mangle /. 1.5); self#y (sin mangle /. 1.5) ] - canvas (`Tag "minutes"); + self#x (cos mangle /. 1.5); self#y (sin mangle /. 1.5) ]; let sangle = float (rflag * tm.Unix.tm_sec - 15) *. pi /. 30. in - Canvas.coords_set + Canvas.coords_set canvas (`Tag "seconds") ~coords:[ self#x 0.; self#y 0.; self#x (cos sangle /. 1.25); self#y (sin sangle /. 1.25) ] - canvas (`Tag "seconds") end (* Initialize the Tcl interpreter *) diff --git a/otherlibs/labltk/example/demo.ml b/otherlibs/labltk/example/demo.ml index 343f45684..e648b3bb1 100644 --- a/otherlibs/labltk/example/demo.ml +++ b/otherlibs/labltk/example/demo.ml @@ -25,7 +25,7 @@ let _ = (* Initialize Tk *) let top = openTk () in (* Title setting *) -Wm.title_set top ~title:"LablTk demo"; +Wm.title_set top "LablTk demo"; (* Base frame *) let base = Frame.create top in @@ -118,7 +118,7 @@ pack [bar] ~fill: `X; (* Toplevel *) let top2 = Toplevel.create top in - Wm.title_set top2 ~title:"LablTk demo control"; + Wm.title_set top2 "LablTk demo control"; let defcol = `Color "#dfdfdf" in let selcol = `Color "#ffdfdf" in let buttons = diff --git a/otherlibs/labltk/example/eyes.ml b/otherlibs/labltk/example/eyes.ml index 73286d303..a20116ed5 100644 --- a/otherlibs/labltk/example/eyes.ml +++ b/otherlibs/labltk/example/eyes.ml @@ -48,7 +48,7 @@ let _ = else e.ev_MouseX, e.ev_MouseY in - Canvas.move ~x: (nx - !curx) ~y: (ny - !cury) c o; + Canvas.move c o ~x: (nx - !curx) ~y: (ny - !cury); curx := nx; cury := ny) c |