www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/cgbrowser.m
function h=cgbrowser(varargin) %CGBROWSER External interface to cgtools.cgbrowser % % h=CGBROWSER returns the persistent handle to the cgbrowser % object. % % This file also acts as the harbinger of all the browser activeX % callbacks. % Copyright 2000-2011 The MathWorks, Inc. and Ford Global Technologies, Inc. persistent objH % Search for a current cgbrowser, else return a new one if isempty(objH) % make absolutely sure CAGE isn't around somewhere? fH=cgf; if ~isempty(fH) % get handle from userdata objH= get(fH,'CGB'); else % create a blank new object objH= cgtools.cgbrowser; end % MLOCK might make the objH appear more often - won't have to go to fH userdata %mlock; elseif ~isa(objH,'cgtools.cgbrowser') % handle has been deleted? Create a valid one objH= cgtools.cgbrowser; end if nargin==0 h=objH; end