<ViewWindow> ( view rect style -- window )
Cocoa bridge ยป Cocoa window utilities

Prev:<NSWindow> ( rect style class -- window )


Vocabulary
cocoa.windows

Inputs
viewan NSView
rectan NSRect
stylea style mask


Outputs
windowan NSWindow


Word description
Creates a new NSWindow with the specified dimensions, containing the given view.

Definition


: <ViewWindow> ( view rect style -- window )
dup class-for-style <NSWindow>
[ swap { void { id SEL id } } "setContentView:" send ] keep
dup dup { id { id SEL } } "contentView" send
{ void { id SEL id } } "setInitialFirstResponder:" send
dup 1
{ void { id SEL char } } "setAcceptsMouseMovedEvents:" send
dup 0 { void { id SEL char } } "setReleasedWhenClosed:" send
;