Expand description
The checked program: every name resolved to an id, every expression typed, and every dynamic part of the UI annotated with the state it reads.
Macros§
- id đź”’
Structs§
- Binding
- A two-way binding: the control shows the place’s value and writes the user’s edits to it.
- Dialog
- A
pick_…(…)call: once the event finishes, shows a file dialog, and writes the path or paths the user picks toanswer. Cancelling leavesansweras it was. Settings the call leaves out are empty:"", or[]fortypes. - Download
- A
download(…)call: fetchesurlinto the folderfolderon another thread, asname, or after the address when that is"", over up toconnectionsconnections at once, sendingheadersand trying failed connections again up toretriestimes, writing how it is going to each bound place: always its percentage done and a description of where it stands, and the other fields the call binds. - Dynamic
- An expression the UI shows, with the states whose changes require showing it again.
- Expr
- Field
Def - FnDef
- Parameters occupy the first locals, in order.
- FnId
- LocalId
- Loop
- A
for’s variables and what it loops over. - Menu
- A menu: its title, and its entries in order.
Ais what an item does: an action the app runs, or, as backends receive it, the number of the item. - MenuBar
- The app’s menus, in order, whose items’ actions share one frame of locals.
- NavItem
- A sidebar row, selected while
selectionholdsvalue. - Place
- A location that can be assigned or bound: state or a local, then fields and indexes.
- Program
- Shortcut
- A keyboard shortcut: the platform’s command key, Cmd on macOS and Ctrl on Windows,
with
key, and Shift or Alt (Option on macOS) when set.repr(C)because compiled apps store it as is. - State
Def - StateId
- One
statedeclaration of the app, numbered in the order they are declared. - State
Set - States read by a dynamic part of the UI, sorted and without duplicates.
- Struct
Def - Struct
Id - ViewDef
- ViewId
- Window
Def - Window
Id
Enums§
- Binary
Op - Dialog
Kind - What a dialog asks the user to pick. Compiled code passes it to the runtime as a
u32, which every platform’s C calling convention passes without widening. - Download
Command - What code asks of a running download, by its id.
repr(u32)because compiled apps pass it to the runtime, which every platform’s C calling convention passes without widening. - Download
Field - A piece of state a download reports into. Compiled apps pass it to the runtime by its code.
- Expr
Kind - Iterable
- What a
forloops over. Looping over a place makes the loop variable an alias of each element, so assigning through it changes the original list. - Menu
Entry - Node
- UI parts are shared, so whatever runs the program can keep them for as long as it shows them.
- Place
Root - Place
Step - Segment
- Stmt
- Type
- Window
Action - What code asks of a window.
repr(u32)because compiled apps pass it to the runtime, which every platform’s C calling convention passes without widening.
Constants§
- PRIMITIVE_
TYPES - The built-in types;
Type::primitive_namespells them.