WindowHandle

class omni.ui.WindowHandle

Bases: pybind11_object

WindowHandle is a handle object to control any of the windows in Kit. It can be created any time, and if it’s destroyed, the source window doesn’t disappear.

Methods

__init__(*args, **kwargs)

dock_in(self, window, dock_position[, ratio])

Dock the window to the existing window.

focus(self)

Brings the window to the top.

is_selected_in_dock(self)

Return true is the window is the current window in the docking area.

notify_app_window_change(self, arg0)

Notifies the UI window that the AppWindow it attached to has changed.

undock(self)

Undock the window and make it floating.

Attributes

dock_id

Returns ID of the dock node this window is docked to.

dock_order

The position of the window in the dock.

dock_tab_bar_enabled

Checks if the current docking space is disabled.

dock_tab_bar_visible

Checks if the current docking space has the tab bar.

docked

True if this window is docked.

height

The height of the window in points.

position_x

The position of the window in points.

position_y

The position of the window in points.

title

The title of the window.

visible

Returns whether the window is visible.

width

The width of the window in points.

__init__(*args, **kwargs)
dock_in(self: omni.ui._ui.WindowHandle, window: omni.ui._ui.WindowHandle, dock_position: omni.ui._ui.DockPosition, ratio: float = 0.5) None

Dock the window to the existing window. It can split the window to two parts or it can convert the window to a docking tab.

focus(self: omni.ui._ui.WindowHandle) None

Brings the window to the top. If it’s a docked window, it makes the window currently visible in the dock.

is_selected_in_dock(self: omni.ui._ui.WindowHandle) bool

Return true is the window is the current window in the docking area.

notify_app_window_change(self: omni.ui._ui.WindowHandle, arg0: omni::kit::IAppWindow) None

Notifies the UI window that the AppWindow it attached to has changed.

undock(self: omni.ui._ui.WindowHandle) None

Undock the window and make it floating.

property dock_id

Returns ID of the dock node this window is docked to.

property dock_order

The position of the window in the dock.

property dock_tab_bar_enabled

Checks if the current docking space is disabled. The disabled docking tab bar can’t be shown by the user.

property dock_tab_bar_visible

Checks if the current docking space has the tab bar.

property docked

True if this window is docked. False otherwise.

property height

The height of the window in points.

property position_x

The position of the window in points.

property position_y

The position of the window in points.

property title

The title of the window.

property visible

Returns whether the window is visible.

property width

The width of the window in points.