-
Notifications
You must be signed in to change notification settings - Fork 0
/
MEEdrift_main_menu.m
204 lines (181 loc) · 6.58 KB
/
MEEdrift_main_menu.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
function varargout = MEEdrift_main_menu (varargin)
% MEEdrift_main_menu MATLAB code for MEEdrift_main_menu.fig
% MEEdrift_main_menu, by itself, creates a new MEEDRIFT_MAIN_MENU or raises
% the existing singleton*.
%
% H = MEEdrift_main_menu returns the handle to a new MEEdrift_main_menu or
% the handle to the existing singleton*.
%
% MEEdrift_main_menu ('CALLBACK', hObject, eventData, handles, ...) calls the local
% function named CALLBACK in MEEdrift_main_menu.m, with the given input arguments.
%
% MEEdrift_main_menu ('Property', 'Value', ...) creates a new MEEdrift_main_menu or
% raises the existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before MEEdrift_main_menu_OpeningFcn gets called.
% An unrecognized property name or invalid value makes property application
% stop. All inputs are passed to MEEdrift_main_menu_OpeningFcn via varargin.
%
% ~~~~~~~~~~~~~~~~~~~
% When MEEdrift_main_menu is created,
% UIWAIT makes MEEdrift_main_menu wait for user response (see UIRESUME).
% uiwait (handles.fig_MEEdrift_MainMenu);
% MEEdrift_main_menu is in a while loop that contains logic similar to
%
% while SomeTestIsTrue
% MEEdrift_main_menu;
% switch strMainMenu
% case '< Beam <'
% ...
% end
% end
%
% A typical callback takes appropriate actions, and triggers uiresume.
% function uic_pbBeamPrev_Callback (hObject, eventdata, handles)
% global strMainMenu;
% strMainMenu = '< Beam <';
% uiresume (gcbf);
% end
%
% The logic that triggered MEEdrift_main_menu then takes appropriate action.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% In object functions below:
% hObject handle to uic_eOCS_BPP_axisMax (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles created //after all// CreateFcns called
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help MEEdrift_main_menu
% Last Modified by GUIDE v2.5 18-Sep-2015 13:07:00
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct ('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @MEEdrift_main_menu_OpeningFcn, ...
'gui_OutputFcn', @MEEdrift_main_menu_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
nArgsIn = nargin;
nVarArgin = length (varargin);
nArgsOut = nargout;
if nArgsIn && ischar (varargin{1})
gui_State.gui_Callback = str2func (varargin{1});
end
if nArgsOut
[varargout{1:nArgsOut}] = gui_mainfcn (gui_State, varargin{:});
else
gui_mainfcn (gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
end
% --- Executes just before MEEdrift_main_menu is made visible.
function MEEdrift_main_menu_OpeningFcn (hObject, eventdata, handles, varargin)
% This function has no output args; see OutputFcn.
% hObject handle to figure
% varargin command line arguments to MEEdrift_main_menu (see VARARGIN)
% Choose default command line output for MEEdrift_main_menu
handles.output = hObject;
% Update handles structure
guidata (hObject, handles);
% !!! When editing externally, be SURE that the file is not open in MATLAB. !!!
% If it is, MATLAB GUIDE will preferentially use THAT copy, and changes here will be lost. !!!
global strMainMenu;
global dotVersion;
global fControlPanel;
% set (handles.uic_txtTitle, 'String', [ 'MEEdrift ' dotVersion ]);
% UIWAIT makes MEEdrift_main_menu wait for user response (see UIRESUME)
uiwait (handles.fig_MEEdrift_MainMenu);
end
% ~~~~~~~~~~~~~~~~~~~
% --- Outputs from this function are returned to the command line.
function varargout = MEEdrift_main_menu_OutputFcn (hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% Get default command line output from handles structure
varargout{1} = []; % handles.output;
end
% ~~~~~~~~~~~~~~~~~~~
function uic_pbApplyEDP_offsets_Callback (hObject, eventdata, handles)
% hObject handle to uic_pbApplyEDP_offsets (see GCBO)
global strMainMenu;
strMainMenu = 'Apply EDP Offsets';
uiresume (gcbf);
end
% ~~~~~~~~~~~~~~~~~~~
function uic_pbBeamNext_Callback (hObject, eventdata, handles)
% hObject handle to uic_pbBeamNext (see GCBO)
global strMainMenu;
strMainMenu = '> Beam >';
uiresume (gcbf);
end
% ~~~~~~~~~~~~~~~~~~~
function uic_pbBeamPrev_Callback (hObject, eventdata, handles)
% hObject handle to uic_pbBeamPrev (see GCBO)
global strMainMenu;
strMainMenu = '< Beam <';
uiresume (gcbf);
end
% ~~~~~~~~~~~~~~~~~~~
function uic_pbControlPanel_Callback (hObject, eventdata, handles)
% hObject handle to uic_pbControlPanel (see GCBO)
global ControlPanelActive;
ControlPanelActive = true; % control panel can be open even if the main menu closes
MEEdrift_control_panel % (hEDP_mainAxes, hEDP_zoomedAxes)
end
% ~~~~~~~~~~~~~~~~~~~
function uic_pbExit_Callback (hObject, eventdata, handles)
% hObject handle to uic_pbExit (see GCBO)
global ControlPanelActive fControlPanel strMainMenu;
strMainMenu = 'Exit';
if ControlPanelActive
close (fControlPanel);
end
uiresume (gcbf);
close (gcf);
end
% ~~~~~~~~~~~~~~~~~~~
function uic_pbPlotFFT_Callback (hObject, eventdata, handles)
% hObject handle to uic_pbPlotFFT (see GCBO)
global strMainMenu;
strMainMenu = 'Plot EDP FFT x,y';
uiresume (gcbf);
end
% ~~~~~~~~~~~~~~~~~~~
function uic_pbSavePlots_Callback (hObject, eventdata, handles)
% hObject handle to uic_pbSavePlots (see GCBO)
global strMainMenu;
strMainMenu = 'Save Plots';
uiresume (gcbf);
end
% ~~~~~~~~~~~~~~~~~~~
function uic_pbSaveSnapshot_Callback (hObject, eventdata, handles)
% hObject handle to uic_pbSaveSnapshot (see GCBO)
global strMainMenu;
strMainMenu = 'Save Snapshot';
uiresume (gcbf);
end
% ~~~~~~~~~~~~~~~~~~~
function uic_pbSkipViaEDP_Callback (hObject, eventdata, handles)
% hObject handle to uic_pbSkipViaEDP (see GCBO)
global strMainMenu;
strMainMenu = 'Skip via EDP';
uiresume (gcbf);
end
% ~~~~~~~~~~~~~~~~~~~
% --- Executes on button press in uic_pbSmoothEDP.
function uic_pbSmoothEDP_Callback (hObject, eventdata, handles)
% hObject handle to uic_pbSmoothEDP (see GCBO)
global strMainMenu;
strMainMenu = 'Smooth EDP';
uiresume (gcbf);
end
% ~~~~~~~~~~~~~~~~~~~
% --- Executes on button press in uic_pbReplot.
function uic_pbReplot_Callback (hObject, eventdata, handles)
% hObject handle to uic_pbReplot (see GCBO)
global strMainMenu;
strMainMenu = 'Replot';
uiresume (gcbf);
end