Go to the first, previous, next, last section, table of contents.

DisplayHandle - UI handles

The DisplayHandle is the programmer level handle to user interface components, and Haggis defines all its combinators in terms of them. The DisplayHandle defines some standard operations over them:


 {-
   debugging combinator, repeat commands on stderr before
   passing them on
 -}
debugW  :: String -> DisplayHandle -> DisplayHandle
 {-
   Simplest possible DisplauHandle, has no extent and
   consumes all commands silently.
 -}
nullDH  :: DisplayHandle
 {-
  Remove system commands or user input events.
 -}
filterW   :: (WComm -> Bool)       -> DisplayHandle -> DisplayHandle
filterDev :: (DeviceEvent -> Bool) -> DisplayHandle -> DisplayHandle

 {- Create a DisplayHandle with specified Geometry -}
defaultDHandle :: Geometry -> DisplayHandle

 {- simple space -}
space :: Int    -> DisplayHandle

 {- 
  like space, but reads style values:

   - size
   - min
   - squash
   - stretch
 -}
spacing :: GHint  -> Component DisplayHandle

 {-
   Transform the geometric hint a DisplayHandle will
   report.
 -}
withGeo     :: (Geometry -> Geometry) -> DisplayHandle -> DisplayHandle
withGHint   :: Axis   -> (GHint -> GHint) -> DisplayHandle -> DisplayHandle

 {-
  Fix the size of a component, i.e., set its geometric requirements
  such that it is not willing to shrink nor stretch from the natural size.
 -}
fixedSize   :: DisplayHandle -> DisplayHandle
fixedV	    :: DisplayHandle -> DisplayHandle
fixedH	    :: DisplayHandle -> DisplayHandle

 {-
  Set the natural size, but don't touch the stretch and squashiness values.
 -}
withWidth   :: Unit -> DisplayHandle -> DisplayHandle
withHeight  :: Unit -> DisplayHandle -> DisplayHandle
withSize    :: Size -> DisplayHandle -> DisplayHandle

 {-
   Increase the natural and minimum size of a DisplayHandle
 -}
augmentNatSize :: Size -> DisplayHandle -> DisplayHandle

 {- 
  Set squash and stretchiness attributes
 -}
withSquash  :: Axis -> (WillOrder, Willingness) -> DisplayHandle -> DisplayHandle
withStretch :: Axis -> (WillOrder, Willingness) -> DisplayHandle -> DisplayHandle
withSpring  :: Axis -> (WillOrder, Willingness) -> DisplayHandle -> DisplayHandle


Go to the first, previous, next, last section, table of contents.