(* Callbacks *)
let jump node =
-(*
- print_string ("jump: " ^ s ^ "\n") ;
- flush stdout
-*) ()
+ let module M = Minidom in
+ print_string ("jump: " ^
+ (match
+ M.node_get_attribute_ns node
+ (M.mDOMString_of_string "xlink")
+ (M.mDOMString_of_string "href")
+ with
+ None -> "DOES NOT WORKS (if you have clicked on the hyperlink)!!!!!"
+ | Some s -> M.string_of_mDOMString s
+ ) ^ "\n");
+ print_string ("jump: " ^
+ (match
+ M.node_get_attribute node
+ (M.mDOMString_of_string "href")
+ with
+ None -> "DOES NOT WORKS (if you have clicked on the hyperlink)!!!!!"
+ | Some s -> M.string_of_mDOMString s
+ ) ^ "\n");
+ flush stdout
;;
let selection_changed node =
-(*
- print_string ("jump: " ^ s ^ "\n") ;
- flush stdout
-*) ()
+ let module M = Minidom in
+ print_string ("selection_changed: " ^
+ (match
+ M.node_get_name node
+ with
+ None -> "selection_changed on nothing (???)"
+ | Some s -> "selection changed on " ^ M.string_of_mDOMString s
+ ) ^ "\n");
+ flush stdout
;;
+
let clicked node =
-(*
- print_string "clicked: IT WORKS\n" ;
- flush stdout
-*) ()
+ let module M = Minidom in
+ print_string ("clicked: " ^
+ (match
+ M.node_get_name node
+ with
+ None -> "Nothing clicked (???)"
+ | Some s -> M.string_of_mDOMString s ^ " clicked"
+ ) ^ "\n");
+ flush stdout
;;
+
let activate_t1 mathview sw () =
sw#remove !mathview#coerce ;
mathview :=