(******************************************************************************)
(* Callbacks *)
-let jump node =
-(*
+let jump s =
print_string ("jump: " ^ s ^ "\n") ;
flush stdout
-*) ()
;;
-let clicked node =
-(*
+let clicked () =
print_string "clicked: IT WORKS\n" ;
flush stdout
-*) ()
;;
let load mathview () =
exception Ok;;
let get_selection mathview () =
-(*
let selection =
match mathview#get_selection with
None -> "NO SELECTION"
in
print_string ("get_selection: " ^ selection ^ "\n") ;
flush stdout
-*) ()
;;
let unload mathview () =
flush stdout
;;
-(*
let dump mathview () =
mathview#dump ;
print_string "dump: SEEMS TO WORK\n" ;
flush stdout
;;
-*)
let get_width mathview () =
print_string ("get_width: " ^ string_of_int (mathview#get_width) ^ "\n") ;
let button_load = GButton.button ~label:"load" ~packing:hbox#pack () in
let button_get_selection = GButton.button ~label:"get_selection" ~packing:hbox#pack () in
let button_unload = GButton.button ~label:"unload" ~packing:hbox#pack () in
-(*let button_dump = GButton.button ~label:"dump" ~packing:hbox#pack () in*)
+let button_dump = GButton.button ~label:"dump" ~packing:hbox#pack () in
let button_get_width = GButton.button ~label:"get_width" ~packing:hbox#pack () in
let button_get_height = GButton.button ~label:"get_height" ~packing:hbox#pack () in
let button_set_adjustments = GButton.button ~label:"set_adjustments" ~packing:hbox#pack () in
ignore(button_load#connect#clicked (load mathview)) ;
ignore(button_get_selection#connect#clicked (get_selection mathview)) ;
ignore(button_unload#connect#clicked (unload mathview)) ;
-(*ignore(button_dump#connect#clicked (dump mathview)) ;*)
+ignore(button_dump#connect#clicked (dump mathview)) ;
ignore(button_get_width#connect#clicked (get_width mathview)) ;
ignore(button_get_height#connect#clicked (get_height mathview)) ;
ignore(button_set_adjustments#connect#clicked (set_adjustments mathview)) ;