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.Divided

Description

A Container that is divided in half, horizontally or vertically.

Synopsis

Documentation

data Divided s b u Source #

A container divided (horizontally or vertically) into two parts with one of the parts having a set size (height or width) and the other part resizing dynamically.

When configured to be resizable, the resize bar's size is not included in the size of the sized content during layout but is treated as an additional size to be considered.

Instances

Instances details
(Container s b m, Container u b m) => Container (Divided s b u) b m Source # 
Instance details

Defined in FULE.Container.Divided

Methods

minWidth :: Divided s b u -> Proxy b -> m (Maybe Int) Source #

minHeight :: Divided s b u -> Proxy b -> m (Maybe Int) Source #

addToLayout :: Divided s b u -> Proxy b -> Bounds -> RenderGroup -> LayoutOp b m () Source #

type BarControlGen b Source #

Arguments

 = Orientation

The orientation of the resize bar; a Horizontal orientation would call for vertical movement, so should be paired with watching for changes in the y axis, and likewise with Vertical and the x axis.

-> GuideID

A Guide associated with the resize bar that should be updated with a delta when the bar is moved.

-> b

The bar component to be added to the layout.

Type of a function to produce a Component for controlling the resize bar, thus leaving the mechanics and presentation up to you.

data Dynamics b Source #

A specification of whether the sized portion of the container should be resizable and how the resize bar, if any, should be sized and controlled.

dynamic Source #

Arguments

:: BarControlGen b

A function to generate a Component to use for the resize bar.

-> Int

The thickness of the resize bar Component in the direction of travel.

-> Dynamics b 

Use a dynamic sizing, with a resize bar, for the sized portion of the container.

static :: Dynamics b Source #

Use a static size for the sized portion of the container.

sizedTop Source #

Arguments

:: SizedContentSize Int

The size of the sized content.

-> Dynamics b

The dynamics of the Divided container.

-> s

The sized content.

-> u

The dynamic content.

-> Divided s b u 

Create a Divided container with the top portion having a particular size.

sizedLeft Source #

Arguments

:: SizedContentSize Int

The size of the sized content.

-> Dynamics b

The dynamics of the Divided container.

-> s

The sized content.

-> u

The dynamic content.

-> Divided s b u 

Create a Divided container with the left portion having a particular size.

sizedRight Source #

Arguments

:: SizedContentSize Int

The size of the sized content.

-> Dynamics b

The dynamics of the Divided container.

-> s

The sized content.

-> u

The dynamic content.

-> Divided s b u 

Create a Divided container with the right portion having a particular size.

sizedBottom Source #

Arguments

:: SizedContentSize Int

The size of the sized content.

-> Dynamics b

The dynamics of the Divided container.

-> s

The sized content.

-> u

The dynamic content.

-> Divided s b u 

Create a Divided container with the bottom portion having a particular size.