vty-ui-1.5: An interactive terminal user interface library for Vty

Safe HaskellSafe-Infered

Graphics.Vty.Widgets.Limits

Description

This module provides wrapper widgets for enforcing an upper bound on the size of child widgets in one or more dimensions in rows or columns, respectively. This differs from the ''fixed'' widgets in the Fixed module in that Fixed widgets enforce a fixed size regardless of how big or small the child widget is, and add padding to guarantee that the fixed size is honored.

Synopsis

Documentation

data VLimit a Source

Instances

Show (VLimit a) 

data HLimit a Source

Instances

Show (HLimit a) 

hLimit :: Show a => Int -> Widget a -> IO (Widget (HLimit a))Source

Impose a maximum horizontal size, in columns, on a Widget.

vLimit :: Show a => Int -> Widget a -> IO (Widget (VLimit a))Source

Impose a maximum vertical size, in columns, on a Widget.

boxLimitSource

Arguments

:: Show a 
=> Int

Maximum width in columns

-> Int

Maximum height in rows

-> Widget a 
-> IO (Widget (VLimit (HLimit a))) 

Impose a horizontal and vertical upper bound on the size of a widget.

setVLimit :: Widget (VLimit a) -> Int -> IO ()Source

Set the vertical limit of a child widget's size.

setHLimit :: Widget (HLimit a) -> Int -> IO ()Source

Set the horizontal limit of a child widget's size.

addToVLimit :: Widget (VLimit a) -> Int -> IO ()Source

Add to the vertical limit of a child widget's size.

addToHLimit :: Widget (HLimit a) -> Int -> IO ()Source

Add to the horizontal limit of a child widget's size.

getVLimit :: Widget (VLimit a) -> IO IntSource

Get the vertical limit of a child widget's size.

getHLimit :: Widget (HLimit a) -> IO IntSource

Get the horizontal limit of a child widget's size.