]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matita.ml
snapshot, notably:
[helm.git] / helm / matita / matita.ml
index 364b5802599464ff80a5b7fd816c597831ecc550..107691932b6fc5b71eaa4226ab192087f3847de1 100644 (file)
@@ -87,11 +87,20 @@ let _ = (* attach observers to proof status *)
     false);
   currentProof#connect `Abort (fun () -> sequents_viewer#reset; false)
 
+let mathViewer = MatitaMathView.mathViewer ()
 let interpreter =
   let console = (gui#console :> MatitaTypes.console) in
   let currentProof = (currentProof :> MatitaTypes.currentProof) in
   new MatitaInterpreter.interpreter
-    ~disambiguator ~currentProof ~console ~dbd ()
+    ~disambiguator ~currentProof ~console ~mathViewer ~dbd ()
+let _ =
+  let href_callback uri =
+    let term = CicAst.Uri (UriManager.string_of_uri uri, None) in
+    ignore (interpreter#evalAst (TacticAst.Command (TacticAst.Check term)))
+  in
+  proof_viewer#set_href_callback (Some href_callback);
+  sequent_viewer#set_href_callback (Some href_callback);
+  mathViewer#set_href_callback (Some href_callback)
 
 (** {2 Script window handling} *)
 
@@ -214,5 +223,6 @@ let _ =
   (try
     load_script Sys.argv.(1)
   with Invalid_argument _ -> ());
+  gui#console#show ();
   GtkThread.main ()