www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgddnode/cgbsupport.m

    function supp=cgbsupport(nd, pSub, supp)
%CGBSUPPORT Get cgbrowser supported options
%
%  SUPP=CGBSUPPORT(OBJ, pSUB, SUPP) where SUPP is a structure of options
%  and pSUB is a pointer to the subitem to be shown, gets the options for
%  this particular node/subitem combination.

%  Copyright 2000-2008 The MathWorks, Inc. and Ford Global Technologies, Inc.


supp.renderer='painters';
supp.relabelmanager = @i_renamemanager;
supp.relabelcallback = @i_renamerefresh;
if ~isempty(nd.ptrlist)
   supp.allowremoval=true;
   supp.allowlabeledit=true;
   supp.allowduplication = true;
else
   supp.allowremoval=false;
   supp.allowlabeledit=false;
   supp.allowduplication = false;
end
supp.helptopics={'&Variable Dictionary Help','CGDDVIEW'};


function ok = i_renamemanager(dd, pItem, name)
ok = renameDDitem(dd, pItem, name);


function i_renamerefresh(cgb, evt)
pCurr = cgb.CurrentSubItem;
pDD = cgb.DataDictionary;
syms = insymval(pDD.info, pCurr);
if length(syms)>0
    cgb.doDrawList('update', pDD, syms);
end