www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/+cgsimfill/@Feature/guiSelectConstraint.m
function [exprConstraint, ok] = guiSelectConstraint(F) %GUISELECTCONSTRAINT shows constraint editor % % [EXPRCONSTRAINT, OK] = GUISELECTCONSTRAINT(F) shows the constraint editor % and whether the user pressed OK or Cancel. If they pressed OK % EXPRCONSTRAINT is the cgexprconstraint the user chose. % Copyright 2006-2008 The MathWorks, Inc. % We need a exprconstraint so we can dispatch to the editordialog, we'll % make a new one if we have to. exprConstraint = F.Constraint; if isempty( exprConstraint ) exprConstraint = cgexprconstraint; end % Bring up the dialog [exprConstraint, ok] = editordialog( exprConstraint, info(F.Project) ); % Don't return anything if the user pressed Cancel. if ~ok exprConstraint = []; end