X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fmatita%2FmatitaGui.ml;fp=helm%2Fmatita%2FmatitaGui.ml;h=0000000000000000000000000000000000000000;hb=1696761e4b8576e8ed81caa905fd108717019226;hp=2018d7176210f8b4cbc9b2bfbf40aa903436610b;hpb=5325734bc2e4927ed7ec146e35a6f0f2b49f50c1;p=helm.git diff --git a/helm/matita/matitaGui.ml b/helm/matita/matitaGui.ml deleted file mode 100644 index 2018d7176..000000000 --- a/helm/matita/matitaGui.ml +++ /dev/null @@ -1,126 +0,0 @@ -(* Copyright (C) 2004, 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 stringListModel' uriChoiceDialog = - let tree_view = uriChoiceDialog#uriChoiceTreeView in - let column_list = new GTree.column_list in - let text_column = column_list#add Gobject.Data.string in - let list_store = GTree.list_store column_list in - let renderer = (GTree.cell_renderer_text [], ["text", text_column]) in - let view_column = GTree.view_column ~renderer () in - let _ = tree_view#set_model (Some (list_store :> GTree.model)) in - let _ = tree_view#append_column view_column in - object - method append s = - let tree_iter = list_store#append () in - list_store#set ~row:tree_iter ~column:text_column s - method clear () = list_store#clear () - end -*) - -open MatitaGeneratedGui -open MatitaGtkMisc - -class gui file = - (* creation order _is_ relevant for windows placement *) - let toolbar = new toolBarWin ~file () in - let main = new mainWin ~file () in - let about = new aboutWin ~file () in - let fileSel = new fileSelectionWin ~file () in - let proof = new proofWin ~file () in - let keyBindingBoxes = (* event boxes which should receive global key events *) - [ toolbar#toolBarEventBox; proof#proofWinEventBox ] - in - let console = MatitaConsole.console ~packing:main#scrolledConsole#add () in - object (self) - initializer - (* glade's check widgets *) - List.iter (fun w -> w#check_widgets ()) - (let c w = (w :> unit>) in - [ c about; c fileSel; c main; c proof; c toolbar ]); - (* show/hide commands *) - toggle_visibility toolbar#toolBarWin main#showToolBarMenuItem; - toggle_visibility proof#proofWin main#showProofMenuItem; - (* "global" key bindings *) - List.iter (fun (key, callback) -> self#addKeyBinding key callback) - [ GdkKeysyms._F3, - toggle_win ~check:main#showProofMenuItem proof#proofWin; - ]; - (* about win *) - ignore (about#aboutWin#event#connect#delete (fun _ -> true)); - ignore (main#aboutMenuItem#connect#activate (fun _ -> - about#aboutWin#show ())); - ignore (about#aboutDismissButton#connect#clicked (fun _ -> - about#aboutWin#misc#hide ())); - (* menus *) - List.iter (fun w -> w#misc#set_sensitive false) - [ main#saveMenuItem; main#saveAsMenuItem ]; - main#helpMenu#set_right_justified true; - (* console *) - console#echo_message "\tMatita version 0.0.1\n"; - console#echo_prompt (); - console#misc#grab_focus () - - method about = about - method console = console - method fileSel = fileSel - method main = main - method proof = proof - method toolbar = toolbar - - method newUriDialog () = - let dialog = new uriChoiceDialog ~file () in - dialog#check_widgets (); - dialog - - method newInterpDialog () = - let dialog = new interpChoiceDialog ~file () in - dialog#check_widgets (); - dialog - - method newConfirmationDialog () = - let dialog = new confirmationDialog ~file () in - dialog#check_widgets (); - dialog - - method newEmptyDialog () = - let dialog = new emptyDialog ~file () in - dialog#check_widgets (); - dialog - - method private addKeyBinding key callback = - List.iter (fun evbox -> add_key_binding key callback evbox) - keyBindingBoxes - - method setQuitCallback callback = - ignore (main#toplevel#connect#destroy callback); - ignore (main#quitMenuItem#connect#activate callback); - self#addKeyBinding GdkKeysyms._q callback - - method setPhraseCallback = console#set_callback - - end -