Changeset 332 for trunk/src/mouse_down.m
- Timestamp:
- Dec 13, 2011, 11:20:07 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_down.m
r309 r332 24 24 function xy=mouse_down(hObject,eventdata) 25 25 26 huvmat=findobj(allchild(0),'tag','uvmat');%find the uvmat interface handle which controls theoption of mouse action 27 if isempty(huvmat) 28 return 29 end 30 hhuvmat=guidata(huvmat);%handles of elements in uvmat 31 UvData=get(huvmat,'UserData'); 26 AxeData=[];%default 32 27 FigData=get(hObject,'UserData'); 33 28 if ishandle(FigData)% case of a zoom plot, the handle of the parent rectangle is stored in UserData, its parent is the plotting axes of the rectangle … … 41 36 hhcurrentfig=guidata(hcurrentfig); 42 37 if isfield(hhcurrentfig,'CheckZoom') 43 test_zoom=get(hhcurrentfig.CheckZoom,'Value');%test for zoom action, first priority38 test_zoom=get(hhcurrentfig.CheckZoom,'Value');%test for zoom action, first priority 44 39 else 45 40 test_zoom=0; 46 41 end 47 test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');%test for ruler action, second priority; 48 test_edit=get(hhuvmat.edit_object,'Value');%test for object editing, third priority 49 test_edit_vect=get(hhuvmat.edit_vect,'Value');%test for vector editing, priority 4 50 test_create=isequal(get(hhuvmat.MenuObject,'checked'),'on');% test for object creation, priority 5 51 if test_create 52 hset_object=findobj(allchild(0),'tag','set_object'); 53 test_create=~isempty(hset_object)&&~test_edit; 54 end 55 test_cal=isequal(get(hhuvmat.MenuCalib,'checked'),'on');% test for calibration 56 if test_cal% test for calibration popints, priority 6 57 h_calib=findobj(allchild(0),'tag','geometry_calib'); 58 if isempty(h_calib) 59 test_cal=0; 60 set(hhuvmat.MenuCalib,'checked','off');% test for calibration off 61 else 62 hh_calib=guidata(h_calib); 63 test_cal=get(hh_calib.edit_append,'Value'); 64 end 65 end 66 AxeData=[];%default 42 43 %% look for parameters set by the GUI uvmat 44 test_ruler=0; 45 test_edit=0; 46 test_create=0; 47 huvmat=findobj(allchild(0),'tag','uvmat');%find the uvmat interface handle which controls theoption of mouse action 48 if ~isempty(huvmat) 49 hhuvmat=guidata(huvmat);%handles of elements in uvmat 50 UvData=get(huvmat,'UserData'); 51 test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');%test for ruler action, second priority; 52 test_edit=get(hhuvmat.edit_object,'Value');%test for object editing, third priority 53 test_edit_vect=get(hhuvmat.edit_vect,'Value');%test for vector editing, priority 4 54 test_create=isequal(get(hhuvmat.MenuObject,'checked'),'on');% test for object creation, priority 5 55 if test_create 56 hset_object=findobj(allchild(0),'tag','set_object'); 57 test_create=~isempty(hset_object)&&~test_edit; 58 end 59 test_cal=isequal(get(hhuvmat.MenuCalib,'checked'),'on');% test for calibration 60 if test_cal% test for calibration popints, priority 6 61 h_calib=findobj(allchild(0),'tag','geometry_calib'); 62 if isempty(h_calib) 63 test_cal=0; 64 set(hhuvmat.MenuCalib,'checked','off');% test for calibration off 65 else 66 hh_calib=guidata(h_calib); 67 test_cal=get(hh_calib.edit_append,'Value'); 68 end 69 end 70 end 67 71 68 72 %% determine the currently selected items
Note: See TracChangeset
for help on using the changeset viewer.