Now I've got an own docking manager work, with D7. The implementation 
addresses the zone management and sizes, which are flawed in LDockTree 
(TLazDockTree, TLazDockZone).

The question is, how to proceed. Should I provide a new Lazarus unit, as 
an alternative for LDockTree, or should I update LDockTree and Controls 
and submit an patch? Be warned: my implementation changes fields, 
methods and properties of TDockZone, and also parts of TDockTree, so 
that other docking managers will have to be updated. That's why a new 
unit might be a better introduction for this changed base classes.


Still missing is the anchoring, as done in TLazDockTree, and the 
handling of messages and the display of the zone headers. It would be 
nice to have a true TDockHeader component, derived from a 
TCustomSplitter, so that only one additional component has to be managed 
(anchored...), instead of separate zone header and splitter components. 
Is this feasable?

The header part and message processing can be taken from LDockTree, but 
I'd suggest more changes to the anchoring of the docked components. IMO 
the anchors are affected only by InsertControl and RemoveControl, not by 
other changes like a resize of the docking site, so that the required 
changes to the anchors could be reduced to just the insertion and 
removal (docking and undocking) of a control.

For required size adjustments, after un/docking or a resize of the dock 
site, multiple algorithms are applicable. In the simplest case the space 
is distributed equally onto the docked controls. But the space also can 
be distributed proportionally, according to the current or undocked size 
of the controls. It might be a good idea to leave the choice to the 
user, by means of an OnResize handler, or by a dedicated virtual method. 
I'd like similar adjustments/selections for layout managers in general, 
so that a coder can use the simple Delphi or the complicated Lazarus 
anchors, or any other (Java like...) layout managers. Then a docking 
manager can be reduced to just the handling of un/docking controls, 
whereas the layout of the dock site could be delegated to an appropriate 
layout manager.


I'm just asking for opinions from insiders, which are more familiar with 
the current model and capabilities of the LCL and IDE, before I proceed 
with the integration of the refurbished docking manager.

DoDi
_______________________________________________
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to