From ddff8ae1e15c9fcaf83320978a5cad509d734a74 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Wed, 27 Jul 2005 12:55:52 +0000 Subject: [PATCH] refactored gui handling code so that MatitaMathView is linked before MatitaGui and all callback registrations happen in matitaGui.ml rather than matita.ml --- helm/matita/.depend | 63 +++++++++-------- helm/matita/Makefile.in | 2 +- helm/matita/matita.ml | 29 -------- helm/matita/matitaGui.ml | 30 +++++++- helm/matita/matitaGui.mli | 68 +----------------- helm/matita/matitaGuiTypes.mli | 125 +++++++++++++++++++++++++++++++++ helm/matita/matitaMathView.ml | 13 ++-- helm/matita/matitaMathView.mli | 77 +++++--------------- 8 files changed, 214 insertions(+), 193 deletions(-) create mode 100644 helm/matita/matitaGuiTypes.mli diff --git a/helm/matita/.depend b/helm/matita/.depend index c7246ac01..990877d36 100644 --- a/helm/matita/.depend +++ b/helm/matita/.depend @@ -1,11 +1,23 @@ -matita.cmo: matitamakeLib.cmi matitaTypes.cmi matitaScript.cmi matitaMisc.cmi \ - matitaMathView.cmi matitaLog.cmi matitaGui.cmi matitaGtkMisc.cmi \ - matitaEngine.cmi matitaDisambiguator.cmi matitaDb.cmi buildTimeConf.cmo -matita.cmx: matitamakeLib.cmx matitaTypes.cmx matitaScript.cmx matitaMisc.cmx \ - matitaMathView.cmx matitaLog.cmx matitaGui.cmx matitaGtkMisc.cmx \ - matitaEngine.cmx matitaDisambiguator.cmx matitaDb.cmx buildTimeConf.cmx +matitacleanLib.cmo: matitaSync.cmi matitaMisc.cmi matitaLog.cmi matitaDb.cmi \ + matitacleanLib.cmi +matitacleanLib.cmx: matitaSync.cmx matitaMisc.cmx matitaLog.cmx matitaDb.cmx \ + matitacleanLib.cmi +matitaclean.cmo: matitacleanLib.cmi matitaMisc.cmi matitaLog.cmi matitaDb.cmi \ + buildTimeConf.cmo +matitaclean.cmx: matitacleanLib.cmx matitaMisc.cmx matitaLog.cmx matitaDb.cmx \ + buildTimeConf.cmx +matitacLib.cmo: matitacleanLib.cmi matitaTypes.cmi matitaMisc.cmi \ + matitaLog.cmi matitaExcPp.cmi matitaEngine.cmi matitaDb.cmi \ + buildTimeConf.cmo matitacLib.cmi +matitacLib.cmx: matitacleanLib.cmx matitaTypes.cmx matitaMisc.cmx \ + matitaLog.cmx matitaExcPp.cmx matitaEngine.cmx matitaDb.cmx \ + buildTimeConf.cmx matitacLib.cmi +matitac.cmo: matitacLib.cmi +matitac.cmx: matitacLib.cmx matitaDb.cmo: matitaMisc.cmi matitaDb.cmi matitaDb.cmx: matitaMisc.cmx matitaDb.cmi +matitadep.cmo: matitaMisc.cmi matitaLog.cmi matitaExcPp.cmi buildTimeConf.cmo +matitadep.cmx: matitaMisc.cmx matitaLog.cmx matitaExcPp.cmx buildTimeConf.cmx matitaDisambiguator.cmo: matitaTypes.cmi matitaDisambiguator.cmi matitaDisambiguator.cmx: matitaTypes.cmx matitaDisambiguator.cmi matitaEngine.cmo: matitacleanLib.cmi matitaTypes.cmi matitaSync.cmi \ @@ -30,6 +42,12 @@ matitaGui.cmx: matitamakeLib.cmx matitacleanLib.cmx matitacLib.cmx \ buildTimeConf.cmx matitaGui.cmi matitaLog.cmo: matitaLog.cmi matitaLog.cmx: matitaLog.cmi +matitamakeLib.cmo: matitaMisc.cmi matitaLog.cmi buildTimeConf.cmo \ + matitamakeLib.cmi +matitamakeLib.cmx: matitaMisc.cmx matitaLog.cmx buildTimeConf.cmx \ + matitamakeLib.cmi +matitamake.cmo: matitamakeLib.cmi buildTimeConf.cmo +matitamake.cmx: matitamakeLib.cmx buildTimeConf.cmx matitaMathView.cmo: matitaTypes.cmi matitaScript.cmi matitaMisc.cmi \ matitaGui.cmi matitaGtkMisc.cmi matitaExcPp.cmi buildTimeConf.cmo \ matitaMathView.cmi @@ -40,6 +58,12 @@ matitaMisc.cmo: matitaTypes.cmi matitaLog.cmi matitaExcPp.cmi \ buildTimeConf.cmo matitaMisc.cmi matitaMisc.cmx: matitaTypes.cmx matitaLog.cmx matitaExcPp.cmx \ buildTimeConf.cmx matitaMisc.cmi +matita.cmo: matitamakeLib.cmi matitaTypes.cmi matitaScript.cmi matitaMisc.cmi \ + matitaMathView.cmi matitaLog.cmi matitaGui.cmi matitaGtkMisc.cmi \ + matitaEngine.cmi matitaDisambiguator.cmi matitaDb.cmi buildTimeConf.cmo +matita.cmx: matitamakeLib.cmx matitaTypes.cmx matitaScript.cmx matitaMisc.cmx \ + matitaMathView.cmx matitaLog.cmx matitaGui.cmx matitaGtkMisc.cmx \ + matitaEngine.cmx matitaDisambiguator.cmx matitaDb.cmx buildTimeConf.cmx matitaScript.cmo: matitamakeLib.cmi matitacleanLib.cmi matitaTypes.cmi \ matitaSync.cmi matitaMisc.cmi matitaLog.cmi matitaEngine.cmi \ matitaDisambiguator.cmi matitaDb.cmi buildTimeConf.cmo matitaScript.cmi @@ -52,34 +76,11 @@ matitaSync.cmx: matitaTypes.cmx matitaMisc.cmx matitaLog.cmx matitaDb.cmx \ matitaSync.cmi matitaTypes.cmo: matitaLog.cmi matitaTypes.cmi matitaTypes.cmx: matitaLog.cmx matitaTypes.cmi -matitac.cmo: matitacLib.cmi -matitac.cmx: matitacLib.cmx -matitacLib.cmo: matitacleanLib.cmi matitaTypes.cmi matitaMisc.cmi \ - matitaLog.cmi matitaExcPp.cmi matitaEngine.cmi matitaDb.cmi \ - buildTimeConf.cmo matitacLib.cmi -matitacLib.cmx: matitacleanLib.cmx matitaTypes.cmx matitaMisc.cmx \ - matitaLog.cmx matitaExcPp.cmx matitaEngine.cmx matitaDb.cmx \ - buildTimeConf.cmx matitacLib.cmi -matitaclean.cmo: matitacleanLib.cmi matitaMisc.cmi matitaLog.cmi matitaDb.cmi \ - buildTimeConf.cmo -matitaclean.cmx: matitacleanLib.cmx matitaMisc.cmx matitaLog.cmx matitaDb.cmx \ - buildTimeConf.cmx -matitacleanLib.cmo: matitaSync.cmi matitaMisc.cmi matitaLog.cmi matitaDb.cmi \ - matitacleanLib.cmi -matitacleanLib.cmx: matitaSync.cmx matitaMisc.cmx matitaLog.cmx matitaDb.cmx \ - matitacleanLib.cmi -matitadep.cmo: matitaMisc.cmi matitaLog.cmi matitaExcPp.cmi buildTimeConf.cmo -matitadep.cmx: matitaMisc.cmx matitaLog.cmx matitaExcPp.cmx buildTimeConf.cmx -matitamake.cmo: matitamakeLib.cmi buildTimeConf.cmo -matitamake.cmx: matitamakeLib.cmx buildTimeConf.cmx -matitamakeLib.cmo: matitaMisc.cmi matitaLog.cmi buildTimeConf.cmo \ - matitamakeLib.cmi -matitamakeLib.cmx: matitaMisc.cmx matitaLog.cmx buildTimeConf.cmx \ - matitamakeLib.cmi matitaDisambiguator.cmi: matitaTypes.cmi matitaEngine.cmi: matitaTypes.cmi matitaGtkMisc.cmi: matitaGeneratedGui.cmi -matitaGui.cmi: matitaLog.cmi matitaGeneratedGui.cmi matitaDisambiguator.cmi +matitaGui.cmi: matitaGuiTypes.cmi matitaDisambiguator.cmi +matitaGuiTypes.cmi: matitaLog.cmi matitaGeneratedGui.cmi matitaMathView.cmi: matitaTypes.cmi matitaMisc.cmi: matitaTypes.cmi matitaScript.cmi: matitaTypes.cmi diff --git a/helm/matita/Makefile.in b/helm/matita/Makefile.in index 2658d48ba..093a3217d 100644 --- a/helm/matita/Makefile.in +++ b/helm/matita/Makefile.in @@ -38,8 +38,8 @@ CMOS = \ matitaScript.cmo \ matitaGeneratedGui.cmo \ matitaGtkMisc.cmo \ - matitaGui.cmo \ matitaMathView.cmo \ + matitaGui.cmo \ $(NULL) # objects for matitac (batch compiler) CCMOS = \ diff --git a/helm/matita/matita.ml b/helm/matita/matita.ml index 9207b1c05..fbf3d500e 100644 --- a/helm/matita/matita.ml +++ b/helm/matita/matita.ml @@ -29,10 +29,8 @@ open MatitaGtkMisc open MatitaTypes open MatitaMisc - (* ALB to link paramodulation... *) let _ = Paramodulation.Saturation.init () - (** {2 Initialization} *) @@ -43,9 +41,6 @@ let _ = MetadataTypes.ownerize_tables (Helm_registry.get "matita.owner"); MatitaDb.create_owner_environment (); MatitamakeLib.initialize (); - GtkMain.Rc.add_default_file BuildTimeConf.gtkrc_file; (* loads gtk rc *) - GMathView.add_configuration_path BuildTimeConf.gtkmathview_conf; - ignore (GMain.Main.init ()); CicEnvironment.set_trust (* environment trust *) (let trust = Helm_registry.get_bool "matita.environment_trust" in fun _ -> trust) @@ -54,29 +49,6 @@ let _ = let gui = MatitaGui.instance () -let _ = - ignore (gui#main#newCicBrowserMenuItem#connect#activate (fun _ -> - ignore (MatitaMathView.cicBrowser ()))); - (* font sizes *) - ignore (gui#main#increaseFontSizeMenuItem#connect#activate (fun _ -> - gui#increaseFontSize (); - MatitaMathView.increase_font_size (); - MatitaMathView.update_font_sizes ())); - ignore (gui#main#decreaseFontSizeMenuItem#connect#activate (fun _ -> - gui#decreaseFontSize (); - MatitaMathView.decrease_font_size (); - MatitaMathView.update_font_sizes ())); - ignore (gui#main#normalFontSizeMenuItem#connect#activate (fun _ -> - gui#resetFontSize (); - MatitaMathView.reset_font_size (); - MatitaMathView.update_font_sizes ())); - MatitaMathView.reset_font_size (); - (* disambiguator callback *) - MatitaDisambiguator.set_choose_uris_callback - (MatitaGui.interactive_uri_choice ()); - MatitaDisambiguator.set_choose_interp_callback - (MatitaGui.interactive_interp_choice ()) - let script = let s = MatitaScript.script @@ -106,7 +78,6 @@ let script = gui#sourceView#source_buffer#end_not_undoable_action (); s - (* math viewers *) let _ = let sequent_viewer = MatitaMathView.sequentViewer_instance () in diff --git a/helm/matita/matitaGui.ml b/helm/matita/matitaGui.ml index a41215bd4..fe0b4a1f9 100644 --- a/helm/matita/matitaGui.ml +++ b/helm/matita/matitaGui.ml @@ -331,7 +331,7 @@ class gui () = let clipboard = let atom = Gdk.Atom.clipboard in GData.clipboard atom in - ignore(self#main#editMenu#connect#activate + ignore (self#main#editMenu#connect#activate ~callback: (fun () -> let something_selected = @@ -751,7 +751,23 @@ class gui () = clean_locked := false; (MatitaScript.instance ())#clean_dirty_lock; clean_locked := true - end)) + end)); + (* math view handling *) + connect_menu_item main#newCicBrowserMenuItem (fun () -> + ignore (MatitaMathView.cicBrowser ())); + connect_menu_item main#increaseFontSizeMenuItem (fun () -> + self#increaseFontSize (); + MatitaMathView.increase_font_size (); + MatitaMathView.update_font_sizes ()); + connect_menu_item main#decreaseFontSizeMenuItem (fun () -> + self#decreaseFontSize (); + MatitaMathView.decrease_font_size (); + MatitaMathView.update_font_sizes ()); + connect_menu_item main#normalFontSizeMenuItem (fun () -> + self#resetFontSize (); + MatitaMathView.reset_font_size (); + MatitaMathView.update_font_sizes ()); + MatitaMathView.reset_font_size (); method loadScript file = let script = MatitaScript.instance () in @@ -888,6 +904,7 @@ class gui () = let gui () = let g = new gui () in gui_instance := Some g; + MatitaMathView.set_gui g; g let instance = singleton gui @@ -1045,3 +1062,12 @@ let interactive_interp_choice () choices = GtkThread.main (); (match !interp_no with Some row -> [row] | _ -> raise MatitaTypes.Cancel) +let _ = + (* disambiguator callbacks *) + MatitaDisambiguator.set_choose_uris_callback (interactive_uri_choice ()); + MatitaDisambiguator.set_choose_interp_callback (interactive_interp_choice ()); + (* gtk initialization *) + GtkMain.Rc.add_default_file BuildTimeConf.gtkrc_file; (* loads gtk rc *) + GMathView.add_configuration_path BuildTimeConf.gtkmathview_conf; + ignore (GMain.Main.init ()) + diff --git a/helm/matita/matitaGui.mli b/helm/matita/matitaGui.mli index 0943862ce..b82cb3947 100644 --- a/helm/matita/matitaGui.mli +++ b/helm/matita/matitaGui.mli @@ -23,74 +23,8 @@ * http://helm.cs.unibo.it/ *) -class type console = -object - method message: string -> unit - method error: string -> unit - method warning: string -> unit - method debug: string -> unit - method clear: unit -> unit - - method log_callback: MatitaLog.log_callback -end - -class type browserWin = -object - inherit MatitaGeneratedGui.browserWin - method browserUri: GEdit.combo_box_entry -end - - (** @param fname name of the Glade file describing the GUI *) -class type gui = -object - - method setQuitCallback : (unit -> unit) -> unit - - (** {2 Access to singleton instances of lower-level GTK widgets} *) - - method fileSel : MatitaGeneratedGui.fileSelectionWin - method main : MatitaGeneratedGui.mainWin - method findRepl : MatitaGeneratedGui.findReplWin - method develList: MatitaGeneratedGui.develListWin - method newDevel: MatitaGeneratedGui.newDevelWin -(* method toolbar : MatitaGeneratedGui.toolBarWin *) - - method console: console - method sourceView: GSourceView.source_view - - (** {2 Dialogs instantiation} - * methods below create a new window on each invocation. You should - * remember to destroy windows after use *) - - method newBrowserWin: unit -> browserWin - method newUriDialog: unit -> MatitaGeneratedGui.uriChoiceDialog - method newInterpDialog: unit -> MatitaGeneratedGui.interpChoiceDialog - method newConfirmationDialog: unit -> MatitaGeneratedGui.confirmationDialog - method newEmptyDialog: unit -> MatitaGeneratedGui.emptyDialog - - (** {2 Utility methods} *) - - (** ask the used to choose a file with the file chooser - * @param ok_not_exists if set to true returns also non existent files - * (useful for save). Defaults to false *) - method chooseFile: ?ok_not_exists:bool -> unit -> string option - method createDevelopment: containing:string option -> unit - - (** prompt the user for a (multiline) text entry *) - method askText: ?title:string -> ?msg:string -> unit -> string option - - method loadScript: string -> unit - method setStar: string -> bool -> unit - - (** {3 Fonts} *) - method increaseFontSize: unit -> unit - method decreaseFontSize: unit -> unit - method resetFontSize: unit -> unit - -end - (** singleton instance of the gui *) -val instance: unit -> gui +val instance: unit -> MatitaGuiTypes.gui (** {2 Disambiguation callbacks} * Use singleton gui instance. *) diff --git a/helm/matita/matitaGuiTypes.mli b/helm/matita/matitaGuiTypes.mli new file mode 100644 index 000000000..c4c1007b7 --- /dev/null +++ b/helm/matita/matitaGuiTypes.mli @@ -0,0 +1,125 @@ +(* Copyright (C) 2005, 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://helm.cs.unibo.it/ + *) + +class type console = +object + method message: string -> unit + method error: string -> unit + method warning: string -> unit + method debug: string -> unit + method clear: unit -> unit + + method log_callback: MatitaLog.log_callback +end + +class type browserWin = +object + inherit MatitaGeneratedGui.browserWin + method browserUri: GEdit.combo_box_entry +end + +class type gui = +object + method setQuitCallback : (unit -> unit) -> unit + + (** {2 Access to singleton instances of lower-level GTK widgets} *) + + method fileSel : MatitaGeneratedGui.fileSelectionWin + method main : MatitaGeneratedGui.mainWin + method findRepl : MatitaGeneratedGui.findReplWin + method develList: MatitaGeneratedGui.develListWin + method newDevel: MatitaGeneratedGui.newDevelWin +(* method toolbar : MatitaGeneratedGui.toolBarWin *) + + method console: console + method sourceView: GSourceView.source_view + + (** {2 Dialogs instantiation} + * methods below create a new window on each invocation. You should + * remember to destroy windows after use *) + + method newBrowserWin: unit -> browserWin + method newUriDialog: unit -> MatitaGeneratedGui.uriChoiceDialog + method newInterpDialog: unit -> MatitaGeneratedGui.interpChoiceDialog + method newConfirmationDialog: unit -> MatitaGeneratedGui.confirmationDialog + method newEmptyDialog: unit -> MatitaGeneratedGui.emptyDialog + + (** {2 Utility methods} *) + + (** ask the used to choose a file with the file chooser + * @param ok_not_exists if set to true returns also non existent files + * (useful for save). Defaults to false *) + method chooseFile: ?ok_not_exists:bool -> unit -> string option + method createDevelopment: containing:string option -> unit + + (** prompt the user for a (multiline) text entry *) + method askText: ?title:string -> ?msg:string -> unit -> string option + + method loadScript: string -> unit + method setStar: string -> bool -> unit + + (** {3 Fonts} *) + method increaseFontSize: unit -> unit + method decreaseFontSize: unit -> unit + method resetFontSize: unit -> unit +end + + (** multi selection gtkMathView which handle mactions and hyperlinks. Mactions + * are handled internally. Hyperlinks are handled by calling an user provided + * callback *) +class type clickableMathView = +object + inherit GMathViewAux.multi_selection_math_view + + (** set hyperlink callback. None disable hyperlink handling *) + method set_href_callback: (string -> unit) option -> unit + + method string_of_selected_terms: string + + method update_font_size: unit +end + +class type sequentViewer = +object + inherit clickableMathView + + (** load a sequent and render it into parent widget *) + method load_sequent: Cic.metasenv -> int -> unit +end + +class type sequentsViewer = +object + method reset: unit + method load_sequents: ProofEngineTypes.status -> unit + method goto_sequent: int -> unit (* to be called _after_ load_sequents *) +end + +class type cicBrowser = +object + method load: MatitaTypes.mathViewer_entry -> unit + (* method loadList: string list -> MatitaTypes.mathViewer_entry -> unit *) + method loadInput: string -> unit +end + diff --git a/helm/matita/matitaMathView.ml b/helm/matita/matitaMathView.ml index 5f0c77df5..3b9d02823 100644 --- a/helm/matita/matitaMathView.ml +++ b/helm/matita/matitaMathView.ml @@ -45,6 +45,12 @@ object (self) end let cicBrowsers = ref [] +let gui_instance = ref None +let set_gui gui = gui_instance := Some gui +let get_gui () = + match !gui_instance with + | None -> assert false + | Some gui -> gui let default_font_size () = Helm_registry.get_opt_default Helm_registry.int @@ -64,7 +70,6 @@ let near (x1, y1) (x2, y2) = let href_ds = Gdome.domString "href" let xref_ds = Gdome.domString "xref" - class clickableMathView obj = let text_width = 80 in object (self) @@ -427,8 +432,8 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history) let is_whelp txt = Pcre.pmatch ~rex:whelp_RE txt in let is_uri txt = Pcre.pmatch ~rex:uri_RE txt in let is_dir txt = Pcre.pmatch ~rex:dir_RE txt in - let gui = MatitaGui.instance () in - let win = gui#newBrowserWin () in + let gui = get_gui () in + let (win: MatitaGuiTypes.browserWin) = gui#newBrowserWin () in let queries = ["Locate";"Hint";"Match";"Elim";"Instance"] in let combo,_ = GEdit.combo_box_text ~strings:queries () in let activate_combo_query input q = @@ -748,7 +753,7 @@ let default_sequentViewer () = sequentViewer ~show:true () let sequentViewer_instance = MatitaMisc.singleton default_sequentViewer let default_sequentsViewer () = - let gui = MatitaGui.instance () in + let gui = get_gui () in let sequentViewer = sequentViewer_instance () in sequentsViewer ~notebook:gui#main#sequentsNotebook ~sequentViewer () let sequentsViewer_instance = MatitaMisc.singleton default_sequentsViewer diff --git a/helm/matita/matitaMathView.mli b/helm/matita/matitaMathView.mli index 3816a4b02..bee32796e 100644 --- a/helm/matita/matitaMathView.mli +++ b/helm/matita/matitaMathView.mli @@ -23,51 +23,6 @@ * http://helm.cs.unibo.it/ *) - (** multi selection gtkMathView which handle mactions and hyperlinks. Mactions - * are handled internally. Hyperlinks are handled by calling an user provided - * callback *) -class type clickableMathView = - object - inherit GMathViewAux.multi_selection_math_view - - (** set hyperlink callback. None disable hyperlink handling *) - method set_href_callback: (string -> unit) option -> unit - - method string_of_selected_terms: string - - method update_font_size: unit - end - -class type sequentViewer = - object - inherit clickableMathView - -(* |+* @return the list of selected terms. Selections which are not terms are - * ignored +| - method get_selected_terms: Cic.term list - - |+* @return the list of selected hypothese. Selections which are not - * hypotheses are ignored +| - method get_selected_hypotheses: Cic.hypothesis list *) - - (** load a sequent and render it into parent widget *) - method load_sequent: Cic.metasenv -> int -> unit - end - -class type sequentsViewer = - object - method reset: unit - method load_sequents: ProofEngineTypes.status -> unit - method goto_sequent: int -> unit (* to be called _after_ load_sequents *) - end - -class type cicBrowser = -object - method load: MatitaTypes.mathViewer_entry -> unit - (* method loadList: string list -> MatitaTypes.mathViewer_entry -> unit *) - method loadInput: string -> unit -end - (** {2 Constructors} *) (** meta constructor *) @@ -83,31 +38,35 @@ type 'widget constructor = unit -> 'widget -val clickableMathView: clickableMathView constructor +val clickableMathView: MatitaGuiTypes.clickableMathView constructor -val sequentViewer: sequentViewer constructor +val sequentViewer: MatitaGuiTypes.sequentViewer constructor val sequentsViewer: notebook:GPack.notebook -> - sequentViewer:sequentViewer -> + sequentViewer:MatitaGuiTypes.sequentViewer -> unit -> - sequentsViewer + MatitaGuiTypes.sequentsViewer -val cicBrowser: unit -> cicBrowser +val cicBrowser: unit -> MatitaGuiTypes.cicBrowser -(** mathview wide functions *) +(** {2 Mathview wide functions} *) -val increase_font_size: unit -> unit -val decrease_font_size: unit -> unit -val reset_font_size: unit -> unit +val increase_font_size: unit -> unit +val decrease_font_size: unit -> unit +val reset_font_size: unit -> unit val refresh_all_browsers: unit -> unit (** act on all cicBrowsers *) -val update_font_sizes: unit -> unit +val update_font_sizes: unit -> unit + +(** {2 Singleton instances} *) + +val sequentViewer_instance: unit -> MatitaGuiTypes.sequentViewer +val sequentsViewer_instance: unit -> MatitaGuiTypes.sequentsViewer -(** {2 singleton instances} *) +val mathViewer: unit -> MatitaTypes.mathViewer -val sequentViewer_instance: unit -> sequentViewer -val sequentsViewer_instance: unit -> sequentsViewer +(** {2 Initialization} *) -val mathViewer: unit -> MatitaTypes.mathViewer +val set_gui: MatitaGuiTypes.gui -> unit -- 2.39.2