[GUI] Dynamic ... something
Axel Simon
A.Simon@ukc.ac.uk
Wed, 9 Apr 2003 11:39:23 +0100
On Tue, Apr 08, 2003 at 09:31:31PM +0100, Glynn Clements wrote:
> > So, to remain in-topic, how do you people think about a GUI builder
> > written in CGA, for the CGA?
[..]
> Also, Motif interface builders tend to rely upon the fact that Xt
> widget classes are self-describing. Given a WidgetClass value (pointer
> to a WidgetClassRec structure), you can enumerate the attributes of
> the widget class. Consequently, Motif interface builders normally
> allow you to use widget classes from extension libraries (i.e. widget
> classes which were unknown at the time the interface builder was
> written and compiled).
I get the impression that the model of Motif and Gtk are very similar...
> There's also the fact that different toolkits have substantially
> different models for geometry management. E.g. Win32 uses absolute
> positions and sizes, specified in fractions of the font size. OTOH, Xt
> normally uses attachments; the actual positions and sizes are computed
> at run-time based upon factors such as the label text and font of each
> of the widgets, the size of the window (and whether the window size
> can be changed to accommodate the layout or whether the layout must
> adapt to the window size).
>
> This is part of the reason why I would prefer an API which encouraged
> the code to stick to the core application logic (i.e. perform a given
> action in response to a given event), and have everything else
> determined "by other means".
So you're saying we should not supply any layouting mechanism to arrange
widgets? Does that mean we supply tools that convert MS Visual Studio .rc
files, Glade's xml files and Motif's UIL files into backend-specific
Haskell code that builds a widget tree? The advantage is that some higher
level bindings (namely Fudgets) use combinators to arrange widgets how
information flow is handled. If we force the user to use external tools
for the layout, Fudgets couldn't be implemented on top of CGA. But I do
not dislike the idea. It could safe us a lot of trouble.
Axel.