[−][src]Function vgtk::current_window
pub fn current_window() -> Option<Window>
Get the current Window
.
When called from inside a Component
, it will return the Window
to which
its top level Object
is attached.
If the top level Object
is a Window
, it will return that.
If the top level Object
is an Application
, it will return that
Application
's idea of what its currently active Window
is, as determined
by Application::get_active_window()
.
If it's unable to determine what the current Window
is, you'll get a
None
.
When called from outside a Component
's lifecycle, you should hopefully
just receive a None
, but, generally, try not to do that.