Commit Graph
5 Commits
Author SHA1 Message Date
waozi 2514568dd9 Add TimePicker for picking a time of day
TimePicker shows a time as 24-hour HH:MM, or a placeholder while no time
is chosen, and opens an hour and a minute column at the current value. A
tap, a finger drag or fling, or the mouse wheel picks and scrolls; Down
opens it, the arrow keys step a column and wrap within it, Left and Right
switch columns, and Enter or Escape closes it. Optional Now and Done
buttons set the current time and close the popup. The time changes as it
is picked, so closing never loses a choice, and the popup stays on screen,
opening above the field when there is no room below. The picker takes the
dropdown's look from every style, light or dark, and portable apps can draw
it through the widget host.

Dropdowns now follow Kryon's light and dark system palettes; a dark palette
left their field and menu light before.

`make -C examples time-picker` builds a window that shows the picker in
each of its states.
2026-10-13 14:38:03 -03:00
waozi 9af484664e Let portable apps draw a Spinbox through the widget host
Hosted bundles can now step numbers with the standard Spinbox. The
regenerated codec also carries TextField's numeric flag, which was
missing from the hosted boundary.
2026-10-12 23:53:19 -03:00
waozi 7870801388 Let bundles use Press through the widget host
A bundle built with KRYON_HOSTED_UI now calls PressHostedHost, and the
widget host draws the press area in the host's frame and returns its press
state, so a hosted app such as Lumi can select messages by holding and
dragging. The generated codec gains PressProps and PressResult.
2026-10-11 00:27:32 -03:00
waozi 63d65c502a Write file imports in generated codecs as #import, file
An application's codec imports its own record files; the generator wrote
them with a space before the comma.
2026-10-11 00:20:25 -03:00
waozi 53ea0fdb87 Host the widgets of a bundle that runs inside another application
An application that runs a .zib inside its own window answered each
widget's HostedHost call with its own codec and dispatcher. Kryon now owns
that host side next to the bundle side: widget_host draws a bundle's widgets
in the frame's session, refuses calls from another frame, foreign records,
texture handles and assets its host's callback rejects, and closes scrolls
the bundle leaves open. WidgetHostSupports lists the calls it answers,
including Toggle.

widget_codec is generated from Kryon's widget records by
scripts/generate-widget-codecs.py, whose --uses option lets an application
generate codecs for its own records on top of Kryon's. hosted_values holds
the shared helpers: fields match by name, so a bundle and its host may be
built against different layouts.
2026-10-11 00:04:50 -03:00