Vincenzo Ciancia wrote:
I doubt that anyone considers interface builders or an editres clone to be a priority
I sometimes wonder how the model we are designing will fit with interface builders. I personally think that an interface builder is an important priority. While I don't like RAD, I like using the right instrument for every purpose, and designing an interface seems like a task for a paint-like program. Or for a latex-like language, I am not sure :)
So, to remain in-topic, how do you people think about a GUI builder written in CGA, for the CGA?
I think that it would add a whole bunch of additional requirements to the CGA which would only be necessary for interface builders. Part of the problem is that such tools often rely heavily on functionality which is specific to a particular toolkit. E.g. a Motif interface builder will generate UIL code, because that's the standard for describing Motif UIs. 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). 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". -- Glynn Clements <glynn.clements@virgin.net>