Documentation
¶
Overview ¶
Example: gogpu/ui — File Drop Demo
Demonstrates OS file drag-and-drop integration with the gogpu/ui widget toolkit. Files dragged from Explorer/Finder/Nautilus are received through the dnd.Manager and displayed as a reactive list.
Key concepts shown:
- dnd.DropTarget registration with hit-testing bounds
- dnd.KindFile + dnd.FilePayload for OS file drops
- state.Signal for reactive UI updates
- primitives.TextFn for computed text display
Architecture:
OS file drop → gogpu.OnDragDrop → desktop.Run bridge → dnd.Manager → DropTarget.Drop → Signal update → reactive text display
Rendering: event-driven (default since gogpu v0.43.0). 0% CPU when idle. Redraws only on user interaction or file drop.
Click to show internal directories.
Click to hide internal directories.