BoxLayout

Simple horizontal/vertical box layout

This widget stacks up a bunch of widgets horizontally or vertically. It adds margins around the entire container and a custom spacing between adjacent widgets.

Constructors

this
this(Orientation orientation, Alignment alignment, int margin, int spacing)

Construct a box layout which packs widgets in the given Orientation

Members

Functions

alignment
Alignment alignment()

The Alignment of this BoxLayout.

margin
int margin()

The margin of this BoxLayout.

margin
void margin(int margin)

Sets the margin of this BoxLayout.

orientation
Orientation orientation()

The Orientation this BoxLayout is using.

performLayout
void performLayout(NanoContext ctx, Widget widget)

See Layout.performLayout.

preferredSize
Vector2i preferredSize(NanoContext ctx, Widget widget, Widget skipped)

Implementation of the layout interface See Layout.preferredSize.

setAlignment
void setAlignment(Alignment alignment)

Sets the Alignment of this BoxLayout.

setOrientation
void setOrientation(Orientation orientation)

Sets the Orientation of this BoxLayout.

setSpacing
void setSpacing(int spacing)

Sets the spacing of this BoxLayout.

spacing
int spacing()

The spacing this BoxLayout is using to pad in between widgets.

Variables

mAlignment
Alignment mAlignment;

The Alignment of this BoxLayout.

mMargin
int mMargin;

The margin of this BoxLayout.

mOrientation
Orientation mOrientation;

The Orientation of this BoxLayout.

mSpacing
int mSpacing;

The spacing between widgets of this BoxLayout.

Inherited Members

From Layout

performLayout
void performLayout(NanoContext ctx, Widget widget)

Performs any and all resizing applicable.

preferredSize
Vector2i preferredSize(NanoContext ctx, Widget widget, Widget skipped)

The preferred size for this layout.

margin
int margin()

The margin of this Layout.

margin
void margin(int )

Sets the margin of this Layout.

Meta