feat: add "new()" command to create new dock area windows from client

This commit is contained in:
2024-12-23 15:59:10 +01:00
committed by wakonig_k
parent 6f2eb6b4cd
commit bde5618699
2 changed files with 14 additions and 0 deletions
+6
View File
@@ -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.