annotate aim-mat/gui/quitprogram.m @ 4:537f939baef0 tip

various bug fixes and changed copyright message
author Stefan Bleeck <bleeck@gmail.com>
date Tue, 16 Aug 2011 14:37:17 +0100
parents 20ada0af3d7d
children
rev   line source
tomwalters@0 1 % procedure for 'aim-mat'
tomwalters@0 2 %
tomwalters@0 3 % INPUT VALUES:
tomwalters@0 4 %
tomwalters@0 5 % RETURN VALUE:
tomwalters@0 6 %
tomwalters@0 7 % my close function
tomwalters@0 8 %
bleeck@3 9 %
tomwalters@0 10 % (c) 2011, University of Southampton
bleeck@3 11 % Maintained by Stefan Bleeck (bleeck@gmail.com)
bleeck@3 12 % download of current version is on the soundsoftware site:
bleeck@3 13 % http://code.soundsoftware.ac.uk/projects/aimmat
bleeck@3 14 % documentation and everything is on http://www.acousticscale.org
tomwalters@0 15
tomwalters@0 16
tomwalters@0 17 function quitprogram(obj,eventdata,handles)
tomwalters@0 18 % selection = questdlg('Close AIM?',...
tomwalters@0 19 % 'Close Request Function',...
tomwalters@0 20 % 'Yes','No','Yes');
tomwalters@0 21 % switch selection,
tomwalters@0 22 % case 'Yes',
tomwalters@0 23 try
tomwalters@0 24 % first delete possible children
tomwalters@0 25 if isfield(handles.info,'children')
tomwalters@0 26 single_channel_gui('close');
tomwalters@0 27 delete(handles.info.children.single_channel.windowhandle)
tomwalters@0 28 end
tomwalters@0 29 % then delete all graphic windows associated:
tomwalters@0 30 try
tomwalters@0 31 close(handles.info.current_figure);
tomwalters@0 32 end
tomwalters@0 33
tomwalters@0 34 % the standart closing routine (first show window)
tomwalters@0 35 shh = get(0,'ShowHiddenHandles');
tomwalters@0 36 set(0,'ShowHiddenHandles','on');
tomwalters@0 37 currFig = get(0,'CurrentFigure');
tomwalters@0 38 set(0,'ShowHiddenHandles',shh);
tomwalters@0 39 delete(currFig);
tomwalters@0 40 % delete(gcf);
tomwalters@0 41 % close(handles.info.current_figure);
tomwalters@0 42 end
tomwalters@0 43 % case 'No'
tomwalters@0 44 % return
tomwalters@0 45 % end