www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcmultiview/@StatefulAction/StatefulAction.m

    function obj = StatefulAction(varargin)
%STATEFULACTION Construct a new StatefulAction object
%
%  OBJ = STATEFULACTION(COMMAND, LABEL, DESCRIPTION, ICONFILE) create a new
%  action that can have its visible and enable properties toggled.  By
%  default the Enabled property is set up to fire StateChanged events.

%  Copyright 2005 The MathWorks, Inc. and Ford Global Technologies, Inc.


if nargin && isa(varargin{1}, 'mbcmultiview.StatefulAction')
    obj = varargin{1};
    varargin(1) = [];
else
    obj = mbcmultiview.StatefulAction;
end

obj.Action(varargin{:});
obj.enableStateChange({'Enabled'});