-
Nicola Vigano authored
Signed-off-by:
Nicola Vigano <nicola.vigano@esrf.fr> git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@194 4c865b51-4357-4376-afb4-474e03ccb993
Nicola Vigano authoredSigned-off-by:
Nicola Vigano <nicola.vigano@esrf.fr> git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@194 4c865b51-4357-4376-afb4-474e03ccb993
gtGetParentFigure.m 424 B
function hndl = gtGetParentFigure(hndl)
% GTGETPARENTFIGURE Looks for the parent figure of a graphic handle
%
% Return:
% if the object is a figure or figure descendent, returns the figure.
% Otherwise returns [].
found = false;
while ~found
if isempty(hndl) || strcmp('figure', get(hndl, 'Type'))
found = true;
else
hndl = get(hndl, 'Parent');
end
end
end