-(* Callbacks *)
-let selection_changed mathview (node : Ominidom.o_mDOMNode option) =
- let module O = Ominidom in
- print_string ("selection_changed: " ^
- (match node with
- None -> "selection_changed on nothing"
- | Some node ->
- match node#get_name with
- | Some x -> x#get_string
- | None -> "on element without name"
- ) ^ "\n");
- mathview#set_selection node;
- flush stdout
-;;
-
-
-let rec jump (node : Ominidom.o_mDOMNode) =
- let module O = Ominidom in
- match node#get_attribute (O.o_mDOMString_of_string "href") with
- None ->
- begin
- try
- let p = node#get_parent in
- jump p
- with
- O.Node_has_no_parent ->
- print_string "jump: NO HREF FOR THIS NODE\n" ;
- flush stdout ;
- false
- end
- | Some x ->
- print_string ("jump: " ^ x#get_string ^ "\n") ;
- flush stdout ;
- true
-;;