Skip to content

Map geometry

A data structure returned by screen.find_widget.

textual._compositor.MapGeometry class

Bases: NamedTuple

Defines the absolute location of a Widget.

clip instance-attribute

clip: Region

A region to clip the widget by (if a Widget is within a container).

container_size instance-attribute

container_size: Size

The container size (area not occupied by scrollbars).

dock_gutter instance-attribute

dock_gutter: Spacing

Space from the container reserved by docked widgets.

order instance-attribute

order: tuple[tuple[int, int, int], ...]

Tuple of tuples defining the painting order of the widget.

Each successive triple represents painting order information with regards to ancestors in the DOM hierarchy and the last triple provides painting order information for this specific widget.

region instance-attribute

region: Region

The (screen) region occupied by the widget.

virtual_region instance-attribute

virtual_region: Region

The region relative to the container (but not necessarily visible).

virtual_size instance-attribute

virtual_size: Size

The virtual size (scrollable area) of a widget if it is a container.

visible_region property

visible_region: Region

The Widget region after clipping.