www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@localmod/gui_localmodopts.m
function [m,ok]=gui_localmodopts(m,action,fig,p) %GUI_LOCALMODOPTS Local model options dialog % % [M,OK]=GUI_LOCALMODOPTS(M) creates a modal dialog for setting up % options specific to the current local model class. This function is % the default, creating a simple 'No options available dialog'. Overload % it in local models which have additional options such as spline order. % % LYT=GUI_LOCALMODOPTS(M,'layout',FIG,P) creates and returns a layout in % figure FIG, based around altering the model in the pointer P. This % interface must be supported by overloaded methods. FIG may also be an % existing layout object in which case the layout is updated with fresh % information from the model in P. % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin<2 action='figure'; end switch lower(action) case 'figure' [m,ok] = gui_localmodoptsdlg(m); case 'layout' m=i_createlyt(fig,p); end function lyt=i_createlyt(figh,p) if ~isa(figh,'xregcontainer') str = 'There are no additional options available for this model class.'; u=xreguicontrol('Style','text',... 'Parent',figh,... 'Visible','off',... 'String',str,... 'HorizontalAlignment','left'); lyt=xreglayerlayout(figh,'elements',{u},'packstatus','off'); else % no updating necessary lyt=figh; end