function ChildList=allchild(HandleList);
%ALLCHILD Get all object children
%   ChildList=ALLCHILD(HandleList) returns the list of all children 
%   (including ones with hidden handles) for each handle.  If 
%   HandleList is a single element, the output is returned in a 
%   vector.  Otherwise, the output is a cell array.
%
%   For example, try get(gca,'children') and allchild(gca).
%
%   See also GET, FINDALL.

%   Loren Dean
%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.10 $ $Date: 1997/11/21 23:48:15 $

error(nargchk(1,1,nargin));
if ~isa(HandleList,'double')|~all(ishandle(HandleList)),
  error('Invalid handles passed to ALLCHILD.')  
end  

Temp=get(0,'ShowHiddenHandles');
set(0,'ShowHiddenHandles','on');
ChildList=get(HandleList,'Children');
set(0,'ShowHiddenHandles',Temp);
