IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
about.m
Go to the documentation of this file.
1 %>@ingroup guigroup
2 %>@file
3 %>@brief About Dialog
4 
5 %> @cond
6 function varargout = about(varargin)
7 % Last Modified by GUIDE v2.5 25-Aug-2012 21:12:55
8 
9 % Begin initialization code - DO NOT EDIT
10 gui_Singleton = 1;
11 gui_State = struct('gui_Name', mfilename, ...
12  'gui_Singleton', gui_Singleton, ...
13  'gui_OpeningFcn', @about_OpeningFcn, ...
14  'gui_OutputFcn', @about_OutputFcn, ...
15  'gui_LayoutFcn', [] , ...
16  'gui_Callback', []);
17 if nargin && ischar(varargin{1})
18  gui_State.gui_Callback = str2func(varargin{1});
19 end
20 
21 if nargout
22  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
23 else
24  gui_mainfcn(gui_State, varargin{:});
25 end
26 % End initialization code - DO NOT EDIT
27 
28 % --- Executes just before about is made visible.
29 function about_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 about (see VARARGIN)
35 
36 % Update handles structure
37 guidata(hObject, handles);
38 
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');
45 FigWidth = OldPos(3);
46 FigHeight = OldPos(4);
47 if 0 || isempty(gcbf)
48 % ScreenUnits=get(0,'Units');
49 % set(0,'Units','pixels');
50 % ScreenSize=get(0,'ScreenSize');
51 % set(0,'Units',ScreenUnits);
52 %
53 % FigPos(1)=1/2*(ScreenSize(3)-FigWidth);
54 % FigPos(2)=2/3*(ScreenSize(4)-FigHeight);
55 else
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];
62 end
63 FigPos(3:4)=[FigWidth FigHeight];
64 set(hObject, 'Position', FigPos);
65 set(hObject, 'Units', OldUnits);
66 
67 % Show a question icon from dialogicons.mat - variables questIconData
68 % and questIconMap
69 
70 IM = imread('splash.png');
71 
72 % load dialogicons.mat
73 
74 % IconData=questIconData;
75 % questIconMap(256,:) = get(handles.figure1, 'Color');
76 % IconCMap=questIconMap;
77 
78 % Img=image(IconData, 'Parent', handles.axes1);
79 % set(handles.figure1, 'Colormap', IconCMap);
80 
81 Img = image(IM, 'Parent', handles.axes1);
82 
83 set(handles.axes1, ...
84  'Visible', 'off', ...
85  'YDir' , 'reverse' , ...
86  'XLim' , get(Img,'XData'), ...
87  'YLim' , get(Img,'YData') ...
88  );
89 
90 % Make the GUI modal
91 set(handles.figure1,'WindowStyle','modal')
92 
93 
94 % UIWAIT makes about wait for user response (see UIRESUME)
95 uiwait(handles.figure1);
96 
97 % --- Outputs from this function are returned to the command line.
98 function varargout = about_OutputFcn(hObject, eventdata, handles)
99 % varargout cell array for returning output args (see VARARGOUT);
100 % hObject handle to figure
101 % eventdata reserved - to be defined in a future version of MATLAB
102 % handles structure with handles and user data (see GUIDATA)
103 
104 % The figure can be deleted now
105 delete(handles.figure1);
106 
107 % --- Executes on button press in pushbutton1.
108 function pushbutton1_Callback(hObject, eventdata, handles)
109 % hObject handle to pushbutton1 (see GCBO)
110 % eventdata reserved - to be defined in a future version of MATLAB
111 % handles structure with handles and user data (see GUIDATA)
112 
113 handles.output = get(hObject,'String');
114 
115 % Update handles structure
116 guidata(hObject, handles);
117 
118 % Use UIRESUME instead of delete because the OutputFcn needs
119 % to get the updated handles structure.
120 uiresume(handles.figure1);
121 
122 % --- Executes on button press in pushbutton2.
123 function pushbutton2_Callback(hObject, eventdata, handles)
124 % hObject handle to pushbutton2 (see GCBO)
125 % eventdata reserved - to be defined in a future version of MATLAB
126 % handles structure with handles and user data (see GUIDATA)
127 
128 handles.output = get(hObject,'String');
129 
130 % Update handles structure
131 guidata(hObject, handles);
132 
133 % Use UIRESUME instead of delete because the OutputFcn needs
134 % to get the updated handles structure.
135 uiresume(handles.figure1);
136 
137 
138 % --- Executes when user attempts to close figure1.
139 function figure1_CloseRequestFcn(hObject, eventdata, handles)
140 % hObject handle to figure1 (see GCBO)
141 % eventdata reserved - to be defined in a future version of MATLAB
142 % handles structure with handles and user data (see GUIDATA)
143 
144 if isequal(get(handles.figure1, 'waitstatus'), 'waiting')
145  % The GUI is still in UIWAIT, us UIRESUME
146  uiresume(handles.figure1);
147 else
148  % The GUI is no longer waiting, just close it
149  delete(handles.figure1);
150 end
151 
152 
153 % --- Executes on key press over figure1 with no controls selected.
154 function figure1_KeyPressFcn(hObject, eventdata, handles)
155 % hObject handle to figure1 (see GCBO)
156 % eventdata reserved - to be defined in a future version of MATLAB
157 % handles structure with handles and user data (see GUIDATA)
158 
159 % Check for "enter" or "escape"
160 if isequal(get(hObject,'CurrentKey'),'escape')
161  % User said no by hitting escape
162  handles.output = 'No';
163 
164  % Update handles structure
165  guidata(hObject, handles);
166 
167  uiresume(handles.figure1);
168 end
169 
170 if isequal(get(hObject,'CurrentKey'),'return')
171  uiresume(handles.figure1);
172 end
173 
174 
175 
176 function edit1_Callback(hObject, eventdata, handles)
177 % hObject handle to edit1 (see GCBO)
178 % eventdata reserved - to be defined in a future version of MATLAB
179 % handles structure with handles and user data (see GUIDATA)
180 
181 % Hints: get(hObject,'String') returns contents of edit1 as text
182 % str2double(get(hObject,'String')) returns contents of edit1 as a double
183 
184 
185 % --- Executes during object creation, after setting all properties.
186 function edit1_CreateFcn(hObject, eventdata, handles)
187 % hObject handle to edit1 (see GCBO)
188 % eventdata reserved - to be defined in a future version of MATLAB
189 % handles empty - handles not created until after all CreateFcns called
190 
191 % Hint: edit controls usually have a white background on Windows.
192 % See ISPC and COMPUTER.
193 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
194  set(hObject,'BackgroundColor','white');
195 end
196 
197 
198 
199 function edit2_Callback(hObject, eventdata, handles)
200 % hObject handle to edit2 (see GCBO)
201 % eventdata reserved - to be defined in a future version of MATLAB
202 % handles structure with handles and user data (see GUIDATA)
203 
204 % Hints: get(hObject,'String') returns contents of edit2 as text
205 % str2double(get(hObject,'String')) returns contents of edit2 as a double
206 
207 
208 % --- Executes during object creation, after setting all properties.
209 function edit2_CreateFcn(hObject, eventdata, handles)
210 % hObject handle to edit2 (see GCBO)
211 % eventdata reserved - to be defined in a future version of MATLAB
212 % handles empty - handles not created until after all CreateFcns called
213 
214 % Hint: edit controls usually have a white background on Windows.
215 % See ISPC and COMPUTER.
216 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
217  set(hObject,'BackgroundColor','white');
218 end
219 %> @endcond
function edit2_Callback(in hObject, in eventdata, in handles)
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 edit2_CreateFcn(in hObject, in eventdata, in handles)
Analysis Session (AS) base class.
Definition: as.m:6
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)