Draggable Tags?
Draggable Tags?
- Subject: Draggable Tags?
- From: Rachel Blackman <email@hidden>
- Date: Thu, 1 Jul 2004 22:16:40 -0700
I am trying to implement something a little odd, a heavily-customized
tab view.
The idea is that each 'tab' has a 'container path'; think of them as
nested, docking windows. If I have a path of 'foo:bar' and a path of
'foo:baz' both in one window, then there will be a 'foo' tab at the top
level, and when you click on it, you'll get a secondary line of tabs,
with 'bar' and 'baz'. If there is only one sub-tab of any given level,
it collapses the tab view up into the parent; i.e., if 'foo:baz' went
away, the foo tab would become 'foo (bar)' until there was another foo
subtag. If there is only one possible option at every level, all the
tabviews go away, that view becomes the window's content view, and the
window title changes to what the tab would've been.
That part, I have working fine; it takes my own NSView subclass (which
has a containerPath method on it) and will happily add it to the
window, or remove it based on the containerPath. All happy-skippy,
everything renders just fine, and the subclassed NSView doesn't care
where it is.
Now, here's the part that's throwing me for a curve; I want to be able
to drag-and-drop a tab. I want to, in other words, be able to 'tear' a
tab off of one tabset in a window, and either drop it into another
tabbed window, /or/ drop it out in space and have it spawn a new window
with it being the only tabset in it. But I cannot seem to figure out
where I need to start adding support for NSDragging stuff.
Implementing the NSDraggingSource informal protocol in my NSTabViewItem
subclass doesn't seem to do it, neither does adding it in my custom
NSTabView subclass. In fact, the draggingSourceOperationMaskForLocal:
method is never even called. :(
Any advice/help/pointers? Thanks!
--
Rachel 'Sparks' Blackman -- sysadmin, developer, mad scientist
"If it is not broken, give me five minutes to redesign it!"
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.