[Lazarus] Docking manager implementation

Hans-Peter Diettrich DrDiettrich1 at aol.com
Sat Jan 24 19:51:37 CET 2009


Michael Van Canneyt schrieb:

> The same things you see there can be easily done in Lazarus ?

Maybe somehow, dunno how easily ;-)

> Whether I write - rather obscure - layouting code for the start as 
> displayed there, or I write a 'OnResize' event handler and do some 
> minor adjustments myself (the improved anchoring of lazarus gets 
> you a long way), the fact remains that I must take care of 
> the layouting by writing code manually ?

Most widgetsets have no concept of persistence, so everything must be 
set up in code.

> If you had a nice property editor, maybe then it would be better.
> Even so, creating a usable property editor for such a complicated 
> matter is not going to be easy, I think.

You address an sensitive topic. Now I realize what I don't like with the 
Lazarus anchor editor - it lacks a visualization of the designed 
dependencies, for a quick design, overview and verification of the 
overall layout. It violates my primary design rule: keep it simple!

Of course people have very different meanings about "useful" layout 
managers, in so far the most powerful layout manager may address the 
needs of everybody, even if every single developer only uses his 
favorite subset of the offered features. Nonetheless I fear that the 
outcome will be "write only", with little chances that somebody will be 
able to update any existing complex layout, perhaps except for it's 
inventor :-(

I for my part would prefer a strictly structured (layered, nested) 
layout, where frames can be used to visualize the nesting in design 
mode. Just as is demonstrated in the last item of the MiG layout manager.

When structured code is the accepted "best" coding style nowadays, 
because it's clear, understandable, extensible, and can be verified 
easily - why should spaghetti style be better suited for the design of a 
GUI?


BTW, the layout demo doesn't include any graphics. I wonder what will be 
required to include graphics, in a way that produces a predictable look 
and behaviour in environments with different screen resolutions and text 
sizes. It's hard enough, with only text, to test a layout on such 
different environments, so that it's not acceptable to me when a GUI 
looks fine at the designer's site only, with an unknown appearance on 
other machines.

DoDi




More information about the Lazarus mailing list