]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaGui.ml
snapshot
[helm.git] / helm / matita / matitaGui.ml
index 16af244349b40bbaf69027b8a83a55663c94b209..6ad3e81e0c015e57c1ff40e83a6c283a0c14c904 100644 (file)
@@ -49,22 +49,23 @@ 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
+  let _ =
+    console#echo_message "message";
+    console#echo_error "error";
+    console#echo_prompt ()
+  in
   object (self)
     initializer
         (* glade's check widgets *)
       List.iter (fun w -> w#check_widgets ())
         (let c w = (w :> <check_widgets: unit -> 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;
@@ -89,12 +90,29 @@ class gui file =
     method toolbar = toolbar
     method main = main
     method about = about
-    method dialog = dialog
-    method uriChoice = uriChoice
-    method interpChoice = interpChoice
     method fileSel = fileSel
     method proof = proof
 
+    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
@@ -104,7 +122,5 @@ class gui file =
       ignore (main#quitMenuItem#connect#activate callback);
       self#addKeyBinding GdkKeysyms._q callback
 
-    method uriChoices = uriChoices
-
   end