Re: System Preferences "halo/spotlight" effect

2009-02-13 Thread John C. Daub
on 2/13/09 10:41 AM, Adam R. Maxwell at amaxw...@mac.com wrote:

> On Feb 13, 2009, at 4:51 AM, John C. Daub wrote:
> 
>> I'm trying to replicate that overlay halo/spotlight behavior, in a
>> similar sort of window (window full of icons). I'm seeking guidance in
>> how to achieve this.
> 
> I did this on an OmniAppKit preference window, and it works pretty
> well using an overlay window and custom view.  Code is all BSD licensed:
> 
> View:
> 
> http://bibdesk.svn.sourceforge.net/viewvc/bibdesk/trunk/bibdesk/BDSKSpotlightV
> iew.m?view=markup
> 
> Controller:
> 
> http://bibdesk.svn.sourceforge.net/viewvc/bibdesk/trunk/bibdesk/BDSKPreference
> Controller.m?view=markup
> 
> Overlay window:
> 
> http://bibdesk.svn.sourceforge.net/viewvc/bibdesk/trunk/bibdesk/BDSKOverlay.m?
> view=markup

Thank you for this!

I didn't use your code directly, but I followed what you did in the
BDSKSpotlightView source along with little bits from the other 2 and was
able to get something going. It's just proof of concept and plugging it into
my code right now, so I still have much work to do to get it working just
right for my needs. But this is exactly the sort of thing I needed.

Thank you for your help and for sharing this with me.

-- 
John C. Daub }:-)>=
 
"Nothing is greater than love or surrender." -- Buddo


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: System Preferences "halo/spotlight" effect

2009-02-13 Thread John C. Daub
on 2/13/09 10:26 AM, Kyle Sluder at kyle.slu...@gmail.com wrote:

> On Fri, Feb 13, 2009 at 7:51 AM, John C. Daub  wrote:
>> I'm figuring in System Preferences it's using an overlay window, but since
>> my content scrolls I cannot use a window and must use an NSView. I did find
>> -[NSView addSubview:positioned:relativeTo:], which helped me position my
>> "halo view" atop my contents, and I have been fiddling around with various
>> things trying to accomplish the effect but I can't quite get there. I do see
>> within System Preferences.app/Contents/Resources/ a spotlight.tif and
>> spotlightdim.tif which provide the halo masking, and I experimenting with
>> rendering copies of those TIFF's via
>> -drawAtPoint:fromRect:operation:fraction: within my -[HaloView drawRect:]
>> and I could sorta get things to work with a fraction of 0.5. But that just
>> gives me the halo. I'm struggling to get the fill over the full content
>> area, that then doesn't affect the halo areas.
> 
> 1) Why can't you use an overlay window?  Just convert to window
> coordinates and clip appropriately when objects are out of view.

Is there some particular reason why I ought to use an overlay window and not
just an NSView added via -addSubview:positioned:relativeTo: NSWindowAbove
relative to my content view?

> 2) If you want to go the image route, I'd use a Quartz mask.  Saves
> you from having to render the blur at runtime.

Adam R. Maxwell posted another reply and I took his approach.

Thanx for the reply.

-- 
John C. Daub }:-)>=
 
Too numb to cry, too tough to die. - BLS
 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: System Preferences "halo/spotlight" effect

2009-02-13 Thread Adam R. Maxwell


On Feb 13, 2009, at 4:51 AM, John C. Daub wrote:

I'm trying to replicate that overlay halo/spotlight behavior, in a  
similar

sort of window (window full of icons). I'm seeking guidance in how to
achieve this.


I did this on an OmniAppKit preference window, and it works pretty  
well using an overlay window and custom view.  Code is all BSD licensed:


View:

http://bibdesk.svn.sourceforge.net/viewvc/bibdesk/trunk/bibdesk/BDSKSpotlightView.m?view=markup

Controller:

http://bibdesk.svn.sourceforge.net/viewvc/bibdesk/trunk/bibdesk/BDSKPreferenceController.m?view=markup

Overlay window:

http://bibdesk.svn.sourceforge.net/viewvc/bibdesk/trunk/bibdesk/BDSKOverlay.m?view=markup




smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: System Preferences "halo/spotlight" effect

2009-02-13 Thread Kyle Sluder
On Fri, Feb 13, 2009 at 7:51 AM, John C. Daub  wrote:
> I'm figuring in System Preferences it's using an overlay window, but since
> my content scrolls I cannot use a window and must use an NSView. I did find
> -[NSView addSubview:positioned:relativeTo:], which helped me position my
> "halo view" atop my contents, and I have been fiddling around with various
> things trying to accomplish the effect but I can't quite get there. I do see
> within System Preferences.app/Contents/Resources/ a spotlight.tif and
> spotlightdim.tif which provide the halo masking, and I experimenting with
> rendering copies of those TIFF's via
> -drawAtPoint:fromRect:operation:fraction: within my -[HaloView drawRect:]
> and I could sorta get things to work with a fraction of 0.5. But that just
> gives me the halo. I'm struggling to get the fill over the full content
> area, that then doesn't affect the halo areas.

1) Why can't you use an overlay window?  Just convert to window
coordinates and clip appropriately when objects are out of view.
2) If you want to go the image route, I'd use a Quartz mask.  Saves
you from having to render the blur at runtime.

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com