On Mon, Feb 2, 2009 at 9:16 AM, Vince <mailingli...@satsumac.com> wrote:
> Hi there,
>
> I hope someone in this list can give me a hint on these issues/questions:
>
> (Note: all for OSX 10.5.x+)
>
> 1. Can I add elements to an NSWindow's title bar (without having to rebuild
> the entire window on my own)? In my case I'd just like to put an image right
> underneath the window's title.
> (kind of like what the OmniGroup did with the OmniFocus beta:
> http://cache.lifehacker.com/assets/resources/2008/01/omnifocus-header.png)

There is no supported way to do this. However, the window title is
part of the NSView hierarchy just like any other (although not within
the window's contentView), so with some cleverness you can get in
there. Just be aware that you set yourself up for breakage.

> 2. I'm about to build a custom view component for a project of mine.
> It is going to look something like this:
>
> http://img218.imageshack.us/my.php?image=customcomponentsin9.jpg
>
> 2a) How would I get that connection point between those two panels done with
> NSViews?
> Wouldn't I need to overlap the views (works since Leopard, I read)? Or is
> there a better (= valid) solution for this?

My first thought upon seeing that would be to have a smart container
view to draw the visual frames around the views, and then have the
subviews simply draw their contents.

> 2b) As you can see it will need semi-transparent gradients, some kind of
> inner glow and last but not least an outer glow and drop shadow.
> I googled, and googled, and googled… but couldn't find any demonstrative
> tutorial/instruction/guide on building such a custom view component.

http://www.cocoadev.com/index.pl?BreakItDown

Which part in particular gives you trouble? Gradients can be done with
NSGradient. Glows and shadows can be done with NSShadow.

Mike
_______________________________________________

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

Reply via email to