File: assistant.ml

package info (click to toggle)
lablgtk3 3.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,796 kB
  • sloc: ml: 40,890; ansic: 22,312; makefile: 133; sh: 17
file content (33 lines) | stat: -rw-r--r-- 1,229 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
(**************************************************************************)
(*    Lablgtk - Examples                                                  *)
(*                                                                        *)
(*    This code is in the public domain.                                  *)
(*    You may freely copy parts of it in your application.                *)
(*                                                                        *)
(**************************************************************************)

(* $Id: $ *)
let main () =
  GMain.init ();

  let assistant = GAssistant.assistant () in

  let box = GPack.vbox () in
  ignore (assistant#append_page box#as_widget);
  assistant#set_page_complete box#as_widget true;
  prerr_endline "Complete";
  assistant#set_page_type box#as_widget `SUMMARY;
  let button = GButton.link_button 
    "http://HELLO.ORG" 
    ~label:"BYE" ~packing:box#add () 
  in
  button#set_uri "GHHHHH";
  Format.printf "Got:%a@." GUtil.print_widget button;
  button#connect#activate_link
    (fun () -> Format.printf "Got url '%s'@." button#uri;   button#set_uri "AGAIN");
  assistant#connect#close GMain.quit;
  assistant#show ();
  GMain.main ()

let _ = main ()