FlexRow

class FlexRow(spacing: Double) : Layout

Layout that stacks children horizontally with optional spacing. It scales Views up to fit the parent's height and take up as much horizontal room as possible. But it respects View.minimumSize, and won't make Views narrower.

Parameters

spacing

between Views

Constructors

Link copied to clipboard
constructor(spacing: Double)

Inherited functions

Link copied to clipboard
open override fun item(of: Sequence<Positionable>, at: Point): LookupResult

Gets the child within the Positionable at the given point. The default is to ignore these calls and let the caller perform their own search for the right child. But Layouts are free to return a value here if it can be done more efficiently.

Link copied to clipboard
open override fun layout(views: Sequence<Positionable>, min: Size, current: Size, max: Size, insets: Insets): Size

Positions and sizes the given views and returns a size appropriate to laying out these views within the given constraints.

Link copied to clipboard
open override fun preferredSize(views: Sequence<Positionable>, min: Size, current: Size, max: Size, insets: Insets): Size

Determines the best size to contain the views given the constraints. The default implementation relies on layout with current = max for the answer.

Link copied to clipboard
open override fun requiresLayout(old: Size, new: Size): Boolean

Indicates whether a layout is needed because of the given size change to a container. This is called whenever the container's size changes.

open override fun requiresLayout(child: Positionable, within: Size, old: Rectangle, new: Rectangle): Boolean

Indicates whether a layout is needed because of the given bounds change to a child within a container. This is called whenever the child's size changes.