2 <!-- [SCILAB_FIGURE_ID] pattern is replaced at generation of Java menu by the ID of the figure -->
3 <!-- The accelerator can be "control shift A" or "control A" or "meta A" or "OSSCKEY A" where oskey means "OS ShortCut key"
4 and is replaced by the good key (control for Unix/Windows OS and meta for Mac) -->
7 <menu label="&File">
8 <submenu label="&New figure..." accelerator="OSSCKEY N">
9 <callback instruction="scf();" type="0"/>
12 <submenu label="&Load..." icon="document-open">
15 %fileToLoad = uigetfile("*.scg", pwd(), gettext("Select a file to load"));
16 if ~isempty(%fileToLoad) then
17 xload(%fileToLoad,[SCILAB_FIGURE_ID]);
18 disp(msprintf(gettext("Figure loaded.\n")));
23 <submenu label="&Save..." accelerator="OSSCKEY S" icon="document-save">
26 %fileToSave = uiputfile("*.scg", pwd(), gettext("Select a file to write"));
27 if ~isempty(%fileToSave) then
28 if isempty(fileparts(%fileToSave, "extension")) then
29 %fileToSave = %fileToSave + ".scg";
31 xsave(%fileToSave, get_figure_handle([SCILAB_FIGURE_ID]));
32 disp(msprintf(gettext("Figure saved.\n")));
34 clear %fileToSave isempty'
38 <submenu label="&Export to..." accelerator="OSSCKEY E">
39 <callback instruction='exportUI([SCILAB_FIGURE_ID])' type="0"/>
40 <submenu label="P&NG">
41 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.exportCustomFileChooser' type="3"/>
44 %fileToWrite = uiputfile("*.png", pwd(), gettext("Select a file name"));
45 if ~isempty(%fileToWrite) then
46 xs2png([SCILAB_FIGURE_ID], %fileToWrite);
48 clear %fileToWrite isempty'
51 <submenu label="&JPG">
52 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.exportCustomFileChooser' type="3"/>
55 %fileToWrite = uiputfile("*.jpg", pwd(), gettext("Select a file name"));
56 if ~isempty(%fileToWrite) then
57 xs2jpg([SCILAB_FIGURE_ID], %fileToWrite);
59 clear %fileToWrite isempty'
62 <submenu label="&GIF">
63 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.exportCustomFileChooser' type="3"/>
66 %fileToWrite = uiputfile("*.gif", pwd(), gettext("Select a file name"));
67 if ~isempty(%fileToWrite) then
68 xs2gif([SCILAB_FIGURE_ID], %fileToWrite);
70 clear %fileToWrite isempty'
73 <submenu label="&PPM">
74 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.exportCustomFileChooser' type="3"/>
77 %fileToWrite = uiputfile("*.ppm", pwd(), gettext("Select a file name"));
78 if ~isempty(%fileToWrite) then
79 xs2ppm([SCILAB_FIGURE_ID], %fileToWrite);
81 clear %fileToWrite isempty'
84 <submenu label="&BMP">
85 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.exportCustomFileChooser' type="3"/>
88 %fileToWrite = uiputfile("*.bmp", pwd(), gettext("Select a file name"));
89 if ~isempty(%fileToWrite) then
90 xs2bmp([SCILAB_FIGURE_ID], %fileToWrite);
92 clear %fileToWrite isempty'
96 <submenu label="&Vectorial export to...">
97 <submenu label="&PDF">
98 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.exportCustomFileChooser' type="3"/>
101 %fileToWrite = uiputfile("*.pdf", pwd(), gettext("Select a file name"));
102 if ~isempty(%fileToWrite) then
103 xs2pdf([SCILAB_FIGURE_ID], %fileToWrite);
105 clear %fileToWrite isempty'
108 <submenu label="&PS">
109 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.exportCustomFileChooser' type="3"/>
112 %fileToWrite = uiputfile("*.ps", pwd(), gettext("Select a file name"));
113 if ~isempty(%fileToWrite) then
114 xs2ps([SCILAB_FIGURE_ID], %fileToWrite);
116 clear %fileToWrite isempty'
119 <submenu label="&SVG">
120 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.exportCustomFileChooser' type="3"/>
123 %fileToWrite = uiputfile("*.svg", pwd(), gettext("Select a file name"));
124 if ~isempty(%fileToWrite) then
125 xs2svg([SCILAB_FIGURE_ID], %fileToWrite);
127 clear %fileToWrite isempty'
130 <submenu label="&EMF">
131 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.exportCustomFileChooser' type="3"/>
134 %fileToWrite = uiputfile("*.emf", pwd(), gettext("Select a file name"));
135 if ~isempty(%fileToWrite) then
136 xs2emf([SCILAB_FIGURE_ID], %fileToWrite);
138 clear %fileToWrite isempty'
141 <submenu label="&EPS">
142 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.exportCustomFileChooser' type="3"/>
145 %fileToWrite = uiputfile("*.eps", pwd(), gettext("Select a file name"));
146 if ~isempty(%fileToWrite) then
147 xs2eps([SCILAB_FIGURE_ID], %fileToWrite);
149 clear %fileToWrite isempty'
153 <submenu label="&Copy to clipboard" accelerator="OSSCKEY C" icon="edit-copy">
154 <callback instruction='clipboard([SCILAB_FIGURE_ID], "EMF");' type="0"/>
157 <submenu label="P&age setup...">
158 <callback instruction='org.scilab.modules.gui.bridge.CallScilabBridge.pageSetup' type="3"/>
160 <submenu label="&Print..." accelerator="OSSCKEY P" icon="document-print">
161 <callback instruction='printfigure([SCILAB_FIGURE_ID]);' type="0"/>
164 <submenu label="C&lose" accelerator="OSSCKEY W">
165 <callback instruction='
166 if (get(get_figure_handle([SCILAB_FIGURE_ID]), "event_handler_enable") == "on" );
167 execstr(get(get_figure_handle([SCILAB_FIGURE_ID]), "event_handler")+"([SCILAB_FIGURE_ID], -1, -1, -1000)", "errcatch", "m");
169 delete(get_figure_handle([SCILAB_FIGURE_ID]));'
174 <menu label="&Tools">
175 <submenu label="Show/Hide &Toolbar">
178 if toolbar([SCILAB_FIGURE_ID])=="on" then
179 toolbar([SCILAB_FIGURE_ID], "off");
181 toolbar([SCILAB_FIGURE_ID], "on");
186 <submenu label="&Zoom" icon="zoom-fit-selection">
187 <callback instruction='zoom_rect(get_figure_handle([SCILAB_FIGURE_ID]))' type="0"/>
189 <submenu label="&Original View" icon="zoom-original">
190 <callback instruction='unzoom(get_figure_handle([SCILAB_FIGURE_ID]))' type="0"/>
193 <submenu label="2D/3D &Rotation" icon="transform-rotate">
194 <callback instruction="set(get_figure_handle([SCILAB_FIGURE_ID]), 'info_message', 'Right click and drag to rotate.')" type="-2"/>
198 <menu label="&Edit">
199 <submenu label="&Select as current figure">
200 <callback instruction='scf([SCILAB_FIGURE_ID]);' type="0"/>
202 <submenu label="&Clear figure">
203 <callback instruction='clf(get_figure_handle([SCILAB_FIGURE_ID]));' type="0"/>
206 <submenu label="&Figure properties">
207 <callback instruction='ged(8,[SCILAB_FIGURE_ID]);' type="0"/>
209 <submenu label="&Axes properties">
210 <callback instruction='ged(9,[SCILAB_FIGURE_ID]);' type="0"/>
213 <submenu label="&Start entity picker">
214 <callback instruction='ged(10,[SCILAB_FIGURE_ID]);' type="0"/>
216 <submenu label="S&top entity picker">
217 <callback instruction='ged(11,[SCILAB_FIGURE_ID]);' type="0"/>
220 <submenu label="&Start datatip manager" icon="datatips">
221 <callback instruction='datatipManagerMode([SCILAB_FIGURE_ID],"on");' type="0"/>
223 <submenu label="Stop datatip manager">
224 <callback instruction='datatipManagerMode([SCILAB_FIGURE_ID],"off");' type="0"/>
229 <menu label="&MVC">
230 <submenu label="&Log View (Trace all View notifications)">
231 <callback instruction='org.scilab.modules.graphic_objects.MVCDebugView.showLogView' type="3"/>
234 <submenu label="&All Objects View (All objects with properties)">
235 <callback instruction='org.scilab.modules.graphic_objects.MVCDebugView.showAllObjectsView' type="3"/>
238 <submenu label="&Ged-like View (Future ged)">
239 <callback instruction='org.scilab.modules.graphic_objects.MVCDebugView.showGedView' type="3"/>
245 <menu label="&?">
246 <submenu label="&Scilab Help" accelerator="F1" icon="help-browser">
247 <callback instruction='help();' type="0"/>
250 <submenu label="&About Scilab..." accelerator="shift F1">
251 <callback instruction='about()' type="0"/>