2005-06-19 · in Ideas · 183 words

I'm a big fan of the GTK method of building GUIs -- absolute positioning is absolutely forbidden, which makes it possible to localise GUIs, make them accessible, and support different font and appearance choices at runtime with no effort required on the part of the programmer. (It amazes me that many modern toolkits still don't support proper layouts, or implement them in needlessly awkward ways -- see Swing for a prime example.)

Widgets in a GTK GUI need to communicate with each other to make positioning decisions. Obviously, it'd be nice to be able to parallelise this where possible (for example, laying out text and widgets on a web page can be CPU-intensive). We could also use a decent GUI framework for occam.

We should thus look at building occam GUIs out of individual processes connected by channels: a container is connected to all its children, and can talk to them to decide how big it should be and how the children should be layed out. The channels could even carry graphics requests and events, which filter down through the network to the appropriate widgets.