Nicer menu with debugging options
[texmacs.git] / src / TeXmacs / progs / texmacs / menus / tools-menu.scm
blobce56510ba1e767ce25fe63bd8bdf433d12e8d555
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;
4 ;; MODULE      : tools-menu.scm
5 ;; DESCRIPTION : the tools menu
6 ;; COPYRIGHT   : (C) 1999  Joris van der Hoeven
7 ;;
8 ;; This software falls under the GNU general public license version 3 or later.
9 ;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
10 ;; in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14 (texmacs-module (texmacs menus tools-menu))
16 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
17 ;; Dynamic menus for formats
18 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
20 (define (clipboard-preference-item fm name routine)
21   `(,name (,routine ,fm)))
23 (define-macro (clipboard-preference-menu-promise routine)
24   (define (item fm name) (clipboard-preference-item fm name routine))
25   (with fun (if (== routine 'clipboard-set-export)
26                 converter-from-menu converter-to-menu)
27     `(menu-dynamic ,@(fun "texmacs-snippet" "-snippet" #t item))))
29 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
30 ;; The Tools menu
31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
33 (menu-bind tools-menu
34   (-> "Execute"
35       ("Execute system command" (interactive system))
36       ("Evaluate scheme expression" (interactive footer-eval)))
37   (-> "Selections"
38       (-> "Import"
39           (promise (clipboard-preference-menu-promise clipboard-set-import)))
40       (-> "Export"
41           (promise (clipboard-preference-menu-promise clipboard-set-export))))
42   (-> "Update"
43       ("Image links" (image-gc))
44       ("Inclusions" (inclusions-gc))
45       ("Styles" (style-clear-cache)))
46   (-> "Web"
47       ("Create web site" (tmweb-interactive-build)))
48   (-> "Project"
49       (link project-manage-menu))
50   (-> "Miscellaneous"
51       ("Clear undo history" (clear-undo-history)))
52   ---
53   ("Debugging tool" (toggle-preference "debugging tool"))
54   ("Linking tool" (toggle-preference "linking tool"))
55   ("Versioning tool" (toggle-preference "versioning tool")))