[Lazarus] Testing 0.9.29
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Mon Feb 21 00:25:13 CET 2011
Mattias Gaertner schrieb:
>> In the most useful model every control would have its own (configurable)
>> layout manager, selectable from an (extensible) number of predefined
>> layouts. In fact the DockManager already *is* such an *installable*
>> layout manager...
>
> A TDockmanager is somewhat more.
Not really. Every container can act as a DockSite, this is not a
privilege or special feature of an DockManager. All methods involved in
the *act* of docking can reside in the TDragDockObjects, as implemented
in Delphi, instead of the currently used DragPerformers. Also the
distinction between Controls[] and DockClients[] is nonsense, because
only one of these collections can contain elements, at the same time
(both properties could be rebased onto the same field).
> But I think a TLCLLayoutManager could be done similar to this. Maybe
> TDockManager should be made a descendant of a TLCLLayoutManager.
Right. I already tried such an approach, and failed due to the existing
dependencies between a general layout manager and the already introduced
AnchorSides, ChildSizing etc. fields - these and all related methods
should be moved into specialized layout managers.
A control only needs a reference to its layout manager, and eventually
another (untyped) reference to layout data, created and used exclusively
by that layout manager. Such a design would e.g. allow to transform the
currently distributed AnchorSides into kind of that tree, that currently
has to be built from scratch, whenever a site with (such) anchors is
updated (during autosizing...).
DoDi
More information about the Lazarus
mailing list