-
Notifications
You must be signed in to change notification settings - Fork 7
/
swe_ui_main.m
113 lines (97 loc) · 4.2 KB
/
swe_ui_main.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
function swe_ui_main
% Creates a new SWE_UI_MAIN menu.
% =========================================================================
% FORMAT: swe_ui_main
% =========================================================================
% The SwE GUI displays 4 buttons:
% - Specify model:
% This option opens the batch window and allows the user to specify a
% new 'SwE' matlabbatch.
% - Run model:
% This option allows the user to run a design specified during the
% specify model stage.
% - Results:
% This option allows the user to view and query thresholded results.
% - Documentation:
% This option opens the documentation available on the NISOx website
% via the Matlab internet browser.
% =========================================================================
% Author: Tom Maullin (05/09/2018)
% Version Info: $Format:%ci$ $Format:%h$
%=======================================================================
close(findobj(get(0,'Children'),'Tag','SwE Menu'))
%-Font details
%------------------------------------------------------------------
FS = spm('FontSizes');
PF = spm_platform('fonts');
%-Open SwE menu window
%----------------------------------------------------------------------
S = get(0,'ScreenSize');
F = figure('Color',[1 1 1]*.8,...
'Name','SwE Toolbox',...
'NumberTitle','off',...
'Position',[S(3)/2-200,S(4)/2-140,300,290],...
'Resize','off',...
'Tag','SwE Menu',...
'Pointer','Watch',...
'MenuBar','none',...
'Visible','off');
%-Outer Frames and text
%----------------------------------------------------------------------
axes('Position',[0 0 300/300 290/290],'Visible','Off')
text((095-5)/300,0.455,'SwE',...
'FontName',PF.times,'FontSize',FS(30)*2,...
'Rotation',90,...
'VerticalAlignment','bottom','HorizontalAlignment','center',...
'Color',[1 1 1]*.6);
text(0.5,0.96,'Sandwich Estimator Toolbox',...
'FontName',PF.times,'FontSize',FS(14),... %'FontAngle','Italic',...
'VerticalAlignment','middle','HorizontalAlignment','center',...
'FontWeight','Bold',...
'Color',[1 1 1]*.6);
text(0.98,0.9,['Version ' swe('ver')],...
'FontName',PF.times,'FontSize',FS(11),'FontAngle','Italic',...
'VerticalAlignment','middle','HorizontalAlignment','right',...
'FontWeight','Bold',...
'Color',[1 1 1]*.6);
%-Inner Frames
%----------------------------------------------------------------------
uicontrol(F,'Style','Frame','Position',[095 005 200 240],...
'BackgroundColor',swe('Colour'));
uicontrol(F,'Style','Frame','Position',[105 015 180 220]);
%-Buttons to launch SwE functions
%----------------------------------------------------------------------
uicontrol(F,'String','Specify Model',...
'Position',[115 190-(1-1)*55 130 035],...
'CallBack','swe_smodel',...
'Interruptible','on',...
'ForegroundColor','k');
uicontrol(F,'String','Run Model',...
'Position',[115 190-(2-1)*55 130 035],...
'CallBack','swe_rmodel',...
'Interruptible','on',...
'ForegroundColor','k');
uicontrol(F,'String','?',...
'Position',[250 190-(2-1)*55 025 035],...
'CallBack','spm_help(''swe_cp.m'')',...
'Interruptible','on',...
'ForegroundColor','b');
uicontrol(F,'String','Results',...
'Position',[115 190-(3-1)*55 130 035],...
'CallBack','swe_results',...
'Interruptible','on',...
'ForegroundColor','k');
uicontrol(F,'String','?',...
'Position',[250 190-(3-1)*55 025 035],...
'CallBack','spm_help(''swe_results_ui.m'')',...
'Interruptible','on',...
'ForegroundColor','b');
uicontrol(F,'String','Help (Online)',... %'<html>Documentation<br>  (Online)',...
'Position',[115 190-(4-1)*55 130 035],...
'CallBack','web(''http://www.nisox.org/Software/SwE'')',...
'Interruptible','on',...
'ForegroundColor','k');
%-Make visible
%----------------------------------------------------------------------
set(F,'Pointer','Arrow','Visible','on');
end