Start reimplementation of widget selection.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>