📄 m1_w4.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% m1_w4.m
%
% callback for window-display pushbutton 4 for m1
%
% MANUAL SCALE FACTOR WINDOW
%
% jmw
% 6/8/94
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if (~isempty(w4_h))
;
% do nothing, window is already open
return;
else
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% do following ONLY if window was just opened
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% initialize window:
w4_ht = 60 + (MAXRB * 40); % height dependent upon number of segments
if (isempty(w4_saved_position))
w4_h=figure('Position',[50 40 600 w4_ht],'Numbertitle','off',...
'Name','Man SF''s: Manual Scale Factors' ,'Resize','on',...
'Color',BACK_COLOR);
else
w4_h=figure('Position',w4_saved_position,'Numbertitle','off','Name',...
'Man SF''s: Manual Scale Factors' ,'Resize','on',...
'Color',BACK_COLOR);
end;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% add 'OK' function button
ok_ht = w4_ht - 50;
w4_pb_ok_h=uicontrol('Style','Pushbutton','Position',[50 ok_ht-40 60 30],'String','OK',...
'Callback','w4_ok');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% add 'Defaults' function button
w4_pb_defaults_h=uicontrol('Style','Pushbutton','Position',[450 ok_ht-40 60 30],'String','Defaults',...
'Callback','w4_de');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% add 'Update' function button
w4_pb_update_h=uicontrol('Style','Pushbutton','Position',[200 ok_ht-40 60 30],'String','Update',...
'Callback','w4_up','Visible', 'off');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% add 'Cancel' function button
w4_pb_cancel_h=uicontrol('Style','Pushbutton','Position',[300 ok_ht-40 60 30],'String','Cancel',...
'Callback','w4_ca','Visible', 'off');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% draw slider and edit/text/value windows
for i = 2:MAXRB,
temp_y = w4_ht - (60 + 35*i);
temp_x = 25 ;
temp_pos = [temp_x, temp_y, 120,30];
temp_txt = sprintf('%d %s', i, choice_1(i,:));
w4_rb_h(i)=uicontrol('Style','radiobutton','Position',...
temp_pos,'String',temp_txt,'HorizontalAlignment', 'left',...
'CallBack','w4_rb','Value',man_override_flag(i));
temp_pos = [temp_x+150,temp_y,40,30];
if(man_override_flag(i) == 1)
s_visible=sprintf('on');
elseif(man_override_flag(i)==0)
s_visible=sprintf('off');
end;
w4_e_h(i) = uicontrol('Style','edit','Position',temp_pos,...
'Visible',s_visible,'String',sprintf('%4.2f',man_sf(i)));
temp_pos = [temp_x+200,temp_y,300,20];
w4_s_h(i) = uicontrol('Style','slider','Position',temp_pos,...
'Visible',s_visible,'Max', 3, 'Value', man_sf(i),...
'CallBack','w4_s');
end;
tmp_man_sf = man_sf;
tmp_man_override_flag = man_override_flag;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear w4_ht ok_ht temp_x temp_y temp_pos s_visible temp_txt
%return;
end; % end ~isempty(w4_h)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -