dev

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2026 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package dev provides developer tools for Bellui applications.

Call dev.Enable(window) during development to add:

  • F12: toggle layout inspector overlay (widget boundaries + type labels)
  • F11: dump widget tree to console
  • F10: toggle refresh tracing

These tools are safe to ship — they add no overhead unless toggled on.

func main() {
    w := app.New().NewWindow("My App")
    dev.Enable(w) // add dev tools
    bellui.ShowAndRun(w)
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enable

func Enable(w bellui.Window)

Enable adds developer tools to the given window. Press F12 to toggle the layout inspector overlay, F11 to dump the widget tree to the console, F10 to toggle refresh/layout tracing.

func Watch

func Watch(dir string, onChange func())

Watch monitors .go files in the given directory (recursively) and calls the rebuild function when changes are detected. Useful for development:

// In a separate goroutine or main:
dev.Watch(".", func() {
    // Rebuild and restart — or just log
    log.Println("Source changed, rebuild needed")
})

For a full auto-restart workflow, use WatchAndRun instead.

func WatchAndRun

func WatchAndRun(watchDir, pkgPath string)

WatchAndRun watches .go files and automatically rebuilds and restarts the application. This is a development-only convenience — do not use in production.

It builds the package at pkgPath, runs the resulting binary, and restarts it when source files change.

// Typically called from a dev helper:
// go run ./cmd/dev-server
func main() {
    dev.WatchAndRun(".", ".")
}

Types

This section is empty.

Directories

Path Synopsis
Package inspector provides an opt-in, read-only runtime widget-tree inspector for debugging Bellui layouts — the human-facing counterpart to the accessibility introspection layer.
Package inspector provides an opt-in, read-only runtime widget-tree inspector for debugging Bellui layouts — the human-facing counterpart to the accessibility introspection layer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL