📄 fm_cset.m
字号:
function fig = fm_cset()
% FM_CSET create GUI for UDM general settings
%
% HDL = FM_CSET()
%
%Author: Federico Milano
%Date: 11-Nov-2002
%Version: 1.0.0
%
%E-mail: fmilano@thunderbox.uwaterloo.ca
%Web-site: http://thunderbox.uwaterloo.ca/~fmilano
%
% Copyright (C) 2002-2006 Federico Milano
global Theme Fig Comp
if Fig.cset, figure(Fig.cset), return, end
h0 = figure('Color',Theme.color01, ...
'Units', 'normalized', ...
'CreateFcn','Fig.cset = gcf;', ...
'DeleteFcn','Fig.cset = 0;', ...
'Colormap',[], ...
'FileName','fm_cset', ...
'MenuBar','none', ...
'Name','Component Settings', ...
'NumberTitle','off', ...
'PaperPosition',[18 180 576 432], ...
'PaperType','A4', ...
'PaperUnits','points', ...
'Position',sizefig(1.2*0.2375,1.25*0.3750), ...
'Resize','on', ...
'ToolBar','none');
% Frame for parameters and settings
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'ForegroundColor',Theme.color03, ...
'Position',[0.1000 0.2750*0.8 0.8000 0.4500*1.1], ...
'Style','frame', ...
'Tag','Frame1');
% Push buttons
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color03, ...
'Callback','fm_comp cset', ...
'FontWeight','bold', ...
'ForegroundColor',Theme.color09, ...
'Position',[0.1000 0.0500*1.5917*0.8 0.2333 0.0700*1.5917*0.8], ...
'String','Ok', ...
'Tag','Pushbutton1');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_comp cset', ...
'Position',[0.3833 0.0500*1.5917*0.8 0.2333 0.0700*1.5917*0.8], ...
'String','Apply', ...
'Tag','Pushbutton2');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','close(gcf)', ...
'Position',[0.6666 0.0500*1.5917*0.8 0.2333 0.0700*1.5917*0.8], ...
'String','Cancel', ...
'Tag','Pushbutton3');
% Edit text
h(1) = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','fm_comp name', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.5000 0.7279*0.8 0.3500 0.0651*0.8], ...
'Style','edit', ...
'Tag','EditText1');
h(2) = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color01, ...
'HorizontalAlignment','left', ...
'Position',[0.5000 0.4675*0.8 0.3500 0.0651*0.8], ...
'String','Initialization', ...
'Style','checkbox', ...
'Tag','Checkbox1');
h(3) = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color04, ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.5000 0.5977*0.8 0.3500 0.0651*0.8], ...
'Style','edit', ...
'Tag','EditText2');
h(5) = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color01, ...
'HorizontalAlignment','left', ...
'Position',[0.5000 0.3372*0.8 0.3500 0.0651*0.8], ...
'String','Shunt', ...
'Style','checkbox', ...
'Tag','Checkbox2');
% Frame and edit text for the variable name
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color04, ...
'ForegroundColor',Theme.color03, ...
'Position',[0.1000 0.8090 0.8000 0.0955*0.8], ...
'Style','frame', ...
'Tag','Frame1');
h(4) = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color04, ...
'FontWeight','bold', ...
'ForegroundColor',Theme.color07, ...
'Position',[0.2000 0.8170 0.6000 0.0637*0.8], ...
'Style','text', ...
'String','<empty>', ...
'Tag','StaticText4');
% Static texts
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color01, ...
'HorizontalAlignment','right', ...
'Position',[0.1500 0.7279*0.8 0.3250 0.0651*0.8], ...
'String','Name', ...
'Style','text', ...
'Tag','StaticText1');
%h1 = uicontrol('Parent',h0, ...
% 'Units', 'normalized', ...
% 'BackgroundColor',Theme.color01, ...
% 'HorizontalAlignment','right', ...
% 'Position',[0.1500 0.4675*0.8 0.3250 0.0651*0.8], ...
% 'String','Initialization', ...
% 'Style','text', ...
% 'Tag','StaticText2');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color01, ...
'HorizontalAlignment','right', ...
'Position',[0.1500 0.5977*0.8 0.3250 0.0651*0.8], ...
'String','Description', ...
'Style','text', ...
'Tag','StaticText3');
set(h0,'UserData',h)
if nargout > 0, fig = h0; end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -