f95777d7ee0bca745d2da60649db5f5bcb592f97
[scilab.git] / scilab / modules / gui / etc / main_menubar.xml
1 <?xml version="1.0"?>
2 <menubar>
3
4    <!-- All "main" menus are disabled when created and then enabled in scilab.start file after all macros are loaded -->
5    <!-- The accelerator can be "control shift A" or "control A" or "meta A" or "OSSCKEY A" where oskey means "OS ShortCut key"
6         and is replaced by the good key (control for Unix/Windows OS and meta for Mac) -->
7  
8    <!-- File menu -->
9    <menu label="&amp;File" enabled="false">
10         <submenu label="&amp;Execute..." accelerator="OSSCKEY E">
11             <callback
12             instruction='
13               %fileToExec = uigetfile("*.sc*", "", gettext("Select a file to execute"));
14               if ~(%fileToExec == "") then
15                 exec(%fileToExec);
16                 disp(msprintf(gettext("Execution done.\n")));
17               end
18               clear("%fileToExec");'
19             type="0"/>
20         </submenu>
21         <separator/>
22         <submenu label="&amp;Open a file..." accelerator="OSSCKEY O">
23             <callback
24             instruction='
25               %fileToOpen = uigetfile("*.sc*", "", gettext("Select a file to open with SciNotes"));
26               if ~(%fileToOpen == "") then
27                 editor(%fileToOpen);
28               end
29               clear("%fileToOpen");'
30             type="0"/>
31         </submenu>
32         <submenu label="&amp;Load environment..." accelerator="OSSCKEY L">
33             <callback
34             instruction='
35               %fileToLoad = uigetfile("*.sav", "", gettext("Select a file to load"));
36               if ~(%fileToLoad == "") then
37                 load(%fileToLoad);
38                 disp(msprintf(gettext("Environment loaded.\n")));
39               end
40               clear("%fileToLoad");'
41             type="0"/>
42         </submenu>
43         <submenu label="&amp;Save environment..." accelerator="OSSCKEY S">
44             <callback
45             instruction='
46               %fileToSave = uiputfile("*.sav", "", gettext("Select a file to write"));
47               if ~(%fileToSave == "") then
48                 if (fileparts(%fileToSave, "extension") == "") then
49                   %fileToSave = %fileToSave + ".sav";
50                 end
51                 save(%fileToSave);
52                 disp(msprintf(gettext("Environment saved.\n")));
53               end
54               clear("%fileToSave");'
55             type="0"/>
56         </submenu>
57         <separator/>
58         <submenu label="&amp;Change current directory...">
59             <callback
60             instruction='
61               %newDir = uigetdir(pwd(), gettext("Select a directory"));
62               if ~(%newDir == "") then
63                 cd(%newDir);
64               end
65               clear("%newDir");'
66             type="0"/>
67         </submenu>
68         <submenu label="&amp;Display current directory">
69             <callback instruction='if iswaitingforinput() then printf("\n%s\n\n%s\n",prompt(),pwd()); else printf("\n\n%s\n\n",pwd());end' type="0"/>
70         </submenu>
71         <separator/>
72         <submenu label="P&amp;age setup...">
73             <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.pageSetup' type="3"/>
74         </submenu>
75         <submenu label="&amp;Print..." accelerator="OSSCKEY P">
76             <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.printConsoleContents' type="3"/>
77         </submenu>
78         <separator/>
79         <submenu label="&amp;Quit" accelerator="OSSCKEY Q">
80             <callback instruction='exit();' type="0"/>
81         </submenu>
82     </menu>
83
84     <!-- Edit menu -->
85     <menu label="&amp;Edit" enabled="false">
86         <submenu label="C&amp;ut" accelerator="OSSCKEY X">
87             <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.cutConsoleSelection' type="3"/>
88         </submenu>
89         <submenu label="&amp;Copy" accelerator="OSSCKEY C">
90             <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.copyConsoleSelection' type="3"/>
91         </submenu>
92         <submenu label="&amp;Paste" accelerator="OSSCKEY V">
93             <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.pasteClipboardIntoConsole' type="3"/>
94         </submenu>
95         <separator/>
96         <submenu label="&amp;Empty clipboard">
97             <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.emptyClipboard' type="3"/>
98         </submenu>
99         <separator/>
100         <submenu label="&amp;Select all" accelerator="OSSCKEY A">
101             <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.selectAllConsoleContents' type="3"/>
102         </submenu>
103     </menu>
104
105     <!-- Preferences menu -->
106     <menu label="&amp;Preferences" enabled="false">
107         <submenu label="&amp;Colors">
108             <submenu label="Console &amp;Background...">
109                 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.changeConsoleBackground' type="3"/>
110             </submenu>
111             <submenu label="Console &amp;Font...">
112                 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.changeConsoleForeground' type="3"/>
113             </submenu>
114         </submenu>
115         <submenu label="&amp;Font...">
116             <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.changeConsoleFont' type="3"/>
117         </submenu>
118         <submenu label="Show/Hide &amp;Toolbar">
119               <callback
120               instruction='
121                 if toolbar(-1)=="on" then
122                   toolbar(-1, "off");
123                 else
124                   toolbar(-1, "on");
125                 end'
126               type="0"/>
127         </submenu>
128         <separator/>
129         <submenu label="Clear &amp;History">
130            <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.clearHistory' type="3"/>
131         </submenu>
132         <submenu label="Clear C&amp;onsole">
133           <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.clear' type="3"/>
134         </submenu>
135     </menu>
136
137     <!-- Control menu -->
138     <menu label="&amp;Control" enabled="false">
139         <submenu label="&amp;Resume">
140             <callback instruction='resume;' type="-2"/>
141         </submenu>
142         <submenu label="&amp;Abort">
143             <callback instruction='abort;' type="-2"/>
144         </submenu>
145         <submenu label="&amp;Interrupt">
146             <callback instruction='pause;' type="-2"/>
147         </submenu>
148     </menu>
149
150     <!-- Applications menu -->
151     <menu label="&amp;Applications" enabled="false">
152         <submenu label="&amp;SciNotes">
153             <callback instruction='editor();' type="0"/>
154         </submenu>
155         <separator/>
156         <submenu label="&amp;Xcos">
157             <callback instruction='if with_module("xcos") then xcos(); else disp(gettext("Please install xcos module.")); end' type="0"/>
158         </submenu>
159         <separator/>
160         <submenu label="&amp;Matlab to Scilab translator">
161             <callback instruction='if with_module("m2sci") then mfile2sci(); else disp(gettext("Please install m2sci module.")); end' type="0"/>
162         </submenu>
163         <separator/>
164         <submenu label="M&amp;odule manager - ATOMS">
165             <callback instruction='if with_module("atoms") then atomsGui(); else disp(gettext("Please install atoms module.")); end' type="0"/>
166         </submenu>
167         <separator/>
168         <submenu label="&amp;Variable Browser">
169             <callback instruction='browsevar()' type="0"/>
170         </submenu>
171         <separator/>
172         <submenu label="&amp;Command History">
173             <callback instruction='org.scilab.modules.history_browser.CommandHistory.setVisible' type="3"/>
174         </submenu>
175     </menu>
176
177     <!-- Help menu -->
178     <menu label="&amp;?" enabled="false">
179         <submenu label="Scilab &amp;Help" accelerator="F1">
180             <callback instruction='help();' type="0"/>
181         </submenu>
182         <separator/>
183         <submenu label="Scilab &amp;Demonstrations">
184              <callback instruction='demo_gui();' type="0"/>
185         </submenu>
186         <separator/>
187         <submenu label="&amp;Links">
188             <submenu label="Scilab &amp;Web Site">
189                 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.openScilabWebSite' type="3"/>
190             </submenu>
191             <separator/>
192             <submenu label="Scilab &amp;Online Help">
193                 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.openOnlineHelp' type="3"/>
194             </submenu>
195             <submenu label="Scilab &amp;Wiki">
196                 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.openWiki' type="3"/>
197             </submenu>
198             <separator/>
199             <submenu label="Scilab &amp;ATOMS Web Site">
200                 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.openAtomsScilab' type="3"/>
201             </submenu>
202             <submenu label="&amp;File Exchange">
203                 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.openFileExchange' type="3"/>
204             </submenu>
205             <submenu label="&amp;Mailing lists">
206                 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.openMailingList' type="3"/>
207             </submenu>
208             <separator/>
209             <submenu label="&amp;Forge">
210                 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.openForge' type="3"/>
211             </submenu>
212             <submenu label="&amp;Bugs And Requests">
213                 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.openBugzilla' type="3"/>
214             </submenu>
215         </submenu>
216         <separator/>
217         <submenu label="&amp;About Scilab..." accelerator="shift F1">
218               <callback instruction='about()' type="0"/>
219         </submenu>
220     </menu>
221 </menubar>