[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do I need a college educ

>        Reply to:   RE>do I need a college education to
>> philg asks about window-layer and window-shown-p
>window-shown-p just determines whether or not the window exists on the screen
>somewhere, possibly under a pile of other windows.
>if you want to determine window occlusions, you'll have to hack that yourself.
>It's not that bad though, you just have to keep track of the size and position
>of each window and know your screen parameters.  These fns and vars should do
>it all:
>(view-size *myWin*)
>(view-position *myWin*)
>So if window A is 100 x 100 and at position #@(0 0) and window B is 50 x 50 and
>also at #@(0 0), then of course you won't see window B.  It IS there though,
>and a call to window-shown-p on window B returns ...... ?   T-e-e-e

The Mac toolbox keeps track of all this stuff very efficiently.  One needs
simply to get the "visrgn" (visible region) of a window, and ask the
toolbox (QuickDraw in this case) whether the region is empty.

There's no need to duplicate the bookkeeping (less efficiently).  Plus the
toolbox answers correctly if MCL is in the background, and other app's
windows are also obscuring part of the window in question.


>Date: 8/17/1994 11:59 PM
>To: Steve Casner
>From: philg@mit.edu
>The documentation for WINDOW-SHOWN-P says that it "returns true if the
>window is visible , and false it is hidden".
>This seems to return t for me when I give it any of the windows
>returned by (WINDOWS), i.e., for any window in the system even if it
>is covered by five other windows.
>I can't use WINDOW-LAYER either because if I have six windows all in
>different spots on a big screen, they are all visible as far as I'm
>concerned yet they all report themselves as being in different layers.
>Is there an easy way to determine if part or all of a window is in
>fact visible to a user?  And what is the purpose of WINDOW-SHOWN-P?

jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).