struct

Tui::Constraints

Inherits Struct / Value / Object

Size constraints

Constructors

default
Source
new(width : Dimension = Dimension.auto, height : Dimension = Dimension.auto, min_width : Int32 | Nil = nil, max_width : Int32 | Nil = nil, min_height : Int32 | Nil = nil, max_height : Int32 | Nil = nil)
Source

Instance methods

constrain_height(value : Int32) : Int32
Source
constrain_width(value : Int32) : Int32

Apply constraints to a value

Source
height
Source
height=(height : Dimension)
Source
max_height
Source
max_height=(max_height : Int32 | Nil)
Source
max_width
Source
max_width=(max_width : Int32 | Nil)
Source
min_height
Source
min_height=(min_height : Int32 | Nil)
Source
min_width
Source
min_width=(min_width : Int32 | Nil)
Source
width
Source
width=(width : Dimension)
Source