📄 fm_make.m
字号:
function fig = fm_make()% FM_MAKE create GUI for UDM definition%% HDL = FM_MAKE()%%see also FM_BUILD%%Author: Federico Milano%Date: 11-Nov-2002%Version: 1.0.0%%E-mail: Federico.Milano@uclm.es%Web-site: http://www.uclm.es/area/gsee/Web/Federico%% Copyright (C) 2002-2008 Federico Milanoglobal Theme Fig Pathif Fig.make, figure(Fig.make), return, end%screensize = get(0,'ScreenSize');h0 = figure('Color',Theme.color01, ... 'Units', 'normalized', ... 'Colormap',[], ... 'CreateFcn','Fig.make = gcf;', ... 'DeleteFcn','Fig.make = 0;', ... 'FileName','fm_make', ... 'MenuBar','none', ... 'Name','Component Editor', ... 'NumberTitle','off', ... 'PaperPosition',[18 180 576 432], ... 'PaperType','A4', ... 'PaperUnits','points', ... 'Position',sizefig(0.6992,0.7168), ... 'Resize','on', ... 'ToolBar','none');% Static texts for variables% ----------------------------------------------------------------------------------h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color01, 'HorizontalAlignment','left', ... 'Position',[0.0235 0.8100 0.1363 0.0286], ... 'String','Buses','Style','text','Tag','StaticTextBuses');h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color01, 'HorizontalAlignment','left', ... 'Position',[0.1863 0.8100 0.1363 0.0286], ... 'String','State Variables','Style','text','Tag', ... 'StaticTextStateVariable');h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color01, 'HorizontalAlignment','left', ... 'Position',[0.3492 0.8100 0.1363 0.0286], ... 'String','Algebraic Variables','Style','text', ... 'Tag','StaticTextAlgebraicVariable');h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color01, 'HorizontalAlignment','left', ... 'Position',[0.5120 0.8100 0.1363 0.0286], ... 'String','Service Variables','Style','text','Tag', ... 'StaticTextServiceVariable');h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color01, 'HorizontalAlignment','left', ... 'Position',[0.6749 0.8100 0.1363 0.0286], ... 'String','Parameters','Style','text','Tag', ... 'StaticTextParameter');h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color01, 'HorizontalAlignment','left', ... 'Position',[0.8369 0.8100 0.1363 0.0286], ... 'String','Initial Variables','Style','text','Tag', ... 'StaticTextInitVariable');% Static texts for equations% ----------------------------------------------------------------------------------h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color01, 'HorizontalAlignment','left', ... 'Position',[0.023464 0.4765 0.15642 ... 0.027248], 'String','Differential Equations', ... 'Style','text','Tag','StaticTextDifferentialEquation');h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color01, 'HorizontalAlignment','left', ... 'Position',[0.023464 0.3165 0.15754 ... 0.027248], 'String','Algebraic Equations', ... 'Style','text','Tag','StaticTextAlgebraicEquation');h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color01, 'HorizontalAlignment','left', ... 'Position',[0.023464 0.1553 0.16313 ... 0.027248], 'String','Service Equations', ... 'Style','text','Tag','StaticTextDialogEquation');% Static texts for input strings% ----------------------------------------------------------------------------------h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color01, 'HorizontalAlignment','left', ... 'Position',[0.0235 0.8887 0.2000 0.0286], 'String',['Input ' ... 'Variable'],'Style','text','Tag','StaticTextInputVar');h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color01, 'HorizontalAlignment','left', ... 'Position',[0.0235 0.5475 0.2 0.0286], 'String',['Input ' ... 'Equation'],'Style','text','Tag','StaticTextInputEq');ico0 = fm_mat('make_save');ico1 = fm_mat('make_add');ico2 = fm_mat('make_delete');ico3 = fm_mat('make_recall');ico4 = fm_mat('make_set');ico5 = fm_mat('make_make');ico6 = fm_mat('make_open');ico7 = fm_mat('make_exit');ico8 = fm_mat('make_settings');ico9 = fm_mat('make_new');% General purpose push buttons% ----------------------------------------------------------------------------------h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color02,'Callback','fm_new', 'CData', ... ico9,'Position',[0.2035 0.940 0.0346 0.0450], ... 'TooltipString','New','Tag','PushbuttonNew');h1 = uicontrol('Parent',h0,'Units','normalized','BackgroundColor', ... Theme.color02,'Callback','fm_open', 'CData', ... ico6,'Position',[0.2381 0.940 0.0346 0.0450], ... 'TooltipString','Open','Tag','PushbuttonOpen');h1 = uicontrol('Parent',h0,'Units','normalized','BackgroundColor', ... Theme.color02,'Callback','fm_save(Comp)', 'CData', ... ico0,'Position',[0.2727 0.940 0.0346 0.0450], ... 'TooltipString','Save','Tag','PushbuttonSave');h1 = uicontrol('Parent',h0,'Units','normalized','BackgroundColor', ... Theme.color02,'Callback','fm_build', 'CData', ... ico5,'Position',[0.3246 0.940 0.0346 0.0450], ... 'TooltipString','Build','Tag','PushbuttonBuild');h1 = uicontrol('Parent',h0,'Units','normalized','BackgroundColor', ... Theme.color02,'Callback','fm_comp cprop', 'CData', ... ico8,'Position',[0.3592 0.940 0.0346 0.0450], ... 'TooltipString','Settings','Tag','PushbuttonSett');h1 = uicontrol('Parent',h0,'Units','normalized','BackgroundColor', ... Theme.color02,'Callback','close(gcf);', 'CData', ... ico7,'Position',[0.4111 0.940 0.0346 0.0450], ... 'TooltipString','Close','Tag','PushbuttonClose');% Push buttons for manipulating equations% ----------------------------------------------------------------------------------% recallh1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color02, 'CData', ico3,'Callback',['fm_comp ' ... 'mcallxe'],'Position',[0.9372 0.4333 0.0346 ... 0.0450], 'TooltipString','Recall','Tag', ... 'PushbuttonRecallStateEq');h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color02, 'CData', ico3,'Callback',['fm_comp ' ... 'mcallae'],'Position',[0.9372 0.2726 0.0346 ... 0.0450], 'TooltipString','Recall','Tag', ... 'PushbuttonRecallAlgEq');h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color02, 'CData', ico3,'Callback',['fm_comp ' ... 'mcallse'],'Position',[0.9372 0.1118 0.0346 ... 0.0450], 'TooltipString','Recall','Tag', ... 'PushbuttonRecallServiceEq');% addh1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color02, 'CData', ico1,'Callback',['fm_comp ' ... 'maddxe'],'Position',[0.9372 0.3883 0.0346 ... 0.0450], 'TooltipString','Add','Tag', ... 'PushbuttonAddStateEq');h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color02, 'CData', ico1,'Callback',['fm_comp ' ... 'maddae'],'Position',[0.9372 0.2276 0.0346 ... 0.0450], 'TooltipString','Add','Tag','PushbuttonAddAlgEq');h1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color02, 'CData', ico1,'Callback',['fm_comp ' ... 'maddse'],'Position',[0.9372 0.0668 0.0346 ... 0.0450], 'TooltipString','Add','Tag','PushbuttonAddSerEq');% deleteh1 = uicontrol('Parent',h0,'Units', 'normalized','BackgroundColor', ... Theme.color02, 'CData', ico2,'Callback',['fm_comp ' ... 'mdelxe'],'Position',[0.9372 0.3433 0.0346 ... 0.0450], 'TooltipString','Delete','Tag', ... 'PushbuttonDelStateEq');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -