• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: best way to determine if portion of window is visible?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: best way to determine if portion of window is visible?


  • Subject: Re: best way to determine if portion of window is visible?
  • From: Negm-Awad Amin <email@hidden>
  • Date: Wed, 20 Aug 2008 14:06:05 +0200


Am Di,19.08.2008 um 18:13 schrieb Jason Bobier:

Hi Amin,

Unless I am misunderstanding, this would tell me if it was onscreen, but not if the window was exposed (not hidden by other windows).
Ah, probably I misunderstood you.

Cheers,
Amin



Jason

On Aug 15, 2008, at 5:03 PM, email@hidden wrote:

Hey folks,

I'd like to fade my window out if any portion of it is visible to the
user, otherwise I simply want to close it for speed. Is there an easy
way to determine if some portion of the window is visible?
I do not know, whether this is a "dirty" hack (are there clean hacks?), but you can read the frames of the screens
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSScreen_Class/Reference/Reference.html#/ /apple_ref/occ/clm/NSScreen/screens


http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSScreen_Class/Reference/Reference.html#/ /apple_ref/occ/instm/NSScreen/frame

and clip it with you window frame.

http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#/ /apple_ref/occ/instm/NSWindow/frame

That probably works.

Cheers,

Amin


Thanks!

Jason
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

Amin Negm-Awad email@hidden




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >RE: best way to determine if portion of window is visible? (From: email@hidden)
 >Re: best way to determine if portion of window is visible? (From: Jason Bobier <email@hidden>)

  • Prev by Date: Re: This document's file has been changed by another application?
  • Next by Date: Re: How to reference a NSDocument from a NSView?
  • Previous by thread: Re: best way to determine if portion of window is visible?
  • Next by thread: Re: best way to determine if portion of window is visible?
  • Index(es):
    • Date
    • Thread