kiln.ui
kiln.ui declares elements for each frame. Load it with
local ui = require("kiln").ui. Stock compositions are in
kiln.widgets.
Constructors
| Function | Declares |
|---|---|
| box, row, column, spacer | Containers and flexible space. |
| text | Text, including font selection and truncation. |
| image | An image file, optionally recoloured. |
| surface | Client content displayed through its surface tree. |
| scroll | A vertically scrolling column. |
| each | List items with retained per-key state. |
| Function | Registers |
|---|---|
| widget | Signal and timer redraws for a declaration function. |
| bar | An edge bar that reserves workarea. |
| popup | A 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.
Menus
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.