Re: iPhoto embedded toolbar
Re: iPhoto embedded toolbar
- Subject: Re: iPhoto embedded toolbar
- From: Andy Matuschak <email@hidden>
- Date: Wed, 24 Aug 2005 14:01:59 -0500
Presuming you're talking about the bar that runs along the bottom of
the iPhoto window and that contains things like "Rotate", "Edit",
"Book", "Slideshow", and so on, I'm not sure that's an NSToolbar. One
can't cmd+drag items around in it, so unless they willfully and
specifically removed that functionality, it's a custom view not based
on NSToolbar.
Now, as for making such an interface based on NSToolbar, that might
be possible. You could fetch the private toolbar view from the
toolbar with the (aptly named) method _toolbarView. Of course, it's
private and so is susceptible to change. You can set the background
color of a toolbar with _setBackgroundColor:, another private method.
So long as you're okay with having this toolbar at the top of the
window, you could just call _setBackgroundColor: to gray on the
toolbar. Removing the toolbar view from the top of the window and
putting it somewhere else would be problematic, I'd imagine. That is,
I think you could successfully add it as a subview somewhere, but I
doubt it would cooperate. If you're really interested though, it has
numerous (private) methods you can access that might help you.
This of course begs the question: why make the current run upstream?
Consider putting your toolbar at the top of the window like the rest
of us. ;)
- Andy Matuschak
On Aug 24, 2005, at 1:12 PM, email@hidden wrote:
Hi folks,
I'm trying to create a replica of the iPhoto embedded toolbar and
I'm trying to
do so without (basically) recreating the entire NSToolbar class.
It almost
seems like it would be simple enough to do if NSToolbar inherited from
something like NSView, and I could arbitrarily change the
background color and
position it anywhere in a window.
Is there a way to get access to the private "id _toolbarView"
object? Is there
a way to reverse engineer the private methods in NSToolbar to find
something
that might let me do my own positioning and background colors?
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40andymatuschak.org
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden