Changeset 681 for trunk/src/set_object.m
- Timestamp:
- Sep 2, 2013, 2:42:52 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/set_object.m
r680 r681 36 36 function varargout = set_object(varargin) 37 37 38 % Last Modified by GUIDE v2.5 28-Aug-2013 20:41:0238 % Last Modified by GUIDE v2.5 02-Sep-2013 11:39:56 39 39 40 40 % Begin initialization code - DO NOT REFRESH … … 93 93 ZBounds=0; %default 94 94 end 95 set(handles.Coord,'KeyPressFcn',{@key_press_fcn,handles})%set keyboard action function (allow action on uvmat when set_object is in front)96 95 set(hObject,'WindowButtonDownFcn',{'mouse_down'})%set mouse click action function 97 96 set(hObject,'DeleteFcn',{@closefcn}) … … 116 115 end 117 116 Type_Callback(hObject, eventdata, handles)% update the GUI set_object depending on the object type 118 117 set(handles.REFRESH,'BackgroundColor',[1 0 0]) 119 118 if isfield(data,'RangeZ') && length(ZBounds) >= 2 120 119 set(handles.num_RangeZ_2,'String',num2str(max(data.RangeZ),3)) … … 219 218 function Type_Callback(hObject, eventdata, handles) 220 219 %------------------------------------------------------------------------ 221 %style_prev=get(handles.Type,'UserData');%previous object style 220 222 221 ListType=get(handles.Type,'String'); 223 222 Type=ListType{get(handles.Type,'Value')}; … … 271 270 % --- Executes on selection change in ProjMode. 272 271 %------------------------------------------------------------------------ 273 274 272 function ProjMode_Callback(hObject, eventdata, handles) 273 274 set(handles.REFRESH,'BackgroundColor',[1 0 1]) 275 275 menu=get(handles.ProjMode,'String'); 276 276 value=get(handles.ProjMode,'Value'); … … 419 419 function REFRESH_Callback(hObject, eventdata, handles) 420 420 421 set(handles.REFRESH,'BackgroundColor',[1 1 0]) 421 set(handles.REFRESH,'BackgroundColor',[1 1 0])% indicate activation of REFRESH 422 422 drawnow 423 423 … … 588 588 set(hhuvmat.CheckEditObject,'Value',1) % set uvmat to object edit mode to allow further object update 589 589 set(hhuvmat.CheckViewField,'Value',1) 590 590 591 set(handles.REFRESH,'BackgroundColor',[1 0 0]) 592 %set(handles.Coord,'BackgroundColor',[1 1 1]) 593 set(handles.num_RangeY_2,'BackgroundColor',[1 1 1]) 594 591 595 %------------------------------------------------------------------------ 592 596 % --- Executes on button press in MenuCoord. … … 617 621 618 622 function num_RangeX_2_Callback(hObject, eventdata, handles) 623 619 624 %------------------------------------------------------------------------ 620 625 %------------------------------------------------------------------------ … … 720 725 function Coord_CellEditCallback(hObject, eventdata, handles) 721 726 %------------------------------------------------------------------------ 727 %set(handles.Coord,'BackgroundColor',[1 1 0]) 722 728 % ListType=get(handles.Type,'String'); 723 729 % Type=ListType{get(handles.Type,'Value')}; … … 744 750 end 745 751 746 %------------------------------------------------------------------------ 747 % --- 'key_press_fcn:' function activated when a key is pressed on the keyboard 748 %------------------------------------------------------------------------ 749 function key_press_fcn(hObject,eventdata,handles) 750 752 753 function num_Angle_3_Callback(hObject, eventdata, handles) 754 755 %------------------------------------------------------------------------ 756 % --- Executes on key press with selection of a uicontrol 757 %------------------------------------------------------------------------ 758 function KeyPressFcn(hObject, eventdata, handles) 759 set(handles.REFRESH,'BackgroundColor',[1 0 1])% se REFRESH to magenta color, indicates that refresh needs to be done 760 761 %------------------------------------------------------------------------ 762 % --- Executes on key press with focus on Coord and none of its controls. 763 %------------------------------------------------------------------------ 764 function Coord_KeyPressFcn(hObject, eventdata, handles) 765 766 set(handles.REFRESH,'BackgroundColor',[1 0 1]) 751 767 xx=double(get(handles.set_object,'CurrentCharacter')); %get the keyboard character 752 768 if ismember(xx,[127 31])% delete, or downward … … 763 779 end 764 780 765 function num_Angle_3_Callback(hObject, eventdata, handles) 766 % hObject handle to num_Angle_3 (see GCBO) 767 % eventdata reserved - to be defined in a future version of MATLAB 768 % handles structure with handles and user data (see GUIDATA) 769 770 % Hints: get(hObject,'String') returns contents of num_Angle_3 as text 771 % str2double(get(hObject,'String')) returns contents of num_Angle_3 as a double 781 782
Note: See TracChangeset
for help on using the changeset viewer.