added Widget as a library base class

Use Widget for composing composite structures with templates and
subviews