module Graphics.Layout.Grid where import Data.Text (Text) import Graphics.Layout.Box data Grid m n = Grid { rows :: [(Name, Either m Double)], columns :: [(Name, Either n Double)], gap :: Size m n, gridBox :: PaddedBox m n } data GridItem m n = GridItem { startRow :: Int, endRow :: Int, startCol :: Int, endCol :: Int, gridItemBox :: PaddedBox m n } type Name = Text {-gridMinWidths :: Double -> Grid y Length -> [GridItem y Length] -> (Double, [Double]) gridNatWidths :: Double -> Grid y Length -> [GridItem y Length] -> (Double, [Double]) gridMaxWidths :: PaddedBox y Double -> Grid y Length -> (Double, [Double]) gridWidths :: PaddedBox y Double -> Grid y Length -> (Double, [Double]) gridNatHeights :: PaddedBox Length Double -> [GridItem Length Double] -> (Double, [Double]) gridMinHeights :: Double -> Grid Length Double -> (Double, [Double]) gridMaxHeights :: Double -> Grid Length Double -> (Double, [Double]) gridHeights :: Double -> Grid Length Double -> (Double, [Double]) gridPosition :: GridLength Double Double -> [GridItem Double Double] -> [Size Double Double] gridLayout :: PaddedBox Double Double -> Grid Length Length -> [GridItem Length Length] -> Bool -> (Grid Double Double, [(Size Double Double, GridItem Double Double)])-}