🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #494

How to set up a window for pointer focus

#494
From: Michelle Buck
Date: Fri, 07 Aug 1992 21:06
31 lines
1783 bytes
For those who are interested, a bug in an application I have been writing
might be useful for someone else.  If you are writing an application and
you would like a window or windows to respond to pointer focus, the way
Shell does when debugging, then this is how you can do it:

1) Set a PostScript tracking Rect equal to the frame Rect of the window in
question

2) In the mouseEntered method for the object you specified to receive
the event when you set the tracking Rect, put code to make the window Main
or Key or both, and order the window as desired

Remember that whenever the window's frame Rect changes, you must reset the
tracking Rect.  This can be accomplished in methods such as
windowDidResize

A convenient place to put all of the code for making a window respond to
pointer focus can be placed in the window's delegate.  in other words,
build a small controller class that you will use as the window delegate for
all the windows you wish to have pointer focus for.

			- Erik

 -------------------------------------------------------------------------
 Michelle Buck     |                   |  michelle@meaddata.com
 Mead Data Central | "Do everything I  |  ...!uunet!meaddata!michelle
 P.O. Box 933      |  say and I'll be  |
 Dayton, OH 45401  |  your slave."     |
		   |                   |
 -------------------------------------------------------------------------
Technical Details
Message-ID: <1992Aug7.210600.2173@meaddata.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!meaddata!michelle

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!meaddata!michelle
From: michelle@meaddata.com (Michelle Buck)
Subject: How to set up a window for pointer focus
Sender: news@meaddata.com (Usenet Administrator)
Organization: Mead Data Central, Dayton OH
Date: Fri, 7 Aug 1992 21:06:00 GMT
Message-ID: <1992Aug7.210600.2173@meaddata.com>
Lines: 32