Changeset 177 for trunk/src/mouse_down.m
- Timestamp:
- Jan 7, 2011, 1:53:05 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_down.m
r156 r177 24 24 function xy=mouse_down(hObject,eventdata) 25 25 26 %MouseAction='none'; %default27 26 huvmat=findobj(allchild(0),'tag','uvmat');%find the uvmat interface handle which controls theoption of mouse action 28 27 if isempty(huvmat) … … 31 30 hhuvmat=guidata(huvmat);%handles of elements in uvmat 32 31 UvData=get(huvmat,'UserData'); 33 %MouseAction='none'; %default34 32 currentfig=hObject; 35 33 hhcurrentfig=guidata(currentfig); 36 34 test_zoom=get(hhcurrentfig.zoom,'Value');%test for zoom action, first priority 37 % if isfield(UvData,'MouseAction') 38 % MouseAction=UvData.MouseAction;% get the mouse action from the uvmat GUI: options: 39 % end 40 41 %test_cal=get(handles.cal,'Value'); 42 % test_cal=strcmp(MouseAction,'calib'); 43 test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');%test for ruler action, second priority 44 %test_ruler=strcmp(MouseAction,'ruler'); 45 %test_edit=strcmp(MouseAction,'edit_object'); 35 test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');%test for ruler action, second priority; 46 36 test_edit=get(hhuvmat.edit_object,'Value');%test for object editing, third priority 47 %test_edit_vect=strcmp(MouseAction,'edit_vect');%test for vector editing, priority 448 37 test_edit_vect=get(hhuvmat.edit_vect,'Value');%test for vector editing, priority 4 49 38 test_create=isequal(get(hhuvmat.MenuObject,'checked'),'on');% test for object creation, priority 5 … … 63 52 end 64 53 end 65 %test_create=~test_zoom && strcmp(MouseAction,'create_object')&&~test_edit && ~test_edit_vect ;% || isequal(MouseAction,'create_mask'));66 54 xdisplay=[];%default 67 55 ydisplay=[];%default 68 56 AxeData=[];%default 69 57 70 %% edit an existing point or line if found58 %% determine the currently selected items 71 59 hcurrentobject=gco;% current object handle (selected by the mouse) 72 60 hcurrentfig=hObject;% current figure handle 73 61 fig_tag=get(hcurrentfig,'Tag'); 74 tag_obj=get(gco,'Tag'); 62 tag_obj=get(gco,'Tag');%tag of the currently selected object 75 63 xy=[];%default 76 64 xy_fig=get(hcurrentfig,'CurrentPoint');% current point of the current figure (gcbo) … … 367 355 end 368 356 if isequal(Field.FF(ivec),0) 369 Field.FF(ivec)=100 %mark vector #ivec as false357 Field.FF(ivec)=100; %mark vector #ivec as false 370 358 else 371 359 Field.FF(ivec)=0;
Note: See TracChangeset
for help on using the changeset viewer.