Handbook
Glossary
auto-position ( window loc -- )
Vocabulary
ui
.
backend
.
cocoa
Inputs
window
an
object
loc
an
object
Outputs
None
Definition
USING:
accessors
alien.c-types
cocoa.messages
cocoa.runtime
cocoa.types
core-graphics.types
kernel
math
namespaces
sequences
ui.private
;
IN:
ui.backend.cocoa
:
auto-position
( window loc -- )
dup
{
0 0
}
=
[
drop
worlds
get-global
length
1
<=
[
{
void
{
id
SEL
}
}
"center"
send
]
[
worlds
get-global
last
second
window-loc>>
dupd
first2
<CGPoint>
{
NSPoint
{
id
SEL
NSPoint
}
}
"cascadeTopLeftFromPoint:"
send
{
void
{
id
SEL
NSPoint
}
}
"setFrameTopLeftPoint:"
send
]
if
]
[
first2
<CGPoint>
{
void
{
id
SEL
NSPoint
}
}
"setFrameTopLeftPoint:"
send
]
if
;