Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!ucsd!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!smurf!gopnbg!mcshh!shin From: shin@mcshh.hanse.de (Thomas Braun) Newsgroups: comp.lang.smalltalk Subject: ZOOM function on middle mouse button Summary: Changes to TerminalStream class Keywords: ZOOM Message-ID: <7905@mcshh.hanse.de> Date: 11 Aug 90 04:38:04 GMT Distribution: comp Lines: 42 - BEGIN OF FILE: TERM.CHG -------------------------------------------------- " ACTIVATE MIDDLE MOUSE BUTTON FOR ZOOM FUNCTION 10. August 1990 - Thomas Braun This File installs the zoom function [F8] on the middle button (if u hv!) :-) To load evaluate the following message, where the file must be in the current directory. (File pathName: 'term.chg') fileIn; close. "! Transcript cr; show: 'Filing in TerminalStream changes...'! ! TerminalStream methods ! middleButton: value "Private - Decode middle mouse button down event." mouseOffset := Cursor offset. mouseTime := Time mouseClockValue. value = 16r3 ifTrue: [^ZoomFunction]. ^SetLoc ! mouseButtonDown "Private - Decode all button down events." | button value | MouseEvent := true. button := (value := CurrentEvent value) bitAnd: 16r3. button = 16r1 "left button down" ifTrue: [^self leftButton: value]. button = 16r2 "right button down" ifTrue: [^self rightButton: value]. button = 16r3 "middle button down" ifTrue: [^self middleButton: value]. ^SetLoc ! ! Transcript show: ' done.'; cr; cr! - EOF: TERM.CHG ------------------------------------------------------------