Skip to content
phroun edited this page Aug 22, 2026 · 2 revisions

Wire names dockrow · dockentry

A row of entries standing for windows that are not on screen — where a minimized MDIPane window goes. Clicking an entry is the gesture that asks for its window back.

d=new dockrow entry_width=20 children={
	e=new dockentry caption="Report.txt" window=1042
}
sub d.e click

dockrow

Property Type Default Meaning
entry_width int Width of each dock entry in units

Plus the common properties.

dockentry

Property Type Default Meaning
caption string Dock entry caption
window int Hosted window id

dockentry is a virtual type and takes none of the common properties:

new dockrow children={ new dockentry caption="x" bg=blue }
  ->  property "bg" is not supported by this type

Events

click — A docked entry was clicked — the gesture that restores a minimized window.

Field Type Meaning
trinket uint The entry's object ID.
window uint The window the entry stands for.

The event belongs to the entry, not the row, so that is what you subscribe to — and trinket is the entry's own id:

sub d.e click

A dock of several entries means several subscriptions, one per entry. There is no row-level event that reports a click on whichever entry was hit.

The dock does not fill itself

Nothing connects a pane to a dock automatically. Minimizing a window in an MDIPane raises minimize and does not create an entry; clicking a dock entry raises click and does not restore anything. The application is the wire between them.

The round trip is:

  1. minimize arrives from the pane, carrying window and title.
  2. The client adds an entry: set d children={ new dockentry caption=… window=… }.
  3. The user clicks it, and click arrives carrying that window.
  4. The client restores it: set p restore=<window>, and destroys the entry.

Which means the dock is a general list of standing-for-a-window entries rather than an MDI accessory. Anything an application wants represented that way can go in it.

Entries are addressable

An entry is a real wire object with an id. A correlation key inside children={…} does not come back in the build reply, so surface it the usual way and keep the number:

eid=d.e

destroy removes an entry from the row:

destroy d.e

Retargeting an entry does not work yet

caption and window are both writable after the entry is docked, and only one of them takes effect. The caption changes; the window does not — the entry goes on reporting whatever window it was built with:

click -> trinket=14 window=1042      # built with window=1042
set d.e caption="Renamed" window=2000
click -> trinket=14 window=1042      # still 1042, though the caption is now "Renamed"

Nothing errors, and the two properties give no sign of behaving differently. So an entry that is meant to follow whichever window is currently minimized into it will keep restoring the first one.

Until that is fixed, destroy the entry and add a new one rather than retargeting it. An entry built with the right window behaves correctly for its whole life; it is only the later change that is lost.

window is not checked

An entry may name a window that does not exist, or none at all:

new dockrow children={ new dockentry caption="x" }
  ->  accepted, standing for window 0

The dock holds captions and numbers; it does not look them up. A wrong number surfaces when the click arrives and the application tries to restore something that is not there.

See also

MDIPane — where minimized windows come from · Window · Desktop · Common Properties

Clone this wiki locally