[plt-scheme] Using a UI language for PLT Scheme

From: Daniel Silva (dansilva at lynx.dac.neu.edu)
Date: Wed Feb 11 22:04:44 EST 2004

It seems that every few months somebody asks the list about updating
MrEd's branch of wxWindows.  Maybe instead of creating a million
bindings for some monstrous UI toolkit, it would be better to start by
embedding or linking to a UI interpreter.

First, a brief introduction to existing redundant technologies:

Mozilla's UI language, XUL, enables Mozilla's developers to create their
user interfaces through an HTML-like markup language.  An XUL file is
interpreted at runtime to display frames, dialogs, and so on.

GNOME/GTK's UI language is similar to XUL but comes with a WYSIWYG
designer, Glade, that generates the UI resource code.  The resource (a
".glade" file) can then be used to generate C code that uses GTK or
interpreted at runtime with libglade, just like XUL.

KDE/Qt's UI language is similar to GTK's: it has a WYSIWYG designer (Qt
Designer), generates ".ui" files, and can be either translated to C++
code that uses Qt or interpreted at runtime with libqui and

Microsoft's UI language for Longhorn, XAML, is also like Mozilla's XUL. 
It is almost the same as using ASP.Net to create WinForms.  With
ASP.Net, your quasi-HTML is translated into a subclass of the Page class
that knows how to generate the HTML you intended.  Now it knows how to
call CreateWindow.

Not only do all these different UI languages exist for each platform, a
lot of them can use other languages, since they are all XML-based and
easy to transform.  There are programs that translate Glade to XUL, QtUI
to XUL, XUL to QtUI, XUL to PHP-GTK, XUL to Java/Swing, and so on.

My suggestion is for PLT Scheme to pick one of these UI languages, link
to one of their interpreters, and have an easy way to create static user
interfaces almost for free.

As for dynamic graphical user interfaces, they would require either full
bindings to the target toolkit or the UI interpreter should be flexible
enough with its XML inputs.  The first option is painful and has been
discussed to death before.  I don't know much about the second option,
but libglade looks promising--apparently you can load snippets of XML to
create single widgets.

Comments welcome.  Resources follow:

Quick XUL guide:



Qt Designer and KDevelop:


Microsoft XAML

Glade to XUL, QtUI to XUL:

XUL to QtUI:
http://luxor-xul.sourceforge.net/download/qatar.pdf )


- Daniel

Posted on the users mailing list.