Widgets: core engine (canvas painting, ordered input, interaction mechanisms) #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Widgets"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Widgets core engine
First of two PRs splitting the Widgets rewrite. This one is the engine: no widgets. Every widget, the window adapter and the gallery come in
WidgetsComponents(#13), which will be ported onto this API.The core was reviewed against its consumers (PR #13, Sketch2D, Taskboard, Objects, 3DEditor, Sketch3D, LibraryViewer). The review found 18 issues, and this branch resolves all of them.
GraphicApplication (3 commits, to be split into their own PR)
Canvasis now a portable drawing API over aCanvasBackend:SurfaceCanvaskeeps NanoVG on a window surface.RecordingCanvasBackendrecords drawing commands for headless tests.Canvas::Clipscopes,gradientRect(…, Axis), andTextMetrics.KeyModifiers/ModifierTrackerinInputState.WindowTypeslibrary — cursor, clipboard and platform types move into a small library, so code that only names them no longer links the GPU stack.Widgets
tp::Canvas— thePaintermirror is removed.AppStorageis removed.tp::InputEventlog, andui::Eventis now an envelope around the input event or a recognized gesture.Viewport+ViewportPolicy— scroll, pan, zoom, fling, stretch,reveal, auto-scroll.SelectionModel<Id>,ReorderSession,Commands<Id>.Column/Row/Stackown their layout and takeBoxOptions.emplaceChild<T>()gives widgets owned children.Widget::platform()provides window services that work without a window.openDropdown, andopenOverlaywithDialog,SheetorNotice.Theme::Interactionholds the interaction constants.Metricskeeps only the shared sizes, with a single scaling list that a test checks.Widget::assignreplaces the per-setter boilerplate.Ui(UiOptions{ textMetrics, theme, windowHost }), plus aWidgetsTestinglibrary (UiDriver, probes) built on the recording canvas.Verification
cfcb37f): the 3DEditor, LibraryViewer and Sketch3D entry points, plusSketchGUI, which still use the old API.84192f778eto9305f53a40- Move to the GraphicApplication layout: src/{core,layouts,widgets,app,components}, one static library each (WidgetsCore/.../WidgetsComponents) under the Widgets umbrella. - Split the widget set: the simple proof-of-concept widgets stay in widgets/; the full widgets (docking, kanban, markdown, media, files, views, session) and the node editor live in src/components/, grouped by category, with their tests alongside. - The tooltip bubble moves into core (the tooltip controller owns one) so core no longer depends on the Label widget; InputRouting moves into core too. - DebugInspector/DebugTools move to components/debug; WidgetApplication is now a minimal adapter without the inspector/debug menu. - Tests split: core + simple-widget tests in tests/, component tests in src/components/tests/, app adapter tests in tests/app/.Widgets: rebuild around measure/arrange layout, event routing and popupsto Widgets: minimal core library with simple widgets and layout engineWidgets: minimal core library with simple widgets and layout engineto Widgets: core engine library (widget, layout, painter, popup, theme)Widgets: core engine library (widget, layout, painter, popup, theme)to Widgets: core engine (canvas painting, ordered input, interaction mechanisms)View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.