Widget class constructor section.