newExtSelListBoxFrame :: (Container par) => par -> String -> Distance
                      -> IO SelAllListbox
newExtSelListBoxFrame b2 title hValue = do
  left <- newFrame b2 []
  pack left [Expand On, Fill Both]

  b3 <- newVBox left []
  pack b3 [Expand On, Fill Both]

  l0 <- newLabel b3 [text title]
  pack l0 [Anchor NorthWest]

  lbFrame <- newFrame b3 []
  pack lbFrame [Expand On, Fill Both, Anchor NorthWest]

  lb <- newListBox lbFrame [bg "white", exportSelection False,
                            selectMode Multiple,
                            height hValue] :: IO (ListBox String)

  pack lb [Expand On, Side AtLeft, Fill Both]
  sb <- newScrollBar lbFrame []
  pack sb [Expand On, Side AtRight, Fill Y, Anchor West]
  lb # scrollbar Vertical sb

  -- buttons for goal selection
  sbf <- newSelectButtonsFrame b3
  return (SAL sbf lb)


-- *** Main GUI

-- | Invokes the GUI.
newExtSelListBoxFrame :: (Container par) => par -> String -> Distance
                      -> IO SelAllListbox
newExtSelListBoxFrame b2 title hValue = do
  left <- newFrame b2 []
  pack left [Expand On, Fill Both]

  b3 <- newVBox left []
  pack b3 [Expand On, Fill Both]

  l0 <- newLabel b3 [text title]
  pack l0 [Anchor NorthWest]

  lbFrame <- newFrame b3 []
  pack lbFrame [Expand On, Fill Both, Anchor NorthWest]

  lb <- newListBox lbFrame [bg "white", exportSelection False,
                            selectMode Multiple,
                            height hValue] :: IO (ListBox String)

  pack lb [Expand On, Side AtLeft, Fill Both]
  sb <- newScrollBar lbFrame []
  pack sb [Expand On, Side AtRight, Fill Y, Anchor West]
  lb # scrollbar Vertical sb

  -- buttons for goal selection
  sbf <- newSelectButtonsFrame b3
  return (SAL sbf lb)


-- *** Main GUI

-- | Invokes the GUI.
newExtSelListBoxFrame b2 title hValue = do
  left <- newFrame b2 []
  pack left [Expand On, Fill Both]

  b3 <- newVBox left []
  pack b3 [Expand On, Fill Both]

  l0 <- newLabel b3 [text title]
  pack l0 [Anchor NorthWest]

  lbFrame <- newFrame b3 []
  pack lbFrame [Expand On, Fill Both, Anchor NorthWest]

  lb <- newListBox lbFrame [bg "white", exportSelection False,
                            selectMode Multiple,
                            height hValue] :: IO (ListBox String)

  pack lb [Expand On, Side AtLeft, Fill Both]
  sb <- newScrollBar lbFrame []
  pack sb [Expand On, Side AtRight, Fill Y, Anchor West]
  lb # scrollbar Vertical sb

  -- buttons for goal selection
  sbf <- newSelectButtonsFrame b3
  return (SAL sbf lb)


-- *** Main GUI

-- | Invokes the GUI.