Fwd: mavericks style tabs
-- Forwarded message -- From: *Conrad Shultz* conrad_shu...@apple.com Date: Saturday, May 31, 2014 Subject: mavericks style tabs To: SevenBits sevenbitst...@gmail.com On May 18, 2014, at 3:12 PM, SevenBits sevenbitst...@gmail.com javascript:_e(%7B%7D,'cvml','sevenbitst...@gmail.com'); wrote: I don’t believe that Apple has released publicly any kind of code to make these kinds of tabs. Would be nice to see them though. Please file a bug at bugreport.apple.com if you would find that useful. Thanks, Conrad ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: mavericks style tabs
On Saturday, May 31, 2014, Conrad Shultz conrad_shu...@apple.com wrote: On May 18, 2014, at 3:12 PM, SevenBits sevenbitst...@gmail.com javascript:_e(%7B%7D,'cvml','sevenbitst...@gmail.com'); wrote: I don’t believe that Apple has released publicly any kind of code to make these kinds of tabs. Would be nice to see them though. Please file a bug at bugreport.apple.com if you would find that useful. Okay, I will. That will be helpful to many people, I think. Thanks, Conrad ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: mavericks style tabs
On May 18, 2014, at 3:30 PM, SevenBits wrote: On May 18, 2014, at 6:22 PM, Uli Kusterer witness.of.teacht...@gmx.net wrote: On 18 May 2014, at 23:06, Luther Baker lutherba...@gmail.com wrote: Trying my hand at some Cocoa development ... is there an SDK around the tabs used in Finder or Safari? If not, is there a popular library that folks are using ( https://urldefense.proofpoint.com/v1/url?u=https://github.com/rsms/chromium-tabsk=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0Ar=yJFJhaNnTZDfFSSz1U9TSNMmxGyib3KjZGuKfIhHLxA%3D%0Am=ihAq%2F9sYJx0uRRRknJog%2Bz76%2FWSI%2FeU0Eg%2BZkq4RS%2FA%3D%0As=022b4bc75bb38cf30d3fe81e00ca46eb0d052c5950ac9d933cc67fd0ce296837 ?) or is this something folks are generally building from ground up? Which of the features do you need? Do you need to be able to drag/drop/re-arrange tabs? In any event, it may be helpful to know that NSTabView can be used without a border and without actual tabs at the top, as an invisible, generic paging view. So you could let that take care of correctly doing display, focus-switching etc. and just create a control that draws the actual tabs to click at. Of course, if you want the tabs to be on your title bar, like what Chrome and the new Firefox do, you’ll need some NSWindow trickery. Not really - that part's easy enough with [newWindow setStyleMask:[newWindow styleMask] | NSTexturedBackgroundWindowMask]; [newWindow setAutorecalculatesContentBorderThickness:NO forEdge:NSMaxYEdge]; [[newWindow toolbar] setShowsBaselineSeparator:NO]; What I would personally do? I would create a view subclass and draw the tabs myself with Core Graphics, and then add that view as a subview of the target window’s theme view. Now *that's* trickery. My tabView is in the window's contentView, no need to poke around in the theme view: NSRect tabFrame = [tabView bounds]; NSWindow *window = [tabView window]; /* * Make the border extend to just below the top of the contentFrame. * This will draw a line and will be where the sheet appears. * If we don't set it, we'll get a random one. */ NSRect windowRect = [[window contentView] bounds]; CGFloat delta = windowRect.size.height - tabFrame.size.height + 2; [window setContentBorderThickness:delta forEdge:NSMaxYEdge]; ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
mavericks style tabs
Trying my hand at some Cocoa development ... is there an SDK around the tabs used in Finder or Safari? If not, is there a popular library that folks are using ( https://github.com/rsms/chromium-tabs ?) or is this something folks are generally building from ground up? Thanks, -Luther ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: mavericks style tabs
On May 18, 2014, at 5:06 PM, Luther Baker lutherba...@gmail.com wrote: Trying my hand at some Cocoa development ... is there an SDK around the tabs used in Finder or Safari? If not, is there a popular library that folks are using ( https://github.com/rsms/chromium-tabs ?) or is this something folks are generally building from ground up? I don’t believe that Apple has released publicly any kind of code to make these kinds of tabs. Would be nice to see them though. chromium-tabs is a decent library, but it’s a little old, and Chromium/Chrome no longer uses that particular tab style. Also, last I checked it doesn’t use ARC and appears to be abandoned. Thanks, -Luther ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/sevenbitstech%40gmail.com This email sent to sevenbitst...@gmail.com signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: mavericks style tabs
On 18 May 2014, at 23:06, Luther Baker lutherba...@gmail.com wrote: Trying my hand at some Cocoa development ... is there an SDK around the tabs used in Finder or Safari? If not, is there a popular library that folks are using ( https://github.com/rsms/chromium-tabs ?) or is this something folks are generally building from ground up? Which of the features do you need? Do you need to be able to drag/drop/re-arrange tabs? In any event, it may be helpful to know that NSTabView can be used without a border and without actual tabs at the top, as an invisible, generic paging view. So you could let that take care of correctly doing display, focus-switching etc. and just create a control that draws the actual tabs to click at. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://zathras.de ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: mavericks style tabs
On May 18, 2014, at 6:22 PM, Uli Kusterer witness.of.teacht...@gmx.net wrote: On 18 May 2014, at 23:06, Luther Baker lutherba...@gmail.com wrote: Trying my hand at some Cocoa development ... is there an SDK around the tabs used in Finder or Safari? If not, is there a popular library that folks are using ( https://github.com/rsms/chromium-tabs ?) or is this something folks are generally building from ground up? Which of the features do you need? Do you need to be able to drag/drop/re-arrange tabs? In any event, it may be helpful to know that NSTabView can be used without a border and without actual tabs at the top, as an invisible, generic paging view. So you could let that take care of correctly doing display, focus-switching etc. and just create a control that draws the actual tabs to click at. Of course, if you want the tabs to be on your title bar, like what Chrome and the new Firefox do, you’ll need some NSWindow trickery. What I would personally do? I would create a view subclass and draw the tabs myself with Core Graphics, and then add that view as a subview of the target window’s theme view. Then I’d do what Uli suggested and use an NSTabView to switch between content (UNLESS you’re using WebKit - then switch the active WebFrame). But you should tell us more so that we can get some additional information and give better advice. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://zathras.de ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/sevenbitstech%40gmail.com This email sent to sevenbitst...@gmail.com signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: mavericks style tabs
But you should tell us more so that we can get some additional information and give better advice. Sure. I'm writing a diagramming tool and I'd like multiple diagrams open simultaneously. Using the NSTabView and custom drawing as described seems like a viable option to me. ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com