doSelectAllEntries :: Bool {- ^ indicates wether all entries should be selected
                         or deselected -}
                 -> ListBox a
                 -> IO ()
doSelectAllEntries selectAll lb =
  if selectAll
     then selectionRange (0 :: Int) EndOfText lb >> return ()
     else clearSelection lb
doSelectAllEntries :: Bool {- ^ indicates wether all entries should be selected
                         or deselected -}
                 -> ListBox a
                 -> IO ()
doSelectAllEntries selectAll lb =
  if selectAll
     then selectionRange (0 :: Int) EndOfText lb >> return ()
     else clearSelection lb
doSelectAllEntries selectAll lb =
  if selectAll
     then selectionRange (0 :: Int) EndOfText lb >> return ()
     else clearSelection lb