Changeset 244 for trunk/src/series.m


Ignore:
Timestamp:
Apr 20, 2011, 12:51:29 PM (10 years ago)
Author:
sommeria
Message:

various bug repair, improved display of msgbox_uvmat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r238 r244  
    6262%default initial parameters
    6363drawnow
    64 
     64set(hObject,'Units','pixels')
     65% set(0,'Units','pixels')
     66% screensize=get(0,'ScreenSize'); %screen size in pixels
     67set(hObject,'Position',[150 100 1000 600] );%position and size in pixels (get adjusted to the screen size in case of excess)
    6568%load the list of previously browsed files in menus Open and Open_1
    6669dir_perso=prefdir;
     
    16721675end
    16731676eval(['h_function=@' ACTION ';']);
    1674 [fid,errormsg] =fopen([ACTION '.m']);
    1675 InputText=textscan(fid,'%s',1,'delimiter','\n');
    1676 fclose(fid)
     1677try
     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})
     1682end
    16771683if ~isequal(path_series,PathName)
    16781684    rmpath(PathName)
    16791685end
    1680 set(handles.ACTION,'ToolTipString',InputText{1}{1})
    16811686varargout=h_function();
    16821687Param_list={};
     
    18541859
    18551860%-----------------------------
    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)
     1861function mouse_up_gui(hObject,eventdata,handles)
     1862if 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')
    18651883end
    18661884
     
    21962214if isequal(mode,'#_ab')
    21972215    dirpair=dir([filebasesub '*_*.nc']);
    2198 elseif isequal(mode,'bursts')|isequal(mode,'series(Dj)') 
     2216elseif isequal(mode,'bursts')||isequal(mode,'series(Dj)') 
    21992217    dirpair=dir([filebasesub '_*_*-*.nc']);
    22002218elseif isequal(mode,'series(Di)')
Note: See TracChangeset for help on using the changeset viewer.