Changeset 244 for trunk/src/series.m
- Timestamp:
- Apr 20, 2011, 12:51:29 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r238 r244 62 62 %default initial parameters 63 63 drawnow 64 64 set(hObject,'Units','pixels') 65 % set(0,'Units','pixels') 66 % screensize=get(0,'ScreenSize'); %screen size in pixels 67 set(hObject,'Position',[150 100 1000 600] );%position and size in pixels (get adjusted to the screen size in case of excess) 65 68 %load the list of previously browsed files in menus Open and Open_1 66 69 dir_perso=prefdir; … … 1672 1675 end 1673 1676 eval(['h_function=@' ACTION ';']); 1674 [fid,errormsg] =fopen([ACTION '.m']); 1675 InputText=textscan(fid,'%s',1,'delimiter','\n'); 1676 fclose(fid) 1677 try 1678 [fid,errormsg] =fopen([ACTION '.m']); 1679 InputText=textscan(fid,'%s',1,'delimiter','\n'); 1680 fclose(fid) 1681 set(handles.ACTION,'ToolTipString',InputText{1}{1}) 1682 end 1677 1683 if ~isequal(path_series,PathName) 1678 1684 rmpath(PathName) 1679 1685 end 1680 set(handles.ACTION,'ToolTipString',InputText{1}{1})1681 1686 varargout=h_function(); 1682 1687 Param_list={}; … … 1854 1859 1855 1860 %----------------------------- 1856 function mouse_up_gui(ggg,eventdata,handles) 1857 if isequal(get(ggg,'SelectionType'),'alt') 1858 display('global CurData, UserData of GUI series') 1859 global CurData 1860 CurData=get(ggg,'UserData'); 1861 evalin('base','global CurData');%make CurData global in the workspace 1862 evalin('base','CurData'); %display CurData in the workspace 1863 commandwindow 1864 % plot_text(CurData) 1861 function mouse_up_gui(hObject,eventdata,handles) 1862 if isequal(get(hObject,'SelectionType'),'alt') 1863 set(hObject,'Units','pixels') 1864 series_pos=get(hObject,'Position');%position of the GUI series (in pixels) 1865 set(hObject,'Units','normalized') 1866 xy_fig=get(hObject,'CurrentPoint');% current point of the current figure (gcbo) 1867 hchild=get(hObject,'Children');%handles of all objects in the current figure 1868 %% loop on all the objects in the current figure (selected by the last mouse click) 1869 1870 for ichild=1:length(hchild) 1871 obj_pos=get(hchild(ichild),'Position');%position of the object 1872 if numel(obj_pos)>=4 && xy_fig(1) >=obj_pos(1) && xy_fig(2) >= obj_pos(2)&& xy_fig(1) <=obj_pos(1)+obj_pos(3) && xy_fig(2) <= obj_pos(2)+obj_pos(4); 1873 htype=get(hchild(ichild),'Type');%type of object child of the current figure 1874 %if the mouse is over an axis, look at the data 1875 if isequal(htype,'uicontrol') && isequal(get(hchild(ichild),'Visible'),'on') 1876 msg_pos(1:2)=series_pos(1:2)+obj_pos(1:2).*series_pos(3:4); 1877 msgbox_uvmat(['uicontrol: ' get(hchild(ichild),'Tag')],'',get(hchild(ichild),'String'),msg_pos) 1878 break 1879 end 1880 end 1881 end 1882 set(hObject,'Units','pixels') 1865 1883 end 1866 1884 … … 2196 2214 if isequal(mode,'#_ab') 2197 2215 dirpair=dir([filebasesub '*_*.nc']); 2198 elseif isequal(mode,'bursts')| isequal(mode,'series(Dj)')2216 elseif isequal(mode,'bursts')||isequal(mode,'series(Dj)') 2199 2217 dirpair=dir([filebasesub '_*_*-*.nc']); 2200 2218 elseif isequal(mode,'series(Di)')
Note: See TracChangeset
for help on using the changeset viewer.