1+ function saveGUIstate(handles )
2+
3+ propertystruct = initializeproperties();
4+ end
5+
6+ function [propertystruct ] = initializeproperties()
7+ % Initialize structure containing the default properties to save.
8+ % Fieldnames of propertystruct should match the 'Type' property of the UI
9+ % object to save. If the object has multiple types (e.g. uicontrol), then
10+ % nest the types under their overall object type (e.g. uicontrol.edit).
11+ % Strings (single or cell array) must match the property name(s).
12+
13+ propertystruct.figure = ' Position' ;
14+ propertystruct.axes = ' ' ; % Nothing to save currently
15+ propertystruct.uipanel = ' ' ; % Nothing to save currently
16+ propertystruct.uitabgroup = ' ' ; % Nothing to save currently, introduced in R2014b
17+ propertystruct.uitab = ' ' ; % Nothing to save currently, introduced in R2014b
18+ propertystruct.uitable = ' ' ; % Nothing to save currently
19+ propertystruct.actxcontrol = ' ' ; % Nothing to save currently
20+ propertystruct.uicontrol.togglebutton = ' Value' ;
21+ propertystruct.uicontrol.radiobutton = ' Value' ;
22+ propertystruct.uicontrol.checkbox = ' Value' ;
23+ propertystruct.uicontrol.edit = ' String' ;
24+ propertystruct.uicontrol.slider = {' Value' , ' Min' , ' Max' , ' SliderStep' };
25+ propertystruct.uicontrol.listbox = {' String' , ' Value' , ' Min' , ' Max' };
26+ propertystruct.uicontrol.popupmenu = {' String' , ' Value' };
27+ propertystruct.uicontrol.text = ' ' ; % Nothing to save currently
28+ end
0 commit comments