SimpleToolButton
- class omni.kit.widget.toolbar.SimpleToolButton(name, tooltip, icon_path, icon_checked_path, hotkey=None, toggled_fn=None, model=None, additional_style=None)
Bases:
WidgetGroupA helper class to create simple WidgetGroup that contains only one ToolButton.
- Parameters
name – Name of the ToolButton.
tooltip – Tooltip of the ToolButton.
icon_path – The icon to be used when button is not checked.
icon_checked_path – The icon to be used when button is checked.
hotkey – HotKey to toggle the button (optional).
toggled_fn – Callback function when button is toggled. Signature: on_toggled(checked) (optional).
model – Model for the ToolButton (optional).
additional_style – Additional styling to apply to the ToolButton (optional).
Methods
__init__(name, tooltip, icon_path, ...[, ...])clean()Clean up function to be called before destroying the object.
create(default_size)Main function to creates widget.
Gets the style of all widgets defined in this Widgets group.
get_tool_button()- __init__(name, tooltip, icon_path, icon_checked_path, hotkey=None, toggled_fn=None, model=None, additional_style=None)
- clean()
Clean up function to be called before destroying the object.
- create(default_size)
Main function to creates widget. If you want to export widgets and allow external code to fetch and manipulate them, return a Dict[str, Widget] mapping from name to instance at the end of the function.
- get_style()
Gets the style of all widgets defined in this Widgets group.