MainWindow#

class omni.kit.mainwindow.MainWindow#

Bases: object

A class that represents the main application window in OmniKit.

This class manages the initialization, display, and cleanup of the main window. It provides methods to toggle the visibility of the main menu and status bar, as well as to asynchronously dock various application windows at startup. The main window is set up with custom settings that are retrieved from the application’s settings.

Methods

__init__()

Initializes the main window with customized settings and potentially starts window docking.

destroy()

Cleans up the main window by setting its reference and setup window task to None.

get_main_menu_bar()

Returns the main menu bar.

get_status_bar_frame()

Returns the frame containing the status bar.

show_hide_menu()

Toggles the visibility of the main menu bar.

show_hide_status_bar()

Toggles the visibility of the status bar.

__init__()#

Initializes the main window with customized settings and potentially starts window docking.

The main window is initialized with a gray foreground to hide undocked windows during the first several frames. The visibility of the main menu bar is set based on the application’s release status. Settings for margins, background color, and whether to dock windows on startup are retrieved and applied to the main window. If docking is enabled, an asynchronous task is created to dock the windows.

destroy()#

Cleans up the main window by setting its reference and setup window task to None.

get_main_menu_bar() MenuBar#

Returns the main menu bar.

Returns:

The main menu bar.

Return type:

ui.MenuBar

get_status_bar_frame() Frame#

Returns the frame containing the status bar.

Returns:

The frame containing the status bar.

Return type:

ui.Frame

show_hide_menu()#

Toggles the visibility of the main menu bar.

show_hide_status_bar()#

Toggles the visibility of the status bar.