Atlas Engine
API Referencegraphite

Column

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

Module: graphite

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

Declaration

export class Column extends UIObject { ... }

Extends: UIObject

Constructors

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

Properties

spacing

spacing: number;

maxSize

maxSize: Size2d;

padding

padding: Size2d;

children

children: UIObject[];

position

position: Position3d;

alignment

alignment: ElementAlignment;

anchor

anchor: LayoutAnchor;

style

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