Add support for line widgets

@lennartcl 

This isn't well thought, and polished, but works well enough for now.
Maybe we should merge as is, and work on improving it later?