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

Representing interactive components

The representation of a DisplayHandle is as follows:

type DisplayHandle 
 = Component ComponentHandle
 = DC -> IO ComponentHandle

The DisplayHandle is represent the unrealised user interface component, to realise it we feed it the DisplayContext to use, which returns the `active' representation of the component:

type SystemHandler = WComm -> IO ()   
type DeviceHandler = DeviceEvent -> IO () 

data ComponentHandle =
 CH
    {- sink to forward device events to -}
   DeviceHandler	   
    {- sink to forward system commands to -}
   SystemHandler
    {- get back current geometry 
      (nat.size, min. size plus stretch- and squashiness -}
   (IO Geometry)
    {- return current size of component -}
   (IO Size)

The actual representation of the ComponentHandle is not of importance here, rather the commands we can perform on ComponentHandles, See section ComponentHandles - active components for list of functions.


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