|
Subject: Using a UI language for PLT Scheme Newsgroups: gmane.lisp.scheme.plt Date: 2004-02-12 03:04:44 GMT (5 years, 20 weeks, 4 days, 10 hours and 44 minutes ago) For list-related administrative tasks: http://list.cs.brown.edu/mailman/listinfo/plt-scheme 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 QWidgetFactory. 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: http://www.xulplanet.com/tutorials/xulapp/ Glade: http://glade.gnome.org/features.html libglade: http://www.daa.com.au/~james/software/libglade/ http://developer.gnome.org/doc/API/libglade/libglade-notes.html Qt Designer and KDevelop: http://women.kde.org/articles/tutorials/kdevelop3/ QWidgetFactory: http://doc.trolltech.com/3.3/qwidgetfactory.html http://doc.trolltech.com/3.3/designer-manual-6.html Microsoft XAML http://longhorn.msdn.microsoft.com/lhsdk/core/overviews/about%20xaml.aspx Glade to XUL, QtUI to XUL: http://sourceforge.net/project/showfiles.php?group_id=64067 XUL to QtUI: http://www.staikos.net/~staikos/presentations/August2003/kaxul/ http://www.ecoinformatics.org/pipermail/jalama-dev/2003-June/000051.html (paper: http://luxor-xul.sourceforge.net/download/qatar.pdf ) XUL to PHP-GTK: http://www.phppatterns.com/index.php/article/articleview/48/1/2/ - Daniel |
|
|