The hand-built std::vector<std::string> selection (toggle/clear/select-all and
the contains checks) becomes SelectionModel<std::string> in multiple mode: the
banner, move-here picker and action menu now read the selected set and current
item from the shared selection model.
BrushListPopup no longer hand-builds BrushPresetButton widgets: the presets are
a ListView whose rows are ListRow with a custom-painted leading (the stroke
sample). ListRow gains a custom leading so a caller can paint its own mark, and
the brush sample paint moves into a free function.
The hand-rolled CommandRegistry is now a thin wrapper over Commands<Command>:
definitions, shortcuts, enabled/checked, run and key handling all come from the
shared registry, with the commandInfo label and the key-repeat tracking on top.
The repeat tracking itself moved into Commands<Id> so any app can offer fine
adjustment on a held shortcut, and the actions no longer carry the unused event
pointer.
RenameLayerDialog and SaveSketchDialog were two copies of the same one-field
prompt; replace them with the shared PromptDialog. The layer dialog keeps its
63-character limit and the library prompts their 64-character limit; the
prompt's submitted signal preserves Enter-confirm without re-confirming on a
focus change.
The UI layer now compiles against the refactored Widgets and shared Graphics
input layer: the old Painter/text positional API becomes Canvas + TextStyle,
ui::ImageId becomes ImageHandle, the InputID key registry becomes the shared
Key enum, event.touchGesture/wheelAmount/pressure become the new Event accessors,
and the theme Metrics fields are renamed. Sketch2D keeps its own command
registry (with repeat tracking and event-triggered actions) under
CommandRegistry, renamed so it no longer shadows the shared Commands.hpp; it
also keeps its profiler macros and the CPU-placement policy, rebuilt on the
shared Profiler and ThreadPinning.
The refactor moved pointer buttons, modifiers and the pointer sample into the
shared GraphicApplication input layer: PointerButton::Primary -> Left, the
old ui::Modifiers -> KeyModifiers, PointerTool::Finger -> PointerDevice::Finger,
and the canvas type is tp::Canvas rather than a Widgets painter. Rename the UI
layer to match and undo two over-eager Painter->Canvas replacements.
The refactor dropped the global profile macros, the CPU-placement policy and
the shared AppStorage. Follow it: delete the TP_PROFILE_* instrumentation and
the ThreadPlacement pinning (worker count becomes hardware_concurrency), and
give Sketch2D its own small AppStorage for its home folder. Also repair a
Painter->Canvas rename that had corrupted StrokePainter's deleted copy ops.
The refactor renamed Graphics -> GraphicApplication and moved Profiler into
GraphicApplicationDiagnostics, ParallelFor and WorkerLanes into Threading.
Point the libraries at the new targets so the ported includes resolve.
The refactor renamed the Widgets painter to tp::Canvas (fillRect -> rect,
fillCircle -> circle, strokeRect -> outline, strokeCircle -> circleOutline,
fillPolygon -> polygon, image -> drawImage, RecordingPainter ->
RecordingCanvasBackend). The UI layer still used the old Painter names; port
them, register the module in the root build, and link the tests against
WidgetsTesting instead of the removed Widgets test-support sources.