function [list] = list_of_all_children_of_object(H)

% all_children(HANDLE) returns all children of the specified object,
%   not including the object itself.
%
% Note: known to work under Matlab 5.1; may break under version 4.

list = [];

while (~isempty(H))
  next = [];
  for i = H(:)'
    cell = get(i, 'Children');
    next = [next; cell];
  end
  H = next;
  list = [list; H];
end
