C4 Engine
C4 Engine API Documentation

Widget::GetOwningWindow

Defined in:  C4Widgets.h
Returns the window to which a widget belongs.
Prototype

Window *GetOwningWindow(voidconst;

Description
The GetOwningWindow function returns a pointer to the window to which a widget belongs. If the widget is not part of a window, then the return value is nullptr.

Note that the GetOwningWindow function does not necessarily return the same widget as the Widget::GetRootWidget function when a widget is in a window. It is possible for a window to contain other types of root widgets that contain widgets themselves.
See Also

Widget::GetRootWidget

Window