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 )
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)
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]