~alcinnz/CatTrap

ref: eae2c2003d8f7d331e6e97364ed25ede50be6d81 CatTrap/Graphics/Layout.hs -rw-r--r-- 1.1 KiB
eae2c200 — Adrian Cochrane Unittest basic grid sizing. 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module Graphics.Layout where

import Graphics.Layout.Box
import Graphics.Layout.Grid

data LayoutItem m n x =
    LayoutFlow x (PaddedBox m n) [LayoutItem m n x]
    | LayoutGrid x (Grid m n) [(GridItem m n, LayoutItem m n x)]
-- More to come...

{-boxMinWidth :: Double -> LayoutItem y Length x -> (Double, LayoutItem y Length x)
boxNatWidth :: Double -> LayoutItem y Length x -> (Double, LayoutItem y Length x)
boxMaxWidth :: PaddedBox y Length -> LayoutItem y Length x -> (Double, LayoutItem y Length x)
boxWidth :: PaddedBox y Length -> LayoutItem y Length x -> (Double, LayoutItem y Double x)
boxNatHeight :: LayoutItem Length Double x -> (Double, LayoutItem Length Double x)
boxMinHeight :: Double -> LayoutItem Length Double x -> (Double, LayoutItem Length Double x)
boxMaxHeight :: Double -> LayoutItem Length Double x -> (Double, LayoutItem Length Double x)
boxHeight :: Double -> LayoutItem Length Double x -> (Double, LayoutItem Length Length x)
boxPosition :: LayoutItem Double Double x -> LayoutItem Double Double x
boxLayout :: PaddedBox Double Double -> LayoutItem Length Length x -> Bool ->
        LayoutItem Double Double x-}