[Lazarus] IDEDialogLayoutList.ApplyLayout() is flawed

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed Jun 10 20:52:11 CEST 2009


Mattias Gärtner schrieb:

> Windows that can stay open together with other IDE windows use at the 
> moment the EnvironmentOptions.IDEWindowLayoutList. But there is no IDE 
> interface for this, because this should be replaced by the docking manager.
> 
> For example the idea of the anchor docking manager is, that every window 
> has a TLazControlDocker (just put one onto a form in the designer). The 
> rest is done by the docking manager. But I had not the time to complete 
> the restore algorithm and the recent changes probably broke some parts.

I had a quick look at TLazControlDocker, but I don't understand how to 
use it.

> Maybe DoDi can outline what his docking manager requires. Maybe we can 
> then create an IDE interface for IDE windows.

I've not yet looked deeper into persistent layouts. IMO there should 
exist a global registration instance, for all dockable components. Every 
such component registers itself, when it's created, just like a DockSite 
registers itself with the DragManager. It also should provide 
identifying information, that can be saved by an docking manager. On 
rebuild of a layout the manager should be able to create all components, 
that do not already exist. The creation sequence may be important, so 
that e.g. a Code Explorer can be created for and linked to a specific 
editor window, as the Delphi IDE can do.

My next demo application will be an editor with multiple windows, where 
I can look deeper into details of saving and loading docking layouts. My 
docking notebook already allows to dock individual pages, so that 
multiple editor windows already are possible. As long as we don't have 
files with multiple viewers, another global manager will be required to 
prevent multiple concurrent edits of the same source, in multiple editor 
pages.

DoDi





More information about the Lazarus mailing list