IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
irootlabgui.m
Go to the documentation of this file.
1 %>@ingroup guigroup mainguis
2 %> @file
3 %> @brief OpenSpec main GUI
4 %>
5 %> Contains shortcuts to major GUIs and allows to see auto-generated code.
6 %> @image html Screenshot-openspecgui.png
7 
8 %> @cond
9 function varargout = irootlabgui(varargin)
10 
11 % Edit the above text to modify the response to help openspecgui
12 
13 % Last Modified by GUIDE v2.5 25-Aug-2012 23:16:18
14 
15 % Begin initialization code - DO NOT EDIT
16 gui_Singleton = 1;
17 gui_State = struct('gui_Name', mfilename, ...
18  'gui_Singleton', gui_Singleton, ...
19  'gui_OpeningFcn', @openspecgui_OpeningFcn, ...
20  'gui_OutputFcn', @openspecgui_OutputFcn, ...
21  'gui_LayoutFcn', [] , ...
22  'gui_Callback', []);
23 if nargin && ischar(varargin{1})
24  gui_State.gui_Callback = str2func(varargin{1});
25 end
26 
27 if nargout
28  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
29 else
30  gui_mainfcn(gui_State, varargin{:});
31 end
32 % End initialization code - DO NOT EDIT
33 
34 
35 % --- Executes just before openspecgui is made visible.
36 function openspecgui_OpeningFcn(hObject, eventdata, handles, varargin)
37 
38 % Choose default command line output for openspecgui
39 handles.output = hObject;
40 
41 % Update handles structure
42 guidata(hObject, handles);
43 
44 o = irdata();
45 set(handles.pushbuttonDatatool, 'BackgroundColor', o.color);
46 o = irobj();
47 set(handles.pushbuttonObjtool, 'BackgroundColor', o.color);
48 
49 
50 % initialization
51 global handles_irootlab;
53 set(handles.textVersion, 'string', sprintf('%s', irootlab_version));
54 handles_irootlab = handles;
55 refresh_code();
57 gui_set_position(hObject);
58 setup_load();
59 
60 
61 % --- Outputs from this function are returned to the command line.
62 function varargout = openspecgui_OutputFcn(hObject, eventdata, handles)
63 % varargout cell array for returning output args (see VARARGOUT);
64 % hObject handle to figure
65 % eventdata reserved - to be defined in a future version of MATLAB
66 % handles structure with handles and user data (see GUIDATA)
67 
68 % Get default command line output from handles structure
69 varargout{1} = handles.output;
70 
71 
72 
73 
74 
75 %##########################################################################
76 %##########################################################################
77 % Auxiliary functions
78 
79 %#########
80 function refresh_code()
82 global handles_irootlab IRCODE;
83 set(handles_irootlab.editCode, 'String', IRCODE.s);
84 set(handles_irootlab.text_codefilename, 'String', ['File: ' IRCODE.filename]);
85 
86 
87 %##########################################################################
88 %##########################################################################
89 
90 
91 % --- Executes on button press in pushbuttonDatatool.
92 function pushbuttonDatatool_Callback(hObject, eventdata, handles)
93 datatool();
94 
95 % --------------------------------------------------------------------
96 function Untitled_1_Callback(hObject, eventdata, handles)
97 
98 % --------------------------------------------------------------------
99 function Untitled_2_Callback(hObject, eventdata, handles)
100 
101 % --------------------------------------------------------------------
102 function moAbout_Callback(hObject, eventdata, handles)
103 about();
104 
105 % --- Executes on button press in pushbuttonObjtool.
106 function pushbuttonObjtool_Callback(hObject, eventdata, handles)
107 objtool();
108 
109 function editCode_Callback(hObject, eventdata, handles)
110 
111 % --- Executes during object creation, after setting all properties.
112 function editCode_CreateFcn(hObject, eventdata, handles)
113 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
114  set(hObject,'BackgroundColor','white');
115 end
116 
117 
118 % --- Executes on button press in pushbuttonRefreshCode.
119 function pushbuttonRefreshCode_Callback(hObject, eventdata, handles)
120 refresh_code();
121 
122 
123 % --------------------------------------------------------------------
124 function moExit_Callback(hObject, eventdata, handles)
125 delete(handles.figure1);
126 
127 
128 
129 % --- Executes on button press in pushbuttonReset.
130 function pushbuttonReset_Callback(hObject, eventdata, handles)
131 ircode_reset();
132 ircode_assert();
133 refresh_code();
134 
135 
136 % --- Executes on button press in pushbutton_save.
137 function pushbutton_save_Callback(hObject, eventdata, handles)
138 try
139  global IRCODE;
140  if ~isempty(IRCODE) && ~isempty(IRCODE.filename)
141  [name, path, filterindex] = uiputfile({'*.m', 'MATLAB source file(*.m)'}, 'Save as', IRCODE.filename);
142  if name > 0
143  IRCODE.filename = fullfile(path, name);
144  ircode_eval([], ['>>>>>>>>>>>>>>>>> Saved as ' IRCODE.filename]);
145  end;
146  end;
147 catch ME
148  msgbox(ME.message, 'Error!');
149 end;
150 
151 
152 
153 
154 % --- Executes on button press in checkbox_flag_logtake.
155 function checkbox_flag_logtake_Callback(hObject, eventdata, handles)
156 
157 % --- Executes on button press in pushbutton14.
158 function pushbutton14_Callback(hObject, eventdata, handles)
159 
160 % --- Executes on button press in pushbutton15.
161 function pushbutton15_Callback(hObject, eventdata, handles)
162 
163 
164 % --- Executes on button press in pushbutton_mergetool.
165 function pushbutton_mergetool_Callback(hObject, eventdata, handles)
166 mergetool();
167 
168 function Untitled_open_help_Callback(hObject, eventdata, handles)
169 help2();
170 
171 
172 % --- Executes on button press in pushbutton_help.
173 function pushbutton_help_Callback(hObject, eventdata, handles)
174 help2();
175 
176 % --- Executes on button press in pushbutton_web.
177 function pushbutton_web_Callback(hObject, eventdata, handles)
178 web('http://irootlab.googlecode.com', '-browser');
179 
180 %> @endcond
181 
182 
183 % --------------------------------------------------------------------
Dataset class.
Definition: irdata.m:30
function objtool(in varargin)
function help2(in prefix)
function ircode_eval(in s, in title)
function ircode_assert()
function colors_markers()
function gui_set_position(in hObject)
Base class.
Definition: irobj.m:33
function setup_load()
function irootlab_version()
function ircode_reset()