Re: Tear off...
Re: Tear off...
- Subject: Re: Tear off...
- From: j o a r <email@hidden>
- Date: Mon, 20 May 2002 16:15:43 +0200
Everything is possible to a programmer! :)
Since the AppKit doesn't have any support for this (which might be A Good Thing with regards to the latest lawsuits over this type of functionality) you will need to implement it yourself. There are of course a zillion ways you could implement this. I'll outline one that mimics the behaviour of Phothshop.
I would guess that a bare minimum what you'd need to do involves:
1) Look for a CMD-Key mouse down event in the tab view and locate which tab view item it corresponds to.
2) Create a window without a title bar floating on top of the original window and place a tab view with a corrwsponding tab item there to create the illusion of a popped out tab view item. Remove the popped tab view item from the original tab view.
3) Track mouse moved events and move the window with the popped tab view item with it.
4) Wait for the mouse up event. Check to see a) if it was above the original tab view, in which case you re-insert the tab view at that position - or - b) if it was outside of the original window then create a new window and place the tab view item there.
There are a lot of nice things you can add to this, like providing live feedback in the original tab view while dragging the popped tab over it. Perhaps drawing the popped tab semi-transparent, et.c.
j o a r
On Monday, May 20, 2002, at 15:38 Europe/Stockholm, Albert Atkinson wrote:
How hard would it be to implement tear off tab items? What I would like is the user to be able to move the tabs to different places in the tab pane by command+dragging it to another spot in the tab pane. I would also like if they dragged it out of the window to make another window and then if they dragged that window back into the tab pane or closed the window then that tab would appear back in the pane. Is this possible?
_______________________________________________
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.
References: | |
| >Tear off... (From: Albert Atkinson <email@hidden>) |