mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 19:01:02 +00:00
Add a Dockable HTML Panel API for Plugins
orca.host.ui.create_dock_panel() hosts plugin HTML in a pane of the Plater's dock manager, next to the sidebar, and returns a UiDockPanel handle (post/show/hide/close/is_open). The panel reuses the window.orca bridge of plugin windows, restores its position and size from the saved window layout, hides with the Plater off the Prepare and Preview tabs when floating, and is closed with its plugin. Includes a sample plugin (sandboxes/orca_dock_panel_plugin_any.py) and binding and layout-helper tests in slic3rutils.
This commit is contained in:
@@ -47,6 +47,12 @@ public:
|
||||
static void request_close(PluginWebDialog* dialog);
|
||||
static void destroy_for_plugin(PluginWebDialog* dialog);
|
||||
|
||||
// Shared with PluginDockPanel: the bundled blank page a plugin web view loads before the plugin
|
||||
// HTML is swapped in, the window.orca bridge, and the base URL the plugin HTML is loaded against.
|
||||
static constexpr const char* BOOTSTRAP_PAGE = "web/dialog/PluginWebDialog/blank.html";
|
||||
static const char* bridge_user_script();
|
||||
static wxString content_base_url();
|
||||
|
||||
// Push a payload to the page; delivered to handlers registered via
|
||||
// window.orca.onMessage(). MAIN-THREAD ONLY (the plugin layer marshals).
|
||||
void push_message(const nlohmann::json& data);
|
||||
|
||||
Reference in New Issue
Block a user