1 %>@ingroup guigroup usercomm
6 function varargout = buggui(varargin)
7 % Last Modified by GUIDE v2.5 13-Jan-2012 17:06:33
9 % Begin initialization code - DO NOT EDIT
11 gui_State =
struct(
'gui_Name', mfilename, ...
12 'gui_Singleton', gui_Singleton, ...
13 'gui_OpeningFcn', @buggui_OpeningFcn, ...
14 'gui_OutputFcn', @buggui_OutputFcn, ...
15 'gui_LayoutFcn', [] , ...
17 if nargin && ischar(varargin{1})
18 gui_State.gui_Callback = str2func(varargin{1});
22 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
24 gui_mainfcn(gui_State, varargin{:});
26 % End initialization code - DO NOT EDIT
28 % --- Executes just before buggui is made visible.
29 function buggui_OpeningFcn(hObject, eventdata, handles, varargin)
30 % This
function has no output args, see OutputFcn.
31 % hObject handle to figure
32 % eventdata reserved - to be defined in a future version of MATLAB
33 % handles structure with handles and user data (see GUIDATA)
34 % varargin command line arguments to buggui (see VARARGIN)
36 % Update handles structure
37 guidata(hObject, handles);
39 % Determine the position of the dialog - centered on the callback figure
40 %
if available,
else, centered on the screen
41 FigPos=
get(0,
'DefaultFigurePosition');
42 OldUnits =
get(hObject,
'Units');
43 set(hObject,
'Units',
'pixels');
44 OldPos =
get(hObject,
'Position');
46 FigHeight = OldPos(4);
48 % ScreenUnits=
get(0,
'Units');
49 % set(0,
'Units',
'pixels');
50 % ScreenSize=
get(0,
'ScreenSize');
51 % set(0,
'Units',ScreenUnits);
53 % FigPos(1)=1/2*(ScreenSize(3)-FigWidth);
54 % FigPos(2)=2/3*(ScreenSize(4)-FigHeight);
56 GCBFOldUnits =
get(gcbf,
'Units');
57 set(gcbf,
'Units',
'pixels');
58 GCBFPos =
get(gcbf,
'Position');
59 set(gcbf,
'Units',GCBFOldUnits);
60 FigPos(1:2) = [(GCBFPos(1) + GCBFPos(3) / 2) - FigWidth / 2, ...
61 (GCBFPos(2) + GCBFPos(4) / 2) - FigHeight / 2];
63 FigPos(3:4)=[FigWidth FigHeight];
64 set(hObject,
'Position', FigPos);
65 set(hObject,
'Units', OldUnits);
67 % Show a question icon from dialogicons.mat - variables questIconData
70 IM = imread(
'bug.png');
72 % load dialogicons.mat
74 % IconData=questIconData;
75 % questIconMap(256,:) =
get(handles.figure1,
'Color');
76 % IconCMap=questIconMap;
78 % Img=image(IconData,
'Parent', handles.axes1);
79 % set(handles.figure1,
'Colormap', IconCMap);
81 Img = image(IM,
'Parent', handles.axes1);
83 set(handles.axes1, ...
85 'YDir' ,
'reverse' , ...
86 'XLim' ,
get(Img,
'XData'), ...
87 'YLim' ,
get(Img,
'YData') ...
91 set(handles.figure1,
'WindowStyle',
'modal')
96 set(handles.text_message,
'String', ME.message);
97 set(handles.edit_stack,
'String', ME.getReport());
102 % UIWAIT makes buggui wait
for user response (see UIRESUME)
103 uiwait(handles.figure1);
107 % --- Outputs from
this function are returned to the command line.
108 function varargout = buggui_OutputFcn(hObject, eventdata, handles)
109 % varargout cell array
for returning output args (see VARARGOUT);
110 % hObject handle to figure
111 % eventdata reserved - to be defined in a future version of MATLAB
112 % handles structure with handles and user data (see GUIDATA)
114 % The figure can be deleted now
115 delete(handles.figure1);
117 % --- Executes on button press in pushbutton1.
119 % hObject handle to pushbutton1 (see GCBO)
120 % eventdata reserved - to be defined in a future version of MATLAB
121 % handles structure with handles and user data (see GUIDATA)
123 handles.output =
get(hObject,
'String');
125 % Update handles structure
126 guidata(hObject, handles);
128 % Use UIRESUME instead of
delete because the OutputFcn needs
129 % to
get the updated handles structure.
130 uiresume(handles.figure1);
132 % --- Executes on button press in pushbutton2.
134 % hObject handle to pushbutton2 (see GCBO)
135 % eventdata reserved - to be defined in a future version of MATLAB
136 % handles structure with handles and user data (see GUIDATA)
138 handles.output =
get(hObject,
'String');
140 % Update handles structure
141 guidata(hObject, handles);
143 % Use UIRESUME instead of
delete because the OutputFcn needs
144 % to
get the updated handles structure.
145 uiresume(handles.figure1);
148 % --- Executes when user attempts to close figure1.
150 % hObject handle to figure1 (see GCBO)
151 % eventdata reserved - to be defined in a future version of MATLAB
152 % handles structure with handles and user data (see GUIDATA)
154 if isequal(
get(handles.figure1,
'waitstatus'),
'waiting')
155 % The GUI is still in UIWAIT, us UIRESUME
156 uiresume(handles.figure1);
158 % The GUI is no longer waiting, just close it
159 delete(handles.figure1);
163 % --- Executes on key press over figure1 with no controls selected.
165 % hObject handle to figure1 (see GCBO)
166 % eventdata reserved - to be defined in a future version of MATLAB
167 % handles structure with handles and user data (see GUIDATA)
169 % Check
for "enter" or
"escape"
170 if isequal(
get(hObject,
'CurrentKey'),
'escape')
171 % User said no by hitting escape
172 handles.output =
'No';
174 % Update handles structure
175 guidata(hObject, handles);
177 uiresume(handles.figure1);
180 if isequal(
get(hObject,
'CurrentKey'),
'return')
181 uiresume(handles.figure1);
187 % hObject handle to edit1 (see GCBO)
188 % eventdata reserved - to be defined in a future version of MATLAB
189 % handles structure with handles and user data (see GUIDATA)
191 % Hints: get(hObject,'String') returns contents of edit1
as text
192 % str2double(get(hObject,'String')) returns contents of edit1
as a
double
195 % --- Executes during
object creation, after setting all properties.
197 % hObject handle to edit1 (see GCBO)
198 % eventdata reserved - to be defined in a future version of MATLAB
199 % handles empty - handles not created until after all CreateFcns called
201 % Hint: edit controls usually have a white background on Windows.
202 % See ISPC and COMPUTER.
203 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
204 set(hObject,'BackgroundColor','white');
209 function edit_stack_Callback(hObject, eventdata, handles)
210 % hObject handle to edit_stack (see GCBO)
211 % eventdata reserved - to be defined in a future version of MATLAB
212 % handles structure with handles and user data (see GUIDATA)
214 % Hints: get(hObject,'String') returns contents of edit_stack
as text
215 % str2double(get(hObject,'String')) returns contents of edit_stack
as a
double
218 % --- Executes during
object creation, after setting all properties.
219 function edit_stack_CreateFcn(hObject, eventdata, handles)
220 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
221 set(hObject,'BackgroundColor','white');
226 function edit__Callback(hObject, eventdata, handles)
228 function edit__CreateFcn(hObject, eventdata, handles)
229 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
230 set(hObject,'BackgroundColor','white');
function figure1_KeyPressFcn(in hObject, in eventdata, in handles)
function edit1_Callback(in hObject, in eventdata, in handles)
function figure1_CloseRequestFcn(in hObject, in eventdata, in handles)
function gui_set_position(in hObject)
Analysis Session (AS) base class.
function edit1_CreateFcn(in hObject, in eventdata, in handles)
function pushbutton1_Callback(in hObject, in eventdata, in handles)
function pushbutton2_Callback(in hObject, in eventdata, in handles)