-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathfilemenu.m
70 lines (62 loc) · 3.04 KB
/
filemenu.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
function filemenu
%
% Name: filemenu.m
%
% Usage: filemenu
%
% Description:
% Initializes the DIAMOND file menu
%
% Version SWD970904
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This matlab source code was originally %
% developed as part of "DIAMOND" at %
% Los Alamos National Laboratory. It may %
% be copied, modified, and distributed in %
% any form, provided: %
% a) This notice accompanies the files and %
% appears near the top of all source %
% code files. %
% b) No payment or commercial services are %
% received in exchange for the code. %
% %
% Original copyright is reserved by the %
% Regents of the University of California, %
% in addition to Scott W. Doebling, Phillip %
% J. Cornwell, Erik G. Straser, and Charles %
% R. Farrar. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
global HANDLES
%=======================================
% File menu
%=======================================
HANDLES.hmmenu{1}(1) = uimenu(HANDLES.hfigdmnd,'Label','File','enable','on');
HANDLES.hmmenu{1}(2) = uimenu(HANDLES.hmmenu{1}(1),'Label','Print');
HANDLES.hmmenu{1}(3) = uimenu(HANDLES.hmmenu{1}(2),'Label','Windows');
uimenu(HANDLES.hmmenu{1}(3),'label','Color','callback','print -dwinc -noui')
uimenu(HANDLES.hmmenu{1}(3),'label','Monochrome','callback','print -dwin -noui')
uimenu(HANDLES.hmmenu{1}(2),'label','Unix','callback','print')
uimenu(HANDLES.hmmenu{1}(1),'label','Copy to Clipboard (Windows)','callback','print -noui -dmeta');
HANDLES.hmmenu{1}(4) = uimenu(HANDLES.hmmenu{1}(1),'label','Import');
HANDLES.hmmenu{1}(7) = uimenu(HANDLES.hmmenu{1}(4),'label','Universal File');
uimenu(HANDLES.hmmenu{1}(7),'label','Type 58 Data','callback',...
['[filename,pathname,error]=loadfile(4,pathname);', ...
'if error==0,',...
' disp(''Loading Type 58 Data...''),',...
' uffin_data(pathname,filename);',...
' disp(''Done Loading Type 58 Data''),',...
'end']);
uimenu(HANDLES.hmmenu{1}(4),'label','Create Bootstrap Data','callback','makeboot')
uimenu(HANDLES.hmmenu{1}(4),'label','Create Averaged Data','callback','makeavgd')
uimenu(HANDLES.hmmenu{1}(4),'label','Create Multi-Ref Data','callback','makemref')
HANDLES.hmmenu{1}(5) = uimenu(HANDLES.hmmenu{1}(1),'label','Export');
uimenu(HANDLES.hmmenu{1}(5),'label','Universal File','callback','uffout')
HANDLES.hmmenu{1}(6) = uimenu(HANDLES.hmmenu{1}(5),'label','ASCII File');
uimenu(HANDLES.hmmenu{1}(6),'label','Modes','callback','modes2ascii')
uimenu(HANDLES.hmmenu{1}(1),'Label','Exit Diamond','separator','on','Callback',...
'set(findobj(''type'',''figure''),''closerequestfcn'',''closereq''),close all');
uimenu(HANDLES.hmmenu{1}(1),'Label','Quit Matlab','Callback',...
'set(findobj(''type'',''figure''),''closerequestfcn'',''closereq''),quit');
return