Split widget.cpp, implement Focus

The Focus feature is EXPERIMENTAL and may generate out-of-bounds polys
at the moment.