]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaGuiTypes.mli
implemented copy/cut/paste/delete/pastePattern
[helm.git] / helm / matita / matitaGuiTypes.mli
index efb704579feb36b4db3acf34a0c256ef3c9eb95a..c68bbc28eccef565981384e7cd5c59d56eb8f9f6 100644 (file)
@@ -66,6 +66,20 @@ object
   method newConfirmationDialog: unit -> MatitaGeneratedGui.confirmationDialog
   method newEmptyDialog:        unit -> MatitaGeneratedGui.emptyDialog
 
+    (** {2 Selections / clipboards handling} *)
+
+  method canCopy:         bool
+  method canCut:          bool
+  method canDelete:       bool
+  method canPaste:        bool
+  method canPastePattern: bool
+
+  method copy:         unit -> unit
+  method cut:          unit -> unit
+  method delete:       unit -> unit
+  method paste:        unit -> unit
+  method pastePattern: unit -> unit
+
     (** {2 Utility methods} *)
 
     (** ask the used to choose a file with the file chooser
@@ -86,6 +100,8 @@ object
   method resetFontSize: unit -> unit
 end
 
+type paste_kind = [ `Term | `Pattern ]
+
   (** multi selection gtkMathView which handle mactions and hyperlinks. Mactions
   * are handled internally. Hyperlinks are handled by calling an user provided
   * callback *)
@@ -96,8 +112,10 @@ object
     (** set hyperlink callback. None disable hyperlink handling *)
   method set_href_callback: (string -> unit) option -> unit
   
-  method string_of_selections: string list
-  method string_of_selection: string option (* last selected node *)
+  method has_selection: bool
+
+    (** @raise Failure "no selection" *)
+  method strings_of_selection: (paste_kind * string) list
 
   method update_font_size: unit
 end