0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 % BUILDMAINFIG build the main modelViewer window
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 % M Hewitson 18-10-08
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 % $Id: buildMainfig.m,v 1.2 2008/11/30 16:16:24 hewitson Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 function mainfig = buildMainfig(mainfig, varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 % %% Check if I exist already
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 % id = findobj('Tag', 'SIGBUILDERmainfig');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 % if ~isempty(id)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 % figure(id)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 % return
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 % end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 %% Some initial setup
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 Screen = get(0,'screensize');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 mainfig.Gproperties.Gcol = [255 255 255]/255;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 mainfig.Gproperties.Screen = Screen;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 mainfig.Gproperties.Gwidth = 0.3;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 mainfig.Gproperties.Gheight = 0.5;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 mainfig.Gproperties.Gborder = 10;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 mainfig.Gproperties.fontsize = 12;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 l = (0.5-mainfig.Gproperties.Gwidth/2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 b = (0.5-mainfig.Gproperties.Gheight/2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 w = mainfig.Gproperties.Gwidth;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 h = mainfig.Gproperties.Gheight;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 mainfig.Gproperties.Gposition = [l b w h];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 if ~isempty(varargin) && ishandle(varargin{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 mainfig.handle = varargin{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 set(mainfig.handle, 'Tag', 'MODELVIEWERmainfig');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 set(mainfig.handle, 'Units', 'normalized');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 % Initialize and hide the GUI as it is being constructed.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 mainfig.handle = figure('Name', 'LTPDA Model Viewer',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 'NumberTitle', 'off',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 'Visible','off',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 'Position',mainfig.Gproperties.Gposition,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 'Toolbar', 'none',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 'MenuBar', 'none',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 'Color', mainfig.Gproperties.Gcol,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 'Resize', 'on',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 'Tag', 'MODELVIEWERmainfig');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 % Set mainfig callbacks
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 set(mainfig.handle, 'CloseRequestFcn', {'modelViewer.cb_mainfigClose', mainfig});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 %------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 %- General properties
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 %------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 hmarg = 0.01;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 vmarg = 0.02;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 commHeight = 0.2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 % l b w h
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 % make settings panel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 w = 1-2*hmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 h = 0.25-2*vmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 l = hmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 b = 1-h-vmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 span = uipanel(mainfig.handle,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 'Title', 'Select model ', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 'FontSize', mainfig.Gproperties.fontsize, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 'BackgroundColor', [0.9 0.9 0.9], ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 'Position', [l b w h], ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 'BorderType', 'line', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 'BorderWidth', 1, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 'Tag', 'SettingsPanel', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 'HighlightColor', [0.5 0.5 0.5]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 % 'BackgroundColor', [1 1 1], ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 % make parameter panel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 w = 1-2*hmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 h = 0.55-2*vmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 l = hmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 b = 0.2+vmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 ppan = uipanel(mainfig.handle,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 'Title', 'Parameters ', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 'FontSize', mainfig.Gproperties.fontsize, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 'BackgroundColor', [200 220 240]/255, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 'Position', [l b w h], ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 'BorderType', 'line', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 'BorderWidth', 1, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 'Tag', 'MODELVIEWERparamspanel', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 'HighlightColor', [0.5 0.5 0.5]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 % make parameter panel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 w = 1-2*hmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 h = 0.2-2*vmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 l = hmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 b = vmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 cpan = uipanel(mainfig.handle,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 'Title', 'Controls ', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 'FontSize', mainfig.Gproperties.fontsize, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 'BackgroundColor', [200 220 240]/255, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 'Position', [l b w h], ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102 'BorderType', 'line', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 'BorderWidth', 1, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 'Tag', 'MODELVIEWERcontrolpanel', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 'HighlightColor', [0.5 0.5 0.5]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 %------------------------------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 % Model type
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 % label
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 l = hmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 h = commHeight;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 b = 1-h-3*hmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 w = 0.15;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 sth = uicontrol(span, 'Style','text',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 'String', 'model type ',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117 'Units', 'normalized', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 'HorizontalAlignment', 'right',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 'BackgroundColor', [0.9 0.9 0.9], ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120 'Fontsize', mainfig.Gproperties.fontsize, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121 'Position',[l b w h]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123 % menu box
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124 l = l + w + hmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 w = 0.2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126 mtsh = uicontrol(span, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127 'Style', 'popupmenu', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128 'Units', 'normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129 'Fontsize', mainfig.Gproperties.fontsize, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130 'BackgroundColor', 'w', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131 'String', {'ao', 'ssm'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 'Position', [l b w h],...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133 'Tag', 'ModelTypeSelect', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134 'Callback', {'modelViewer.cb_selectModelType', mainfig});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137 % Model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139 % label
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140 l = l + w + hmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141 h = commHeight;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 w = 0.15;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143 sth = uicontrol(span, 'Style','text',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144 'String', 'model ',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145 'Units', 'normalized', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146 'HorizontalAlignment', 'right',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147 'BackgroundColor', [0.9 0.9 0.9], ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148 'Fontsize', mainfig.Gproperties.fontsize, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149 'Position',[l b w h]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 % menu box
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152 l = l + w + hmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153 w = 0.4;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 clsh = uicontrol(span, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
155 'Style', 'popupmenu', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
156 'Units', 'normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
157 'Fontsize', mainfig.Gproperties.fontsize, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
158 'BackgroundColor', 'w', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
159 'String', ' ', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
160 'Position', [l b w h],...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
161 'Tag', 'ModelSelect', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
162 'Callback', {'modelViewer.cb_selectModel', mainfig});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
163
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
164
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
165 % Description field
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
166 l = hmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
167 h = 2.5*commHeight;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
168 w = 1-2*hmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
169 b = 4*vmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
170 sth = uicontrol(span, 'Style','text',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
171 'String', ' ',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
172 'Units', 'normalized', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
173 'HorizontalAlignment', 'left',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
174 'BackgroundColor', [1 1 1], ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
175 'Max', 1000, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
176 'Fontsize', mainfig.Gproperties.fontsize, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
177 'Enable', 'on', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
178 'Tag', 'MODELVIEWERmodeldescription', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
179 'Position',[l b w h]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
180
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
181 % Fire callbacks
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
182 modelViewer.cb_selectModelType(mtsh, mainfig);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
183 modelViewer.cb_selectModel(clsh, mainfig);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
184
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
185 % Build button
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
186 h = 1.5*commHeight;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
187 w = 0.2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
188 l = 1-w-hmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
189 b = 4*vmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
190 pbh = uicontrol(cpan,'Style','pushbutton',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
191 'String','build',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
192 'Callback', {'modelViewer.cb_buildModel', mainfig}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
193 'Units', 'normalized', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
194 'Fontsize', mainfig.Gproperties.fontsize, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
195 'Position',[l b w h]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
196
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
197 % Type button
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
198 h = 1.5*commHeight;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
199 w = 0.2;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
200 l = l-w-vmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
201 b = 4*vmarg;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
202 pbh = uicontrol(cpan,'Style','pushbutton',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
203 'String','type',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
204 'Callback', {'modelViewer.cb_typeModel', mainfig}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
205 'Units', 'normalized', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
206 'Fontsize', mainfig.Gproperties.fontsize, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
207 'Position',[l b w h]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
208
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
209
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
210
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
211 end
|