class HexaPDF::Layout::ColumnBox

Parent

A ColumnBox arranges boxes in one or more columns.

The number of columns as well as the size of the gap between the columns can be modified.

Attributes

children[R]

The child boxes of this ColumnBox.

columns[R]

The number of columns. TODO: allow array with column widths later like [100, :*, :*]; same for gaps

gap[R]

The size of the gap between the columns.

Public Class Methods

new(children = [], columns = 2, gap: 36, **kwargs)

Creates a new ColumnBox object for the given children boxes.

Calls superclass method Box.new

Public Instance Methods

fit(available_width, available_height, frame)

Fits the column box into the available space.