meui

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

MeUI

QML declares the surface. Go decides what it does.

Go 1.25 CI Go Reference Release

A weather dashboard built with MeUI

MeUI is a Go widget toolkit for web-looking pages and desktop consoles. A window can be built directly in Go, declared in Go structs with the flow wrappers, or written in QML — a builder, not a language: no expressions, no bindings, no JavaScript. However the layout is declared, every behaviour — a click, a selection, a scroll, a validation — is attached from Go, so the logic is typed, testable and debuggable.

The same scene renders through a software device (headless, deterministic) or OpenGL (through mobilegles), which is what makes the screenshots and the pixel tests in this repository possible.

Why MeUI

  • QML that can't lie. The QML is data, not code. Ids are resolved when the scene is built, so a typo is an error at startup, not a handler that silently never runs. There is no second place for state to hide: behaviour lives in Go, next to the rest of the app.
  • Web pages and consoles. Sticky headers, breakpoints, virtual lists and frosted glass on one side; menubars, typed tables, trees, inspectors and a navigation rail on the other. One widget set, two idioms.
  • One drawing seam. Soft and GL devices draw the same primitives. The render-parity harness renders a scene through both and diffs the frames, so the two backends cannot drift apart unnoticed.
  • Deterministic screenshots. Every example runs headless with -shot out.png; the behaviour harness asserts layout, hit-testing and painting without a display, and the visual harness asserts real pixels in a real window.
  • A toolkit you can theme. 19 presets (web, macOS, Windows 11, Adwaita, Breeze, metro, iOS, Android, harness) plus 52 importable IntelliJ-style theme files, with per-widget overrides.
  • No cgo in the desktop build. Control reaches SDL3 and OpenGL through purego, so the dev loop is plain CGO_ENABLED=0 go run.

Quick start

Requires Go 1.25.

git clone https://github.com/sixnineone/meui
cd meui
CGO_ENABLED=0 go run ./examples/launcher

The launcher lists every example; each one also runs on its own and every one can render a frame without a display:

CGO_ENABLED=0 go run ./examples/docs                 # a real window, real input
CGO_ENABLED=0 go run ./examples/docs -shot docs.png  # the same scene, headless

Install

go get github.com/sixnineone/meui@latest
go get github.com/sixnineone/meui-gl@latest   # the SDL3 window and input

API documentation follows the module: pkg.go.dev/github.com/sixnineone/meui. The smallest complete applications are examples/direct (no QML) and examples/flow (declarative Go); examples/landing is the QML one.

Requirements

Go 1.25 is the only build-time requirement — the desktop build is cgo-free, so there is no compiler or -dev package to install.

To open a window (anything without -shot) the machine needs Linux with:

  • SDL3 runtime (libSDL3.so.0) — windows, input, clipboard, dialogs and the tray
  • OpenGL 2.1+ (Mesa or the vendor driver) — the mobilegles renderer
  • an X11 display; on Wayland the toolkit requests X11, and SDL_VIDEODRIVER=wayland asks for the native backend instead
# openSUSE Tumbleweed
sudo zypper install libSDL3-0

# Debian / Ubuntu 25.04+
sudo apt install libsdl3-0

# Fedora 41+
sudo dnf install SDL3

# Arch
sudo pacman -S sdl3

Releases that do not package SDL3 yet (for example Ubuntu 24.04) need SDL3 3.x built from source and installed. Verify the runtime with:

ldconfig -p | grep libSDL3

Headless rendering (-shot, qmlshot, the test suites) needs none of that: no SDL3, no display, no GPU — it draws with the software device.

Optional, for development: python3 + numpy + Pillow for the render-parity reference script, and xvfb to run the GL tests without a desktop session. A C toolchain is only needed for the Android host, which lives in a separate repository.

Three ways to build a window

The same window can be built three ways. Behaviour is Go in every case; only the place the layout lives changes. Imports are omitted below.

Direct Go. Construct widgets and set their properties:

win := meui.NewWindow()

content := meui.NewPanel()
content.SetLayout(layout.NewVStack())
win.AddChild(content)

title := widgets.NewLabel()
title.SetText("Hello, MeUI")
title.SetFontSize(28)
content.AddChild(title)

content.AddChild(widgets.NewButton().SetText("Press me"))

Declarative Go — flow. Keep the layout declarative without a .qml file: describe the tree as Go structs and call Build. The compiler checks it, the fields mirror QML, and the result is the same widget tree the parser produces.

flow ships wrappers for Window, Panel, VStack, HStack, Label, Button and CheckBox. A widget without a wrapper plugs in by implementing flow.WidgetWrapper.

app := &flow.Window{
	W:     flow.W{Width: 720, Height: 480},
	Title: "Hello",
	Children: []flow.WidgetWrapper{
		&flow.VStack{
			W:       flow.W{ID: "body", FillWidth: true, FillHeight: true},
			Spacing: 12,
			Children: []flow.WidgetWrapper{
				&flow.Label{
					Text:      "Hello, MeUI",
					OnCreated: func(l *widgets.Label) { l.SetFontSize(28) },
				},
				&flow.Button{
					Text:    "Press me",
					OnClick: func() { fmt.Println("pressed") },
				},
			},
		},
	},
}

root, ids := flow.Build(app) // ids.Get("body") returns the built VStack

QML. Layout in a file, behaviour wired by id from Go — the model the examples use:

scene, _ := web.Load("hello.qml", "web-light", 720, 480)
scene.OnClick("card", func() { scene.SetText("title", "Pressed.") })

All three produce a meui.Widget tree, so the headless renderer does not care which one built it: web.Shot(root, 720, 480, "out.png").

layout lives in checked at best for
Direct Go Go calls compile time tools, tests, dynamic trees
flow Go structs compile time declarative Go apps without QML
QML .qml file parse time (qmlverify) designer-readable pages, imported scenes

A scene, a page of Go

Save this as hello.qml. Note what is not there: no onClicked, no bindings, no JavaScript. It is a description of a surface.

Window {
  width: 720
  height: 480
  color: "#F7F5F0"

  Rectangle {
    anchors.fill: parent
    color: "#F7F5F0"

    Text {
      id: title
      x: 40
      y: 44
      width: 480
      height: 48
      text: "Hello, MeUI"
      font.pixelSize: 28
      font.weight: 700
      color: "#0F1115"
    }

    Rectangle {
      id: card
      x: 40
      y: 112
      width: 300
      height: 120
      radius: 12
      color: "#FFFFFF"
      border.width: 1
      border.color: "#E5E0D6"
      shadow: "card"
      clickable: true

      Text {
        x: 20
        y: 20
        width: 260
        height: 24
        text: "A card is a Rectangle"
        font.pixelSize: 12
        font.weight: 600
        color: "#0F1115"
      }
    }

    Button {
      id: cta
      x: 40
      y: 260
      width: 160
      height: 44
      text: "Say hello"
    }
  }
}

The behaviour is the Go file:

package main

import (
	"log"

	"github.com/sixnineone/meui"
	"github.com/sixnineone/meui-gl/sdl3"
	"github.com/sixnineone/meui/graphics"
	"github.com/sixnineone/meui/web"
	"github.com/sixnineone/meui/widgets"
)

func main() {
	scene, err := web.Load("hello.qml", "web-light", 720, 480)
	if err != nil {
		log.Fatal(err)
	}

	// The scene declared the surface; Go decides what it does.
	scene.Get("cta").(*widgets.Button).SetOnClicked(func() {
		scene.SetText("title", "Hello, Go.")
	})
	scene.OnClick("card", func() {
		scene.SetText("title", "The card was clicked.")
	})

	root := scene.Root.(*meui.Window)
	app := meui.NewApp(sdl3.NewApp(), meui.AppOptions{Title: "Hello"})
	if _, err := app.AddWindow(root, meui.WindowOptions{
		Title: "Hello",
		Size:  graphics.NewSize(720, 480),
	}); err != nil {
		log.Fatal(err)
	}
	if err := app.Run(); err != nil {
		log.Fatal(err)
	}
}

scene.Shot(720, 480, "hello.png") renders the same tree without opening a window.

Features

Layout and surfaces

  • VStack, HStack, Grid, Flex, anchors and size policies
  • Rounded corners, borders, offset and soft shadows, gradients, clipping
  • Opacity, z-order, backdrop blur ("frosted glass"), sticky headers
  • Responsive breakpoints and per-breakpoint layout overrides

Scrolling and data

  • ScrollView / ScrollPane with wheel, drag and scroll bars
  • VirtualList — thousands of rows, only the visible widgets exist
  • Typed DataTable (columns, sorting, selection, column resize), Tree, ListView
  • Sticky sections inside long pages

Input

  • Click, hover, press, drag, wheel and keyboard focus, wired by id
  • MouseArea, context menus, tooltips, dialogs, bottom sheets, action sheets

Forms

  • TextField, ComboBox, CheckBox, RadioButton, Switch, Slider, SpinBox
  • ProgressBar, DatePicker, Calendar, ColorPicker, validation states and error rings

Chrome

  • MenuBar, StatusBar, NavigationRail, tabs (TabPanel), SplitView, DockPanel
  • Desktop-style window chrome with minimize/maximize/close

Text and graphics

  • Wrapped and elided labels, MarkdownView, MarkdownEditor, CodeEditor
  • Images (cover/contain, rounded, clipped), SVG icons, paths and strokes

Rendering and testing

  • Software device for headless, deterministic rendering
  • OpenGL renderer (mobilegles) with the same primitive set
  • Headless behaviour suite, windowed visual suite, render-parity harness, imgdiff
Landing page
landing — display type, offset card shadows, pill CTAsDashboard
dashboard — gradients, translucent cards, a box chartDocs
docs — fixed top bar and sidebar, a 1,880px article, a sticky headerDocs, scrolled
docs — the sticky header after scrollingMail
mail — a virtual list of 240 messages, frosted headerCheckout
checkout — a three-step flow with inline validationSettings
settings — web-styled fields, switches, a toastExamples launcher
launcher — every example in one windowOps console
ops — menubar, tree, typed table, inspector, status barAdmin console
admin — dark rail, filters, invite dialogDirect Go example
direct — the same page built with widgets and settersFlow example
flow — the same page declared as Go structsPhone-shaped device demo
device — the phone-shaped demo: adaptive pages, sheets, a search view

Kitchen sink

The QML enterprise look demo is the stress test for the layout and paint paths: 18 tabs of widgets, all wired from Go. A few of them:

Basic Components tab
Basic Components — the first tab: labels, buttons, check boxes, combos, fields, scroll panes and typographyCalendar and Color tab
Calendar & Color — date and time pickers, colour fields, a calendar and a colour pickerData Table tab
Data Table — a typed table with virtual scrolling, selection and sortingCode Editor tab
Code Editor — syntax highlighting, line numbers and folding on this repository's own sourceMDI Windows tab
MDI Windows — draggable, closable child windows inside the pageMarkdown tab
Markdown — a source editor and a live preview, split

CGO_ENABLED=0 go run ./examples/enterprise opens it; MEUI_TAB=<n> starts on a tab and MEUI_CAPTURE_SHOT=<path> captures the live window.

Themes

A preset restyles structure and ink together, not just the palette. The same dashboard with -preset web-dark:

The dashboard on the web-dark preset

19 presets ship — web-light/web-dark for pages, meui-light/windows11-dark for consoles, plus macOS, Windows 11, Adwaita, Breeze, metro, iOS, Android and the harness pair. cmd/tools/presetgallery renders the whole set on one sheet.

Examples

example shows
landing display type, offset card shadows, pill CTAs
dashboard full-bleed gradients, translucent cards, a chart of boxes
docs fixed chrome, a scrolling article, a sticky header, a breakpoint
settings web-styled fields, combo, switches, radios, a toast
mail a virtual list of 240 messages, selection, a frosted header
checkout a three-step flow with inline validation and error rings
ops a desktop console: menubar, tree, typed table, inspector, status bar
admin a dark console: navigation rail, filters, invite dialog
direct the same page built with widgets and setters — no QML
flow the same page declared as Go structs, built by flow
device, mobile phone-shaped pages at device sizes
enterprise the imported QML kitchen sink
parity the scene the soft and GL devices are diffed on

Every example takes -shot, -preset, -w, -h and -qml; examples/README.md documents them all.

How it fits together

module what it is
meui (this repo) toolkit: widgets, layouts, QML parser/builder, web behaviour layer, theming, examples, harness
meui-gl SDL3 window/input/platform adapter; hosts a window and runs the frame loop
mobilegles OpenGL batch renderer for shapes, text and images

The soft device lives in meui/graphics; mobilegles is the GL side of the same seam. Graphics primitives, platform interfaces and theme presets are the contracts between the three modules.

Testing

CGO_ENABLED=0 go test ./...                                  # headless: behaviour, parsing, layout, theming
CGO_ENABLED=0 go test -tags visual ./harness/behaviour/...   # real window, real pixels
make parity-web                                               # soft vs GL on the parity scene

CI runs go build, go vet, gofmt, the cgo guard and the headless suites on every push (see .github/workflows/ci.yml). cmd/tools holds the instruments: qmlshot (headless render), glshot (GL render), imgdiff (frame diff), presetgallery (every preset in one sheet), qmlfmt/qmlverify (scene hygiene), themetool, fontprobe and the determinism checks.

Documentation

Status

v0.1.1 — pre-1.0, so the API can still move. Linux desktop is the development target; the SDL3 adapter and the GL renderer are portable, and the adapter carries the Android JNI surface. Issues and examples of what you are building are welcome.

Licence

MIT — see LICENSE. The bundled Inter Display faces are SIL OFL 1.1 (fonts/OFL.txt); dependency notices are in THIRD_PARTY_NOTICES.md and LICENSES/.

Documentation

Index

Constants

View Source
const (
	EventLogPath        = "/tmp/meui_events.log"
	PerfLogPath         = "/tmp/meui_perf.log"
	TreeJSONPath        = "/tmp/meui_tree.json"
	CrashScreenshotPath = "/tmp/meui_crash.jpeg"
)

Log files

View Source
const DragThreshold float32 = 6

DragThreshold is the minimum distance (in pixels) the mouse must move before a drag operation begins.

Variables

View Source
var (
	// Debug infrastructure
	DebugEnabled           = os.Getenv("MEUI_DEBUG") == "1"            // Master switch
	EventTraceEnabled      = os.Getenv("MEUI_EVENT_TRACE") == "1"      // Log all events
	PerfMetricsEnabled     = os.Getenv("MEUI_PERF") == "1"             // Log performance metrics
	TreeJSONEnabled        = os.Getenv("MEUI_TREE_JSON") == "1"        // Export tree as JSON
	ScreenshotCrashEnabled = os.Getenv("MEUI_SCREENSHOT_CRASH") == "1" // Screenshot on crash

	// Safety net infrastructure
	LayoutValidateEnabled        = getEnvDefault("MEUI_LAYOUT_VALIDATE", true)         // Validate layout results
	AnchorCycleDetectEnabled     = getEnvDefault("MEUI_ANCHOR_CYCLE_DETECT", true)     // Detect anchor cycles
	LifecycleTrackEnabled        = getEnvDefault("MEUI_LIFECYCLE_TRACK", false)        // Track widget lifecycle
	StrictModeEnabled            = getEnvDefault("MEUI_STRICT", false)                 // Nil safety (fail fast)
	QMLValidateEnabled           = getEnvDefault("MEUI_QML_VALIDATE", true)            // Enhanced QML validation
	ThemeCheckEnabled            = getEnvDefault("MEUI_THEME_CHECK", false)            // Theme compliance
	ZIndexValidateEnabled        = getEnvDefault("MEUI_ZINDEX_VALIDATE", true)         // Z-index validation
	RecursiveLayoutDetectEnabled = getEnvDefault("MEUI_RECURSIVE_LAYOUT_DETECT", true) // Layout depth limits
	TestCoverageEnabled          = getEnvDefault("MEUI_TEST_COVERAGE", false)          // Test coverage reporting
)

Debug and safety net flags (controlled by environment variables)

Functions

func BlendOver

func BlendOver(dst, src graphics.Color) graphics.Color

BlendOver composites src OVER dst in straight (non-premultiplied) alpha. A Box uses it to paint its hover and press washes: the theme supplies a translucent ink, and the box keeps its own fill underneath.

func CheckRecursiveLayout

func CheckRecursiveLayout(depth int, maxDepth int) bool

CheckRecursiveLayout detects potential infinite layout loops

func ChildLocal

func ChildLocal(child Widget, x, y float32) (float32, float32, bool)

ChildLocal maps a point in the PARENT's space to the child's local space, when the point is inside the child's hit frame. The hit frame may be expanded to the touch floor; the COORDINATES are always taken against the child's REAL frame.

The distinction is the whole point of the floor. Expanding the frame is meant to widen where a finger may land; it must not move the widget's origin. Using the expanded frame for the subtraction shifted every local coordinate by half the expansion (11px for a 22px control), so a small control's top half reported coordinates from its bottom half — the spin box's up arrow acted as DOWN, and the only way to press it was to click ABOVE the widget.

func ChildLocalAmong

func ChildLocalAmong(child Widget, x, y float32, siblings []Widget) (float32, float32, bool)

ChildLocalAmong is ChildLocal with the sibling-clamped expansion (see TouchHitFrameAmong).

func ChildLocalAmongFor

func ChildLocalAmongFor(child Widget, x, y float32, siblings []Widget, floorOn bool) (float32, float32, bool)

ChildLocalAmongFor is ChildLocalAmong with an explicit floor setting.

func ChildLocalFor

func ChildLocalFor(child Widget, x, y float32, floorOn bool) (float32, float32, bool)

ChildLocalFor is ChildLocal with an explicit floor setting.

func ClearDragOverlay

func ClearDragOverlay()

ClearDragOverlay clears the global drag ghost overlay.

func CloseDebug

func CloseDebug()

CloseDebug closes all debug resources

func ColorLerp

func ColorLerp(a, b graphics.Color, t float32) graphics.Color

ColorLerp interpolates per channel in straight (non-premultiplied) space; alpha included. t is clamped to [0,1].

func ContainsWidget

func ContainsWidget(root, target Widget) bool

ContainsWidget reports whether target is root or sits in root's subtree, using the same Children() the focus traversal uses.

func DetectAnchorCycles

func DetectAnchorCycles(w Widget) []string

DetectAnchorCycles checks for circular anchor dependencies

func DrawFocusRing

func DrawFocusRing(c *graphics.Canvas, r graphics.Rect, radius float32)

DrawFocusRing paints the active platform's focus indicator (theme Effects.Focus) around or inside r. Kind selects the construction:

ring      outer accent ring (macOS, Adwaita) — offset grows it out
inset     accent stroke inside the bounds (Breeze)
two-tone  contrasting double rect (Fluent)
underline accent bar along the bottom edge (Metro-ish text fields)

Call when the widget owns focus; radius matches the widget's corner radius so the indicator follows its shape.

func DrawFocusRingInk

func DrawFocusRingInk(c *graphics.Canvas, r graphics.Rect, radius float32, ink graphics.Color)

DrawFocusRingInk is DrawFocusRing with an explicit colour for the ring. A field in an error state uses its error ink: the accent ring drawn on top of a red border read as "focused, fine" when the point was "this value is wrong".

func DrawSVG

func DrawSVG(canvas *graphics.Canvas, doc *SVGDocument, x, y, width, height float32)

DrawSVG renders an SVG document onto a canvas at the specified position. The vector is rasterized ONCE at 4x, box-filtered to the target size (a true 16-tap area average — see boxFilter4x) and drawn 1:1 pixel-aligned, matching Skia's analytic stroke coverage closely.

func DrawShadow

func DrawShadow(c *graphics.Canvas, r graphics.Rect, radius float32, spec theme.ShadowSpec)

DrawShadow paints a soft drop shadow behind r using concentric rounded rects with decaying alpha — no FBO round trip (unlike the blur-pipeline DropShadow), so it batches with the frame's SDF quads and costs one quad ring per step.

Draw BEFORE the widget's own background; the background covers the interior and only the fringe remains.

func Ease

func Ease(k theme.Easing, t float32) float32

Ease maps normalized time to eased progress. Curves are the concrete forms of the theme's easing intents.

func ExportTreeJSON

func ExportTreeJSON(root Widget) error

ExportTreeJSON exports the widget tree as JSON

func InitDebug

func InitDebug()

InitDebug initializes all debug and safety net infrastructure

func IsInteractive

func IsInteractive(w Widget) bool

IsInteractive reports whether a widget is a TAPPABLE TARGET, which is what the hit-slop expansion turns on. It is exported because the touch AUDIT must ask the same question the hit test does: a widget that is interactive but that this does not recognise stays 14px with nothing failing anywhere.

This predicate was WRONG in a way that made the whole floor inert, and the audit is what found it. It used to ask two questions and both were the wrong one:

  • HasMouseHandlers reports whether callbacks are INSTALLED, but every real control (Button, CheckBox, Switch, Slider, …) handles input by OVERRIDING OnMouseDown instead, so it answered false for all of them;
  • `interface{ SetOnClicked(func()) }` never matched either, because Button's method is fluent — `SetOnClicked(func()) *Button` — and a method that returns something does not satisfy an interface that returns nothing.

So nothing was ever recognised and the expansion expanded nothing. The fix is a NAME-BASED registry of the types that are targets. Reflection cannot answer it: Go generates a distinct wrapper for a promoted method, so comparing method pointers reports "overridden" for every widget that merely embeds BaseWidget — measured on ProgressBar, which declares no input methods at all and whose promoted pointers still differ from BaseWidget's.

Containers are excluded separately (expanding a panel would steal hits from the gaps between its children), and so is Label: it handles input for text selection, but a label is not something a finger aims at, and expanding one beside a checkbox would take the checkbox's own expansion.

func LogEvent

func LogEvent(widgetName, eventType string)

LogEvent logs an event to the event log file

func LogEventf

func LogEventf(widgetName, format string, args ...interface{})

LogEventf logs a formatted event

func MinTouchTarget

func MinTouchTarget() float32

MinTouchTarget is the effective floor in logical px: the theme's metric when the preset sets one (48 on Android, 44 on iOS), else the historical 44. The theme is the right source because the floor is a published per-platform number, and putting it in the preset is what lets one widget set serve both.

func OpenURL

func OpenURL(url string)

OpenURL launches the platform browser for the given URL. Used as the default action for clicked links in Markdown and rich-text labels when the application does not install its own OnLinkClicked handler.

It delegates to the platform seam, so a backend with a real URL opener (the SDL3 adapter, which also covers Android and iOS) is used where there is one; otherwise the seam's fallback shells out. The error is dropped because this is a fire-and-forget default action — an app that cares installs its own handler.

func PrintTree

func PrintTree(root Widget, indent int)

PrintTree prints the widget tree starting from this widget. indent is the indentation level (number of spaces / 2).

func PrintTreeToFile

func PrintTreeToFile(root Widget, indent int, f *os.File)

PrintTreeToFile prints the widget tree to a file.

func RegisterInteractiveType

func RegisterInteractiveType(name string)

RegisterInteractiveType adds a widget type to the interactive registry. An APP-defined widget that handles input needs this: the registry is keyed by type name, and without an entry the touch-target floor would silently not apply to it on a phone — a widget that works with a mouse and is frustrating with a thumb.

func RegisterNamedWidget

func RegisterNamedWidget(id string, w Widget)

func ReportTestCoverage

func ReportTestCoverage()

ReportTestCoverage reports untested widget/layout paths

func ScaleGradient

func ScaleGradient(g graphics.Gradient, r graphics.Rect) graphics.Gradient

ScaleGradient resolves a unit gradient (Start/End/Center in 0..1 of the shape) against a concrete rect. The gradient types express geometry in the shape's own pixels, which a scene author does not know until layout runs.

func SetDefaultChrome

func SetDefaultChrome(f func(root *Window, w platform.Window) platform.TitleBar)

SetDefaultChrome registers the title bar AddWindow installs on each window. Passing nil disables the default. Called by the widgets package.

func SetDragOverlay

func SetDragOverlay(img *graphics.Image, x, y, w, h float32)

SetDragOverlay sets the global drag ghost overlay (position is in Window coordinates).

func SetTouchProfile

func SetTouchProfile(on bool)

SetTouchProfile enables/disables the DEFAULT touch floor. A window carries its own setting (see Window.SetTouchProfile) and App.AddWindow derives one from the window's form factor, so this is the fallback for a window that has none — the headless tests, and a host with one logical surface. It stays exported for tests and for a host that knows better than the size classes.

func SetTreePaths

func SetTreePaths(root Widget)

SetTreePaths walks the widget tree starting from root and sets tree paths. The path format is "i,j,k" where i,j,k are indices in parent's children. Root's children have paths "0", "1", etc.

func ShadowToken

func ShadowToken(name string) (theme.ShadowSpec, bool)

ShadowToken resolves a named shadow from the active theme. It exists so a scene can say `shadow: "card"` and stay theme-driven: the preset decides what a card's elevation is, and a dark preset can make it deeper without touching the QML.

func TouchHitFrame

func TouchHitFrame(child Widget, f graphics.Rect) graphics.Rect

TouchHitFrame expands frame f, when needed, so that interactive widgets present at least MinTouchTarget square hit area centered on the widget. Non-interactive widgets (no mouse handlers, no click handler) and containers pass through unchanged — expanding panels would steal hits from sibling gaps.

func TouchHitFrameAmong

func TouchHitFrameAmong(child Widget, f graphics.Rect, siblings []Widget) graphics.Rect

TouchHitFrameAmong expands a child's hit frame to the floor and then CLAMPS the expansion against its siblings, so two close targets cannot both claim the same pixel.

This is Android's own caveat, stated in its touch-target guidance: very small and close-together targets cannot all be expanded, and the honest answer is to split the gap between them rather than let one swallow the other. Without it the hit test walks children in reverse and the LAST one wins the overlap, so a checkbox beside another checkbox becomes partly unreachable — which is worse than not expanding at all, because it fails only near the edge and looks like a stray mis-tap.

func TouchHitFrameAmongWith

func TouchHitFrameAmongWith(child Widget, f graphics.Rect, siblings []Widget, floorOn bool) graphics.Rect

TouchHitFrameAmongWith is TouchHitFrameAmong for a specific floor setting.

func TouchHitFrameWith

func TouchHitFrameWith(child Widget, f graphics.Rect, floorOn bool) graphics.Rect

TouchHitFrameWith is TouchHitFrame for a specific floor setting (a window's, or a test's).

func TouchProfile

func TouchProfile() bool

TouchProfileForSize reports whether a surface of this size wants the touch floor, using the same size classes the window uses. It exists so a host or a test can ask the question without a window. TouchProfile reports whether the floor is active, which the touch audit asserts: the floor hung off a switch nothing flipped for its whole life, so "is it on" is a question worth being able to ask.

func TouchProfileForSize

func TouchProfileForSize(width, height, scale float32) bool

func TrackWidgetCreation

func TrackWidgetCreation(w Widget)

TrackWidgetCreation records widget creation with stack trace

func TrackWidgetDisposal

func TrackWidgetDisposal(w Widget)

TrackWidgetDisposal records widget disposal

func ValidateLayout

func ValidateLayout(w Widget, rect graphics.Rect) []string

ValidateLayout checks for layout issues (overlapping, zero-sized, negative coords)

func ValidateTheme

func ValidateTheme(w Widget) []string

ValidateTheme checks if widget has required theme settings

func ValidateZIndex

func ValidateZIndex(w Widget) []string

ValidateZIndex checks for invalid z-index values

Types

type Animation

type Animation struct {
	// contains filtered or unexported fields
}

Animation interpolates a float32 toward a target using the theme's motion tokens (duration + easing intent). Evaluation is lazy at Paint time — the render loop is continuous, so a running animation simply re-renders each frame until it settles; no timers or tick plumbing.

Zero value is usable: Value() returns 0 until the first Set.

func (*Animation) Active

func (a *Animation) Active() bool

Active reports whether the transition is still running.

func (*Animation) Set

func (a *Animation) Set(target float32, timing theme.Timing)

Set starts a transition toward target using timing. Idempotent: retargeting to the in-flight target is a no-op; retargeting mid-flight continues from the CURRENT value (no jump).

func (*Animation) Snap

func (a *Animation) Snap(v float32)

Snap places the animation at v with no transition. It is what a test (or an app that honours "reduce motion") uses to skip the easing.

func (*Animation) Value

func (a *Animation) Value() float32

Value returns the current interpolated value.

type App

type App struct {
	// contains filtered or unexported fields
}

App is the toolkit-facing application facade: it opens windows, installs a widget tree as their content, and runs the backend event loop. It speaks only platform.App, so the backend (SDL3 today) is chosen at the composition root and never named here.

func NewApp

func NewApp(backend platform.App, opts AppOptions) *App

NewApp wires the facade to a platform backend.

app := meui.NewApp(sdl3.NewApp(), meui.AppOptions{})
app.AddWindow(root, meui.WindowOptions{Title: "TradeUI"})
app.Run()

func (*App) AddWindow

func (a *App) AddWindow(root *Window, opts WindowOptions) (platform.Window, error)

AddWindow opens an OS window, installs root as its content and event sink, lays it out against the real window size, and shows it.

func (*App) Backend

func (a *App) Backend() platform.App

Backend returns the platform backend, for OS services such as the clipboard and dialogs.

func (*App) PostTask

func (a *App) PostTask(fn func())

PostTask queues fn on the UI thread (see platform.TaskQueue for the contract).

func (*App) Quit

func (a *App) Quit()

Quit closes every window, which ends Run.

func (*App) Run

func (a *App) Run() error

Run starts the event loop and returns when the last window closes.

func (*App) Windows

func (a *App) Windows() []platform.Window

Windows returns the windows opened through this app.

type AppOptions

type AppOptions struct {
	// Title is used for the first window when a window supplies none.
	Title string
	// Size is the default window size when a window supplies none.
	Size graphics.Size
}

AppOptions configures the application facade.

type BaseContainer

type BaseContainer struct {
	BaseWidget
	// contains filtered or unexported fields
}

BaseContainer is a struct for widgets that have children. Embeds BaseWidget and adds child management + event dispatch helpers. Widgets that need children should embed this instead of BaseWidget.

func (*BaseContainer) AddChild

func (c *BaseContainer) AddChild(child Widget)

AddChild appends a child and sets its parent. Triggers layout + redraw.

func (*BaseContainer) AppendChild

func (c *BaseContainer) AppendChild(child Widget)

AppendChild appends a child without setting its parent. The caller must call child.SetParent(outerWidget) themselves. Used by containers in other packages that need to set the parent to the outer widget, not the embedded BaseContainer.

func (*BaseContainer) Children

func (c *BaseContainer) Children() []Widget

Children returns the child list.

func (*BaseContainer) ChildrenI

func (c *BaseContainer) ChildrenI() []interface{}

ChildrenI returns children as []interface{} for layout compatibility.

func (*BaseContainer) ClearChildren

func (c *BaseContainer) ClearChildren()

ClearChildren disposes and removes all children.

func (*BaseContainer) DefaultPanelAt

func (c *BaseContainer) DefaultPanelAt(x, y float32) Widget

DefaultPanelAt returns the deepest child containing (x,y) in local coords. Returns nil if no child matches — the caller decides what to return as fallback.

func (*BaseContainer) DetachChild

func (c *BaseContainer) DetachChild(child Widget) bool

DetachChild removes a child without calling Dispose. Useful for reparenting.

func (*BaseContainer) DispatchMouseDown

func (c *BaseContainer) DispatchMouseDown(x, y float32, button int) bool

DispatchMouseDown iterates children and dispatches OnMouseDown to the first hit. Returns true if any child handled the event.

func (*BaseContainer) DispatchMouseMove

func (c *BaseContainer) DispatchMouseMove(x, y float32)

DispatchMouseMove iterates children and dispatches OnMouseMove to all hits.

func (*BaseContainer) DispatchMouseUp

func (c *BaseContainer) DispatchMouseUp(x, y float32, button int) bool

DispatchMouseUp iterates children and dispatches OnMouseUp to the first hit.

func (*BaseContainer) DispatchMouseWheel

func (c *BaseContainer) DispatchMouseWheel(x, y, dx, dy float32) bool

DispatchMouseWheel iterates children and dispatches OnMouseWheel to the first hit.

func (*BaseContainer) Dispose

func (c *BaseContainer) Dispose()

Dispose cleans up children and resources.

func (*BaseContainer) MoveChildToFront

func (c *BaseContainer) MoveChildToFront(child Widget)

MoveChildToFront removes the child and re-adds it at the end, making it the topmost in z-order.

func (*BaseContainer) PaintChildren

func (c *BaseContainer) PaintChildren(canvas *graphics.Canvas)

PaintChildren iterates children and paints each one. Call this from your widget's Paint() after drawing your own content.

func (*BaseContainer) RemoveChild

func (c *BaseContainer) RemoveChild(idx int) bool

RemoveChild removes a child by index. Returns false if out of range.

type BaseWidget

type BaseWidget struct {
	// contains filtered or unexported fields
}

func NewBaseWidget

func NewBaseWidget() *BaseWidget

func (*BaseWidget) ApplyEnabled

func (w *BaseWidget) ApplyEnabled(enabled bool)

ApplyEnabled is the non-fluent form used by reflective property appliers: interface{ SetEnabled(bool) } fails to match widgets whose SetEnabled returns *BaseWidget (the fluent pattern), silently no-opping `enabled: false` for most widgets.

func (*BaseWidget) ApplyVisible

func (w *BaseWidget) ApplyVisible(visible bool)

ApplyVisible is the non-fluent form for reflective appliers (see ApplyEnabled).

func (*BaseWidget) ClearNeedsLayout

func (w *BaseWidget) ClearNeedsLayout()

func (*BaseWidget) ContainsPoint

func (w *BaseWidget) ContainsPoint(x, y float32) bool

func (*BaseWidget) DebugName

func (w *BaseWidget) DebugName() string

DebugName returns the debug name of this widget.

func (*BaseWidget) Dispose

func (w *BaseWidget) Dispose()

Dispose cleans up resources held by this widget. Nil out event handlers and parent reference to allow GC.

func (*BaseWidget) DrawTooltip

func (w *BaseWidget) DrawTooltip(canvas *graphics.Canvas, rect graphics.Rect)

DrawTooltip renders the tooltip on the canvas if visible. Call from widget's Paint().

func (*BaseWidget) Enabled

func (w *BaseWidget) Enabled() bool

func (*BaseWidget) Focusable

func (w *BaseWidget) Focusable() bool

WidthIsExplicit/HeightIsExplicit report that QML set width/height directly — layouts must not let measured preferences override them (a fixed-width wrapping label would otherwise grow to its unwrapped text width and never wrap).

func (*BaseWidget) Focused

func (w *BaseWidget) Focused() bool

func (*BaseWidget) FrameRect

func (w *BaseWidget) FrameRect() graphics.Rect

── Coordinate spaces (the system-wide contract) ─────────────────────

FRAME space — parent-relative. FrameRect()/SetFrameRect() store a
widget's position in its PARENT's local space plus its size. Only a
parent may interpret the origin: PaintChildren translates the canvas
by the child's frame origin, containers hit-test children by their
frames, and layout managers write frames in the parent's space.

LOCAL space — widget-relative, origin (0,0) at the widget's own
top-left. Everything a widget does about itself lives here:
Paint(canvas, rect) receives rect = LocalRect(), and mouse events
arrive as OnMouseDown(x, y) in local coordinates.

A widget reading its OWN FrameRect() for X/Y inside Paint, hit-testing or event handling is mixing the two spaces (the historic scrollbar double-offset: bars laid out at FrameRect() were shifted by the widget's position inside its parent). Use LocalRect() instead; the API takes sizes wherever only the extent matters so the space cannot be passed wrongly (see ScrollbarHost.LayoutBars).

FrameRect returns the widget's frame in the PARENT's local space plus its size. Use LocalRect() for the widget's own (0,0)-based rect.

func (*BaseWidget) FromLocal

func (w *BaseWidget) FromLocal(x, y float32) (float32, float32)

FromLocal converts widget-local coordinates to window coordinates.

func (*BaseWidget) GetAnchors

func (w *BaseWidget) GetAnchors() *layout.Anchors

GetAnchors returns the anchor properties for this widget

func (*BaseWidget) GetLayoutProps

func (w *BaseWidget) GetLayoutProps() *layout.LayoutProps

GetLayoutProps returns the layout properties for this widget

func (*BaseWidget) GlobalFrameRect

func (w *BaseWidget) GlobalFrameRect() graphics.Rect

GlobalFrameRect is deprecated and returns FrameRect(). FrameRect() returns coordinates in parent-local space, not absolute.

func (*BaseWidget) HasMouseHandlers

func (w *BaseWidget) HasMouseHandlers() bool

HasMouseHandlers reports whether mouse-down/up callbacks are installed on this widget (touch hit-slop uses this to identify interactive targets).

func (*BaseWidget) Height

func (w *BaseWidget) Height() float32

func (*BaseWidget) HeightExplicit

func (w *BaseWidget) HeightExplicit() bool

HeightExplicit reports whether the height came from an explicit size.

func (*BaseWidget) Hovered

func (w *BaseWidget) Hovered() bool

func (*BaseWidget) InvalidateAncestors

func (w *BaseWidget) InvalidateAncestors()

InvalidateAncestors marks this widget's PARENTS as needing layout.

IT EXISTS because a widget's frame is set by its parent's layout, not by itself, so a widget that changes its own size and only marks ITSELF leaves the old frame exactly where it was — which reads as the widget failing to resize, and no amount of SetNeedsLayout on the widget itself will move it.

Collapsible is the first widget in the tree that changes its own height (a collapsed row is its header, an open one is header plus body), which is what made the gap visible: the toggle worked and nothing moved.

func (*BaseWidget) LocalRect

func (w *BaseWidget) LocalRect() graphics.Rect

LocalRect returns the widget's own rect in LOCAL space: origin (0,0), size equal to FrameRect().Size(). This is the rect Paint receives and the space all widget-local geometry (hit tests, bar layout, clip rects) must use.

func (*BaseWidget) MarkClean

func (w *BaseWidget) MarkClean()

func (*BaseWidget) MarkForRedraw

func (w *BaseWidget) MarkForRedraw()

func (*BaseWidget) MinimumDimensions

func (w *BaseWidget) MinimumDimensions() (float32, float32)

func (*BaseWidget) Modifiers

func (w *BaseWidget) Modifiers() platform.Modifiers

func (*BaseWidget) NeedsLayout

func (w *BaseWidget) NeedsLayout() bool

func (*BaseWidget) NeedsRedraw

func (w *BaseWidget) NeedsRedraw() bool

func (*BaseWidget) OnBlur

func (w *BaseWidget) OnBlur()

func (*BaseWidget) OnClick

func (w *BaseWidget) OnClick(x, y float32)

func (*BaseWidget) OnFocus

func (w *BaseWidget) OnFocus()

func (*BaseWidget) OnMouseDown

func (w *BaseWidget) OnMouseDown(x, y float32, button int) bool

func (*BaseWidget) OnMouseMove

func (w *BaseWidget) OnMouseMove(x, y float32)

func (*BaseWidget) OnMouseUp

func (w *BaseWidget) OnMouseUp(x, y float32, button int) bool

func (*BaseWidget) OnMouseWheel

func (w *BaseWidget) OnMouseWheel(x, y, dx, dy float32) bool

func (*BaseWidget) Paint

func (w *BaseWidget) Paint(canvas *graphics.Canvas, rect graphics.Rect)

func (*BaseWidget) PanelAt

func (w *BaseWidget) PanelAt(x, y float32) Widget

PanelAt returns the deepest child widget containing the point (in local coordinates). This is a default implementation for widgets that don't have children. Override this in container widgets (Window, Panel).

func (*BaseWidget) Parent

func (w *BaseWidget) Parent() Widget

Parent returns the parent widget, if any.

func (*BaseWidget) PointFromRoot

func (w *BaseWidget) PointFromRoot(x, y float32) graphics.Point

PointFromRoot converts root coordinates to local coordinates. Walks the parent chain, subtracting each ancestor's FrameRect offset and re-adding any scroll offset that PointToRoot subtracted.

func (*BaseWidget) PointToRoot

func (w *BaseWidget) PointToRoot(x, y float32) graphics.Point

PointToRoot converts local coordinates to root (window) coordinates. Walks the parent chain, adding each ancestor's FrameRect offset. PointToRoot converts local coordinates to root (window) coordinates. If any ancestor implements scrollAdjuster, its scroll offset is subtracted so coordinates account for ScrollPane scrolling (which translates the canvas during paint without changing widget FrameRects).

func (*BaseWidget) PreferredDimensions

func (w *BaseWidget) PreferredDimensions(target interface{}, width, height float32) (float32, float32)

func (*BaseWidget) Redraw

func (w *BaseWidget) Redraw()

Redraw forces an immediate redraw of this widget and all ancestors. This is called by the frame loop when NeedsRedraw() returns true.

func (*BaseWidget) Scale

func (w *BaseWidget) Scale() float32

Scale returns the scale for this widget. Default is 1.0.

func (*BaseWidget) SetAnchors

func (w *BaseWidget) SetAnchors(anchors *layout.Anchors)

SetAnchors sets the anchor properties for this widget

func (*BaseWidget) SetBounds

func (w *BaseWidget) SetBounds(x, y, width, height float32) *BaseWidget

func (*BaseWidget) SetDebugName

func (w *BaseWidget) SetDebugName(name string)

SetDebugName sets a human-readable name for this widget (used in debug output).

func (*BaseWidget) SetEnabled

func (w *BaseWidget) SetEnabled(enabled bool) *BaseWidget

func (*BaseWidget) SetFocused

func (w *BaseWidget) SetFocused(focused bool) *BaseWidget

func (*BaseWidget) SetFrameRect

func (w *BaseWidget) SetFrameRect(rect graphics.Rect)

func (*BaseWidget) SetFrameRectDirect

func (w *BaseWidget) SetFrameRectDirect(rect graphics.Rect)

SetFrameRectDirect sets the frame rect without triggering a redraw. Used during layout/resizing to avoid infinite redraw loops. Like SetFrameRect, a SIZE change marks the widget for re-layout.

func (*BaseWidget) SetHeight

func (w *BaseWidget) SetHeight(height float32) *BaseWidget

func (*BaseWidget) SetHeightDirect

func (w *BaseWidget) SetHeightDirect(height float32)

func (*BaseWidget) SetHovered

func (w *BaseWidget) SetHovered(hovered bool) *BaseWidget

func (*BaseWidget) SetHoveredState

func (w *BaseWidget) SetHoveredState(hovered bool)

func (*BaseWidget) SetLayoutProps

func (w *BaseWidget) SetLayoutProps(props *layout.LayoutProps)

SetLayoutProps sets the layout properties for this widget

func (*BaseWidget) SetNeedsLayout

func (w *BaseWidget) SetNeedsLayout()

func (*BaseWidget) SetOnClick

func (w *BaseWidget) SetOnClick(handler func()) *BaseWidget

func (*BaseWidget) SetOnKeyDown

func (w *BaseWidget) SetOnKeyDown(handler func(keyCode platform.KeyCode, modifiers platform.Modifiers)) *BaseWidget

func (*BaseWidget) SetOnMouseDown

func (w *BaseWidget) SetOnMouseDown(handler func(x, y float32, button int)) *BaseWidget

func (*BaseWidget) SetOnMouseEnter

func (w *BaseWidget) SetOnMouseEnter(handler func()) *BaseWidget

func (*BaseWidget) SetOnMouseExit

func (w *BaseWidget) SetOnMouseExit(handler func()) *BaseWidget

func (*BaseWidget) SetOnMouseMove

func (w *BaseWidget) SetOnMouseMove(handler func(x, y float32)) *BaseWidget

func (*BaseWidget) SetOnMouseUp

func (w *BaseWidget) SetOnMouseUp(handler func(x, y float32, button int)) *BaseWidget

func (*BaseWidget) SetParent

func (w *BaseWidget) SetParent(p Widget)

SetParent sets the parent widget.

func (*BaseWidget) SetTabIndex

func (w *BaseWidget) SetTabIndex(index int)

func (*BaseWidget) SetTooltip

func (w *BaseWidget) SetTooltip(text string) *BaseWidget

SetTooltip sets the tooltip text for this widget. Default delay is 2 seconds.

func (*BaseWidget) SetTooltipDelay

func (w *BaseWidget) SetTooltipDelay(d time.Duration) *BaseWidget

SetTooltipDelay sets a custom delay for the tooltip.

func (*BaseWidget) SetTreePath

func (w *BaseWidget) SetTreePath(path string)

SetTreePath sets the tree path string (e.g., "1,2,4,5").

func (*BaseWidget) SetVisible

func (w *BaseWidget) SetVisible(visible bool) *BaseWidget

func (*BaseWidget) SetWidth

func (w *BaseWidget) SetWidth(width float32) *BaseWidget

func (*BaseWidget) SetWidthDirect

func (w *BaseWidget) SetWidthDirect(width float32)

func (*BaseWidget) SetX

func (w *BaseWidget) SetX(x float32) *BaseWidget

func (*BaseWidget) SetY

func (w *BaseWidget) SetY(y float32) *BaseWidget

func (*BaseWidget) SetZIndex

func (w *BaseWidget) SetZIndex(z float32) *BaseWidget

SetZIndex orders the widget among its siblings: higher paints later and is hit first. Equal z keeps insertion order.

func (*BaseWidget) StartTooltipTimer

func (w *BaseWidget) StartTooltipTimer(mouseX, mouseY float32)

StartTooltipTimer starts the tooltip show timer (called on mouse enter).

func (*BaseWidget) StopTooltipTimer

func (w *BaseWidget) StopTooltipTimer()

StopTooltipTimer cancels the tooltip timer and hides the tooltip (called on mouse exit).

func (*BaseWidget) TabIndex

func (w *BaseWidget) TabIndex() int

func (*BaseWidget) ToLocal

func (w *BaseWidget) ToLocal(x, y float32) (float32, float32)

ToLocal converts window coordinates to widget-local coordinates.

func (*BaseWidget) TooltipDelay

func (w *BaseWidget) TooltipDelay() time.Duration

TooltipDelay returns the delay before showing the tooltip.

func (*BaseWidget) TooltipText

func (w *BaseWidget) TooltipText() string

TooltipText returns the tooltip text for this widget.

func (*BaseWidget) TreePath

func (w *BaseWidget) TreePath() string

TreePath returns the tree path string.

func (*BaseWidget) Visible

func (w *BaseWidget) Visible() bool

func (*BaseWidget) Width

func (w *BaseWidget) Width() float32

func (*BaseWidget) WidthExplicit

func (w *BaseWidget) WidthExplicit() bool

WidthExplicit reports whether the width came from an explicit author-chosen size (QML `width`) rather than a constructor default or layout pass.

func (*BaseWidget) Window

func (w *BaseWidget) Window() *Window

Window walks up the parent chain to find the root Window. Returns nil if not found.

func (*BaseWidget) ZIndex

func (w *BaseWidget) ZIndex() float32

ZIndex reports the sibling order (0 by default).

type CacheBase

type CacheBase struct {
	// contains filtered or unexported fields
}

CacheBase provides offscreen-image caching for expensive-to-render widgets. Embed in any widget, call GetCached in Paint, and Invalidate when content changes.

func (*CacheBase) GetCached

func (c *CacheBase) GetCached(canvas *graphics.Canvas, rect graphics.Rect, draw func(*graphics.Canvas, graphics.Rect))

GetCached returns the cached image if valid and the same size, otherwise renders into a new offscreen image via draw, caches it, and draws it. MEUI_NO_CACHEBASE=1 bypasses the offscreen cache (draws directly) — diagnostic for resize-flash forensics (offscreen re-render + glReadPixels + re-upload every size-change frame stalls the pipe).

func (*CacheBase) Invalidate

func (c *CacheBase) Invalidate()

Invalidate marks the cached image as stale, forcing a re-render on the next GetCached call.

type ClickBehaviour

type ClickBehaviour struct {
	OnClick func()
	OnPress func(pressed bool)
	// contains filtered or unexported fields
}

ClickBehaviour is the press/click state machine behind every plain clickable surface: a Panel with `clickable: true` (QML's Rectangle) and a MouseArea both run it, so a click cannot mean two different things depending on which element carried it. The widgets that have their own semantics (Button's toggle, a tab's selection) keep their own handlers — this exists for the surface that has none.

func (*ClickBehaviour) Activate

func (c *ClickBehaviour) Activate(enabled bool) bool

Activate is the keyboard path for Enter/Space: a press and a release in one step, because a keyboard "click" has no visible down/up on a plain box (a Button animates its own press instead).

func (*ClickBehaviour) Down

func (c *ClickBehaviour) Down(enabled, inside bool, button int) bool

Down arms the click. It reports whether anything changed, so the caller knows to repaint. Only the primary button activates a surface.

func (*ClickBehaviour) Pressed

func (c *ClickBehaviour) Pressed() bool

Pressed reports whether the pointer is down on this surface.

func (*ClickBehaviour) Up

func (c *ClickBehaviour) Up(enabled, inside bool, button int) bool

Up ends the press, firing OnClick when the pointer is still inside the surface. It reports whether the visual state changed: a release outside still has to clear the pressed feedback even though no click fires.

type ClickHandler

type ClickHandler interface {
	OnClick(x, y float32)
}

type Container

type Container interface {
	Widget
	Children() []Widget
	PanelAt(x, y float32) Widget
	ValidateLayout()
}

Container is an interface for widgets that can contain children.

type ContextMenuHoster

type ContextMenuHoster interface {
	SetOnDismiss(func())
	OnExternalDismiss()
}

ContextMenuHoster is an interface for widgets that can host a context menu. Window checks for this when showing a context menu popup.

type CursorProvider

type CursorProvider interface {
	CursorAt(x, y float32) *platform.Cursor
}

CursorProvider is an optional interface for widgets that want to specify a custom mouse cursor when the pointer is over them.

type DragData

type DragData struct {
	Type   string      // identifies what's being dragged (e.g. "listview-item", "tab")
	Source Widget      // the widget that initiated the drag
	Data   interface{} // arbitrary payload
	Index  int         // source index within the source widget
}

DragData carries the payload of a drag operation.

type DragManager

type DragManager struct {
	// Active is true while a drag is in progress.
	Active bool
	// Data holds the current drag payload.
	Data *DragData
	// Source is the widget that initiated the drag.
	Source Widget
	// Target is the current drop target under the cursor.
	Target DropTarget
	// GhostLayer is an optional layer that renders a drag ghost.
	GhostLayer *Layer
	// contains filtered or unexported fields
}

DragManager tracks the current drag operation. There is one DragManager per Window.

func NewDragManager

func NewDragManager(w *Window) *DragManager

NewDragManager creates a new DragManager for the given Window.

func (*DragManager) Cancel

func (dm *DragManager) Cancel()

Cancel ends the drag without performing a drop.

func (*DragManager) End

func (dm *DragManager) End(x, y float32)

End is called on mouse up to finalize the drop.

func (*DragManager) RecordStart

func (dm *DragManager) RecordStart(x, y float32)

RecordStart records the initial mouse press position for later threshold check.

func (*DragManager) StartCheck

func (dm *DragManager) StartCheck(source Widget, x, y float32) bool

StartCheck checks whether the mouse has moved far enough from the start position to initiate a drag. If so, it calls OnDragStart on the source. Returns true if a drag was started.

func (*DragManager) Update

func (dm *DragManager) Update(x, y float32, localX, localY float32)

Update is called during mouse drag to update ghost position and hit-test for drop targets.

type DragOverlayInfo

type DragOverlayInfo struct {
	Image *graphics.Image
	X, Y  float32
	W, H  float32
}

DragOverlayInfo holds ghost image data for drag preview. Drawn by Window at the very end of Paint, on top of everything.

var GlobalOverlay *DragOverlayInfo

GlobalOverlay is the current drag ghost overlay, drawn on top of everything.

type DragSource

type DragSource interface {
	// OnDragStart is called when a drag begins. Return non-nil to start the drag.
	OnDragStart(x, y float32) *DragData
}

DragSource is implemented by widgets that can initiate drags.

type DropTarget

type DropTarget interface {
	// OnDragEnter is called when the drag enters the widget's bounds.
	OnDragEnter(data *DragData, x, y float32)
	// OnDragOver is called as the cursor moves over the widget during a drag.
	OnDragOver(data *DragData, x, y float32)
	// OnDragDrop is called when the drag is released over the widget.
	OnDragDrop(data *DragData, x, y float32)
	// OnDragLeave is called when the drag leaves the widget's bounds.
	OnDragLeave(data *DragData)
}

DropTarget is implemented by widgets that can accept drops.

type EventHandler

type EventHandler interface {
	OnMouseDown(x, y float32, button int) bool
	OnMouseUp(x, y float32, button int) bool
	OnMouseMove(x, y float32)
}

type EventListener

type EventListener interface {
	OnMouseDown(x, y float32, button int) bool
	OnMouseUp(x, y float32, button int) bool
	OnMouseMove(x, y float32)
}

type FocusHandler

type FocusHandler interface {
	OnFocus()
	OnBlur()
}

type HoverHandler

type HoverHandler interface {
	SetHoveredState(bool)
}

type HoverTarget

type HoverTarget interface {
	HoverAt(x, y float32)
}

HoverTarget is for a widget that owns a pointer position inside its own area without being the deepest hit there — a SplitView's handle sits above its panels, but everywhere else the panels' children are the hit. The window calls HoverAt on every widget along the hit chain (the deepest hit, then its parents) with **widget-local** coordinates on each pointer move, so such a widget learns both when the pointer arrives and when it leaves.

type Layer

type Layer struct {
	X       float32
	Y       float32
	Width   float32
	Height  float32
	ZIndex  int
	Visible bool
	Widget  Widget
	Paint   func(canvas *graphics.Canvas, rect graphics.Rect)

	// Owner is the widget that opened a PAINT-ONLY layer (a combo box's dropdown, a
	// menu drawn by a callback). Such a layer has no Widget to route input to, but it
	// still has to be TOLD when it is closed — otherwise a dropdown removed by Escape
	// leaves its owner believing the list is still open. It is never a hit target.
	Owner Widget
}

func (*Layer) ContainsPoint

func (l *Layer) ContainsPoint(x, y float32) bool

func (*Layer) FrameRect

func (l *Layer) FrameRect() graphics.Rect

func (*Layer) SetFrameRect

func (l *Layer) SetFrameRect(rect graphics.Rect)

type LayerManager

type LayerManager struct {
	Layers []*Layer
	// contains filtered or unexported fields
}

func NewLayerManager

func NewLayerManager() *LayerManager

func (*LayerManager) AddLayer

func (lm *LayerManager) AddLayer(zIndex int, widget Widget) *Layer

func (*LayerManager) AddLayerWithPaint

func (lm *LayerManager) AddLayerWithPaint(zIndex int, paint func(canvas *graphics.Canvas, rect graphics.Rect), pos ...float32) *Layer

func (*LayerManager) CloseTopLayer

func (lm *LayerManager) CloseTopLayer() bool

CloseTopLayer closes the topmost VISIBLE layer and reports whether it closed one.

It is what Escape does when no drag is in progress, and it exists because a layer with no focusable child could otherwise not be dismissed by keyboard at all: the window's key handling walked the FOCUSED widget and the children, so a popup whose contents were all non-focusable had no path to the key. A layer is also the toolkit's own drag ghost, so this is what removes a drag's ghost if the drag is ended some other way.

The widget is told through OnClosed so a popup can release whatever it owns — a combobox that opened a list, a menu that grabbed the pointer — and so can a PAINT-ONLY layer's Owner, which has no widget to route to but still has to know its dropdown is gone.

The layer is removed FIRST, then the owner is told: a widget's OnClosed usually removes the layer itself, and notifying before the splice let that call shift the slice out from under the loop.

func (*LayerManager) Dispose

func (lm *LayerManager) Dispose()

func (*LayerManager) HandleKeyDown

func (lm *LayerManager) HandleKeyDown(keyCode platform.KeyCode, mod platform.Modifiers) bool

HandleKeyDown dispatches key events to the topmost layer widget.

func (*LayerManager) HandleKeyUp

func (lm *LayerManager) HandleKeyUp(keyCode platform.KeyCode, mod platform.Modifiers) bool

HandleKeyUp dispatches a key release to the topmost layer widget.

It exists because the window now DELIVERS key-ups: a popup that acted on a key press needs to know the key was let go, and the layer is where a popup lives. The window dropping key-ups — which it did, with a note saying "no key-up behavior yet" — meant a layer could never observe a release.

func (*LayerManager) HandleMouseDown

func (lm *LayerManager) HandleMouseDown(x, y float32, button int) bool

func (*LayerManager) HandleMouseMove

func (lm *LayerManager) HandleMouseMove(x, y float32) bool

func (*LayerManager) HandleMouseUp

func (lm *LayerManager) HandleMouseUp(x, y float32, button int) bool

func (*LayerManager) HandleMouseWheel

func (lm *LayerManager) HandleMouseWheel(x, y float32, dx, dy float32) bool

func (*LayerManager) HandleRune

func (lm *LayerManager) HandleRune(ch rune) bool

HandleRune dispatches character input to the topmost layer widget.

func (*LayerManager) HandleTextEditing

func (lm *LayerManager) HandleTextEditing(text string, start, length int) bool

HandleTextEditing dispatches an IME composition to the topmost layer widget, so a dialog opened without focus can still show its preedit.

func (*LayerManager) HitTest

func (lm *LayerManager) HitTest(x, y float32) *Layer

func (*LayerManager) LayerCount

func (lm *LayerManager) LayerCount() int

LayerCount is how many layers are open, which a window needs to decide whether Escape should close one or fall through to a widget.

func (*LayerManager) MoveToFront

func (lm *LayerManager) MoveToFront(layer *Layer)

func (*LayerManager) Paint

func (lm *LayerManager) Paint(canvas *graphics.Canvas)

func (*LayerManager) RemoveLayer

func (lm *LayerManager) RemoveLayer(layer *Layer)

func (*LayerManager) RemoveLayerByWidget

func (lm *LayerManager) RemoveLayerByWidget(widget Widget)

func (*LayerManager) TopLayer

func (lm *LayerManager) TopLayer() Widget

TopLayer is the topmost visible layer's widget, or nil. It is the widget a key belongs to when the window is routing to a popup rather than to the focused child.

type MenuStripHost interface{ IsMenuStrip() bool }

MenuStripHost marks widgets (menu bars) that must keep receiving pointer moves while a popup menu is open: hovering another title hover-switches the open menu.

type ModalBackdrop

type ModalBackdrop struct {
	BaseWidget
	// contains filtered or unexported fields
}

func (*ModalBackdrop) ContainsPoint

func (mb *ModalBackdrop) ContainsPoint(x, y float32) bool

func (*ModalBackdrop) OnMouseDown

func (mb *ModalBackdrop) OnMouseDown(x, y float32, button int) bool

func (*ModalBackdrop) OnMouseMove

func (mb *ModalBackdrop) OnMouseMove(x, y float32)

func (*ModalBackdrop) OnMouseUp

func (mb *ModalBackdrop) OnMouseUp(x, y float32, button int) bool

func (*ModalBackdrop) Paint

func (mb *ModalBackdrop) Paint(canvas *graphics.Canvas, rect graphics.Rect)

type ModalPopup

type ModalPopup struct {
	BackdropLayer *Layer
	ContentLayer  *Layer
	ContentWidget Widget

	IsModal bool
	// contains filtered or unexported fields
}

type MouseArea

type MouseArea struct {
	BaseWidget

	// HoverEnabled is QML's name for "track hover even without buttons". It is
	// accepted for scene readability; the toolkit always tracks hover, because a
	// position-based hover walk is cheaper than a second code path.
	HoverEnabled bool

	OnClicked         func()
	OnPressed         func()
	OnReleased        func()
	OnPositionChanged func(x, y float32)
	OnDoubleClicked   func()
	// contains filtered or unexported fields
}

MouseArea is a transparent input region. Size and position come from its parent (anchors.fill) or from explicit width/height.

func NewMouseArea

func NewMouseArea() *MouseArea

NewMouseArea returns an empty input region.

func (*MouseArea) CursorAt

func (m *MouseArea) CursorAt(x, y float32) *platform.Cursor

CursorAt points at an interactive area.

func (*MouseArea) Focusable

func (m *MouseArea) Focusable() bool

Focusable reports whether the area takes the keyboard.

func (*MouseArea) OnKeyDown

func (m *MouseArea) OnKeyDown(keyCode platform.KeyCode, mod platform.Modifiers) bool

OnKeyDown activates a focused area with Enter or Space.

func (*MouseArea) OnMouseDoubleClick

func (m *MouseArea) OnMouseDoubleClick(x, y float32, button int) bool

OnMouseDoubleClick is dispatched by the window's click-count path when a widget implements it; kept here so a scene can wire a double-click without a new widget.

func (*MouseArea) OnMouseDown

func (m *MouseArea) OnMouseDown(x, y float32, button int) bool

OnMouseDown arms the press.

func (*MouseArea) OnMouseMove

func (m *MouseArea) OnMouseMove(x, y float32)

OnMouseMove reports the pointer in the area's own coordinates.

func (*MouseArea) OnMouseUp

func (m *MouseArea) OnMouseUp(x, y float32, button int) bool

OnMouseUp fires the click when the release is still inside.

func (*MouseArea) Paint

func (m *MouseArea) Paint(canvas *graphics.Canvas, rect graphics.Rect)

Paint draws nothing: a MouseArea is input, not ink.

func (*MouseArea) Pressed

func (m *MouseArea) Pressed() bool

Pressed reports the pointer state.

func (*MouseArea) SetCursor

func (m *MouseArea) SetCursor(c *platform.Cursor) *MouseArea

SetCursor forces a cursor; nil falls back to the pointing hand.

func (*MouseArea) SetFillParent

func (m *MouseArea) SetFillParent() *MouseArea

SetFillParent sizes the area to its parent — QML's anchors.fill: parent, without requiring the parent to run an anchor pass before the first frame.

func (*MouseArea) SetFocusable

func (m *MouseArea) SetFocusable(b bool) *MouseArea

SetFocusable makes the area a keyboard target: it joins the Tab order and Enter/Space activate it.

func (*MouseArea) SetHoveredState

func (m *MouseArea) SetHoveredState(v bool)

SetHoveredState forwards hover to the state target as well as tracking it here, so a box painted by the area responds while the pointer is over it.

func (*MouseArea) SetPushed

func (m *MouseArea) SetPushed(v bool)

SetPushed lets the window or a parent drive the visual press state (a drag that started elsewhere, a test).

func (*MouseArea) SetStateTarget

func (m *MouseArea) SetStateTarget(w Widget) *MouseArea

SetStateTarget points the area's hover/press state at another widget (a Panel), which is how a scene lights up the box a MouseArea sits on. Setting a target does not take over the target's own input; it only forwards state.

type OSWindow

type OSWindow struct{}

OSWindow is a stub for the underlying OS-level window concept. The shim does not currently use it; methods are stubs so call sites that retrieve it compile and run as no-ops.

func (*OSWindow) Close

func (*OSWindow) Close()

func (*OSWindow) ContentRect

func (*OSWindow) ContentRect() graphics.Rect

ContentRect returns the content rectangle in screen coordinates. Stub: returns zero rect until a backend provides one.

func (*OSWindow) Position

func (*OSWindow) Position() graphics.Point

Position returns the window's screen position. Stub.

func (*OSWindow) SetContentRect

func (*OSWindow) SetContentRect(graphics.Rect)

func (*OSWindow) SetTitle

func (*OSWindow) SetTitle(string)

func (*OSWindow) Size

func (*OSWindow) Size() graphics.Size

Size returns the window's screen size. Stub.

type Panel

type Panel struct {
	BaseContainer

	DrawCallback         func(canvas *graphics.Canvas, rect graphics.Rect)
	MouseDownCallback    func(where graphics.Point, button, clickCount int, mod platform.Modifiers) bool
	MouseUpCallback      func(where graphics.Point, button int, mod platform.Modifiers) bool
	MouseMoveCallback    func(where graphics.Point, mod platform.Modifiers) bool
	MouseDragCallback    func(where graphics.Point, button int, mod platform.Modifiers) bool
	MouseWheelCallback   func(where, delta graphics.Point, mod platform.Modifiers) bool
	UpdateCursorCallback func(where graphics.Point) *platform.Cursor
	RuneTypedCallback    func(ch rune) bool
	// contains filtered or unexported fields
}

func NewPanel

func NewPanel() *Panel

func (*Panel) AddChild

func (p *Panel) AddChild(child Widget)

AddChild appends a child and sets its parent to this Panel (not the embedded BaseContainer).

func (*Panel) ApplyOpacity

func (p *Panel) ApplyOpacity(a float32)

ApplyOpacity is the non-fluent form the QML loader's common-property pass uses (a fluent setter returning *Panel does not satisfy interface{ ApplyOpacity(float32) }).

func (*Panel) BackdropBlur

func (p *Panel) BackdropBlur() bool

BackdropBlur reports whether the box frosts its backdrop.

func (*Panel) Clear

func (p *Panel) Clear()

func (*Panel) ClearGradient

func (p *Panel) ClearGradient() *Panel

ClearGradient returns to the solid background.

func (*Panel) Clickable

func (p *Panel) Clickable() bool

Clickable reports whether the box is an input target.

func (*Panel) CursorAt

func (p *Panel) CursorAt(x, y float32) *platform.Cursor

CursorAt points at a clickable box. An explicit cursor wins; returning nil lets the walk fall through to the parent.

func (*Panel) Dispose

func (p *Panel) Dispose()

Dispose cleans up all children and resources.

func (*Panel) EffectiveBackground

func (p *Panel) EffectiveBackground() (graphics.Color, bool)

EffectiveBackground resolves the panel background for the current theme: the token when one is set (live), otherwise the stored colour.

func (*Panel) FinishAnimations

func (p *Panel) FinishAnimations()

FinishAnimations snaps every state transition to its target. Tests and reduce-motion apps call it; the window's loop keeps painting until they settle.

func (*Panel) Focusable

func (p *Panel) Focusable() bool

Focusable reports whether the panel can take the keyboard. A clickable box can: a div with a click handler that a keyboard cannot reach is not a control.

func (*Panel) GetContentHeight

func (p *Panel) GetContentHeight() float32

func (*Panel) GetContentWidth

func (p *Panel) GetContentWidth() float32

func (*Panel) HoverAt

func (p *Panel) HoverAt(x, y float32)

HoverAt is the position-based hover walk (see HoverTarget): a clickable box lights up whether the pointer is over its own face or over a label child that is the actual hit.

func (*Panel) Layout

func (p *Panel) Layout() interface{}

func (*Panel) OnBubbledMouseDown

func (p *Panel) OnBubbledMouseDown(x, y float32, button int) bool

OnBubbledMouseDown handles a press that reached this panel because a CHILD was the deepest hit and declined it (see Window.handleMouseDown). It deliberately does NOT dispatch to children: they have already been asked.

func (*Panel) OnBubbledMouseUp

func (p *Panel) OnBubbledMouseUp(x, y float32, button int) bool

OnBubbledMouseUp is the release half of OnBubbledMouseDown.

func (*Panel) OnKeyDown

func (p *Panel) OnKeyDown(keyCode platform.KeyCode, mod platform.Modifiers) bool

OnKeyDown activates a focused clickable box with Enter or Space, which is what a keyboard user means by "click the card".

func (*Panel) OnMouseDown

func (p *Panel) OnMouseDown(x, y float32, button int) bool

func (*Panel) OnMouseMove

func (p *Panel) OnMouseMove(x, y float32)

func (*Panel) OnMouseUp

func (p *Panel) OnMouseUp(x, y float32, button int) bool

func (*Panel) OnMouseWheel

func (p *Panel) OnMouseWheel(x, y float32, dx, dy float32) bool

func (*Panel) Padding

func (p *Panel) Padding() float32

func (*Panel) Paint

func (p *Panel) Paint(canvas *graphics.Canvas, rect graphics.Rect)

func (*Panel) PanelAt

func (p *Panel) PanelAt(x, y float32) Widget

PanelAt returns the deepest child widget containing the point (in LOCAL coordinates).

func (*Panel) PreferredDimensions

func (p *Panel) PreferredDimensions(target interface{}, w, h float32) (float32, float32)

PreferredDimensions returns the preferred size of the panel based on its children.

func (*Panel) Pressed

func (p *Panel) Pressed() bool

Pressed reports whether the pointer is down on this box (the visual press state).

func (*Panel) Radius

func (p *Panel) Radius() float32

Radius returns the current corner radius.

func (*Panel) RemoveChild

func (p *Panel) RemoveChild(child Widget) bool

RemoveChild removes a child widget and cleans up its references.

func (*Panel) Selected

func (p *Panel) Selected() bool

Selected reports the selection flag.

func (*Panel) SetBackdropBlur

func (p *Panel) SetBackdropBlur(on bool) *Panel

SetBackdropBlur frosts the box: what is already painted behind it is blurred with the renderer's kernel, then the box's own translucent fill and border go on top. It is the frosted-glass card, and it is deliberately a BOOLEAN — the blur strength is the renderer's (one kernel on both sides); a per-box radius would drift from GL.

func (*Panel) SetBackground

func (p *Panel) SetBackground(bg interface{}) *Panel

func (*Panel) SetBackgroundToken

func (p *Panel) SetBackgroundToken(name string) *Panel

SetBackgroundToken pins the panel background to a theme role so runtime theme switches recolour it.

func (*Panel) SetBorderColor

func (p *Panel) SetBorderColor(color interface{})

func (*Panel) SetBorderWidth

func (p *Panel) SetBorderWidth(width float32)

func (*Panel) SetBoundProperty

func (p *Panel) SetBoundProperty(propName string, value interface{})

func (*Panel) SetClickable

func (p *Panel) SetClickable(b bool) *Panel

SetClickable makes the box an input target: it tracks hover and press, paints them, points the cursor at itself and takes Enter/Space when focused. Its children still get the press first — a card containing a button must let the button win — and only a press that no child consumed clicks the box.

func (*Panel) SetClipChildren

func (p *Panel) SetClipChildren(b bool) *Panel

SetClipChildren clips children to this panel's (rounded) rect — what a web card with an image needs, and what `clip: true` means in QML.

func (*Panel) SetContentHeight

func (p *Panel) SetContentHeight(height float32)

func (*Panel) SetContentWidth

func (p *Panel) SetContentWidth(width float32)

func (*Panel) SetCornerRadius

func (p *Panel) SetCornerRadius(r float32) *Panel

SetCornerRadius rounds the panel's background, border and shadow together, so the three can never disagree about the shape. It is QML's Rectangle radius.

func (*Panel) SetCursor

func (p *Panel) SetCursor(c *platform.Cursor) *Panel

SetCursor forces a cursor over the box. Nil falls back to the pointing hand when the box is clickable.

func (*Panel) SetEnabled

func (p *Panel) SetEnabled(enabled bool) *Panel

func (*Panel) SetFocusable

func (p *Panel) SetFocusable(b bool)

SetFocusable toggles whether this panel can receive keyboard focus.

func (*Panel) SetFrameRect

func (p *Panel) SetFrameRect(rect graphics.Rect)

SetFrameRect overrides BaseWidget to trigger layout on resize.

func (*Panel) SetGradient

func (p *Panel) SetGradient(g graphics.Gradient) *Panel

SetGradient fills the panel with a gradient instead of a solid colour. The background colour still applies when no gradient is set.

func (*Panel) SetGradientUnit

func (p *Panel) SetGradientUnit(g graphics.Gradient) *Panel

SetGradientUnit fills the panel with a gradient whose geometry is expressed in 0..1 of the box, so a scene can say "top to bottom" without knowing the size the layout will give it. Paint resolves it against the final rect.

func (*Panel) SetHoverInk

func (p *Panel) SetHoverInk(c graphics.Color) *Panel

SetHoverInk overrides the theme's hover wash for this box; zero uses the theme's Hovered role.

func (*Panel) SetHoveredState

func (p *Panel) SetHoveredState(hovered bool)

SetHoveredState starts the hover wash's transition. The window drives it through the hover chain, so a box lights up and fades out the same way whether the pointer is on its face or on a label inside it.

func (*Panel) SetLayout

func (p *Panel) SetLayout(l interface{}) *Panel

func (*Panel) SetOnClick

func (p *Panel) SetOnClick(fn func()) *Panel

SetOnClick installs the box's click handler. Setting a handler also makes the box clickable, because a handler nothing can call is the failure this tree keeps finding.

func (*Panel) SetOnPress

func (p *Panel) SetOnPress(fn func(bool)) *Panel

SetOnPress installs the press-state handler (down/up), which a scene uses when it wants a custom pressed visual rather than the theme wash.

func (*Panel) SetOpacity

func (p *Panel) SetOpacity(a float32) *Panel

SetOpacity sets the panel's own paint opacity (0..1). It applies to the panel's fill, border, shadow and state wash; children keep their own opacity.

func (*Panel) SetPadding

func (p *Panel) SetPadding(padding float32) *Panel

func (*Panel) SetPressedInk

func (p *Panel) SetPressedInk(c graphics.Color) *Panel

SetPressedInk overrides the theme's press wash; zero uses the theme's Pressed role.

func (*Panel) SetPushed

func (p *Panel) SetPushed(v bool) *Panel

SetPushed drives the pressed visual from outside (a MouseArea forwarding its state, a drag that began elsewhere, a test).

func (*Panel) SetSelected

func (p *Panel) SetSelected(selected bool) *Panel

SetSelected marks the box as the chosen one in its group — a nav item, a day cell, a list row. It paints the theme's Selected ink UNDER the hover/press wash, so the selected state survives a hover instead of being replaced by it.

func (*Panel) SetSelectedInk

func (p *Panel) SetSelectedInk(c graphics.Color) *Panel

SetSelectedInk overrides the theme's Selected role for this box; zero uses the theme.

func (*Panel) SetShadow

func (p *Panel) SetShadow(spec theme.ShadowSpec) *Panel

SetShadow paints a drop shadow behind the panel from an explicit spec. The token route (SetShadowToken) is preferred in a theme-driven app.

func (*Panel) SetShadowToken

func (p *Panel) SetShadowToken(name string) *Panel

SetShadowToken resolves a named shadow ("card", "popup", "window", "none") from the ACTIVE theme, so a scene that says `shadow: "card"` follows the preset.

func (*Panel) SetSticky

func (p *Panel) SetSticky(on bool) *Panel

SetSticky pins the box to the top of its scroll viewport while its section is in view. The scroll pane positions it; the box just declares it.

func (*Panel) SetStickyInset

func (p *Panel) SetStickyInset(px float32) *Panel

SetStickyInset is how far below the viewport's top edge a sticky box pins (useful under a fixed bar the pane does not know about).

func (*Panel) Sticky

func (p *Panel) Sticky() bool

Sticky reports whether the box pins while scrolling.

func (*Panel) StickyInset

func (p *Panel) StickyInset() float32

StickyInset reports the pin offset.

func (*Panel) ValidateLayout

func (p *Panel) ValidateLayout()

ValidateLayout applies the layout if needed.

func (*Panel) Window

func (p *Panel) Window() *OSWindow

Window returns the underlying OS window. In the mobilegles migration this is a no-op stub; the return type is an interface to allow a real implementation later without changing call sites.

type PerfTimer

type PerfTimer struct {
	// contains filtered or unexported fields
}

PerfTimer measures performance of an operation

func StartPerfTimer

func StartPerfTimer(name string) *PerfTimer

StartPerfTimer starts a performance timer

func (*PerfTimer) Stop

func (t *PerfTimer) Stop()

Stop stops the timer and logs the duration

type SVGDocument

type SVGDocument struct {
	Width    float32
	Height   float32
	ViewBox  [4]float32
	Elements []SVGElement
}

SVGDocument represents a parsed SVG file

func LoadSVG

func LoadSVG(path string) (*SVGDocument, error)

LoadSVG loads and parses an SVG file

func LoadSVGByName

func LoadSVGByName(name string) (*SVGDocument, error)

LoadSVGByName loads an SVG from the embedded assets/icons directory

type SVGElement

type SVGElement struct {
	Type     string
	Attrs    map[string]string
	Children []SVGElement
	Text     string
}

SVGElement represents a parsed SVG element

type ScrollHandler

type ScrollHandler interface {
	OnMouseWheel(x, y, dx, dy float32) bool
}

type TabIndexSetter

type TabIndexSetter interface {
	SetTabIndex(int)
	TabIndex() int
	Focusable() bool
}

type Widget

type Widget interface {
	Paint(canvas *graphics.Canvas, rect graphics.Rect)
	ContainsPoint(x, y float32) bool
	FrameRect() graphics.Rect
	SetFrameRect(rect graphics.Rect)
	MarkForRedraw()
	SetParent(parent Widget)
	Parent() Widget
	PreferredDimensions(target interface{}, width, height float32) (float32, float32)
	MinimumDimensions() (float32, float32)
}

func FocusableWidgets

func FocusableWidgets(root Widget) []Widget

FocusableWidgets returns the widgets in root's subtree that can take keyboard focus, in TabIndex order (tree order among equal indices).

It is the ONE focus traversal: the window's Tab uses it, a dialog's Tab uses it with the dialog's content as the root, and a container's own Children() decides what is reachable — so a TabPanel offers only its active page and a layer's content (which is not in the window tree) is reachable at all.

func GetNamedWidget

func GetNamedWidget(id string) Widget

func NamedWidgets

func NamedWidgets() []Widget

NamedWidgets returns all globally registered named widgets.

func NearestFocusable

func NearestFocusable(w Widget) Widget

NearestFocusable returns w when it can take focus, otherwise the nearest ancestor that can. A click hits the DEEPEST widget — a label, a cell, an icon inside the control the user meant — and focusing that instead of the control is why a table row or a framed field was never focused by clicking it.

func NilCheck

func NilCheck(w Widget, context string) Widget

NilCheck performs nil safety check

type Window

type Window struct {
	*BaseContainer

	LayerManager *LayerManager
	Drag         *DragManager
	// contains filtered or unexported fields
}

Window is the top-level container that receives events and manages children.

func NewWindow

func NewWindow() *Window

Window management

func (*Window) AddChild

func (w *Window) AddChild(child Widget)

func (*Window) AddLayerFor

func (w *Window) AddLayerFor(from Widget, x, y float32, paint func(canvas *graphics.Canvas, rect graphics.Rect)) *Layer

AddLayerFor places a layer at a point given in `from`'s own local coordinates and returns it. Callers never convert spaces themselves: the window adds the position within the tree and the tree's origin.

func (*Window) AsPanel

func (w *Window) AsPanel() *Panel

func (*Window) Children

func (w *Window) Children() []Widget

Children returns the window's content tree. It is the accessor that makes the window usable wherever a Container is — a tree walk, an audit, a debug dump — which it was not before: the window had AddChild and PanelAt but no way to enumerate what it held, so anything that walked a tree had to start somewhere else or give up.

func (*Window) ClickCount

func (w *Window) ClickCount() int

func (*Window) ContentOrigin

func (w *Window) ContentOrigin() (float32, float32)

ContentOrigin returns the content tree's origin in window space.

func (*Window) CursorAt

func (w *Window) CursorAt(x, y float32) *platform.Cursor

CursorAt implements meuishim.CursorSource — the hover cursor for the widget under (x, y), via the standard hit-test walk.

func (*Window) Device

func (w *Window) Device() graphics.Device

Device returns the device the window last painted through, or nil if it has not painted yet. Offscreen work outside a paint pass uses this.

func (*Window) DismissContextMenu

func (w *Window) DismissContextMenu(id string)

DismissContextMenu dismisses a named context menu popup.

func (*Window) DismissModal

func (w *Window) DismissModal(mp *ModalPopup)

func (*Window) DismissPopupContextMenu

func (w *Window) DismissPopupContextMenu()

DismissPopupContextMenu dismisses the current popup context menu.

func (*Window) DismissTopModal

func (w *Window) DismissTopModal()

func (*Window) Dispose

func (w *Window) Dispose()

Dispose cleans up all resources held by the Window.

func (*Window) FocusedChild

func (w *Window) FocusedChild() Widget

func (*Window) HandleEvent

func (w *Window) HandleEvent(ev *platform.Event) bool

HandleEvent implements platform.Sink. Returns true when consumed.

func (*Window) HeldModifiers

func (w *Window) HeldModifiers() platform.Modifiers

HeldModifiers reports what is held RIGHT NOW, computed from the keys themselves rather than from the last event's modifier field.

It is the answer for a paint or a timer asking "is shift down" between two events, which `Modifiers()` cannot give: that describes the last event that arrived, and moving the mouse is an event carrying no modifiers — so a shift-held UI asked mid-drag would say no.

func (*Window) KeyDown

func (w *Window) KeyDown(k platform.KeyCode) bool

KeyDown reports whether a key is currently held. It is the answer to "is the user holding shift RIGHT NOW", which an event's modifier bits cannot give: they describe the event that arrived, not the state the keyboard is in.

func (*Window) Layout

func (w *Window) Layout() interface{}

func (*Window) MarkForRedraw

func (w *Window) MarkForRedraw()

func (*Window) Modifiers

func (w *Window) Modifiers() platform.Modifiers

RemoveChild removes a child widget from the Window. Modifiers reports the modifiers of the LAST INPUT EVENT — which is what an event handler wants.

It was changed at one point to compute from the keys that are down, on the theory that "is shift held" wants the current state. That broke the node graph's shift+wheel and ctrl+wheel, which are exactly the handlers that read this: a wheel event carries no modifiers, so the pump queries the OS and puts them on the event, and the widget reads them back here. Two different questions, one method:

  • "what did THIS event carry" — Modifiers(), which is this
  • "what is held right now" — HeldModifiers(), which answers it from the keys

Collapsing them broke a real caller for the sake of a case no caller had, which is the trade this project keeps learning: extending the contract is cheaper than redefining it.

func (*Window) Paint

func (w *Window) Paint(canvas *graphics.Canvas, rect graphics.Rect)

func (*Window) PaintLayerOverlay

func (w *Window) PaintLayerOverlay(canvas *graphics.Canvas, translateY float32)

PaintLayerOverlay paints all layers translated by translateY (the content-space offset the layers' coordinates are expressed in).

func (*Window) PanelAt

func (w *Window) PanelAt(x, y float32) Widget

PanelAt returns the deepest child widget containing the point (in local coordinates).

func (*Window) RemoveChild

func (w *Window) RemoveChild(child Widget) bool

func (*Window) RenderToImage

func (w *Window) RenderToImage(wpx, hpx int) (*graphics.Image, error)

RenderToImage renders the window contents to an offscreen image at the given pixel dimensions. Used by render_demo for screenshot capture.

func (*Window) Scale

func (w *Window) Scale() float32

Scale returns the display's content scale factor (1.0 = normal, 2.0 = Retina).

func (*Window) SetBackground

func (w *Window) SetBackground(ink graphics.Ink) *Window

func (*Window) SetBoundProperty

func (w *Window) SetBoundProperty(propName string, value interface{})

func (*Window) SetContentOrigin

func (w *Window) SetContentOrigin(x, y float32)

SetContentOrigin records where the content tree's (0,0) sits in window space. It is non-zero when the host reserves a strip for window chrome — the custom title bar — and it is the *only* bar knowledge the toolkit needs: widgets keep speaking their own tree's coordinates.

func (*Window) SetDisplayScale

func (w *Window) SetDisplayScale(scale float32)

SetDisplayScale overrides the detected display scale. Useful when the window moves to a different monitor and the user wants to set the scale explicitly.

func (*Window) SetFocusedChild

func (w *Window) SetFocusedChild(child Widget)

SetFocusedChild moves keyboard focus to child (nil clears it). It is the only public way in, and it goes through the same blur-then-focus path as a click: assigning the field directly left the previous widget saying it was still focused, which is how two controls ended up both looking — and acting — focused.

func (*Window) SetFrameRect

func (w *Window) SetFrameRect(rect graphics.Rect)

SetFrameRect overrides BaseWidget to trigger layout on resize.

func (*Window) SetLayerPaintExternal

func (w *Window) SetLayerPaintExternal()

SetLayerPaintExternal switches layer painting off inside Window.Paint: the host paints them via PaintLayerOverlay AFTER the title bar, so dropdowns/popups overlay the chrome instead of being overpainted by it.

func (*Window) SetLayout

func (w *Window) SetLayout(layout interface{})

func (*Window) SetOnAction

func (w *Window) SetOnAction(handler func(action string) bool) *Window

SetOnAction installs the app's handler for a semantic action resolved by the global keymap (platform.Event.Actions — window.close, app.exit-fullscreen, or an app-specific binding). It runs only when the widgets declined the key, so a shortcut never steals a key a text field needed; it is how an app binds a command without the toolkit learning every app's vocabulary.

func (*Window) SetOnBack

func (w *Window) SetOnBack(fn func() bool)

SetOnBack installs the handler for the OS back gesture. It returns true when the app handled it — it popped its own navigation — and false to let the window close, which is what happens at the root of the stack. A nil handler always closes.

This is the app's half of Android's back contract. Without it the gesture reaches nothing and the system closes the app, which is what happened before the back event existed at all.

func (*Window) SetOnKeyDown

func (w *Window) SetOnKeyDown(handler func(keyCode platform.KeyCode, modifiers platform.Modifiers)) *Window

Additional methods needed by other code

func (*Window) SetOnMouseDown

func (w *Window) SetOnMouseDown(handler func(x, y float32, button int)) *Window

func (*Window) SetOnMouseMove

func (w *Window) SetOnMouseMove(handler func(x, y float32)) *Window

func (*Window) SetOnMouseUp

func (w *Window) SetOnMouseUp(handler func(x, y float32, button int)) *Window

func (*Window) SetOnResize

func (w *Window) SetOnResize(fn func(width, height float32))

SetOnResize installs the app's resize hook. It receives the CONTENT size, once per actual change, so a responsive scene can reflow without polling Width().

func (*Window) SetOpacity

func (w *Window) SetOpacity(opacity float32) *Window

func (*Window) SetPadding

func (w *Window) SetPadding(padding float32) *Window

func (*Window) SetTouchProfile

func (w *Window) SetTouchProfile(on bool)

SetTouchProfile turns the touch floor on or off FOR THIS WINDOW. It is a manual setting: a later resize will not override it.

func (*Window) SetWindowSize

func (w *Window) SetWindowSize(width, height float32)

SetWindowSize resizes the OS window to the given content dimensions. The status bar size grip calls this to resize the window on drag.

func (*Window) ShowContextMenuPositioned

func (w *Window) ShowContextMenuPositioned(id string, x, y float32)

The menu is displayed as a non-modal popup layer. The id must have been registered via RegisterNamedWidget during QML loading.

func (*Window) ShowModal

func (w *Window) ShowModal(content Widget, pw, ph float32) *ModalPopup

func (*Window) ShowNonModal

func (w *Window) ShowNonModal(content Widget, pw, ph float32) *ModalPopup

func (*Window) ShowPopupContextMenu

func (w *Window) ShowPopupContextMenu(cm Widget, x, y float32)

ShowPopupContextMenu shows a standalone context menu widget at the given position. The menu is displayed as a non-modal popup layer. The widget should be a *ContextMenu or any widget that implements PreferredSize() and ContextMenuHoster.

func (*Window) TakeScreenShot

func (w *Window) TakeScreenShot(onImg func(i *graphics.Image, err error))

func (*Window) TextInputArea

func (w *Window) TextInputArea() (bool, graphics.Rect)

TextInputArea reports whether a widget is editing text, and where it is, in WINDOW coordinates.

It is the handover between the two halves of on-screen-keyboard support: the toolkit knows what has focus, the backend knows how to tell the OS, and neither can answer alone. A backend polls this and calls platform.Window.SetTextInput when it changes.

"Editing text" is the same test the rune path uses — the focused widget accepts OnCharacter — so the keyboard cannot appear for a widget that would then ignore what was typed.

func (*Window) TouchProfile

func (w *Window) TouchProfile() bool

TouchProfile reports whether THIS window uses the touch floor. An explicit setting wins; otherwise it is the process default.

func (*Window) ValidateLayout

func (w *Window) ValidateLayout()

ValidateLayout applies the layout if needed.

func (*Window) Window

func (w *Window) Window() *Window

Window returns the window itself.

Without this, the promoted BaseWidget.Window() wins, and for a *Window it walks Parent() — which a Window does not have — so it returns nil. Any caller doing .Window() on a window then gets nil and can fall back to process-global state, which is how a window ends up using another window's values.

type WindowOptions

type WindowOptions struct {
	Title string
	Size  graphics.Size
	// NoChrome skips the standard title bar. The default is to install it: the
	// desktop backends create undecorated windows, so without chrome a window
	// can be neither moved, maximized nor resized. Mobile hosts — where the OS
	// owns the surface — and any app that draws its own chrome pass true.
	NoChrome bool
}

WindowOptions configures one window added to the app.

Directories

Path Synopsis
cmd
tools/determinism command
Command determinism captures the same QML scene through the demo binary N times and verifies the framebuffers are pixel-identical.
Command determinism captures the same QML scene through the demo binary N times and verifies the framebuffers are pixel-identical.
tools/fontprobe command
tools/glprobe command
glprobe prints the GL driver the renderer actually landed on, and the limits the unified batch depends on.
glprobe prints the GL driver the renderer actually landed on, and the limits the unified batch depends on.
tools/glshot command
glshot renders a QML scene through the REAL pipeline (SDL3 + GL) and writes the framebuffer as a PNG, so an offscreen shot can be compared with what ships.
glshot renders a QML scene through the REAL pipeline (SDL3 + GL) and writes the framebuffer as a PNG, so an offscreen shot can be compared with what ships.
tools/imgdiff command
imgdiff compares two PNG screenshots and reports how far apart they are.
imgdiff compares two PNG screenshots and reports how far apart they are.
tools/presetgallery command
Command presetgallery renders a QML scene under every native theme preset and writes one PNG per preset for visual review.
Command presetgallery renders a QML scene under every native theme preset and writes one PNG per preset for visual review.
tools/qmlfmt command
tools/qmlshot command
qmlshot renders a .qml scene to a PNG through the software device — no display, no GL, no window — so a scene can be reviewed and diffed in the same loop as the tests.
qmlshot renders a .qml scene to a PNG through the software device — no display, no GL, no window — so a scene can be reviewed and diffed in the same loop as the tests.
tools/qmlverify command
Command qmlverify checks that running the QML formatter over a set of files never changes what the runtime parser loads.
Command qmlverify checks that running the QML formatter over a set of files never changes what the runtime parser loads.
tools/renderbar command
renderbar draws the WindowFrame title bar offscreen and saves a PNG for offline inspection of the bar's glyphs and layout.
renderbar draws the WindowFrame title bar offscreen and saves a PNG for offline inspection of the bar's glyphs and layout.
tools/themetool command
Command themetool is a small front-end for the native theme format: list presets, export a theme (from a preset or an existing theme file), and diff two themes.
Command themetool is a small front-end for the native theme format: list presets, export a theme (from a preset or an existing theme file), and diff two themes.
examples
admin command
Team admin — a dark enterprise console: navigation rail, a filterable member table, a detail pane, and an invite flow with validation.
Team admin — a dark enterprise console: navigation rail, a filterable member table, a detail pane, and an invite flow with validation.
checkout command
Checkout — the sixth web scene: a three-step flow with validation.
Checkout — the sixth web scene: a three-step flow with validation.
dashboard command
Dashboard — the second web scene: a gradient sky, frosted cards and a day strip whose cells RESTYLE themselves from Go when chosen.
Dashboard — the second web scene: a gradient sky, frosted cards and a day strip whose cells RESTYLE themselves from Go when chosen.
device command
demoapp runs the real-device demo on the desktop.
demoapp runs the real-device demo on the desktop.
device/demoapp
Package demoapp is the real-device demo: one scene, wired to the platform, that exercises enough of the toolkit and enough of the OS surface to be worth putting on a phone.
Package demoapp is the real-device demo: one scene, wired to the platform, that exercises enough of the toolkit and enough of the OS surface to be worth putting on a phone.
direct command
Direct — the same window built with widgets and setters: no .qml file, no flow wrappers.
Direct — the same window built with widgets and setters: no .qml file, no flow wrappers.
docs command
Docs — the third web scene: a fixed top bar, a fixed sidebar and an article that SCROLLS under them, with a real image at the top.
Docs — the third web scene: a fixed top bar, a fixed sidebar and an article that SCROLLS under them, with a real image at the top.
enterprise command
flow command
Flow — the same window declared as Go structs and built by the flow package.
Flow — the same window declared as Go structs and built by the flow package.
landing command
Landing — the first web scene, runnable and wireable.
Landing — the first web scene, runnable and wireable.
launcher command
The examples launcher: a window that lists the examples and starts the one you click.
The examples launcher: a window that lists the examples and starts the one you click.
mail command
Mail — the fifth web scene: a three-column inbox with list selection, reveal-on- select and an app-supplied display face.
Mail — the fifth web scene: a three-column inbox with list selection, reveal-on- select and an app-supplied display face.
mobile command
ops command
Ops console — an enterprise-shaped application on the toolkit's own desktop theme.
Ops console — an enterprise-shaped application on the toolkit's own desktop theme.
settings command
Settings — the fourth web scene: the CONTROLS under the web preset, wired.
Settings — the fourth web scene: the CONTROLS under the web preset, wired.
Package flow provides declarative widget wrappers for MeUi.
Package flow provides declarative widget wrappers for MeUi.
Package graphics is the meui drawing seam: meui-owned value types, a Paint, and a Canvas facade.
Package graphics is the meui drawing seam: meui-owned value types, a Paint, and a Canvas facade.
enums/paintstyle
Package paintstyle mirrors the reference toolkit's paint-style enum.
Package paintstyle mirrors the reference toolkit's paint-style enum.
enums/pathop
Package pathop mirrors the reference toolkit's path-op enum.
Package pathop mirrors the reference toolkit's path-op enum.
enums/slant
Package slant mirrors the reference toolkit's slant enum.
Package slant mirrors the reference toolkit's slant enum.
enums/spacing
Package spacing mirrors the reference toolkit's spacing enum.
Package spacing mirrors the reference toolkit's spacing enum.
enums/weight
Package weight mirrors the reference toolkit's weight enum.
Package weight mirrors the reference toolkit's weight enum.
harness
behaviour
Package behaviour drives the meui widget toolkit through its event sink and asserts widget state — headless behavioral testing of every widget's expected interactions (tab switching, text editing and selection, tree expand/collapse, panel splitting).
Package behaviour drives the meui widget toolkit through its event sink and asserts widget state — headless behavioral testing of every widget's expected interactions (tab switching, text editing and selection, tree expand/collapse, panel splitting).
renderparity command
renderparity renders a QML file through the meuishim/mobilegles stack and captures the framebuffer to PNG for visual comparison against the Skia reference renders (see RENDER_PARITY_PLAN.md).
renderparity renders a QML file through the meuishim/mobilegles stack and captures the framebuffer to PNG for visual comparison against the Skia reference renders (see RENDER_PARITY_PLAN.md).
renderparity/arrowprobe command
arrowprobe: isolate spinner arrow rendering — SVG at various scales vs the text-glyph fallback.
arrowprobe: isolate spinner arrow rendering — SVG at various scales vs the text-glyph fallback.
renderparity/ceprobe command
ceprobe: CodeEditor rendered directly (no QML) to isolate parsing vs drawing.
ceprobe: CodeEditor rendered directly (no QML) to isolate parsing vs drawing.
renderparity/clippathprobe command
clippathprobe: self-checking probe for Canvas.ClipPath, which the render-parity corpus cannot see (it only ever clips rectangles).
clippathprobe: self-checking probe for Canvas.ClipPath, which the render-parity corpus cannot see (it only ever clips rectangles).
renderparity/cliptest command
cliptest probes Save/ClipRect/Restore pixel behavior through the same meuishim path TabPanel uses: translate to a local origin, clip a tab-bar rect, draw inside the clip, restore, draw after.
cliptest probes Save/ClipRect/Restore pixel behavior through the same meuishim path TabPanel uses: translate to a local origin, clip a tab-bar rect, draw inside the clip, restore, draw after.
renderparity/crispprobe command
P7 crispness check: same string drawn directly vs through a cache image at 1:1, plus a 2x-scaled cache to inspect filtering.
P7 crispness check: same string drawn directly vs through a cache image at 1:1, plus a 2x-scaled cache to inspect filtering.
renderparity/gradientprobe command
gradientprobe: self-checking probe for multi-stop, conic and stroke gradients, none of which the render-parity corpus can see (it uses no gradients at all, and the toolkit does not yet either).
gradientprobe: self-checking probe for multi-stop, conic and stroke gradients, none of which the render-parity corpus can see (it uses no gradients at all, and the toolkit does not yet either).
renderparity/nestedclip command
nestedclip: RenderOffscreen containing red rect, ClipRect, green rect.
nestedclip: RenderOffscreen containing red rect, ClipRect, green rect.
renderparity/paintstateprobe command
paintstateprobe: self-checking probe for the Paint state the render-parity corpus cannot see — it never strokes a path, never disables antialiasing and never varies opacity.
paintstateprobe: self-checking probe for the Paint state the render-parity corpus cannot see — it never strokes a path, never disables antialiasing and never varies opacity.
renderparity/strokeprobe command
strokeprobe: renders thick strokes with each cap and join style to a PNG, so the join geometry can be inspected directly.
strokeprobe: renders thick strokes with each cap and join style to a PNG, so the join geometry can be inspected directly.
renderparity/textprobe command
baselineprobe: draw text at a known baseline inside a 28px field box, capture, and measure the ink band vs the field center.
baselineprobe: draw text at a known baseline inside a 28px field box, capture, and measure the ink band vs the field center.
internal
mobileglesdevice
Package mobileglesdevice is the public entry point to the built-in renderer-backed graphics.Device.
Package mobileglesdevice is the public entry point to the built-in renderer-backed graphics.Device.
Package keymap provides the global, user-mappable key-binding dictionary: stable action names ("window.close") mapped to key + modifier combinations, with JSON persistence so applications (and a future Settings UI) can override the defaults at startup.
Package keymap provides the global, user-mappable key-binding dictionary: stable action names ("window.close") mapped to key + modifier combinations, with JSON persistence so applications (and a future Settings UI) can override the defaults at startup.
Package platform is the OS-facing seam: the contract the toolkit uses for windows, events, input, clipboard, dialogs, displays and cross-thread work, with the renderer/windowing backend supplied behind it.
Package platform is the OS-facing seam: the contract the toolkit uses for windows, events, input, clipboard, dialogs, displays and cross-thread work, with the renderer/windowing backend supplied behind it.
qml
Package web is the small behaviour layer a web-looking meui scene is wired in.
Package web is the small behaviour layer a web-looking meui scene is wired in.

Jump to

Keyboard shortcuts

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