I found myself having to cast to GWidget* all the time when writing some generic debugging code that just wanted to dump widget info.
Call set_active_widget(GWidget*) to put a new widget on top.