module Placer where
import Fudget
import LayoutRequest
import FRequest
--import Geometry(Point, Size(..),Rect)
import NullF(putMessageFu)
--import Command
--import Defaults(defaultSep)
import Placers(horizontalP,verticalP)
import MatrixP(matrixP)
import Spacers(spacerP)
import TableP(tableP)
import AlignP(revP)
import AutoPlacer(autoP)

--import AlignP
--import Alignment

placerF :: Placer -> F a b -> F a b
placerF :: forall a b. Placer -> F a b -> F a b
placerF Placer
placer = forall {ho} {hi}. Message FRequest ho -> F hi ho -> F hi ho
putMessageFu (forall a b. a -> Message a b
Low (LayoutMessage -> FRequest
LCmd (Placer -> LayoutMessage
LayoutPlacer Placer
placer)))

spacerF :: Spacer -> F a b -> F a b
spacerF :: forall a b. Spacer -> F a b -> F a b
spacerF Spacer
spacer = forall {ho} {hi}. Message FRequest ho -> F hi ho -> F hi ho
putMessageFu (forall a b. a -> Message a b
Low (LayoutMessage -> FRequest
LCmd (Spacer -> LayoutMessage
LayoutSpacer Spacer
spacer)))

spacer1F :: Spacer -> F a b -> F a b
spacer1F Spacer
s = forall a b. Placer -> F a b -> F a b
placerF (Spacer
s Spacer -> Placer -> Placer
`spacerP` Placer
autoP)

hBoxF :: F a b -> F a b
hBoxF = forall a b. Placer -> F a b -> F a b
placerF Placer
horizontalP
vBoxF :: F a b -> F a b
vBoxF = forall a b. Placer -> F a b -> F a b
placerF Placer
verticalP

revHBoxF :: F a b -> F a b
revHBoxF = forall a b. Placer -> F a b -> F a b
placerF (Placer -> Placer
revP Placer
horizontalP)
revVBoxF :: F a b -> F a b
revVBoxF = forall a b. Placer -> F a b -> F a b
placerF (Placer -> Placer
revP Placer
verticalP)

matrixF :: Int -> F a b -> F a b
matrixF = forall a b. Placer -> F a b -> F a b
placerF forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Placer
matrixP
tableF :: Int -> F a b -> F a b
tableF  = forall a b. Placer -> F a b -> F a b
placerF forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Placer
tableP