Rewrote the window drawing interface and updated existing widgets to support it