tomwalters@0: % procedure for 'aim-mat' tomwalters@0: % tomwalters@0: % INPUT VALUES: tomwalters@0: % tomwalters@0: % RETURN VALUE: tomwalters@0: % tomwalters@0: % my close function tomwalters@0: % bleeck@3: % tomwalters@0: % (c) 2011, University of Southampton bleeck@3: % Maintained by Stefan Bleeck (bleeck@gmail.com) bleeck@3: % download of current version is on the soundsoftware site: bleeck@3: % http://code.soundsoftware.ac.uk/projects/aimmat bleeck@3: % documentation and everything is on http://www.acousticscale.org tomwalters@0: tomwalters@0: tomwalters@0: function quitprogram(obj,eventdata,handles) tomwalters@0: % selection = questdlg('Close AIM?',... tomwalters@0: % 'Close Request Function',... tomwalters@0: % 'Yes','No','Yes'); tomwalters@0: % switch selection, tomwalters@0: % case 'Yes', tomwalters@0: try tomwalters@0: % first delete possible children tomwalters@0: if isfield(handles.info,'children') tomwalters@0: single_channel_gui('close'); tomwalters@0: delete(handles.info.children.single_channel.windowhandle) tomwalters@0: end tomwalters@0: % then delete all graphic windows associated: tomwalters@0: try tomwalters@0: close(handles.info.current_figure); tomwalters@0: end tomwalters@0: tomwalters@0: % the standart closing routine (first show window) tomwalters@0: shh = get(0,'ShowHiddenHandles'); tomwalters@0: set(0,'ShowHiddenHandles','on'); tomwalters@0: currFig = get(0,'CurrentFigure'); tomwalters@0: set(0,'ShowHiddenHandles',shh); tomwalters@0: delete(currFig); tomwalters@0: % delete(gcf); tomwalters@0: % close(handles.info.current_figure); tomwalters@0: end tomwalters@0: % case 'No' tomwalters@0: % return tomwalters@0: % end