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

Description

This module contains Window, the base Conatiner for all layouts, and the layout and layoutM functions for building a Layout from it.

Synopsis

Documentation

data Window c k Source #

The base container of any (non-custom) Layout representing the window in the encompassing GUI framework. It is the only container that can be used with the layout and layoutM functions to build a Layout.

type WindowAdjustorGen k Source #

Arguments

 = GuideID

The Guide to use to adjust the width of the Layout in response to a change in the window size. Adjustments should be made using the delta of the old and new sizes.

-> GuideID

The Guide to use to adjust the height of the Layout in response to a change in the window size. Adjustments should be made using the delta of the old and new sizes.

-> k 

Type of a function to produce a Component to adjust the Layout in response to a change in the size of the window in the encompassing GUI framework. The Component should use the Guides passed as arguments to this function to update the Layout.

window Source #

Arguments

:: (Int, Int)

The width and height of the window.

-> WindowAdjustorGen k

A function to construct a Component for reacting to changes in the size of the window in the encompassing GUI framework.

-> c

The content of the window.

-> Window c k 

Create a Window.

layoutM :: Container c k m => Window c k -> m (Layout, [ComponentInfo k]) Source #

Build a layout for a Window in the specified monad m.

layout :: Container c k Identity => Window c k -> (Layout, [ComponentInfo k]) Source #

Build a layout for a Window in the Identity monad.