function ui=finduimenu(hfig) %FINDUIMENU Find all the uimenu in the figure % % UI=FINDUIMENU(HFIG) % % HFIG is the figure handle (default gcf) % UI is the vector of all the uimenu handles. % % Claudio Apr 10, 1995 % % % Copyright (c) 1995 by Claudio Rivetti and Mark Young % claudio@alice.uoregon.edu, mark@alice.uoregon.edu % if nargin >1 error('Too many input arguments.'); end if nargin == 0 hfig=gcf; end ch=get(hfig, 'children'); ui=[]; for i=1:length(ch) type=get(ch(i), 'type'); if strcmp(type, 'uimenu') ui=[ui ch(i)]; end end return