Home > marsbar > @mardo > private > pr_refresh_et.m

pr_refresh_et

PURPOSE ^

Refreshes data and display of event type window after edit

SYNOPSIS ^

function F = pr_refresh_et(D, ic, F, hList, hEdit)

DESCRIPTION ^

 Refreshes data and display of event type window after edit
 FORMAT F = pr_refresh_et(D, ic, F, hList)
 
 D              - design object
 ic             - indices to events to select
 F              - (optional) figure handle
 hList          - (optional) handle to list uicontrol
 hEdit          - (optional) handle to Edit uicontrol
 
 Returns
 F              - figure handle (in case you didn't have it)

 $Id$

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function F = pr_refresh_et(D, ic, F, hList, hEdit)
0002 % Refreshes data and display of event type window after edit
0003 % FORMAT F = pr_refresh_et(D, ic, F, hList)
0004 %
0005 % D              - design object
0006 % ic             - indices to events to select
0007 % F              - (optional) figure handle
0008 % hList          - (optional) handle to list uicontrol
0009 % hEdit          - (optional) handle to Edit uicontrol
0010 %
0011 % Returns
0012 % F              - figure handle (in case you didn't have it)
0013 %
0014 % $Id$
0015   
0016 if nargin < 1
0017   error('Need object');
0018 end
0019 if nargin < 2
0020   ic = [];
0021 end
0022 if nargin < 3
0023   F = findobj(get(0, 'Children'), 'Flat', 'Tag', 'ui_event_types');
0024 end
0025 if nargin < 4
0026   hList = findobj(F, 'Tag','eList');
0027 end
0028 if nargin < 5
0029   hEdit = findobj(F, 'Tag','eEdit');
0030 end
0031 
0032 if ~ishandle(F)
0033   error('Could not find ui_event_types window');
0034 end
0035 
0036 et = event_types(D);
0037 
0038 % Event type list to put
0039 if isfield(et, 'name')
0040   eNames = {et(:).name};
0041 else
0042   eNames = {};
0043 end
0044 
0045 set(hList, 'String', eNames);
0046 set(hList, 'Value', ic);
0047 set(F, 'Userdata', D);
0048 set(hEdit, 'UserData', 1);

Generated on Wed 11-May-2022 16:26:09 by m2html © 2003-2019