-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathdoc.go
More file actions
75 lines (75 loc) · 1.81 KB
/
Copy pathdoc.go
File metadata and controls
75 lines (75 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// Package ui provides an enterprise-grade GUI toolkit for Go.
//
// gogpu/ui is designed for building professional applications such as
// IDEs, design tools, CAD applications, and Chrome/Electron-class apps.
// It provides a reactive, declarative API with GPU-accelerated rendering.
//
// # Quick Start
//
// The simplest ui program creates a window with a button:
//
// package main
//
// import (
// "github.com/gogpu/gogpu"
// "github.com/gogpu/ui"
// "github.com/gogpu/ui/widgets"
// "github.com/gogpu/ui/layout"
// )
//
// func main() {
// app := gogpu.NewApp(gogpu.Config{
// Title: "My App",
// Width: 800,
// Height: 600,
// })
//
// root := layout.VStack(
// widgets.Text("Hello, World!"),
// widgets.Button("Click Me").OnClick(func() {
// println("Clicked!")
// }),
// ).Padding(16)
//
// app.SetRoot(root)
// app.Run()
// }
//
// # Architecture
//
// gogpu/ui uses a layered architecture:
//
// - core: Widget interface, WidgetBase, Context
// - layout: VStack, HStack, Grid, Flexbox
// - widgets: Button, TextField, Dropdown, etc.
// - theme: Material 3, Fluent, Cupertino
// - state: Signals integration (coregx/signals)
//
// # State Management
//
// Use signals for reactive state:
//
// count := signals.New(0)
//
// widgets.Text(signals.Computed(func() string {
// return fmt.Sprintf("Count: %d", count.Get())
// }))
//
// # Platform Support
//
// - Windows: Win32
// - macOS: Cocoa
// - Linux: X11/Wayland
//
// # Dependencies
//
// gogpu/ui depends on:
// - github.com/gogpu/gg - 2D graphics
// - github.com/gogpu/gogpu - Windowing
// - github.com/coregx/signals - State management
//
// # Status
//
// This package is in the planning phase (v0.0.0).
// See ROADMAP.md for the development plan.
package ui