Controls of the program's own, drawn with a pen

A component draws itself with (bjogui draw), a pen over Avalonia's
DrawingContext, and hears the pointer, the wheel, the keys and the focus.
It keeps a state of its own between inputs, and sends outputs that drawn
makes the app's messages. It is drawn again only when its value, its state
or its size changes, and no Avalonia class is subclassed: the picture is a
DrawingImage on a canvas.

start-headless! sets Avalonia up with no screen, drawing with Skia, so
tests/components.bjo draws components and reads their pixels. The mixer
example has knobs and a timeline.

🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-4-8)

Co-Authored-By: eca-agent <git@eca.dev>
This commit is contained in:
Linus Björnstam 2026-10-25 20:34:19 +01:00
parent 5379269f43
commit 5237bf3273
9 changed files with 1482 additions and 33 deletions

View file

@ -9,4 +9,8 @@
(packages
(nuget (id "Avalonia") (version "11.3.2"))
(nuget (id "Avalonia.Desktop") (version "11.3.2"))
(nuget (id "Avalonia.Themes.Fluent") (version "11.3.2"))))
(nuget (id "Avalonia.Themes.Fluent") (version "11.3.2"))
;; A platform with no screen, and the drawing it uses, for tests: see
;; `start-headless!`.
(nuget (id "Avalonia.Headless") (version "11.3.2"))
(nuget (id "Avalonia.Skia") (version "11.3.2"))))