
On Thu, Apr 10, 2003 at 02:41:48AM -0700, John Meacham wrote:
Absolute positioning is quite unsuitable for a portable GUI library. fonts are different sizes, widgets will be drawn differently, it will just encourage programs which look bad on systems they were not designed. not that that type of layout should not be provided, it can come in handy, but it should not be the encouraged way to do things unless you are writing a new portable layout algorithm, as it would require extensive querying of the exact properties of every widget used to make sure your layout looks good across platforms.
As a useful tidbit, I was able to implement full gtk hbox and vbox layout algorithms in about 30 lines of Haskell. I think something like them would be a good middle-ground common layout algorithm which could be easily implemented on platforms that don't have it (on the Haskell side of things) and is powerful enough to express most layouts people want that will rescale and deal with differing sized widgets well.
Our self-set goal is to provide native look-and-feel. If we don't abandon that, we need to provide each platform's mechanism for laying out widgets. I guess it's ok to use a dynamic layouting mechanism to construct Windows Dialogs as long as we don't make them resizable. But we don't want to restrict people using the native mechanisms (because the layout calculated by the Haskell code might not be ideal). Thus, maybe we aim for a simple cross-platform dynamic layout algorithm and provide the ability to override these settings with external resource files. Axel.