Skip to main content

Module ui

Module ui 

Source
Expand description

The retained UI that apps drive: create native widgets, arrange them, update them. Changes are laid out together when Ui::flush runs, once per event.

StructsΒ§

Node
A widget, stack or spacer inside one window.
Position
Where a new node goes: at index among the children of parent.
Ui
A shared handle to the app’s windows; clones refer to the same UI.
UiState πŸ”’
WindowId
WindowState πŸ”’

ConstantsΒ§

FULL πŸ”’
The percentage at which a progress bar is full.
OPEN_WINDOW πŸ”’
UNSEEN_CHANGE πŸ”’
Sizes closer than this, in points, look the same on screen.

FunctionsΒ§

as_percent πŸ”’
Progress bars show a share of their width, so a percentage out of range shows as full or empty.
image_path πŸ”’
Where an image’s file is, with ~ standing for the home folder; None for no file.
live_window πŸ”’
surface πŸ”’
The surface drawn behind a stack’s children, if it has one.

Type AliasesΒ§

WindowCloseHandler
Decides what happens when the user asks to close a window.