Adjusting window title bar look/behavior on El Capitan

Is there any set of Cocoa declares that allow controls to “bleed” over the title bar, like the Contacts app in El Capitan?

In this particular case, I was not planning to use a toolbar; instead, I’d like the controls (ex: a container control) to use the window’s entire height. I’ve been testing this with several window types but the top of the container always gets clipped.

( BTW, If the answer is in a particular issue of xDev, I’ll gladly buy it :smiley: )

declare sub setStyleMask lib “Cocoa” selector “setStyleMask:” (w as integer, s As integer)
declare function styleMask lib “Cocoa” selector “styleMask” (w as integer) As integer

//Yosemite only
declare sub setTitlebarAppearsTransparent lib “Cocoa” selector “setTitlebarAppearsTransparent:” (windowHandle as integer, value as boolean)
setTitlebarAppearsTransparent(self.handle, true)

//add NSFullSizeContentViewWindowMask
setStyleMask(self.Handle, styleMask(self.Handle) or 32768)

  const NSWindowTitleHidden = 1
declare sub setTitleVisibility lib "Cocoa" selector "setTitleVisibility:" (windowHandle as Integer, value as Integer)
setTitleVisibility(self.Handle,NSWindowTitleHidden)

Worked like a charm. Thank you!

I’m using the above code and it is doing just as show above, BUT I’d really like to reposition the traffic light buttons -

My calendar is in front and you can see the close,min,resize buttons are in their normal place which does not align very well with the picker button.

I wonder how to get them a bit down and to the right as in the calendar to the left?

I think @Sam Rowlands has an XDev article on the declares involved with that.
I can’t recall if it’s an entirely different type of window/toolbar or if it’s just a property.

[quote=328804:@Tim Parnell]I think @Sam Rowlands has an XDev article on the declares involved with that.
I can’t recall if it’s an entirely different type of window/toolbar or if it’s just a property.[/quote]
You are correct, I don’t recall what edition it was in, a couple of years ago at least. Basically, you need to use a Toolbar. Which means you need to get your controls into the toolbar and apply almost all of the declares above.

Except this one.

[quote]//add NSFullSizeContentViewWindowMask
setStyleMask(self.Handle, styleMask(self.Handle) or 32768)[/quote]