mathview#set_selection None ;
mathview#remove_selections
+let select_over (mathview : GMathViewAux.multi_selection_math_view) =
+ (fun (_,_,_,state) ->
+ let c = function
+ | `SHIFT -> "shift"
+ | `LOCK -> "lock"
+ | `CONTROL -> "control"
+ | `MOD1 -> "mod1"
+ | _ -> ""
+ in
+ let msg =
+ String.concat ","
+ (List.filter (fun s -> s <> "")
+ (List.map c (Gdk.Convert.modifier state)))
+ in
+ if msg <> "" then begin
+ print_endline ("modifiers: " ^ msg);
+ flush stdout
+ end)
+
let unload mathview () =
mathview#unload ;
print_string "unload: SEEMS TO WORK\n" ;
ignore(mathview#connect#click (click mathview)) ;
ignore(mathview#connect#selection_changed (selection_changed mathview));
ignore(mathview#connect#element_over (element_over mathview)) ;
+ignore(mathview#connect#select_over (select_over mathview));
ignore(button_load_dom#connect#clicked (load_doc mathview)) ;
+ignore(main_window#connect#destroy (fun _ -> GMain.quit ()));
(* ignore(button_get_element_at#connect#clicked (get_element_at mathview)) ; *)
(* Main Loop *)
main_window#show () ;