exemple.ml
(* ocamlc xdialog.cma exemple.ml -o exemple *)

print_endline
("You are"^(if Xdialog.yesno"Do you like red wine?"then" "else" not ")^"french.")
;;

Xdialog.msgbox "hello world!"
;;



Xdialog.infobox 
  ~opt:"--icon /home/kevin/info/compilo/caml/JoeCaml.xpm"
  "hello world!" ~timeout:3000
;;



print_endline ("The password is"^ 
  (Xdialog.inputsbox "What is the pass?" ~init:"***" []))
;;
  
  
List.iter 
  (fun x -> print_endline (x^", so I eat Ocaml every day. "))
  (Xdialog.treeview "choose element(0)"
     ["house","maison",true,0;
      "truck","camion",false,0;
      "plane","avion",false,1
     ]
  );;


List.iter (fun x -> print_endline (x^", so I eat Ocaml every day. "))
  (Xdialog.checklist "choose element(1)" 
     ["house","maison",true;
      "truck","camion",false;
      "plane","avion",false
     ]);;



List.iter (fun x -> print_endline (x^", so I eat Ocaml every day. "))
  (Xdialog.radiolist "choose element(2)" 
     ["house","maison",true;
      "truck","camion",false;
      "plane","avion",false
     ]);;



List.iter (fun x -> print_endline (x^",so I eat Ocaml every day. "))
  (Xdialog.buildlist "choose element(3)" 
     ["house","maison",true;"truck","camion",false]);;


print_endline (Xdialog.fselect "" );;



print_endline (Xdialog.dselect "/usr");;



print_endline (Xdialog.combobox "just select what you want" ["aaaa";"bbb";"cccccc"]);;




print_endline (String.concat "\n" (Xdialog.editbox "xdialog.ml" ));;



print_endline (Xdialog.inputsbox "hi!" []);;



print_endline (Xdialog.inputsbox "Completez les points." ["Comment","....";"allez",".....";"vous?","...."]);;



print_endline 
  (Xdialog.spinsbox "select levels" 
  [0,100,50,"life point";
   0,5,1,"game speed"
  ])
;;


List.iter print_endline 
  (Xdialog.sep
     (Xdialog.spinsbox "select levels" 
	[0,100,50,"life point";
	 0,5,1,"game speed"
	])
     '/')
;;


List.iter print_endline (Xdialog.sep "hello/world" '/');;



print_endline (Xdialog.menubox "Select what you want" 3 
		 ["A","car";
		  "B","truck";
		  "C","horse";
		  "D","bick";
		  "E","other"
		 ] 
	      )
;;

Valid XHTML 1.1!Valid CSS!