~ubuntu-branches/ubuntu/hardy/texmacs/hardy

« back to all changes in this revision

Viewing changes to TeXmacs/progs/menus/menu-main.scm

  • Committer: Bazaar Package Importer
  • Author(s): Ralf Treinen
  • Date: 2004-04-19 20:34:00 UTC
  • Revision ID: james.westby@ubuntu.com-20040419203400-g4e34ih0315wcn8v
Tags: upstream-1.0.3-R2
ImportĀ upstreamĀ versionĀ 1.0.3-R2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
3
;;
 
4
;; MODULE      : menu-main.scm
 
5
;; DESCRIPTION : the default main menu of TeXmacs
 
6
;; COPYRIGHT   : (C) 1999  Joris van der Hoeven
 
7
;;
 
8
;; This software falls under the GNU general public license and comes WITHOUT
 
9
;; ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for details.
 
10
;; If you don't have this file, write to the Free Software Foundation, Inc.,
 
11
;; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
12
;;
 
13
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
14
 
 
15
(texmacs-module (menus menu-main))
 
16
 
 
17
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
18
;; Main dynamic, extensible or user defined submenus
 
19
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
20
 
 
21
(menu-bind texmacs-extra-menu)
 
22
(menu-bind texmacs-extra-icons)
 
23
(menu-bind style-menu)
 
24
(menu-bind use-package-menu)
 
25
(menu-bind bookmarks-menu)
 
26
(menu-bind test-menu)
 
27
 
 
28
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
29
;; The TeXmacs main menu
 
30
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
31
 
 
32
(menu-bind texmacs-menu
 
33
  (=> "File" (link file-menu))
 
34
  (=> "Edit" (link edit-menu))
 
35
  (if (not (in-graphics?)) (=> "Insert" (link insert-menu)))
 
36
  (if (in-text?) (=> "Text" (link text-menu)))
 
37
  (if (in-math?) (=> "Mathematics" (link mathematics-menu)))
 
38
  (if (in-io?) (=> "Session" (link session-main-menu)))
 
39
  (if (in-graphics?) (=> "Graphics" (link graphics-menu)))
 
40
  (if (in-table?) (=> "Table" (link table-menu)))
 
41
  (link texmacs-extra-menu)
 
42
  (if (not (in-graphics?)) (=> "Format" (link format-menu)))
 
43
  (=> "Document" (link document-menu))
 
44
  (if (project-attached?) (=> "Project" (link project-menu)))
 
45
  (=> "View" (link view-menu))
 
46
  (=> "Go" (link go-menu))
 
47
  (=> "Tools" (link tools-menu))
 
48
  (=> "Help" (link help-menu)))
 
49
 
 
50
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
51
;; The TeXmacs popup menu
 
52
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
53
 
 
54
(menu-bind texmacs-popup-menu
 
55
  (-> "File" (link file-menu))
 
56
  (-> "Edit" (link edit-menu))
 
57
  (if (not (in-graphics?)) (-> "Insert" (link insert-menu)))
 
58
  (if (in-text?) (-> "Text" (link text-menu)))
 
59
  (if (in-math?) (-> "Mathematics" (link mathematics-menu)))
 
60
  (if (in-graphics?) (-> "Graphics" (link graphics-menu)))
 
61
  (if (in-io?) (-> "Session" (link session-main-menu)))
 
62
  (if (in-table?) (-> "Table" (link table-menu)))
 
63
  (if (not (in-graphics?)) (-> "Format" (link format-menu)))
 
64
  (-> "Document" (link document-menu))
 
65
  (if (project-attached?) (=> "Project" (link project-menu)))
 
66
  (-> "View" (link view-menu))
 
67
  (-> "Go" (link go-menu))
 
68
  (-> "Tools" (link tools-menu))
 
69
  ---
 
70
  (-> "Help" (link help-menu)))
 
71
 
 
72
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
73
;; The main icon bar
 
74
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
75
 
 
76
(menu-bind texmacs-main-icons
 
77
  (=> (balloon (icon "tm_new.xpm") "Open a new buffer") (link new-file-menu))
 
78
  (=> (balloon (icon "tm_open.xpm") "Load a file") (link load-menu))
 
79
  (=> (balloon (icon "tm_save.xpm") "Save this buffer") (link save-menu))
 
80
  (=> (balloon (icon "tm_print.xpm") "Print") (link print-menu))
 
81
  (=> (balloon (icon "tm_style.xpm") "Select a document style")
 
82
      (link document-style-menu))
 
83
  (=> (balloon (icon "tm_language.xpm") "Select a language")
 
84
      (link global-language-menu))
 
85
  (=> (balloon (icon "tm_cancel.xpm") "Close") (link close-menu))
 
86
  |
 
87
  ((balloon (icon "tm_cut.xpm") "Cut text#(C-w)")
 
88
   (clipboard-cut "primary"))
 
89
  ((balloon (icon "tm_copy.xpm") "Copy text#(M-w)")
 
90
   (clipboard-copy "primary"))
 
91
  ((balloon (icon "tm_paste.xpm") "Paste text#(C-y)")
 
92
   (clipboard-paste "primary"))
 
93
  (if (not (in-search-mode?))
 
94
      ((balloon (icon "tm_find.xpm") "Find text#(C-s)") (search-start #t)))
 
95
  (if (in-search-mode?)
 
96
      ((balloon (icon "tm_find_next.xpm") "Find next match#(C-s)")
 
97
       (search-button-next)))
 
98
  ((balloon (icon "tm_replace.xpm") "Query replace#(C-=)")
 
99
   (interactive '("Replace:" "Replace by:") 'replace-start-forward))
 
100
  ((balloon (icon "tm_spell.xpm") "Check text for spelling errors#(M-$)")
 
101
   (spell-start))
 
102
  (if (not (help-buffer?))
 
103
      ((balloon (icon "tm_undo.xpm") "Undo last changes#(M-[)") (undo))
 
104
      ((balloon (icon "tm_redo.xpm") "Redo undone changes#(M-])") (redo)))
 
105
  (if (help-buffer?)
 
106
      ((balloon (icon "tm_back.xpm") "Browse back") (browse-help -1))
 
107
      ((balloon (icon "tm_forward.xpm") "Browse forward") (browse-help 1)))
 
108
  (if (not (in-graphics?))
 
109
      |
 
110
      (=> (balloon (icon "tm_table.xpm") "Insert a table")
 
111
          (link insert-table-menu))
 
112
      (=> (balloon (icon "tm_image.xpm") "Insert a picture")
 
113
          (link insert-image-menu))
 
114
      (=> (balloon (icon "tm_link.xpm") "Insert a link")
 
115
          (link insert-link-menu))
 
116
      (=> (balloon (icon "tm_switch.xpm") "Switching and folding")
 
117
          (link insert-switch-menu))))
 
118
 
 
119
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
120
;; The context dependent icon bar
 
121
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
122
 
 
123
(menu-bind texmacs-context-icons
 
124
  (if (in-text?) (link texmacs-text-icons))
 
125
  (if (in-io?) (link texmacs-session-icons))
 
126
  (if (in-math?) (link texmacs-math-icons))
 
127
  (if (in-graphics?) (link texmacs-graphics-icons))
 
128
  (if (not (in-graphics?)) |)
 
129
  (if (in-prog?) (link prog-modifier-icons))
 
130
  (if (in-text?) (link text-modifier-icons))
 
131
  (if (in-math?) (link math-modifier-icons))
 
132
  (if (not (in-graphics?))
 
133
      (=> (balloon (icon "tm_color.xpm") "Select a foreground color")
 
134
          (link color-menu)))
 
135
  (if (in-table?) (link texmacs-table-icons))
 
136
  (link texmacs-help-icons))