function B = subsref(A,S)
%FIGHANDLE/SUBSREF

%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 1.10 $  $Date: 2000/08/01 22:09:53 $
%   J.H. Roh 

B = [];
if ishandle(A.figStoreHGHandle)

    UD = getscribeobjectdata(A.figStoreHGHandle);

    switch S.subs
     case 'Figure'
      B = get(A.figStoreHGHandle,'Parent');
     case 'HGHandle'
      B = A.figStoreHGHandle;
     otherwise  % HandleStore, ObjectStore, or other
      if isfield(UD,S.subs)
          B = getfield(UD,S.subs);
      end
    end
    
end
