-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfm_cset.m
159 lines (150 loc) · 5.22 KB
/
fm_cset.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
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: [email protected]
%Web-site: faraday1.ucd.ie/psat.html
%
% Copyright (C) 2002-2019 Federico Milano
global Theme Fig Comp
if ishandle(Fig.cset), figure(Fig.cset), return, end
h0 = figure('Color',Theme.color01, ...
'Units', 'normalized', ...
'CreateFcn','Fig.cset = gcf;', ...
'DeleteFcn','Fig.cset = -1;', ...
'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.31*0.8 0.3500 0.0651*0.8], ...
'String','Shunt', ...
'Style','checkbox', ...
'Tag','Checkbox2');
h(6) = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color01, ...
'HorizontalAlignment','left', ...
'Position',[0.5000 0.39*0.8 0.3500 0.0651*0.8], ...
'String','Series', ...
'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