Subclassing NSToolBar.
Subclassing NSToolBar.
- Subject: Subclassing NSToolBar.
- From: "John C. Randolph" <email@hidden>
- Date: Thu, 4 Oct 2001 00:12:53 -0700
I'd like to have a custom view that behaves like NSToolBarView, so that
when you drag its items around, you get that nice smooth animation as
things shift to make room for what you're dragging. I'm trying to get
an idea of whether it's quicker to re-implement or to subclass NSToolBar
to do what I want.
First of all, NSToolBarView isn't published API, so I'd have to snarf it
with class-dump. Secondly, when playing around with the toolbar in
Mail, I can see that there are times when there's more than one icon
sliding. Thirdly, I have a need for a vertical orientation as well as
the existing horizontal mode.
For what I have in mind, I won't be needing the configuration sheet.
All of the items in my toolbar would represent instances of the same
class.
Anyone care to share some ideas?
-jcr
"I fear all we have done is to awaken a sleeping giant and fill him with
a terrible resolve." -Admiral Isoroku Yamamoto, Dec 7, 1941.