25 lines
1.3 KiB
Markdown
25 lines
1.3 KiB
Markdown
# Overview
|
|
|
|
The `display` module is the Core GUI surface. It coordinates windows, menus, trays, dialogs, notifications, and WebSocket events through **Wails v3** on the Go side and **Angular** in `ui/` on the frontend side.
|
|
|
|
## Architecture
|
|
|
|
The project consists of two main parts:
|
|
|
|
1. **Backend (Go):** Handles window management, tray/menu setup, dialogs, notifications, layout persistence, and IPC dispatch.
|
|
2. **Frontend (Angular):** Provides the user interface. It lives in `ui/` and is built as a custom element that talks to the backend through the Wails runtime.
|
|
|
|
## Key Components
|
|
|
|
### Display Service (`display`)
|
|
The core service manages the application lifecycle and exposes declarative operations such as:
|
|
- `OpenWindow(window.Window{})`
|
|
- `CreateWindow(window.Window{Name: "editor", URL: "/#/editor"})`
|
|
- `SaveLayout("coding")`
|
|
- `TileWindows(window.TileModeLeftRight, []string{"editor", "terminal"})`
|
|
- `ApplyWorkflowLayout(window.WorkflowCoding)`
|
|
|
|
### System Integration
|
|
- **Menu:** The application menu is constructed in `buildMenu()` and dispatched through IPC.
|
|
- **System Tray:** The tray menu is configured in `setupTray()` and keeps the desktop surface in sync with the runtime.
|
|
- **Events:** Window, theme, screen, lifecycle, and tray actions are broadcast as WebSocket events for the frontend.
|