X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2FmatitaGui.ml;h=2018d7176210f8b4cbc9b2bfbf40aa903436610b;hb=5325734bc2e4927ed7ec146e35a6f0f2b49f50c1;hp=16af244349b40bbaf69027b8a83a55663c94b209;hpb=c5d4ad1c98c1434b95a8a9b1c8697dd36cf39623;p=helm.git diff --git a/helm/matita/matitaGui.ml b/helm/matita/matitaGui.ml index 16af24434..2018d7176 100644 --- a/helm/matita/matitaGui.ml +++ b/helm/matita/matitaGui.ml @@ -49,22 +49,18 @@ class gui file = let toolbar = new toolBarWin ~file () in let main = new mainWin ~file () in let about = new aboutWin ~file () in - let dialog = new genericDialog ~file () in - let uriChoice = new uriChoiceDialog ~file () in - let interpChoice = new interpChoiceDialog ~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 uriChoices = new stringListModel uriChoice#uriChoiceTreeView 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 dialog; c fileSel; c main; c proof; c toolbar; - c uriChoice; c interpChoice ]); + [ 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; @@ -83,17 +79,37 @@ class gui file = List.iter (fun w -> w#misc#set_sensitive false) [ main#saveMenuItem; main#saveAsMenuItem ]; main#helpMenu#set_right_justified true; - (* uri choice *) - () + (* console *) + console#echo_message "\tMatita version 0.0.1\n"; + console#echo_prompt (); + console#misc#grab_focus () - method toolbar = toolbar - method main = main method about = about - method dialog = dialog - method uriChoice = uriChoice - method interpChoice = interpChoice + 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) @@ -104,7 +120,7 @@ class gui file = ignore (main#quitMenuItem#connect#activate callback); self#addKeyBinding GdkKeysyms._q callback - method uriChoices = uriChoices + method setPhraseCallback = console#set_callback end