Skip to main content
Ctrl+K
Omniverse Kit - Home

Omniverse Kit

  • twitter
  • youtube
  • instagram
  • www
  • linkedin
  • twitch
Omniverse Kit - Home

Omniverse Kit

  • twitter
  • youtube
  • instagram
  • www
  • linkedin
  • twitch

Table of Contents

omni.ui

  • Overview
  • API (python)
    • Modules
      • omni.ui
        • Submodules
          • abstract_shade
            • Classes
              • AbstractShade
          • color_utils
            • Classes
              • AbstractShade
              • ColorShade
            • Functions
              • Singleton
          • constant_utils
            • Classes
              • AbstractShade
              • FloatShade
            • Functions
              • Singleton
          • extension
            • Classes
              • UIPreferencesExtension
          • singleton
            • Functions
              • Singleton
          • style_utils
          • url_utils
            • Classes
              • AbstractShade
              • StringShade
            • Functions
              • Singleton
          • workspace_utils
            • Classes
              • Any
              • CompareDelegate
            • Functions
              • compare_workspace
              • dump_workspace
              • handle_exception
              • restore_workspace
        • Classes
          • AbstractField
          • AbstractItem
          • AbstractItemDelegate
          • AbstractItemModel
          • AbstractMultiField
          • AbstractSlider
          • AbstractValueModel
          • Alignment
          • ArrowHelper
          • ArrowType
          • Axis
          • BezierCurve
          • Button
          • ByteImageProvider
          • CanvasFrame
          • CheckBox
          • Circle
          • CircleSizePolicy
          • CollapsableFrame
          • ColorStore
          • ColorWidget
          • ComboBox
          • Container
          • CornerFlag
          • Direction
          • DockPolicy
          • DockPosition
          • DockPreference
          • DockSpace
          • DynamicTextureProvider
          • Ellipse
          • FillPolicy
          • FloatDrag
          • FloatField
          • FloatSlider
          • FloatStore
          • FocusPolicy
          • FontStyle
          • Fraction
          • Frame
          • FreeBezierCurve
          • FreeCircle
          • FreeEllipse
          • FreeLine
          • FreeRectangle
          • FreeTriangle
          • Grid
          • HGrid
          • HStack
          • Image
          • ImageProvider
          • ImageWithProvider
          • Inspector
          • IntDrag
          • IntField
          • IntSlider
          • InvisibleButton
          • ItemModelHelper
          • IwpFillPolicy
          • Label
          • Length
          • Line
          • MainWindow
          • Menu
          • MenuBar
          • MenuDelegate
          • MenuHelper
          • MenuItem
          • MenuItemCollection
          • MultiFloatDragField
          • MultiFloatField
          • MultiIntDragField
          • MultiIntField
          • MultiStringField
          • OffsetLine
          • Percent
          • Pixel
          • Placer
          • Plot
          • ProgressBar
          • RadioButton
          • RadioCollection
          • RasterImageProvider
          • RasterPolicy
          • Rectangle
          • RpResource
          • ScrollBarPolicy
          • ScrollingFrame
          • Separator
          • ShadowFlag
          • Shape
          • ShapeAnchorHelper
          • SimpleBoolModel
          • SimpleFloatModel
          • SimpleIntModel
          • SimpleStringModel
          • SliderDrawMode
          • Spacer
          • Stack
          • StringField
          • StringStore
          • Style
          • TextureFormat
          • ToolBar
          • ToolBarAxis
          • ToolButton
          • TreeView
          • Triangle
          • Type
          • UIPreferencesExtension
          • UIntDrag
          • UIntSlider
          • UnitType
          • VGrid
          • VStack
          • ValueModelHelper
          • VectorImageProvider
          • Widget
          • WidgetMouseDropEvent
          • Window
          • WindowHandle
          • Workspace
          • ZStack
        • Functions
          • add_to_namespace
          • set_menu_delegate
          • set_shade
          • dock_window_in_window
          • get_custom_glyph_code
          • get_main_window_height
          • get_main_window_width
  • API (C++)
    • Classes
    • Enumerations
    • Namespaces
      • omni
        • kit
        • ui
          • Alignment
          • WindowHandle
          • Workspace
          • windowmanager
  • Changelog
  • API (python)
  • omni.ui Classes
  • MenuDelegate

MenuDelegate#

class omni.ui.MenuDelegate#

Bases: pybind11_object

MenuDelegate is used to generate widgets that represent the menu item.

Methods

__init__(self, **kwargs)

Constructor.

build_item(self, item)

This method must be reimplemented to generate custom item.

build_status(self, item)

This method must be reimplemented to generate custom widgets on the bottom of the window.

build_title(self, item)

This method must be reimplemented to generate custom title.

call_on_build_item_fn(self, arg0)

Called to create a new item.

call_on_build_status_fn(self, arg0)

Called to create a new widget on the bottom of the window.

call_on_build_title_fn(self, arg0)

Called to create a new title.

has_on_build_item_fn(self)

Called to create a new item.

has_on_build_status_fn(self)

Called to create a new widget on the bottom of the window.

has_on_build_title_fn(self)

Called to create a new title.

set_default_delegate(delegate)

Set the default delegate to use it when the item doesn't have a delegate.

set_on_build_item_fn(self, fn, None])

Called to create a new item.

set_on_build_status_fn(self, fn, None])

Called to create a new widget on the bottom of the window.

set_on_build_title_fn(self, fn, None])

Called to create a new title.

Attributes

propagate

__init__(
self: omni.ui._ui.MenuDelegate,
**kwargs,
) → None#

Constructor.

`kwargsdict`

See below

### Keyword Arguments:

`on_build_item`

Called to create a new item.

`on_build_title`

Called to create a new title.

`on_build_status`

Called to create a new widget on the bottom of the window.

`propagate`

Determine if Menu children should use this delegate when they don’t have the own one.

build_item(
self: omni.ui._ui.MenuDelegate,
item: omni::ui::MenuHelper,
) → None#

This method must be reimplemented to generate custom item.

build_status(
self: omni.ui._ui.MenuDelegate,
item: omni::ui::MenuHelper,
) → None#

This method must be reimplemented to generate custom widgets on the bottom of the window.

build_title(
self: omni.ui._ui.MenuDelegate,
item: omni::ui::MenuHelper,
) → None#

This method must be reimplemented to generate custom title.

call_on_build_item_fn(
self: omni.ui._ui.MenuDelegate,
arg0: omni::ui::MenuHelper,
) → None#

Called to create a new item.

call_on_build_status_fn(
self: omni.ui._ui.MenuDelegate,
arg0: omni::ui::MenuHelper,
) → None#

Called to create a new widget on the bottom of the window.

call_on_build_title_fn(
self: omni.ui._ui.MenuDelegate,
arg0: omni::ui::MenuHelper,
) → None#

Called to create a new title.

has_on_build_item_fn(
self: omni.ui._ui.MenuDelegate,
) → bool#

Called to create a new item.

has_on_build_status_fn(
self: omni.ui._ui.MenuDelegate,
) → bool#

Called to create a new widget on the bottom of the window.

has_on_build_title_fn(
self: omni.ui._ui.MenuDelegate,
) → bool#

Called to create a new title.

static set_default_delegate(delegate: MenuDelegate) → None#

Set the default delegate to use it when the item doesn’t have a delegate.

set_on_build_item_fn(self: omni.ui._ui.MenuDelegate, fn: Callable[[omni::ui::MenuHelper], None]) → None#

Called to create a new item.

set_on_build_status_fn(self: omni.ui._ui.MenuDelegate, fn: Callable[[omni::ui::MenuHelper], None]) → None#

Called to create a new widget on the bottom of the window.

set_on_build_title_fn(self: omni.ui._ui.MenuDelegate, fn: Callable[[omni::ui::MenuHelper], None]) → None#

Called to create a new title.

previous

MenuBar

next

MenuHelper

On this page
  • MenuDelegate
    • __init__()
    • build_item()
    • build_status()
    • build_title()
    • call_on_build_item_fn()
    • call_on_build_status_fn()
    • call_on_build_title_fn()
    • has_on_build_item_fn()
    • has_on_build_status_fn()
    • has_on_build_title_fn()
    • set_default_delegate()
    • set_on_build_item_fn()
    • set_on_build_status_fn()
    • set_on_build_title_fn()
NVIDIA NVIDIA

Copyright © 2019-2025, NVIDIA Corporation.

Last updated on Jun 02, 2025.