@contextmanager
    def dock_context(self, container):
        is_window = container.isWindow()
        if is_window:
            is_maxed = container.isMaximized()
            if is_maxed:
                container.showNormal()
            manager = self.manager
            window = QDockWindow(manager, manager.dock_area())
            manager.add_window(window)
            window.setGeometry(container.geometry())
            win_area = window.dockArea()
            plug_frame(win_area, None, container, QGuideRose.Guide.AreaCenter)
            self.post_docked_event(container)
        yield
        if is_window:
            window.show()
            if is_maxed:
                window.showMaximized()
Setup a context for docking onto a QDockContainer target.
dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/qt/docking/layout_builder.py/LayoutBuilder.dock_context