~registry/texmacs/trunk

« back to all changes in this revision

Viewing changes to src/TeXmacs/progs/dynamic/format-prog-menu.scm

  • Committer: mgubi
  • Date: 2009-06-04 15:13:41 UTC
  • Revision ID: svn-v4:64cb5145-927a-446d-8aed-2fb7b4773692:trunk:2717
Support for X11 TeXmacs.app on Mac

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
 
;;
4
 
;; MODULE      : format-prog-menu.scm
5
 
;; DESCRIPTION : local text formatting properties in prog mode
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>.
11
 
;;
12
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
 
 
14
 
(texmacs-module (dynamic format-prog-menu)
15
 
  (:use (generic format-edit)))
16
 
 
17
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
18
 
;; The Font submenu in prog mode
19
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
20
 
 
21
 
(menu-bind prog-font-menu
22
 
  (-> "Name"
23
 
      ("roman" (make-with "prog-font" "roman"))
24
 
      (if (url-exists-in-tex? "ccr10.mf")
25
 
          ("concrete" (make-with "prog-font" "concrete")))
26
 
      (if (url-exists-in-tex? "pnr10.mf")
27
 
          ("pandora" (make-with "prog-font" "pandora"))))
28
 
  (-> "Variant"
29
 
      ("Roman" (make-with "prog-font-family" "rm"))
30
 
      ("Typewriter" (make-with "prog-font-family" "tt"))
31
 
      ("Sans serif" (make-with "prog-font-family" "ss")))
32
 
  (-> "Series"
33
 
      ("Medium" (make-with "prog-font-series" "medium"))
34
 
      ("Bold" (make-with "prog-font-series" "bold")))
35
 
  (-> "Shape"
36
 
      ("Default" (make-with "prog-font-shape" "normal"))
37
 
      ("Right" (make-with "prog-font-shape" "right"))
38
 
      ("Slanted" (make-with "prog-font-shape" "slanted"))
39
 
      ("Italic" (make-with "prog-font-shape" "italic")))
40
 
  (-> "Size" (link font-size-menu)))
41
 
 
42
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
43
 
;; The main Format menu
44
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
45
 
 
46
 
(menu-bind prog-format-menu
47
 
  (group "Font")
48
 
  (link prog-font-menu)
49
 
  (-> "Color" (link color-menu))
50
 
  (-> "Scripts" (link local-supported-scripts-menu)))
51
 
 
52
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
53
 
;; Icons for modifying text properties
54
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
55
 
 
56
 
(menu-bind prog-format-icons
57
 
  ((balloon (icon "tm_italic.xpm") "Write italic text#(A-C-i)")
58
 
   (make-with "prog-font-shape" "italic"))
59
 
  ((balloon (icon "tm_bold.xpm") "Write bold text#(A-C-b)")
60
 
   (make-with "prog-font-series" "bold"))
61
 
  ((balloon (icon "tm_sansserif.xpm") "Use a sans serif font#(A-C-s)")
62
 
   (make-with "prog-font-family" "ss"))
63
 
  (if (not (in-graphics?))
64
 
      (=> (balloon (icon "tm_color.xpm") "Select a foreground color")
65
 
          (link color-menu))))