From: Andrea Asperti Date: Fri, 8 Oct 2010 11:18:01 +0000 (+0000) Subject: hgdome no longer used (RIP) X-Git-Tag: make_still_working~2786 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=e2dde4cca0fe3ce74a79edbf8cb7a0f8e616daa9;p=helm.git hgdome no longer used (RIP) --- diff --git a/matita/components/METAS/meta.helm-hgdome.src b/matita/components/METAS/meta.helm-hgdome.src deleted file mode 100644 index d06666f43..000000000 --- a/matita/components/METAS/meta.helm-hgdome.src +++ /dev/null @@ -1,4 +0,0 @@ -requires="helm-xml gdome2" -version="0.0.1" -archive(byte)="hgdome.cma" -archive(native)="hgdome.cmxa" diff --git a/matita/components/Makefile b/matita/components/Makefile index de0d4ed30..d536ec37b 100644 --- a/matita/components/Makefile +++ b/matita/components/Makefile @@ -8,7 +8,6 @@ NULL = MODULES = \ extlib \ xml \ - hgdome \ registry \ syntax_extensions \ thread \ diff --git a/matita/components/hgdome/.depend b/matita/components/hgdome/.depend deleted file mode 100644 index 072d9697a..000000000 --- a/matita/components/hgdome/.depend +++ /dev/null @@ -1,6 +0,0 @@ -domMisc.cmi: -xml2Gdome.cmi: -domMisc.cmo: domMisc.cmi -domMisc.cmx: domMisc.cmi -xml2Gdome.cmo: xml2Gdome.cmi -xml2Gdome.cmx: xml2Gdome.cmi diff --git a/matita/components/hgdome/.depend.opt b/matita/components/hgdome/.depend.opt deleted file mode 100644 index 072d9697a..000000000 --- a/matita/components/hgdome/.depend.opt +++ /dev/null @@ -1,6 +0,0 @@ -domMisc.cmi: -xml2Gdome.cmi: -domMisc.cmo: domMisc.cmi -domMisc.cmx: domMisc.cmi -xml2Gdome.cmo: xml2Gdome.cmi -xml2Gdome.cmx: xml2Gdome.cmi diff --git a/matita/components/hgdome/Makefile b/matita/components/hgdome/Makefile deleted file mode 100644 index 9630da26a..000000000 --- a/matita/components/hgdome/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -PACKAGE = hgdome - -# modules which have both a .ml and a .mli -INTERFACE_FILES = \ - domMisc.mli \ - xml2Gdome.mli \ - $(NULL) - -IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml) - -include ../../Makefile.defs -include ../Makefile.common diff --git a/matita/components/hgdome/domMisc.ml b/matita/components/hgdome/domMisc.ml deleted file mode 100644 index 97a15b7f8..000000000 --- a/matita/components/hgdome/domMisc.ml +++ /dev/null @@ -1,43 +0,0 @@ -(* Copyright (C) 2000-2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -(******************************************************************************) -(* *) -(* PROJECT HELM *) -(* *) -(* Claudio Sacerdoti Coen *) -(* 06/01/2002 *) -(* *) -(* *) -(******************************************************************************) - -(* $Id$ *) - -let domImpl = Gdome.domImplementation () -let helm_ns = Gdome.domString "http://www.cs.unibo.it/helm" -let xlink_ns = Gdome.domString "http://www.w3.org/1999/xlink" -let mathml_ns = Gdome.domString "http://www.w3.org/1998/Math/MathML" -let boxml_ns = Gdome.domString "http://helm.cs.unibo.it/2003/BoxML" - diff --git a/matita/components/hgdome/domMisc.mli b/matita/components/hgdome/domMisc.mli deleted file mode 100644 index 25d642bc5..000000000 --- a/matita/components/hgdome/domMisc.mli +++ /dev/null @@ -1,42 +0,0 @@ -(* Copyright (C) 2000-2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -(******************************************************************************) -(* *) -(* PROJECT HELM *) -(* *) -(* Claudio Sacerdoti Coen *) -(* 15/01/2003 *) -(* *) -(* *) -(******************************************************************************) - -val domImpl : Gdome.domImplementation - -val helm_ns : Gdome.domString (** HELM namespace *) -val xlink_ns : Gdome.domString (** XLink namespace *) -val mathml_ns : Gdome.domString (** MathML namespace *) -val boxml_ns : Gdome.domString (** BoxML namespace *) - diff --git a/matita/components/hgdome/xml2Gdome.ml b/matita/components/hgdome/xml2Gdome.ml deleted file mode 100644 index eb6a7641c..000000000 --- a/matita/components/hgdome/xml2Gdome.ml +++ /dev/null @@ -1,135 +0,0 @@ -(* Copyright (C) 2000-2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -(* $Id$ *) - -let document_of_xml (domImplementation : Gdome.domImplementation) strm = - let module G = Gdome in - let module X = Xml in - let rec update_namespaces ((defaultns,bindings) as namespaces) = - function - [] -> namespaces - | (None,"xmlns",value)::tl -> - update_namespaces (Some (Gdome.domString value),bindings) tl - | (prefix,name,value)::tl when prefix = Some "xmlns" -> - update_namespaces (defaultns,(name,Gdome.domString value)::bindings) tl - | _::tl -> update_namespaces namespaces tl in - let rec namespace_of_prefix (defaultns,bindings) = - function - None -> None - | Some "xmlns" -> Some (Gdome.domString "xml-ns") - | Some p' -> - try - Some (List.assoc p' bindings) - with - Not_found -> - raise - (Failure ("The prefix " ^ p' ^ " is not bound to any namespace")) in - let get_qualified_name p n = - match p with - None -> Gdome.domString n - | Some p' -> Gdome.domString (p' ^ ":" ^ n) in - let root_prefix,root_name,root_attributes,root_content = - ignore (Stream.next strm) ; (* to skip the declaration *) - ignore (Stream.next strm) ; (* to skip the DOCTYPE declaration *) - match Stream.next strm with - X.Empty(p,n,l) -> p,n,l,[<>] - | X.NEmpty(p,n,l,c) -> p,n,l,c - | _ -> assert false - in - let namespaces = update_namespaces (None,[]) root_attributes in - let namespaceURI = namespace_of_prefix namespaces root_prefix in - let document = - domImplementation#createDocument ~namespaceURI - ~qualifiedName:(get_qualified_name root_prefix root_name) - ~doctype:None - in - let rec aux namespaces (node : Gdome.node) = - parser - [< 'X.Str a ; s >] -> - let textnode = document#createTextNode ~data:(Gdome.domString a) in - ignore (node#appendChild ~newChild:(textnode :> Gdome.node)) ; - aux namespaces node s - | [< 'X.Empty(p,n,l) ; s >] -> - let namespaces' = update_namespaces namespaces l in - let namespaceURI = namespace_of_prefix namespaces' p in - let element = - document#createElementNS ~namespaceURI - ~qualifiedName:(get_qualified_name p n) - in - List.iter - (function (p,n,v) -> - if p = None then - element#setAttribute ~name:(Gdome.domString n) - ~value:(Gdome.domString v) - else - let namespaceURI = namespace_of_prefix namespaces' p in - element#setAttributeNS - ~namespaceURI - ~qualifiedName:(get_qualified_name p n) - ~value:(Gdome.domString v) - ) l ; - ignore - (node#appendChild - ~newChild:(element : Gdome.element :> Gdome.node)) ; - aux namespaces node s - | [< 'X.NEmpty(p,n,l,c) ; s >] -> - let namespaces' = update_namespaces namespaces l in - let namespaceURI = namespace_of_prefix namespaces' p in - let element = - document#createElementNS ~namespaceURI - ~qualifiedName:(get_qualified_name p n) - in - List.iter - (function (p,n,v) -> - if p = None then - element#setAttribute ~name:(Gdome.domString n) - ~value:(Gdome.domString v) - else - let namespaceURI = namespace_of_prefix namespaces' p in - element#setAttributeNS ~namespaceURI - ~qualifiedName:(get_qualified_name p n) - ~value:(Gdome.domString v) - ) l ; - ignore (node#appendChild ~newChild:(element :> Gdome.node)) ; - aux namespaces' (element :> Gdome.node) c ; - aux namespaces node s - | [< >] -> () - in - let root = document#get_documentElement in - List.iter - (function (p,n,v) -> - if p = None then - root#setAttribute ~name:(Gdome.domString n) - ~value:(Gdome.domString v) - else - let namespaceURI = namespace_of_prefix namespaces p in - root#setAttributeNS ~namespaceURI - ~qualifiedName:(get_qualified_name p n) - ~value:(Gdome.domString v) - ) root_attributes ; - aux namespaces (root : Gdome.element :> Gdome.node) root_content ; - document -;; diff --git a/matita/components/hgdome/xml2Gdome.mli b/matita/components/hgdome/xml2Gdome.mli deleted file mode 100644 index 45d0e9532..000000000 --- a/matita/components/hgdome/xml2Gdome.mli +++ /dev/null @@ -1,27 +0,0 @@ -(* Copyright (C) 2000-2002, HELM Team. - * - * This file is part of HELM, an Hypertextual, Electronic - * Library of Mathematics, developed at the Computer Science - * Department, University of Bologna, Italy. - * - * HELM is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * HELM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with HELM; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. - * - * For details, see the HELM World-Wide-Web page, - * http://cs.unibo.it/helm/. - *) - -val document_of_xml : - Gdome.domImplementation -> Xml.token Stream.t -> Gdome.document diff --git a/matita/configure.ac b/matita/configure.ac index 8df69da9a..97d8c6673 100644 --- a/matita/configure.ac +++ b/matita/configure.ac @@ -79,7 +79,6 @@ helm-ng_disambiguation \ helm-ng_cic_content \ helm-grafite_parser \ helm-content_pres \ -helm-hgdome \ helm-ng_paramodulation \ helm-ng_tactics \ " diff --git a/matita/matita/applyTransformation.ml b/matita/matita/applyTransformation.ml index 6cbad3b50..f21677e5d 100644 --- a/matita/matita/applyTransformation.ml +++ b/matita/matita/applyTransformation.ml @@ -38,14 +38,6 @@ let mpres_document pres_box = Xml.add_xml_declaration (CicNotationPres.print_box pres_box) -let nmml_of_cic_sequent status metasenv subst sequent = - let content_sequent,ids_to_refs = - NTermCicContent.nmap_sequent status ~metasenv ~subst sequent in - let pres_sequent = - Sequent2pres.nsequent2pres ids_to_refs subst content_sequent in - let xmlpres = mpres_document pres_sequent in - Xml2Gdome.document_of_xml DomMisc.domImpl xmlpres - let ntxt_of_cic_sequent ~map_unicode_to_tex size status metasenv subst sequent = let content_sequent,ids_to_refs = NTermCicContent.nmap_sequent status ~metasenv ~subst sequent in @@ -55,13 +47,6 @@ let ntxt_of_cic_sequent ~map_unicode_to_tex size status metasenv subst sequent = BoxPp.render_to_string ~map_unicode_to_tex (function x::_ -> x | _ -> assert false) size pres_sequent -let nmml_of_cic_object status obj = - let cobj,ids_to_nrefs = NTermCicContent.nmap_obj status obj in - let pres_sequent = Content2pres.ncontent2pres ~ids_to_nrefs cobj in - let xmlpres = mpres_document pres_sequent in - Xml2Gdome.document_of_xml DomMisc.domImpl xmlpres -;; - let ntxt_of_cic_object ~map_unicode_to_tex size status obj = let cobj,ids_to_nrefs = NTermCicContent.nmap_obj status obj in let pres_sequent = Content2pres.ncontent2pres ~ids_to_nrefs cobj in diff --git a/matita/matita/applyTransformation.mli b/matita/matita/applyTransformation.mli index 5816455c2..93d8afc19 100644 --- a/matita/matita/applyTransformation.mli +++ b/matita/matita/applyTransformation.mli @@ -33,12 +33,6 @@ (* *) (***************************************************************************) -val nmml_of_cic_sequent: - #NCicCoercion.status -> - NCic.metasenv -> NCic.substitution -> (* metasenv, substitution *) - int * NCic.conjecture -> (* sequent *) - Gdome.document (* Math ML *) - val ntxt_of_cic_sequent: map_unicode_to_tex:bool -> int -> #NCicCoercion.status -> @@ -46,7 +40,5 @@ val ntxt_of_cic_sequent: int * NCic.conjecture -> (* sequent *) string (* text *) -val nmml_of_cic_object: #NCicCoercion.status -> NCic.obj -> Gdome.document - val ntxt_of_cic_object: map_unicode_to_tex:bool -> int -> #NCicCoercion.status -> NCic.obj -> string diff --git a/matita/matita/matitaEngine.ml b/matita/matita/matitaEngine.ml index c80405922..dcc111a95 100644 --- a/matita/matita/matitaEngine.ml +++ b/matita/matita/matitaEngine.ml @@ -40,6 +40,7 @@ let disambiguate_command lexicon_status_ref grafite_status cmd = grafite_status,cmd let eval_macro_screenshot (status : GrafiteTypes.status) name = + assert false (* MATITA 1.0 let _,_,metasenv,subst,_ = status#obj in let sequent = List.hd metasenv in let mathml = @@ -56,6 +57,7 @@ let eval_macro_screenshot (status : GrafiteTypes.status) name = Filename.quote (name^".png"))); HLog.debug ("generated " ^ name ^ ".png"); status, `New [] + *) ;; let eval_ast ?do_heavy_checks status (text,prefix_len,ast) = diff --git a/matita/matita/matitaGuiTypes.mli b/matita/matita/matitaGuiTypes.mli index af4a6b31d..7fc6f9ae5 100644 --- a/matita/matita/matitaGuiTypes.mli +++ b/matita/matita/matitaGuiTypes.mli @@ -109,8 +109,8 @@ object method load_root : root:string -> unit method remove_selections: unit - method set_selection: Gdome.element option -> unit - method get_selections: Gdome.element list + method set_selection: unit option -> unit + method get_selections: unit list method set_font_size: int -> unit diff --git a/matita/matita/matitaMathView.ml b/matita/matita/matitaMathView.ml index 8a7b8fdcb..fd5b6d4ac 100644 --- a/matita/matita/matitaMathView.ml +++ b/matita/matita/matitaMathView.ml @@ -65,6 +65,7 @@ let near (x1, y1) (x2, y2) = let distance = sqrt (((x2 -. x1) ** 2.) +. ((y2 -. y1) ** 2.)) in (distance < 4.) +(* let mathml_ns = Gdome.domString "http://www.w3.org/1998/Math/MathML" let xlink_ns = Gdome.domString "http://www.w3.org/1999/xlink" let helm_ns = Gdome.domString "http://www.cs.unibo.it/helm" @@ -83,10 +84,12 @@ let empty_mathml = lazy ( let empty_boxml = lazy ( domImpl#createDocument ~namespaceURI:(Some DomMisc.boxml_ns) ~qualifiedName:(Gdome.domString "box") ~doctype:None) + *) (** shown for goals closed by side effects *) let closed_goal_mathml = lazy "chiuso per side effect..." +(* (* ids_to_terms should not be passed here, is just for debugging *) let find_root_id annobj id ids_to_father_ids ids_to_terms ids_to_inner_types = assert false (* MATITA 1.0 @@ -177,6 +180,7 @@ let rec has_maction (elt :Gdome.element) = has_maction (new Gdome.element_of_node node) | _ -> false ;; +*) class clickableMathView obj = let text_width = 80 in @@ -198,8 +202,8 @@ object (self) ~stop:(self#buffer#get_iter `END); self#buffer#insert root method remove_selections = (() : unit) - method set_selection = (fun _ -> () : Gdome.element option -> unit) - method get_selections = (assert false : Gdome.element list) + method set_selection = (fun _ -> () : unit option -> unit) + method get_selections = (assert false : unit list) method set_font_size font_size = self#misc#modify_font_by_name (sprintf "%s %d" BuildTimeConf.script_font font_size)