Please have a look at examples/dockmanager/elasticsite/SiteTest project. It demonstrates how docking could work in the Lazarus IDE, and how multiple editor windows could be implemented.
The project has been tested on Win32 and Linux (gtk2), taking into account the different handling of docking. Since the Linux window managers do not (easily) allow to dock forms, all dockable items shall be dragged out of their containing form, not by dragging the forms themselves.
The presented editor notebook has extended docking capabilities:
Every file (tab) can be dragged and docked, so that any number of editor window can be created by dropping an tab onto the desktop, or into another editor window.
An entire notebook can be dragged as well, from some empty space in the tab bar. The result may be surprising, it's only a quick proof of the concept ;-)
The ElasticSite allows to dock other components, into or onto the site. The demo expands and shrinks the site automatically, when something is un/docked to the left, right or bottom of the form. This behaviour currently is available only with the primary (inital) application window, not with secondary editor windows. This is not a conceptual restriction, only a limitation of the demo project.
You may encounter some more quirks in the demo project. Please have a look at the comments in fEditorSite.pas. I dunno how to prevent the "Keep references" question when compiling the project - the references MUST be kept.
Paul has suggested another discussion of docking, I'm just collecting opinions about the intended topics and goals. Mattias?
IMO we should agree about a platform independent docking model, that works for all window managers.
We also should agree about the essential docking features, including the notebook docking, re-docking and floating of components. WRT the IDE we are not bound to the flawed Delphi docking model, that effectively is only a poor extension of the drag-drop feature. Even the Delphi IDE seems to use a slightly different drag-dock model, what doesn't prevent the current RAD Studio IDE from crashing when the user does not obey the limitations of the model and its implementation.
Currently we have three docking approaches: anchored docking and tree-based LDock and EasyDockSite managers. We should compare the available features and the pro's and con's of these models.
DoDi
