Skip to main content

kiln.ui

kiln.ui declares elements for each frame. Load it with local ui = require("kiln").ui. Stock compositions are in kiln.widgets.

Constructors​

FunctionDeclares
box, row, column, spacerContainers and flexible space.
textText, including font selection and truncation.
imageAn image file, optionally recoloured.
surfaceClient content displayed through its surface tree.
scrollA vertically scrolling column.
eachList items with retained per-key state.
FunctionRegisters
widgetSignal and timer redraws for a declaration function.
barAn edge bar that reserves workarea.
popupA popup with show, close and toggle methods.

The declare-time contract​

Drawing constructors run inside a bar, layout or declare hook. Registration functions run during config setup. See declaration rules.

The cfg contract​

Element options define sizing, padding, alignment, borders and input for box, row, column and surface. Other constructors accept only the fields on their own pages.

float​

Floating elements attach to a parent, root or named element outside normal layout.

Bars​

Bar options cover edge selection, workarea and per-frame defaults.

Popups​

Popup options and methods cover positioning, keyboard claims, scrims and controller lifetime.

Fonts​

Text fonts use Pango descriptions. Font size is a separate field.

Truncation​

Ellipsizing requires a horizontally clipping ancestor.

Bands (z order)​

Stacking bands define the base z values in ui.bands.

ui.menu(cfg) aliases kiln.menu.show. ui.tooltip(text) aliases kiln.tooltip.attach. ui.hotkeys(s) aliases kiln.hotkeys.show. ui.color(spec) parses colour specifications.

See also​