| INPUTGUI | A comprehensive gui automatic builder. This function helps to create GUI very quickly without bothering about the positions of the elements. After creating a geometry, elements just place themselves in the predefined locations. It is especially useful for figures in which you intend to put text buttons and descriptions. |
| Usage: | >> [ outparam ] = inputgui( 'key1', 'val1', 'key2', 'val2', ... ); >> [ outparam userdat strhalt outstruct] = inputgui( 'key1', 'val1', 'key2', 'val2', ... ); |
| Inputs: | |
'geometry' |
this corresponds to supergui() key-val input 'geomhoriz' |
'uilist' |
list of uicontrol lists describing elements properties { { ui1 }, { ui2 }... }, { 'uiX' } being GUI matlab uicontrol arguments such as { 'style', 'radiobutton', 'String', 'hello' }. See Matlab function uicontrol() for details. |
'helpcom' |
optional help command |
'title' |
optional figure title |
'userdata' |
optional userdata input for the figure |
'mode' |
['normal'|'noclose'|'plot' fignumber]. Either wait for user to press OK or CANCEL ('normal'), return without closing window input ('noclose'), only draw the gui ('plot') or process an existing window which number is given as input (fignumber). Default is 'normal'. |
'geomvert' |
vertical geometry argument, this argument is passed on to supergui() |
'eval' |
[string] command to evaluate at the end of the creation of the GUI but before waiting for user input. |
| Output: | |
outparam |
list of outputs. The function scans all lines and add up an output for each interactive uicontrol, i.e edit box, radio button, checkbox and listbox. |
userdat |
'userdata' value of the figure. |
strhalt |
the function returns when the 'userdata' field of the button with the tag 'ok' is modified. This returns the new value of this field. |
outstruct |
returns outputs as a structure (only tagged ui controls are considered). The field name of the structure is the tag of the ui and contain the ui value or string. |
| Note: | the function also adds three buttons at the bottom of each interactive windows: 'CANCEL', 'HELP' (if callback command is provided) and 'OK'. |
| Example: | |
res |
inputgui('geometry', { 1 1 }, 'uilist', ... { { 'style' 'text' 'string' 'Enter a value' } ... { 'style' 'edit' 'string' '' } }); |
| Author: | Arnaud Delorme, CNL / Salk Institute, La Jolla, 1 Feb 2002 |
| See also: | supergui(), eeglab() |