API reference

WindowAnchor Class

Describes where a child window attaches relative to the main window.
Each anchor encodes a parent–child attachment pair: the parent point selects where on the parent window, and the child point selects where on the child window. The child is positioned so that these two points coincide. Use WindowOffset for additional translation after anchoring.
The five preset objects cover the most common layouts:
WindowAnchor.Start   // child to the left of the parent
WindowAnchor.End     // child to the right
WindowAnchor.Top     // child above
WindowAnchor.Bottom  // child below
WindowAnchor.Center  // child overlapping at center

Use the factory to specify both parent and child attachment points via WindowEdge:
WindowAnchor(parent = WindowEdge.Bottom.End, child = WindowEdge.Top.Start)
WindowAnchor(parent = WindowEdge.End, child = WindowEdge.Center)

Signature

sealed class WindowAnchor

Companion Object

Properties

Bottom : WindowAnchor
[Get]
Window below the main window.
Signature
val Bottom: WindowAnchor
Center : WindowAnchor
[Get]
Window centered on the main window (overlapping).
Signature
val Center: WindowAnchor
End : WindowAnchor
[Get]
Window to the end (right in LTR) of the main window.
Signature
val End: WindowAnchor
Start : WindowAnchor
[Get]
Window to the start (left in LTR) of the main window.
Signature
val Start: WindowAnchor
Top : WindowAnchor
[Get]
Window above the main window.
Signature
val Top: WindowAnchor

Methods

invoke ( parent , child )
Creates an anchor with explicit parent and child attachment points.
Signature
operator fun invoke(parent: WindowEdge, child: WindowEdge): WindowAnchor
Parameters
parent: WindowEdge
child: WindowEdge
Returns
WindowAnchor