frameRect(forContentRect:)
Returns the window’s frame rectangle with a given content rectangle.
Declaration
func frameRect(forContentRect contentRect: NSRect) -> NSRectParameters
- contentRect:
The content rectangle for the window expressed in screen coordinates.
Return Value
The window’s frame rectangle, expressed in screen coordinates, with contentRect.
Discussion
The window uses its current style mask in computing the frame rectangle. See NSWindow.StyleMask for a list of style mask values. The major advantage of this instance-method counterpart to frameRect(forContentRect:styleMask:) is that it allows you to take toolbars into account when converting between content and frame rectangles. (The toolbar is included in the frame rectangle but not the content rectangle.)