begin
notebook#set_current_page
~may_skip_switch_page_event:true metano ;
- notebook#proofw#load_sequent metasenv currentsequent
+prerr_endline "CIAO CIAO" ;
+prerr_endline ("SEQUENTE CORRENTE: " ^ SequentPp.TextualPp.print_sequent currentsequent) ;
+ notebook#proofw#load_sequent metasenv currentsequent ;
+prerr_endline "pASSO CIAO CIAO"
end
with
e ->
show_in_show_window_obj uri obj
in
let show_in_show_window_callback mmlwidget ((n : Gdome.element option),_,_,_) =
+prerr_endline "LUCA: HO RICEVUTO UN CLICK" ;
match n with
None -> ()
| Some n' ->
in
show_in_show_window_uri (UriManager.uri_of_string uri)
else
- ignore (mmlwidget#action_toggle n')
+prerr_endline "LUCA: AZIONO L'ACTION" ;
+ ignore (mmlwidget#action_toggle n') ;
+ let Some doc = n'#get_ownerDocument in
+ ignore (Misc.domImpl#saveDocumentToFile ~name:"/tmp/clicked_doc" ~doc ())
in
let _ =
mmlwidget#connect#click (show_in_show_window_callback mmlwidget)
(* MAIN *)
let initialize_everything () =
+prerr_endline "STO PER CREARE LA PROOF WINDOW" ;
let output =
TermViewer.proof_viewer
~mml_of_cic_object:ChosenTransformer.mml_of_cic_object
~width:350 ~height:280 ()
in
+prerr_endline "CREATA" ;
let notebook = new notebook in
let rendering_window' = new rendering_window output notebook in
+prerr_endline "OK" ;
rendering_window'#set_auto_disambiguation !auto_disambiguation;
set_rendering_window rendering_window';
let print_error_as_html prefix msg =
;;
let main () =
+prerr_endline "CIAO" ;
ignore (GtkMain.Main.init ()) ;
initialize_everything () ;
MQIC.close mqi_handle;
let sequent_mml,(ids_to_terms,ids_to_father_ids,ids_to_hypotheses) =
mml_of_cic_sequent metasenv sequent
in
+prerr_endline "PRIMA DI SALVARE IL FILE" ;
self#load_root ~root:sequent_mml#get_documentElement ;
-(*
+prerr_endline "SALVO IL FILE IN TEMP" ;
Misc.domImpl#saveDocumentToFile ~name:"/tmp/pippo" ~doc:sequent_mml () ;
-*)
current_infos <-
Some (ids_to_terms,ids_to_father_ids,ids_to_hypotheses)
end
(ids_to_terms,ids_to_father_ids,ids_to_conjectures,ids_to_hypotheses);
(* self#load_doc ~dom:mml ;
current_mml <- Some mml ; *)
+Misc.domImpl#saveDocumentToFile ~name:"/tmp/prova" ~doc:mml () ;
(match current_mml with
None ->
let time1 = Sys.time () in
self#load_root ~root:mml#get_documentElement ;
let time2 = Sys.time () in
+ prerr_endline "LUCA: PASSO DA DOVE DEVO PASSARE" ;
debug_print ("Loading and displaying the proof took " ^
string_of_float (time2 -. time1) ^ "seconds") ;
current_mml <- Some mml
else
let t' = from#importNode t true in
ignore (p#replaceChild ~newChild:t' ~oldChild:f) ;
- ignore (highlight_node from t')
+ (* ignore (highlight_node from t') *)
in
match
f#get_nodeType,t#get_nodeType
(function n ->
let n' = from#importNode n true in
ignore (f#appendChild n') ;
- ignore (highlight_node from n')
+ (* ignore (highlight_node from n') *)
+ ()
) tl2
| tl1,[] ->
List.iter (function n -> ignore (f#removeChild n)) tl1