class RatatuiRuby::Layout::Constraint

Defines the sizing rule for a layout section.

Flexible layouts need rules. You can’t just place widgets at absolute coordinates; they must adapt to changing terminal sizes.

This class defines the rules of engagement. It tells the layout engine exactly how much space a section requires relative to others.

Mix and match fixed lengths, percentages, ratios, and minimums. Build layouts that breathe.

Examples

Layout::Constraint.length(5)      # Exactly 5 cells
Layout::Constraint.percentage(50) # Half the available space
Layout::Constraint.min(10)        # At least 10 cells, maybe more
Layout::Constraint.fill(1)        # Fill remaining space (weight 1)