~ubuntu-branches/ubuntu/hardy/ocaml-doc/hardy

« back to all changes in this revision

Viewing changes to examples/camltk/README

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2007-09-08 01:49:22 UTC
  • mfrom: (0.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070908014922-lvihyehz0ndq7suu
Tags: 3.10-1
* New upstream release.
* Removed camlp4 documentation since it is not up-to-date.
* Updated to standards version 3.7.2, no changes needed.
* Updated my email address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Graphical user interface using Caml/Tk
2
 
 
3
 
Start
4
 
 A first program that justs creates a button labelled Hello.
5
 
 
6
 
Hello
7
 
 Creates a button with an action attached to it.
8
 
 
9
 
Hello_quit
10
 
 Same as Hello, but additional quit button (and first example of
11
 
 geometry packing specification).
12
 
 
13
 
Addition
14
 
 A simple program that adds 2 numbers typed in two input areas.
15
 
 
16
 
Rgb
17
 
 Specification of a color using three scales that give the respective
18
 
 amounts of red, green, and blue components of the color.
19
 
 
20
 
Convert_euro
21
 
 Converts a given amount from francs to euros, and converse.
22
 
 
23
 
Convert
24
 
 Converts a given amount from a given currency to another one. Source
25
 
 and target currencies are chosen using a menu.
26
 
 
27
 
Camleyes
28
 
 A Caml/Tk (sort of) clone of Xeyes. Introduce the notion of canvas.
29
 
 
30
 
Taquin
31
 
 A simple game that uses images: cut the image into pieces then add an
32
 
 empty place to move over pieces. You must reconstruct a coherent
33
 
 image. Relatively advanced example.
34
 
 
35
 
Tetris
36
 
 An interactive game. An advanced example using timers, canvas and images.
37
 
 
38
 
 
39
 
To build an interactive toplevel named camltktop, including tk
40
 
 
41
 
ocamlmktop -I +labltk -custom labltk.cma -o ocamltktop
42
 
 
43
 
then load the file loadall.ml
44
 
 
45
 
ocamltktop -I +labltk
46
 
 
47
 
where + stands for the path to camltk on your local installation
48
 
 
49
 
(for instance /usr/local/lib/ocaml/labltk)
50
 
 
51
 
Then type in:
52
 
 
53
 
#use "loadall.ml";;