class RatatuiRuby::Event::Resize

Signals a change in terminal dimensions.

The terminal window is dynamic, not static. The user changes its dimensions at will, usually breaking a fixed layout.

This event captures the new state. It delivers the updated width and height immediately after the change.

Use these dimensions to drive your layout logic. Recalculate constraints. Reallocate space. Fill the new canvas completely to maintain a responsive design.

Examples

Using predicates:

if event.resize?
  puts "Resized to #{event.width}x#{event.height}"
end

Using pattern matching:

case event
in type: :resize, width:, height:
  puts "Resized to #{width}x#{height}"
end