FULE-0.3.1: Functional UI Layout Engine
Copyright(c) Paul Schnapp 2023
LicenseBSD3
MaintainerPaul Schnapp <paul.schnapp@gmail.com>
Safe HaskellSafe-Inferred
LanguageHaskell2010

FULE.Container.Arrayed

Description

A Container to display items one after another, either vertically or horizontally. Items are spaced according to their inherent sizes.

You may also wish to consider a Grid.

Synopsis

Documentation

data ArrayedM m k Source #

An array (horizontal or vertical) of visual ItemMs in a layout. Each item will occupy a different amount of space in the array; if you wish each item to be evenly spaced, use a Grid instead.

Instances

Instances details
Monad m => Container (ArrayedM m k) k m Source # 
Instance details

Defined in FULE.Container.Arrayed

Methods

minWidth :: ArrayedM m k -> Proxy k -> m (Maybe Int) Source #

minHeight :: ArrayedM m k -> Proxy k -> m (Maybe Int) Source #

addToLayout :: ArrayedM m k -> Proxy k -> Bounds -> RenderGroup -> LayoutOp k m () Source #

type Arrayed = ArrayedM Identity Source #

Like ArrayedM but run in the Identity monad.

arrayedHoriz :: Padding -> [ItemM m k] -> ArrayedM m k Source #

Array ItemMs horizontally with the specified padding.

Padding is added between the elements and around the perimeter of the array; the horizontal padding is added once between elements, and the same padding is used before and after the array -- thus the intra-element padding is not double the outside padding.

arrayedVert :: Padding -> [ItemM m k] -> ArrayedM m k Source #

Array ItemMs vertically with the specified padding.

Padding is added between the elements and around the perimeter of the array; the vertical padding is added once between elements, and the same padding is used before and after the array -- thus the intra-element padding is not double the outside padding.