[Lazarus] New experimantal beta feature - View same source in multiple Windows

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Nov 22 10:50:47 CET 2009


On Sun, 22 Nov 2009 01:06:48 +0100
Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:

> Mattias Gaertner schrieb:
> 
> > The unit ldockctrl is only about anchordocking. You don't need to
> > use or alter it for your docking manager.
> 
> LDockCtrl describes the interface that is nailed into the IDE units and 
> methods. 

Which were always in IFDEF, so no one will cry if this is changed or
broken.


> It would be very hard to remove all that stuff, and after all 
> it has to replaced by something similar. That's why I want to retain 
> that interface, and only change it to use a different management internally.
> 
> > Have you solved the layout restore in your docking manager?
> 
> I can't, as long as I don't know how the IDE windows are created and 
> managed (owners...). There seems to exist a dedicated OwningComponent in 
> the IDE, that holds references to some (most? all?) IDE windows. The IDE 
> also has to iterate over all windows when the configuration is stored, 
> it's not yet clear to me how this works (TIDEWindowLayoutList?).

This depends on your docking manager.

For example the anchor docking manager works like this:
There is one central TLazDockingManager object and every window that
should be dockable gets a TLazControlDocker with a unique name.
The IDE only needs to call LoadFromConfig/SaveToConfig (and of
course the default form positions). But: the anchor docking manager is
not finished.

The OwningComponent exists only to destroy components (and
FreeNotifications). Windows that are destroyed by code don't need this.

 
> In a simplified model every persistent IDE window should "register" 
> itself after creation. This could be done in an extended version of the 
> OwningComponent, or in IDEWindowLayoutList.Apply and OnApply, which 
> would make the added forms dockable. Afterwards the forms can be docked 
> by the user, all related information is available in their HostDockSite. 
> All other stuff, introduced with anchor docking (ControlDocker...), can 
> be removed from the forms and other classes. The host sites can be 
> managed independently, but their coordinates and layout should be stored 
> along with the other forms' layout description. When the layout is 
> restored after the next start, the stored information can be used in 
> IDEWindowLayoutList.Apply, to create the dock sites and dock the forms.

Maybe you can write a text and/or wiki how to use your docking manager?

Mattias




More information about the Lazarus mailing list