sf_tool_callback.m
来自「一个matlab的将军模型」· M 代码 · 共 43 行
M
43 行
function sf_tool_callback(command)
% Callback function for CheckMate sf_tool function
%
% See Also:
% sf_tool
switch command
case 'current_system'
sys = gcs;
if ~isempty(sys)
sys = get_root_system(sys);
else
sys = '';
end
[obj,fig] = gcbo;
sys_edit = findobj(fig,'style','edit');
set(sys_edit,'String',sys)
case 'number_current_chart',
[obj,fig] = gcbo;
sys_edit = findobj(fig,'style','edit');
sys = get(sys_edit,'String');
switch sys
case {'CElib','CEtemplate'}
disp('Stateflow tool will not work for "CElib" or "CEtemplate".')
otherwise
number_sf_chart('','currentchart');
end
case 'number_all_charts'
[obj,fig] = gcbo;
sys_edit = findobj(fig,'style','edit');
sys = get(sys_edit,'String');
switch sys
case {'CElib','CEtemplate'}
disp('Stateflow tool will not work for "CElib" or "CEtemplate".')
otherwise
number_sf_chart(sys,'allcharts');
end
case 'close',
[obj,fig] = gcbo;
close(fig)
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?