|
Game.LupupuCube.UI.Constraints |
|
|
Description |
The constraints that define the relationships between
widgets. Each Constraints value can hold 4 Springs: one for
each edge of the widget. Additionally it can hold Springs for the
widget width and the widget height. Since the height and width
constraints are dependent on the other constraints, a widget can be
over-constraint. In this case (like when all of north, south and
height are constraint), the values are adjusted, so that the
mathematics still hold true.
|
|
Synopsis |
|
|
|
Documentation |
|
data Constraints s |
Constraints s is a data type which is parameterised on state
s.
|
|
|
newConstraints :: ST s (Constraints s) |
|
setX :: Constraints s -> Spring s Horizontal -> ST s () |
setX cs spr sets the west spring of cs to spr. If cs
already has east and width springs, this operation drops the width
spring of cs.
|
|
setY :: Constraints s -> Spring s Vertical -> ST s () |
setY cs spr sets the north spring of cs to spr. If cs
already has south and height springs, this operation drops the
height spring of cs.
|
|
setWidth :: Constraints s -> Spring s Horizontal -> ST s () |
setWidth cs spr sets the width spring of cs to spr. If
cs already has west and east springs, this operation drops the
east spring of cs.
|
|
setHeight :: Constraints s -> Spring s Vertical -> ST s () |
setHeight cs spr sets the height spring of cs to spr. If
cs already has north and south springs, this operation drops the
south spring of cs.
|
|
setSouth :: Constraints s -> Spring s Vertical -> ST s () |
setSouth cs spr sets the south spring of cs to spr. If
cs already has height and north springs, this operation drops the
north spring of cs.
|
|
setEast :: Constraints s -> Spring s Horizontal -> ST s () |
setEast cs spr sets the east spring of cs to spr. If cs
already has width and west springs, this operation drops the west
spring of cs.
|
|
setNorth :: Constraints s -> Spring s Vertical -> ST s () |
setNorth is a synonym of setY.
|
|
setWest :: Constraints s -> Spring s Horizontal -> ST s () |
setWest is a synonym of setX.
|
|
unsetX :: Constraints s -> ST s () |
Drops the west spring.
|
|
unsetY :: Constraints s -> ST s () |
Drops the north spring.
|
|
unsetWidth :: Constraints s -> ST s () |
Drops the width spring.
|
|
unsetHeight :: Constraints s -> ST s () |
Drops the height spring.
|
|
unsetSouth :: Constraints s -> ST s () |
Drops the south spring.
|
|
unsetEast :: Constraints s -> ST s () |
Drops the east spring.
|
|
unsetNorth :: Constraints s -> ST s () |
unsetNorth is a synonym of unsetY.
|
|
unsetWest :: Constraints s -> ST s () |
unsetWest is a synonym of unsetX.
|
|
getX :: Constraints s -> ST s (Spring s Horizontal) |
getX cs returns the west spring of cs. If it doesn't have a
west spring, getX returns east |-| width.
|
|
getY :: Constraints s -> ST s (Spring s Vertical) |
getY cs returns the north spring of cs. If it doesn't have a
north spring, getY returns south |-| height.
|
|
getWidth :: Constraints s -> ST s (Spring s Horizontal) |
getWidth cs returns the width spring of cs. If it doesn't
have a width spring, getWidth returns east |-| west.
|
|
getHeight :: Constraints s -> ST s (Spring s Vertical) |
getHeight cs returns the height spring of cs. If it doesn't
have a height spring, getHeight returns south |-| north.
|
|
getSouth :: Constraints s -> ST s (Spring s Vertical) |
getSouth cs returns the south spring of cs. If it doesn't
have a south spring, getSouth returns north |+| height.
|
|
getEast :: Constraints s -> ST s (Spring s Horizontal) |
getEast cs returns the east spring of cs. If it doesn't have
a east spring, getEast returns west |+| width.
|
|
getNorth :: Constraints s -> ST s (Spring s Vertical) |
getNorth is a synonym of getY.
|
|
getWest :: Constraints s -> ST s (Spring s Horizontal) |
getWest is a synonym of getX.
|
|
Produced by Haddock version 2.1.0 |