domouse.m

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

M
59
字号
function theResult = domouse(self, theEvent, varargin)% ps/domouse -- Process "ps" mouse events.%  domouse(self, 'theEvent') handles mouse events%   on behalf of self, a "ps" object. % 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 08:43:30.% Updated    14-Dec-1999 16:39:22.persistent OLD_NAMEpersistent OLD_NUMBER_TITLEpersistent OLD_POINTERpersistent SELECTION_TYPEswitch lower(theEvent)% Mouse play.	case 'windowbuttonmotionfcn'	pt = get(gca, 'CurrentPoint');	pt = mean(pt);	NEW_NAME = ['[' num2str(pt(1)) ', ' num2str(pt(2)) ', ' num2str(pt(3)) ']'];	set(gcbf, 'Name', NEW_NAME)case 'windowbuttondownfcn'	pt = get(gca, 'CurrentPoint');	pt = mean(pt);	SELECTION_TYPE = get(gcbf, 'SelectionType');	NEW_NAME = ['[' num2str(pt(1)) ', ' num2str(pt(2)) ', ' num2str(pt(3)) ']'];	NEW_NUMBER_TITLE = 'off';	NEW_POINTER = 'circle';	OLD_NAME = get(gcbf, 'Name');	OLD_NUMBER_TITLE = get(gcbf, 'NumberTitle');	OLD_POINTER = get(gcbf, 'Pointer');	set(gcbf, ...			'WindowButtonDownFcn', '', ...			'WindowButtonMotionFcn', ['psevent WindowButtonMotionFcn'], ...			'WindowButtonUpFcn', ['psevent WindowButtonUpFcn'], ...			'Name', NEW_NAME, 'NumberTitle', NEW_NUMBER_TITLE, ...			'Pointer', NEW_POINTER);case 'windowbuttonupfcn'	set(gcbf, ...			'WindowButtonMotionFcn', '', ...			'WindowButtonUpFcn', '', ...			'WindowButtonDownFcn', ['psevent WindowButtonDownFcn'], ...			'Name', OLD_NAME, 'NumberTitle', OLD_NUMBER_TITLE, ...			'Pointer', OLD_POINTER);	OLD_NAME = [];	OLD_POINTER = [];endif nargout > 0	theResult = self;end

⌨️ 快捷键说明

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