1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
---|
2 | "http://www.w3.org/TR/REC-html40/loose.dtd"> |
---|
3 | <html> |
---|
4 | <head> |
---|
5 | <title>Description of msgbox_uvmat</title> |
---|
6 | <meta name="keywords" content="msgbox_uvmat"> |
---|
7 | <meta name="description" content="'msgbox_uvmat': associated with GUI msgbox_uvmat.fig to display message boxes, for error, warning or input calls"> |
---|
8 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
9 | <meta name="generator" content="m2html © 2003 Guillaume Flandin"> |
---|
10 | <meta name="robots" content="index, follow"> |
---|
11 | <link type="text/css" rel="stylesheet" href="../m2html.css"> |
---|
12 | </head> |
---|
13 | <body> |
---|
14 | <a name="_top"></a> |
---|
15 | <div><a href="../index.html">Home</a> > <a href="index.html">.</a> > msgbox_uvmat.m</div> |
---|
16 | |
---|
17 | <!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png"> Master index</a></td> |
---|
18 | <td align="right"><a href="index.html">Index for . <img alt=">" border="0" src="../right.png"></a></td></tr></table>--> |
---|
19 | |
---|
20 | <h1>msgbox_uvmat |
---|
21 | </h1> |
---|
22 | |
---|
23 | <h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
24 | <div class="box"><strong>'msgbox_uvmat': associated with GUI msgbox_uvmat.fig to display message boxes, for error, warning or input calls</strong></div> |
---|
25 | |
---|
26 | <h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
27 | <div class="box"><strong>function varargout = msgbox_uvmat(varargin) </strong></div> |
---|
28 | |
---|
29 | <h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
30 | <div class="fragment"><pre class="comment">'msgbox_uvmat': associated with GUI msgbox_uvmat.fig to display message boxes, for error, warning or input calls |
---|
31 | msgbox_uvmat(title,display) |
---|
32 | |
---|
33 | OUTPUT: |
---|
34 | answer (text string)= 'yes', 'No', 'cancel', or the text string introduced as input |
---|
35 | |
---|
36 | INPUT: |
---|
37 | title: string indicating the type of message box: |
---|
38 | title= 'INPUT_TXT','CONFIMATION' ,'ERROR', 'WARNING', 'INPUT_Y-N', default = 'INPUT_TXT' (the title is displayed in the upper bar of the fig). |
---|
39 | if title='INPUT_TXT', input data is asked in an edit box |
---|
40 | if title='CONFIMATION'', 'ERROR', 'WARNING', the figure remains opened until a button 'OK' is pressed |
---|
41 | if title='INPUT_Y-N', an answer Yes/No is requested |
---|
42 | display, displayed text |
---|
43 | default_answer: default answer in the edit box (only used with title='INPUT_TXT')</pre></div> |
---|
44 | |
---|
45 | <!-- crossreference --> |
---|
46 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
47 | This function calls: |
---|
48 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
49 | </ul> |
---|
50 | This function is called by: |
---|
51 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
52 | <li><a href="civ.html" class="code" title="function varargout = civ(varargin)">civ</a> 'civ': function associated with the interface 'civ.fig' for PIV, spline interpolation and stereo PIV (patch)</li><li><a href="dataview.html" class="code" title="function varargout = dataview(varargin)">dataview</a> TEST 'dataview': function for scanning directories in a campaign (TEST)</li><li><a href="geometry_calib.html" class="code" title="function varargout = geometry_calib(varargin)">geometry_calib</a> 'geometry_calib': performs geometric calibration from a set of reference points</li><li><a href="get_field.html" class="code" title="function varargout = get_field(varargin)">get_field</a> 'get_field': display variables and attributes from a Netcdf file, and plot selected fields</li><li><a href="plot_field.html" class="code" title="function [PlotType,PlotParamOut,haxes]= plot_field(Data,haxes,PlotParam,KeepLim,PosColorbar)">plot_field</a> 'plot_field': plot any field with the structure defined in the uvmat package</li><li><a href="series.html" class="code" title="function varargout = series(varargin)">series</a> 'series': master function associated to the GUI series.m for analysis field series</li><li><a href="set_grid.html" class="code" title="function varargout = set_grid(varargin)">set_grid</a> 'set_grid':produce grid for PIV with one or two images (stereo case)</li><li><a href="set_object.html" class="code" title="function varargout = set_object(varargin)">set_object</a> 'set_object': GUI to edit a projection object</li><li><a href="uvmat.html" class="code" title="function varargout = uvmat(varargin)">uvmat</a> 'uvmat': function associated with the GUI 'uvmat.fig' for images and data field visualization</li><li><a href="warndlg_uvmat.html" class="code" title="function hwarn=warndlg_uvmat(warntext,title)">warndlg_uvmat</a> 'warndlg_uvmat': display warning message (error, warning, confirmation) in a given figure</li></ul> |
---|
53 | <!-- crossreference --> |
---|
54 | |
---|
55 | <h2><a name="_subfunctions"></a>SUBFUNCTIONS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
56 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
57 | <li><a href="#_sub1" class="code">function msgbox_uvmat_OpeningFcn(hObject, eventdata, handles,title,display,default_answer)</a></li><li><a href="#_sub2" class="code">function varargout = msgbox_uvmat_OutputFcn(hObject, eventdata, handles)</a></li><li><a href="#_sub3" class="code">function OK_Callback(hObject, eventdata, handles)</a></li><li><a href="#_sub4" class="code">function No_Callback(hObject, eventdata, handles)</a></li><li><a href="#_sub5" class="code">function Cancel_Callback(hObject, eventdata, handles)</a></li><li><a href="#_sub6" class="code">function edit_box_Callback(hObject, eventdata, handles)</a></li><li><a href="#_sub7" class="code">function figure1_CloseRequestFcn(hObject, eventdata, handles)</a></li><li><a href="#_sub8" class="code">function figure1_KeyPressFcn(hObject, eventdata, handles)</a></li></ul> |
---|
58 | <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
59 | <div class="fragment"><pre>0001 <span class="comment">%'msgbox_uvmat': associated with GUI msgbox_uvmat.fig to display message boxes, for error, warning or input calls</span> |
---|
60 | 0002 <span class="comment">% msgbox_uvmat(title,display)</span> |
---|
61 | 0003 <span class="comment">%</span> |
---|
62 | 0004 <span class="comment">% OUTPUT:</span> |
---|
63 | 0005 <span class="comment">% answer (text string)= 'yes', 'No', 'cancel', or the text string introduced as input</span> |
---|
64 | 0006 <span class="comment">%</span> |
---|
65 | 0007 <span class="comment">%INPUT:</span> |
---|
66 | 0008 <span class="comment">% title: string indicating the type of message box:</span> |
---|
67 | 0009 <span class="comment">% title= 'INPUT_TXT','CONFIMATION' ,'ERROR', 'WARNING', 'INPUT_Y-N', default = 'INPUT_TXT' (the title is displayed in the upper bar of the fig).</span> |
---|
68 | 0010 <span class="comment">% if title='INPUT_TXT', input data is asked in an edit box</span> |
---|
69 | 0011 <span class="comment">% if title='CONFIMATION'', 'ERROR', 'WARNING', the figure remains opened until a button 'OK' is pressed</span> |
---|
70 | 0012 <span class="comment">% if title='INPUT_Y-N', an answer Yes/No is requested</span> |
---|
71 | 0013 <span class="comment">% display, displayed text</span> |
---|
72 | 0014 <span class="comment">% default_answer: default answer in the edit box (only used with title='INPUT_TXT')</span> |
---|
73 | 0015 |
---|
74 | 0016 <a name="_sub0" href="#_subfunctions" class="code">function varargout = msgbox_uvmat(varargin)</a> |
---|
75 | 0017 |
---|
76 | 0018 <span class="comment">% Last Modified by GUIDE v2.5 24-Oct-2009 21:55:17</span> |
---|
77 | 0019 |
---|
78 | 0020 <span class="comment">% Begin initialization code - DO NOT EDIT</span> |
---|
79 | 0021 gui_Singleton = 1; |
---|
80 | 0022 gui_State = struct(<span class="string">'gui_Name'</span>, mfilename, <span class="keyword">...</span> |
---|
81 | 0023 <span class="string">'gui_Singleton'</span>, gui_Singleton, <span class="keyword">...</span> |
---|
82 | 0024 <span class="string">'gui_OpeningFcn'</span>, @<a href="#_sub1" class="code" title="subfunction msgbox_uvmat_OpeningFcn(hObject, eventdata, handles,title,display,default_answer)">msgbox_uvmat_OpeningFcn</a>, <span class="keyword">...</span> |
---|
83 | 0025 <span class="string">'gui_OutputFcn'</span>, @<a href="#_sub2" class="code" title="subfunction varargout = msgbox_uvmat_OutputFcn(hObject, eventdata, handles)">msgbox_uvmat_OutputFcn</a>, <span class="keyword">...</span> |
---|
84 | 0026 <span class="string">'gui_LayoutFcn'</span>, [] , <span class="keyword">...</span> |
---|
85 | 0027 <span class="string">'gui_Callback'</span>, []); |
---|
86 | 0028 <span class="keyword">if</span> nargin && ischar(varargin{1}) |
---|
87 | 0029 gui_State.gui_Callback = str2func(varargin{1}); |
---|
88 | 0030 <span class="keyword">end</span> |
---|
89 | 0031 |
---|
90 | 0032 <span class="keyword">if</span> nargout |
---|
91 | 0033 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); |
---|
92 | 0034 <span class="keyword">else</span> |
---|
93 | 0035 gui_mainfcn(gui_State, varargin{:}); |
---|
94 | 0036 <span class="keyword">end</span> |
---|
95 | 0037 <span class="comment">% End initialization code - DO NOT EDIT</span> |
---|
96 | 0038 |
---|
97 | 0039 <span class="comment">% --- Executes just before msgbox_uvmat is made visible.</span> |
---|
98 | 0040 <a name="_sub1" href="#_subfunctions" class="code">function msgbox_uvmat_OpeningFcn(hObject, eventdata, handles,title,display,default_answer)</a> |
---|
99 | 0041 <span class="comment">% This function has no output args, see OutputFcn.</span> |
---|
100 | 0042 |
---|
101 | 0043 <span class="comment">% Choose default command line output for msgbox_uvmat</span> |
---|
102 | 0044 handles.output = <span class="string">'Cancel'</span>; |
---|
103 | 0045 |
---|
104 | 0046 <span class="comment">% Update handles structure</span> |
---|
105 | 0047 guidata(hObject, handles); |
---|
106 | 0048 testNo=0; |
---|
107 | 0049 testCancel=1; |
---|
108 | 0050 testinputstring=0; |
---|
109 | 0051 icontype=<span class="string">'quest'</span>;<span class="comment">%default question icon (text input asked)</span> |
---|
110 | 0052 <span class="keyword">if</span> exist(<span class="string">'title'</span>,<span class="string">'var'</span>) |
---|
111 | 0053 set(hObject, <span class="string">'Name'</span>, title); |
---|
112 | 0054 <span class="keyword">if</span> isequal (title,<span class="string">'CONFIRMATION'</span>) |
---|
113 | 0055 icontype=<span class="string">''</span>; |
---|
114 | 0056 testCancel=0; <span class="comment">%no cancel button</span> |
---|
115 | 0057 <span class="keyword">elseif</span> isequal (title,<span class="string">'ERROR'</span>) |
---|
116 | 0058 icontype=<span class="string">'error'</span>; |
---|
117 | 0059 testCancel=0; <span class="comment">%no cancel button</span> |
---|
118 | 0060 <span class="keyword">elseif</span> isequal (title,<span class="string">'WARNING'</span>) |
---|
119 | 0061 icontype=<span class="string">'warn'</span>; |
---|
120 | 0062 testCancel=0; <span class="comment">%no cancel button</span> |
---|
121 | 0063 <span class="keyword">elseif</span> isequal (title,<span class="string">'INPUT_Y-N'</span>) |
---|
122 | 0064 icontype=<span class="string">'quest'</span>; |
---|
123 | 0065 testNo=1; <span class="comment">% button No activated</span> |
---|
124 | 0066 <span class="keyword">else</span> |
---|
125 | 0067 testinputstring=1; |
---|
126 | 0068 <span class="keyword">end</span> |
---|
127 | 0069 <span class="keyword">end</span> |
---|
128 | 0070 <span class="keyword">if</span> exist(<span class="string">'display'</span>,<span class="string">'var'</span>) |
---|
129 | 0071 set(handles.text1, <span class="string">'String'</span>, display); |
---|
130 | 0072 <span class="keyword">end</span> |
---|
131 | 0073 <span class="keyword">if</span> testinputstring |
---|
132 | 0074 set(handles.edit_box, <span class="string">'Visible'</span>, <span class="string">'on'</span>); |
---|
133 | 0075 <span class="keyword">else</span> |
---|
134 | 0076 set(handles.text1, <span class="string">'Position'</span>, [0.15 0.3 0.85 0.7]); |
---|
135 | 0077 <span class="keyword">end</span> |
---|
136 | 0078 <span class="keyword">if</span> exist(<span class="string">'default_answer'</span>,<span class="string">'var'</span>) && testinputstring |
---|
137 | 0079 set(handles.edit_box, <span class="string">'String'</span>, default_answer); |
---|
138 | 0080 <span class="keyword">end</span> |
---|
139 | 0081 <span class="comment">% Determine the position of the dialog - centered on the screen</span> |
---|
140 | 0082 FigPos=get(0,<span class="string">'DefaultFigurePosition'</span>); |
---|
141 | 0083 OldUnits = get(hObject, <span class="string">'Units'</span>); |
---|
142 | 0084 set(hObject, <span class="string">'Units'</span>, <span class="string">'pixels'</span>); |
---|
143 | 0085 OldPos = get(hObject,<span class="string">'Position'</span>); |
---|
144 | 0086 FigWidth = OldPos(3); |
---|
145 | 0087 FigHeight = OldPos(4); |
---|
146 | 0088 ScreenUnits=get(0,<span class="string">'Units'</span>); |
---|
147 | 0089 set(0,<span class="string">'Units'</span>,<span class="string">'pixels'</span>); |
---|
148 | 0090 ScreenSize=get(0,<span class="string">'ScreenSize'</span>); |
---|
149 | 0091 set(0,<span class="string">'Units'</span>,ScreenUnits); |
---|
150 | 0092 |
---|
151 | 0093 FigPos(1)=1/2*(ScreenSize(3)-FigWidth); |
---|
152 | 0094 FigPos(2)=2/3*(ScreenSize(4)-FigHeight); |
---|
153 | 0095 FigPos(3:4)=[FigWidth FigHeight]; |
---|
154 | 0096 set(hObject, <span class="string">'Position'</span>, FigPos); |
---|
155 | 0097 set(hObject, <span class="string">'Units'</span>, OldUnits); |
---|
156 | 0098 |
---|
157 | 0099 <span class="comment">% Show a question icon from dialogicons.mat - variables questIconData</span> |
---|
158 | 0100 <span class="comment">% and questIconMap</span> |
---|
159 | 0101 <span class="keyword">if</span> isequal(icontype,<span class="string">''</span>) |
---|
160 | 0102 hima=findobj(handles.axes1,<span class="string">'Type'</span>,<span class="string">'image'</span>); |
---|
161 | 0103 <span class="keyword">if</span> ~isempty(hima) |
---|
162 | 0104 delete(hima) |
---|
163 | 0105 <span class="keyword">end</span> |
---|
164 | 0106 <span class="keyword">else</span> |
---|
165 | 0107 load dialogicons.mat |
---|
166 | 0108 eval([<span class="string">'IconData='</span> icontype <span class="string">'IconData;'</span>]) |
---|
167 | 0109 eval([<span class="string">'IconCMap='</span> icontype <span class="string">'IconMap;'</span>]) |
---|
168 | 0110 questIconMap(256,:) = get(handles.figure1, <span class="string">'Color'</span>); |
---|
169 | 0111 Img=image(IconData, <span class="string">'Parent'</span>, handles.axes1); |
---|
170 | 0112 set(handles.figure1, <span class="string">'Colormap'</span>, IconCMap); |
---|
171 | 0113 set(handles.axes1, <span class="keyword">...</span> |
---|
172 | 0114 <span class="string">'Visible'</span>, <span class="string">'off'</span>, <span class="keyword">...</span> |
---|
173 | 0115 <span class="string">'YDir'</span> , <span class="string">'reverse'</span> , <span class="keyword">...</span> |
---|
174 | 0116 <span class="string">'XLim'</span> , get(Img,<span class="string">'XData'</span>), <span class="keyword">...</span> |
---|
175 | 0117 <span class="string">'YLim'</span> , get(Img,<span class="string">'YData'</span>) <span class="keyword">...</span> |
---|
176 | 0118 ); |
---|
177 | 0119 <span class="keyword">end</span> |
---|
178 | 0120 <span class="keyword">if</span> testCancel |
---|
179 | 0121 set(handles.Cancel,<span class="string">'Visible'</span>,<span class="string">'on'</span>) |
---|
180 | 0122 <span class="keyword">else</span> |
---|
181 | 0123 set(handles.Cancel,<span class="string">'Visible'</span>,<span class="string">'off'</span>) |
---|
182 | 0124 <span class="keyword">end</span> |
---|
183 | 0125 <span class="keyword">if</span> testNo |
---|
184 | 0126 set(handles.No,<span class="string">'Visible'</span>,<span class="string">'on'</span>) |
---|
185 | 0127 <span class="keyword">else</span> |
---|
186 | 0128 set(handles.No,<span class="string">'Visible'</span>,<span class="string">'off'</span>) |
---|
187 | 0129 <span class="keyword">end</span> |
---|
188 | 0130 <span class="comment">% if testOK % request an answer to proceed</span> |
---|
189 | 0131 <span class="comment">% set(handles.OK,'Visible','on')</span> |
---|
190 | 0132 <span class="comment">% Make the GUI modal</span> |
---|
191 | 0133 set(handles.figure1,<span class="string">'WindowStyle'</span>,<span class="string">'modal'</span>) |
---|
192 | 0134 <span class="comment">% UIWAIT makes msgbox_uvmat wait for user response (see UIRESUME)</span> |
---|
193 | 0135 uiwait(handles.figure1); |
---|
194 | 0136 <span class="comment">% else</span> |
---|
195 | 0137 <span class="comment">% set(handles.OK,'Visible','off')</span> |
---|
196 | 0138 <span class="comment">% set(handles.Cancel,'Visible','off')</span> |
---|
197 | 0139 <span class="comment">% end</span> |
---|
198 | 0140 <span class="comment">% delete(hObject)</span> |
---|
199 | 0141 |
---|
200 | 0142 <span class="comment">% --- Outputs from this function are returned to the command line.</span> |
---|
201 | 0143 <a name="_sub2" href="#_subfunctions" class="code">function varargout = msgbox_uvmat_OutputFcn(hObject, eventdata, handles)</a> |
---|
202 | 0144 |
---|
203 | 0145 <span class="comment">% Get default command line output from handles structure</span> |
---|
204 | 0146 |
---|
205 | 0147 <span class="comment">% varargout{1} = hObject;</span> |
---|
206 | 0148 handles.output |
---|
207 | 0149 <span class="keyword">if</span> isequal(handles.output,<span class="string">'Cancel'</span>) |
---|
208 | 0150 varargout{1}=<span class="string">'Cancel'</span>; |
---|
209 | 0151 <span class="keyword">elseif</span> isequal(handles.output,<span class="string">'No'</span>) |
---|
210 | 0152 varargout{1}=<span class="string">'No'</span>; |
---|
211 | 0153 <span class="keyword">else</span> |
---|
212 | 0154 varargout{1}=get(handles.edit_box,<span class="string">'String'</span>); |
---|
213 | 0155 isequal(varargout{1},<span class="string">''</span>) |
---|
214 | 0156 <span class="keyword">if</span> isempty(varargout{1}) || isequal(varargout{1},<span class="string">''</span>) |
---|
215 | 0157 varargout{1}=<span class="string">'Yes'</span>; |
---|
216 | 0158 <span class="keyword">end</span> |
---|
217 | 0159 <span class="keyword">end</span> |
---|
218 | 0160 |
---|
219 | 0161 <span class="comment">%varargout{2} = handles.output;</span> |
---|
220 | 0162 |
---|
221 | 0163 <span class="comment">% The figure can be deleted now</span> |
---|
222 | 0164 delete(handles.figure1); |
---|
223 | 0165 |
---|
224 | 0166 <span class="comment">% --- Executes on button press in OK.</span> |
---|
225 | 0167 <a name="_sub3" href="#_subfunctions" class="code">function OK_Callback(hObject, eventdata, handles)</a> |
---|
226 | 0168 handles.output = get(hObject,<span class="string">'String'</span>); |
---|
227 | 0169 guidata(hObject, handles);<span class="comment">% Update handles structure</span> |
---|
228 | 0170 uiresume(handles.figure1); |
---|
229 | 0171 |
---|
230 | 0172 <span class="comment">% --- Executes on button press in No.</span> |
---|
231 | 0173 <a name="_sub4" href="#_subfunctions" class="code">function No_Callback(hObject, eventdata, handles)</a> |
---|
232 | 0174 handles.output=<span class="string">'No'</span>; |
---|
233 | 0175 guidata(hObject, handles); |
---|
234 | 0176 uiresume(handles.figure1); |
---|
235 | 0177 |
---|
236 | 0178 <span class="comment">% --- Executes on button press in Cancel.</span> |
---|
237 | 0179 <a name="_sub5" href="#_subfunctions" class="code">function Cancel_Callback(hObject, eventdata, handles)</a> |
---|
238 | 0180 handles.output = get(hObject,<span class="string">'String'</span>); |
---|
239 | 0181 <span class="comment">%handles.output = 'Cancel'</span> |
---|
240 | 0182 guidata(hObject, handles); <span class="comment">% Update handles structure</span> |
---|
241 | 0183 <span class="comment">% Use UIRESUME instead of delete because the OutputFcn needs</span> |
---|
242 | 0184 <span class="comment">% to get the updated handles structure.</span> |
---|
243 | 0185 uiresume(handles.figure1); |
---|
244 | 0186 |
---|
245 | 0187 <span class="comment">% --- Executes on activation of edit_box.</span> |
---|
246 | 0188 <a name="_sub6" href="#_subfunctions" class="code">function edit_box_Callback(hObject, eventdata, handles)</a> |
---|
247 | 0189 |
---|
248 | 0190 |
---|
249 | 0191 <span class="comment">% --- Executes when user attempts to close figure1.</span> |
---|
250 | 0192 <a name="_sub7" href="#_subfunctions" class="code">function figure1_CloseRequestFcn(hObject, eventdata, handles)</a> |
---|
251 | 0193 <span class="keyword">if</span> isequal(get(handles.figure1, <span class="string">'waitstatus'</span>), <span class="string">'waiting'</span>) |
---|
252 | 0194 <span class="comment">% The GUI is still in UIWAIT, us UIRESUME</span> |
---|
253 | 0195 uiresume(handles.figure1); |
---|
254 | 0196 <span class="keyword">else</span> |
---|
255 | 0197 <span class="comment">% The GUI is no longer waiting, just close it</span> |
---|
256 | 0198 delete(handles.figure1); |
---|
257 | 0199 <span class="keyword">end</span> |
---|
258 | 0200 |
---|
259 | 0201 <span class="comment">% --- Executes on key press over figure1 with no controls selected.</span> |
---|
260 | 0202 <a name="_sub8" href="#_subfunctions" class="code">function figure1_KeyPressFcn(hObject, eventdata, handles)</a> |
---|
261 | 0203 <span class="comment">% Check for "enter" or "escape"</span> |
---|
262 | 0204 <span class="keyword">if</span> isequal(get(hObject,<span class="string">'CurrentKey'</span>),<span class="string">'escape'</span>) |
---|
263 | 0205 <span class="comment">% User said no by hitting escape</span> |
---|
264 | 0206 handles.output = <span class="string">'No'</span>; |
---|
265 | 0207 |
---|
266 | 0208 <span class="comment">% Update handles structure</span> |
---|
267 | 0209 guidata(hObject, handles); |
---|
268 | 0210 |
---|
269 | 0211 uiresume(handles.figure1); |
---|
270 | 0212 <span class="keyword">end</span> |
---|
271 | 0213 <span class="keyword">if</span> isequal(get(hObject,<span class="string">'CurrentKey'</span>),<span class="string">'return'</span>) |
---|
272 | 0214 uiresume(handles.figure1); |
---|
273 | 0215 <span class="keyword">end</span> |
---|
274 | 0216 |
---|
275 | 0217 |
---|
276 | 0218 |
---|
277 | 0219 |
---|
278 | 0220</pre></div> |
---|
279 | <hr><address>Generated on Fri 13-Nov-2009 11:17:03 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address> |
---|
280 | </body> |
---|
281 | </html> |
---|