Atlas Engine
API Referencegraphite

Row

Horizontal layout of UI children with spacing, padding, alignment, and an anchor.

Module: graphite

Horizontal layout of UI children with spacing, padding, alignment, and an anchor.

Declaration

export class Row extends UIObject { ... }

Extends: UIObject

Constructors

Creates a new row.

constructor(position: Position2d);

Creates a new row.

constructor(
            children: UIObject[],
            spacing: number,
            padding: Size2d,
            position: Position2d,
        );

Properties

spacing

The spacing.

spacing: number;

maxSize

The maximum size.

maxSize: Size2d;

padding

The padding.

padding: Size2d;

children

The child elements managed by this layout.

children: UIObject[];

position

The position in world space.

position: Position3d;

alignment

The alignment.

alignment: ElementAlignment;

anchor

The anchor.

anchor: LayoutAnchor;

style

The style applied to this layout.

style: UIStyle;

Methods

addChild

Appends a child element to the layout.

addChild(child: UIObject): void;

setChildren

Replaces the layout's child elements.

setChildren(children: UIObject[]): void;

getSize

Returns the current dimensions.

override getSize(): Size2d;

getScreenPosition

Returns the UI element's screen-space position.

override getScreenPosition(): Position2d;

setScreenPosition

Sets the UI element's screen-space position.

override setScreenPosition(position: Position2d): void;

setStyle

Applies a style to the element.

setStyle(style: UIStyle): Column;

On this page