File created 5 July 2004.
This directories contains graphical user interface examples using
the Caml interface to Tcl/Tk.
A first program that justs creates a button labelled Hello.
Creates a button with an action attached to it.
Creates a button a single button with a call back function
that quits the program.
hello.ml, but with an additional quit button
(and a first example of geometry packing specification).
A simple program that adds 2 numbers typed in two input areas.
The specification of a color using three scales that give the respective
amounts of red, green, and blue components of the color.
Converts a given amount from francs to euros, and converse.
Converts a given amount from a given currency to another one. Source
and target currencies are chosen using a menu.
More advanced examples
A Caml/Tk (sort of) clone of Xeyes. Introduce the notion of canvas.
A simple game that uses images: cut the image into pieces then add an
empty place to move over pieces. You must reconstruct a coherent
image. Relatively advanced example.
An interactive game. An advanced example using timers, canvas and images.
An advanced example of widget definition: the basic text widget is
equipped with scroll-bars and kill/yank facilities ``à la Emacs''.
To build an interactive toplevel named camltktop, including tk
ocamlmktop -I +labltk -custom labltk.cma -o ocamltktop
then load the file loadall.ml, using
ocamltktop -I +labltk
Then type in:
Contact the author Pierre.Weis@inria.fr