+class proof_viewer obj =
+ object(self)
+
+ inherit GMathViewAux.single_selection_math_view obj
+
+(* initializer self#set_log_verbosity 3 *)
+
+ val mutable current_infos = None
+ val mutable current_mathml = None
+
+ method load_proof ((uri_opt, _, _, _) as proof, (goal_opt: int option)) =
+ let (annobj, ids_to_terms, ids_to_father_ids, ids_to_inner_sorts,
+ ids_to_inner_types, ids_to_conjectures, ids_to_hypotheses) =
+ Cic2acic.acic_object_of_cic_object (cicCurrentProof proof)
+ in
+ current_infos <- Some (ids_to_terms, ids_to_father_ids, ids_to_conjectures,
+ ids_to_hypotheses);
+ let mathml =
+ ApplyTransformation.mml_of_cic_object ~explode_all:true
+ (unopt_uri uri_opt) annobj ids_to_inner_sorts ids_to_inner_types
+ in
+ match current_mathml with
+ | None ->
+ debug_print "no previous MathML";
+ self#load_root ~root:mathml#get_documentElement ;
+ current_mathml <- Some mathml
+ | Some current_mathml ->
+ debug_print "Previous MathML available: xmldiffing ...";
+ self#freeze ;
+ XmlDiff.update_dom ~from:current_mathml mathml ;
+ self#thaw
+ end