Add symbol checks to translators for MCALL, MARRAYREF, and MARRAYSET
[maxima.git] / interfaces / xmaxima / Tkmaxima / CMMenu.tcl
blob48d37d43626e57457aa6862170aac8d14e5fde2d
1 ############################################################
2 # Menu.tcl #
3 # Copyright (C) 1998 William F. Schelter #
4 # For distribution under GNU public License. See COPYING. #
5 # #
6 # Time-stamp: "2024-03-25 19:20:02 villate" #
7 ############################################################
9 proc CMmenu { win } {
10 global buttonfont maxima_priv
11 set menubar $win.textcommands
12 set win $menubar
13 if { [winfo exists $menubar] } {
14 return $menubar
16 wmenubar $menubar
17 pack $menubar -side top -expand 0 -fill x -anchor nw
18 foreach v { file edit help } {
19 label $win.$v -text [string totit $v] -relief raised
20 $menubar add $win.$v
24 ####### begin help button
26 setHelp $win.help {Bring down a menu with some help options}
27 set m [oget $win.help menu]
28 #oset $win showHelpBar "show help bar"
29 set file $maxima_priv(pReferenceToc)
30 $m add command -underline 0 -label {Maxima Help} \
31 -command "OpenMathOpenUrl \"file:/$file\""
33 global tcl_platform
35 if {$tcl_platform(platform) == "windows"} {
36 set browse start
37 } else {
38 # FIXME: get a browser object
39 set browse netscape
41 $m add sep
42 $m add command -underline 0 -label {Maxima Homepage} \
43 -command [list $browse http://maxima.sourceforge.net]
44 $m add command -underline 0 -label {Project Page} \
45 -command [list $browse https://sourceforge.net/projects/maxima/]
46 $m add command -underline 0 -label {Bug Reports} \
47 -command [list $browse https://sourceforge.net/p/maxima/bugs/]
49 $m add sep
50 set dir $maxima_priv(pTestsDir)
51 $m add command -underline 0 -label {Run Tests} \
52 -command "sendMaxima \[oget $win textwin\] {:lisp (progn (xchdir \"$dir\")(load \"tests.lisp\"))\n}"
55 ####### begin file button
57 setHelp $win.file {Bring down a menu with some file options}
58 set m [oget $win.file menu]
59 #oset $win showFileBar "show file bar"
60 $m add command -underline 0 -label {Toggle Browser Visibility} \
61 -help {Toggle display of Browser} -command {if { [catch { pack info .browser }] } { pack .browser -side bottom } else { pack forget .browser }}
62 $m add command -underline 0 -label {Exit} \
63 -command "maxExit $maxima_priv(cConsoleText)" \
64 -help "End this session of Maxima"
65 $m add command -underline 0 -label {Interrupt C-c C-c} -command "CMinterrupt \[oget $win textwin\]" \
66 -help "Interrupt the Maxima process and reset the filter"
67 $m add command -underline 0 -label {Restart} -command "runOneMaxima \[oget $win textwin\]" \
68 -help "Kill the Maxima process and reset the filter, and start a new one"
69 $m add command -underline 0 -label {Preferences} -command "fontDialog .preferences" \
70 -help "Set Preferences for Xmaxima and Netmath saved in ~/netmath.ini"
71 if { "[info command console]" == "console" } {
72 $m add sep
73 $m add command -underline 0 -label "Show Tcl Console" \
74 -command "console show" \
75 -help \
76 {This console is used mainly in debugging xmaxima}
81 ####### begin edit button
83 setHelp $win.edit {Bring down a menu with some edit options}
84 set m [oget $win.edit menu]
85 #oset $win showEditBar "show edit bar"
86 $m add command -underline 0 -label {Previous Input} -command "CNpreviousInput \[oget $win textwin\] -1"
87 $m add command -underline 0 -label {Clear input} -command "CNclearinput \[oget $win textwin\]"
88 $m add command -underline 0 -label {Copy} -command "tk_textCopy \[oget $win textwin\]"
89 $m add command -underline 1 -label {Cut} -command "tk_textCut \[oget $win textwin\]"
90 $m add command -underline 0 -label {Paste} -command "tk_textPaste \[oget $win textwin\]" \
91 pack $menubar -side top
92 return $win