www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeofftblnode/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.calmanager = true; supp.helptopics = {'&Tradeoff Table Help','CGTRADEOFFTBLVIEW'}; supp.allowduplication = false; supp.allowremoval = true; supp.surfaceviewer = true; supp.surfaceviewernodesfcn = @i_gensurfviewernodes; supp.postdeletecallback = @i_deletecheck; function [pNodes, selidx] = i_gensurfviewernodes(node) % Find list of model nodes that matches the current models of the tradeoff pTO = Parent(node); [pActive, pPassive] = getOutputs(pTO.info); pInTradeoff = [pActive, pPassive]; PROJ = project(node); modelNodes = filterbytype(PROJ, cgtypes.cgmodeltype); pNodes = null(xregpointer, size(pInTradeoff)); nDisp = 0; for n = 1:length(modelNodes) pNode = findptr(modelNodes{n}, pInTradeoff); if ~isempty(pNode) nDisp = nDisp + 1; pNodes(nDisp) = pNode; end end pNodes = pNodes(1:nDisp); selidx = 1; function i_deletecheck(cgb, evt) % Refresh tree icons and labels cgb.doDrawTree([], 'update');