mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-08-10 12:10:37 +02:00
feat: add "new()" command to create new dock area windows from client
This commit is contained in:
@@ -444,6 +444,12 @@ class BECGuiClient(RPCBase):
|
||||
with wait_for_server(self):
|
||||
return client.BECDockArea(gui_id=self._gui_id)
|
||||
|
||||
def new(self, name):
|
||||
"""Ask main window to create a new top-level dock area"""
|
||||
with wait_for_server(self):
|
||||
rpc_client = RPCBase(gui_id=f"{self._gui_id}:window", parent=self)
|
||||
return rpc_client._run_rpc("new_dock_area", name)
|
||||
|
||||
def close(self) -> None:
|
||||
"""
|
||||
Close the gui window.
|
||||
|
||||
Reference in New Issue
Block a user