[Lazarus] Message dialogs in Lazarus
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Mon Dec 20 17:19:32 CET 2010
Darius Blaszyk schrieb:
> - implement a basic layout manager. While you're at it could you also
> integrate it with the design editor? It will make our lives more easy.
There exist already a couple of layout managers in the LCL, but they are
totally isolated. It had been easy with the recent AutoSize rewrite to
implement a general layout manager interface. Since ChildSizing is
already a link to an external object, it could have been extended into a
more general layout manager link as well.
There is nothing magic with layout managers, they have to do nothing but
arrange their child controls, and to report the minimal and desired
sizes to their parent (with AutoSize). Every docking manager already is
a layout manager for its site, and its interface only lacks
beforementioned AutoSize capabilities.
> Once you have done all this, and the quality is good enough I'm sure the
> core developers will grant you SVN access. Development of Lazarus will
> go faster for you and the future of Lazarus will look shiny again.
>
> Please keep us informed of your progress.
It's only the poor AutoSize hack that prevents the use of other layout
managers. Give it a well documented API, and let the users add their own
layout managers as e.g. TChildSizing descendants, as everybody already
can add an docking manager. *Then* you can ask the users to implement
their own layout managers, while asking them to implement a layout
manager *interface* is the *wrong* way.
The same for the designer interface, which should be specified *before*
you can ask the user to implement it. A published LayoutManagerClass and
a LayoutData property in the control/form properties is the minimal
requirement for such an interface. In the easiest case no extra designer
support is required at all, when a layout manager works like a docking
manager, where the location of the dropped control is sufficient to
determine its final origin and extent. Further fine-tuning can use the
already existing ChildSizing interface, and an generalized AnchorDocking
(LayoutCustomization) dialog, if necessary.
Conclusion: The LCL already contains all required features and hooks for
layout managers, only in a too specialized implementation. Make it more
general and open to user supplied players, and the layout manager
discussion can be closed forever, leaving more time for other issues to
the core developers :-)
DoDi
More information about the Lazarus
mailing list