gui.callbacks.add_macros_sender
gui.callbacks.add_macros_sender(app, modules, macros)Add a callbacks to dynamically to macro sections on a Dash app.
As macros are defined in the config file used to run the app, we do not know their names and dash elements a priori. This function loops over all macro sections and given their configs, add the appropriate callback to execute the macro commands.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| app | Dash | The Dash application to which the callback will be added. | required |
| modules | list[ModuleConnection] | A list of ModuleConnection objects representing the modules to be included in the application. | required |
| macros | dict | A dictionary containing macro definitions to be used in the application. | required |
Returns
| Name | Type | Description |
|---|---|---|
| Dash | The Dash application with the added callback. |