doevent.m

来自「任意边界结构正交曲线网格生成程序」· M 代码 · 共 57 行

M
57
字号
function theResult = doevent(self, theEvent, theMessage, varargin)% ps/doevent -- Call "ps" event handler.%  doevent(self, theEvent, theMessage) calls the registered%   event handler on behalf of self, a "ps" object.  Menus%   and controls are processed according to their "Tag"%   property.  A notice is posted whenever an appropriate%   event-handler cannot be found. % Copyright (C) 1999 Dr. Charles R. Denham, ZYDECO.%  All Rights Reserved.%   Disclosure without explicit written consent from the%    copyright owner does not constitute publication. % Version of 05-Nov-1999 19:28:46.% Updated    10-Dec-1999 00:56:21.if nargout > 0, theResult = []; endif nargin < 1, help(mfilename), return, endif nargin < 2, theEvent = '(none)'; endif nargin < 3, theMessage = []; endresult = [];h = gcbo;if isempty(h) & ishandle(theMessage)	h = theMessage;end% Menus and controls are processed via "Tag".switch get(h, 'Type')case {'uimenu', 'uicontrol'}	theEvent = get(h, 'Tag');endtheHandler = handler(self, theEvent);okay = logical(0);if ~isempty(theHandler)	try		result = builtin('feval', theHandler, self, theEvent, theMessage);		okay = logical(1);	catch	endendif ~okay	theEvent = translate(self, theEvent);	if isempty(theEvent), theEvent = '(none)'; end	theType = get(gcbo, 'Type');	disp([' ## No event-handler: ' theEvent ' (' theType ' = ' num2str(gcbo) ')'])endif nargout > 0, theResult = self; end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?