Instead of using NSToolbar, you can add your own views to the top of subviews in the NSSplitView to achieve this after hiding the existing titlebar.
NSWindow's titleVisibility
can be used to hide the built-in titlebar, and by setting the window's styleMask
to include NSFullSizeContentViewWindowMask
you can cause the split view to take up the full height of the window.
To get the blur effect like toolbars/Messages you can use NSVisualEffectView in the top views. Setting the material NSVisualEffectMaterialTitlebar
will give the same look as standard titlebars.
And finally, you can put NSStackView
s inside the visual effect views, and then place the titlebar controls in there.
(And depending on the content that is below your fake toolbars, you might want to look into NSScrollView's contentInsets
property to allow the scroll view to show all of the content, but still be able to scroll under your toolbar).