Skip to content
phroun edited this page Aug 22, 2026 · 1 revision

Wire name window

A top-level window. It carries a title, geometry, a role, and exactly one content trinket.

w=new window title="My App" width=480 height=288 main children={
	new panel layout=vbox spacing=8 children={
		new label caption="Ready"
	}
}

Properties

Property Type Default Meaning
denomination int Row height override in units (0 clears)
font string Window font override ("default" clears)
frameless flag false Draw no frame around the window.
height int Window height in desktop units
main flag false Mark as the application's main window
native flag false Request a native OS window
no_close flag false The user cannot close the window.
no_maximize flag false The user cannot maximize the window.
no_minimize flag false The user cannot minimize the window.
no_move flag false The user cannot move the window.
no_resize flag false The user cannot resize the window.
no_title flag false Draw no title bar.
owner int 0 Owning window's object id for a dialog/modal/toolpalette (0 = app-level)
stays_on_top flag false Keep the window above its peers.
tearable flag false The window may be torn off to its own OS surface.
title string Window title bar text
type string normal Window role: main|normal|mdichild|dialog|modal|toolpalette
width int Window width in desktop units
x int Window x in desktop units
y int Window y in desktop units

Events

window_closed — The window finished closing. It carries no trinket field because the window IS the subject.

Field Type Meaning
window uint The closed window's object ID.

window_closed carries a window field rather than the trinket field the other events use, because the window is itself the subject.

One content trinket

A window holds exactly one child. Two is an error:

new window title="A" children={ new label caption="a"; new label caption="b" }
  ->  window: only one content trinket (wrap several in a panel)

So a window's child is nearly always a Panel, which is what holds the rest.

type takes a quoted string

new window title="Settings" type="dialog"

The value is one of main normal mdichild dialog modal toolpalette, and the quotes are required — type=dialog without them is rejected with type: expected a quoted string. An unrecognised value is rejected by name.

The role decides how the display treats the window. dialog, modal and toolpalette float above an owner; owner= names that window's object id, and 0 means application-level. Whether a role is permitted at all is the display's decision when it adopts the window — a normal window needs the connection to have asked for multiple windows.

Geometry is in desktop units

x y width height are in units, resolved against the desktop's denomination. At the default 8×16 a width=480 height=288 window is 60 columns by 18 rows.

denomination overrides the window's row height in units, and the content re-grids to it; 0 clears the override. font overrides the window's font, which its content inherits, and "default" clears it.

Flags

Each of these is a bare-name flag, negated with !:

Flag Effect
main Marks the application's main window.
native Requests a real OS window rather than one drawn on the desktop.
tearable The window may be detached to its own OS surface.
frameless No frame.
no_title No title bar.
no_resize no_move no_close no_minimize no_maximize Withhold that operation.
stays_on_top Keeps the window above its peers.
new window title="Palette" type="toolpalette" no_minimize no_maximize stays_on_top

Menu bars and status bars are siblings

A window's chrome is not in its children. A menubar and a statusbar are built as their own top-level objects in the same request, and the display adopts each as the connection's chrome:

w=new window title="My App" main children={ new panel layout=vbox children={ … } }
mb=new menubar children={ … }

See MenuBar.

See also

Panel — what a window's single child usually is · MenuBar · StatusBar · MDIPane · Common Properties

Clone this wiki locally