Layout API

Wijjit’s layout engine converts template tags into positioned elements. The modules below govern size specifications, stacking behaviour, frames, scrolling, and dirty-region tracking.

Size & geometry

wijjit.layout.bounds.Bounds

Represents the position and size of a UI element.

wijjit.layout.bounds.Size

Represents a size specification for layout calculation.

wijjit.layout.bounds.parse_size

Parse a size value into a Size object.

wijjit.layout.bounds.parse_margin

Parse a margin value into a normalized 4-tuple.

Engine primitives

wijjit.layout.engine.LayoutNode

Base class for layout tree nodes.

wijjit.layout.engine.ElementNode

Layout node wrapping a single Element.

wijjit.layout.engine.Container

Base container class for layout nodes with children.

wijjit.layout.engine.VStack

Vertical stacking container.

wijjit.layout.engine.HStack

Horizontal stacking container.

wijjit.layout.engine.SizeConstraints

Size constraints for layout calculation.

Frames & scrolling

wijjit.layout.frames.Frame

Renders a frame with borders and content.

wijjit.layout.frames.FrameStyle

Style configuration for a frame.

wijjit.layout.frames.BorderStyle

Border style for frames.

wijjit.layout.scroll.ScrollManager

Manages scroll state and operations for a scrollable container.

wijjit.layout.scroll.render_vertical_scrollbar

Render a vertical scrollbar as a list of characters.

Dirty tracking

wijjit.layout.dirty.DirtyRegionManager

Manages dirty regions for optimized screen rendering.