Render abstract widgets.
To render 
abstract panel widgets see DisplayPItem
abstract canvas widgets see DisplayCItem
basic ops see DisplaySimple

\begin{code}
module DisplayWidget (displayCanvasWidget,displayWidget,displayWindow,displayWidgetWith,Bind(..)) where
import Widget
import WH
import FranCore
import List
import Maybe
import PileArray
import GUIDef
import Monad
import FM
import IOExts
import Identify
import PrimWidget
import MapG
import DisplaySimple
import DisplayPItem
import DisplayCItem
\end{code}

displaying abstract windows.
To show and hide the window we use showWindow and hideWindow.
There is no special notion of grouping windows (see DisplaySimple.lhs)

\begin{code}
data WindowDisplayInfo = WindowDisplayInfo

initWindowDisplayInfo :: IO WindowDisplayInfo
initWindowDisplayInfo = return $! WindowDisplayInfo

displayWindow' :: DisplayInfo -> WindowDisplayInfo -> WW -> IO ()
displayWindow' di _ (WW w) = do
  rmvref <- newIORef (return ())
  let disp True = do
	rm <- primAdd (\w -> showWindow w >> return (hideWindow w)) w
	writeIORef rmvref rm
      disp False = do
	readIORef rmvref >>= id
	writeIORef rmvref (return ())
  displayItem w (lift1 disp) (hideWindow w) (return ()) di

displayWindow :: WindowWidgetB -> GUIDef -> IO ()
displayWindow w gui = do
 di <- initDisplayInfo gui neverE
 wi <- initWindowDisplayInfo
 let noop di wi = return $ (di,wi,\di wi _ _ -> return (neverL,di,wi))
 displayW displayWindow' noop di wi w
\end{code}
