Rect (Area, Rectangle) Example

widget_rect

Demonstrates the Rect geometry primitive and hit-testing patterns.

TUI layouts are composed of rectangles. Understanding how to manipulate Rect objects, reuse them from the layout phase, and use them for mouse interaction is critical for building interactive apps.

Features Demonstrated

Hotkeys

Usage

ruby examples/widget_rect/app.rb

Learning Outcomes

Use this example if you need to…

Read the source code β†’