view aim-mat/gui/quitprogram.m @ 0:74dedb26614d

Initial checkin of AIM-MAT version 1.5 (6.4.2011).
author tomwalters
date Fri, 20 May 2011 12:32:31 +0100
parents
children 20ada0af3d7d
line wrap: on
line source
% procedure for 'aim-mat'
% 
%   INPUT VALUES:
%  
%   RETURN VALUE:
%
% my close function 
% 
% (c) 2011, University of Southampton
% Maintained and written by Stefan Bleeck (bleec@gmail.com)
% http://www.soton.ac.uk/aim


function quitprogram(obj,eventdata,handles)
% selection = questdlg('Close AIM?',...
% 	'Close Request Function',...
% 	'Yes','No','Yes');
% switch selection,
% 	case 'Yes',
		try
			% first delete possible children
			if isfield(handles.info,'children')
				single_channel_gui('close');
				delete(handles.info.children.single_channel.windowhandle)
			end
			% then delete all graphic windows associated:
			try 
				close(handles.info.current_figure);
			end
			
			% the standart closing routine (first show window)
			shh = get(0,'ShowHiddenHandles');
			set(0,'ShowHiddenHandles','on');
			currFig = get(0,'CurrentFigure');
			set(0,'ShowHiddenHandles',shh);
			delete(currFig);
			% delete(gcf);
% 			close(handles.info.current_figure);
		end
% 	case 'No'
% 		return
% end