RadioMenuCollection
- class omni.kit.viewport.menubar.core.RadioMenuCollection(text: str, model: ComboBoxModel, identifier: Optional[str] = None, hide_on_click: bool = False, can_toggle_off: bool = False, delegate: Optional[MenuDelegate] = None)
Bases:
MenuItemCollection
A menu collection for radio menu items.
Methods
__init__
(text, model[, identifier, ...])Constructor.
build_menu_item
(item)Build single radio menu item.
destroy
()Release resources
Attributes
- __init__(text: str, model: ComboBoxModel, identifier: Optional[str] = None, hide_on_click: bool = False, can_toggle_off: bool = False, delegate: Optional[MenuDelegate] = None)
Constructor.
- Parameters
text (str) – Menu text.
model (ComboBoxModel) – Radio data model.
- Keyword Arguments
identifier (Optional[str]) – Menu item Identifier, defaults to None.
hide_on_click (bool) – Hide menu when radio menu item clicked, defaults to False.
can_toggle_off (bool) – Toggle selected state to off when radio menu item clicked and already selected, defaults to False.
delegate (ui.MenuDelegate) – Menu item Delegate, defaults to None.
- build_menu_item(item: AbstractItem) → MenuItem
Build single radio menu item.
- Parameters
item (ui.AbstractItem) – Model item.
- destroy() → None
Release resources