X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Fmatita.ml;h=13ec23a6e57697495c06a50246fef6d072f2b42a;hb=f38e8fafcf040258b54b4032562753a876a8a94e;hp=364b5802599464ff80a5b7fd816c597831ecc550;hpb=ac813b7e251e4bac1a8a16befa628203775771ca;p=helm.git diff --git a/helm/matita/matita.ml b/helm/matita/matita.ml index 364b58025..13ec23a6e 100644 --- a/helm/matita/matita.ml +++ b/helm/matita/matita.ml @@ -87,11 +87,21 @@ let _ = (* attach observers to proof status *) false); currentProof#connect `Abort (fun () -> sequents_viewer#reset; false) +let mathViewer = MatitaMathView.mathViewer () +let cicBrowser = MatitaMathView.cicBrowser () 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} *) @@ -204,7 +214,8 @@ let _ = let i = ref 0 in List.iter (fun t -> incr i; debug_print (sprintf "%d: %s" !i (CicPp.ppterm t))) - sequent_viewer#get_selected_terms) + sequent_viewer#get_selected_terms); + addDebugItem "show cic browser" (fun () -> gui#browser#browserWin#show ()); end (** *) @@ -214,5 +225,6 @@ let _ = (try load_script Sys.argv.(1) with Invalid_argument _ -> ()); + gui#console#show (); GtkThread.main ()