Docking UI Elements
Plugins can integrate buttons into the DaiC interface using:
add_to_menu(name, items)– Adds a menu with clickable actions.add_to_tool(name, action)– Adds a button to the main toolbar.
Example usage:
def on_click():
print("Toolbar button clicked!")
DaiCCore.add_to_tool("Click Me", on_click)
You can also use add_to_menu() to register dropdown menu items with labels and actions.