Here is a tiny idea for a QT based GUI library
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi people, In the past months I've seen a lot of interest in designing a standard GUI library for Haskell. I've just realized that a feature of QT 3.0[!] library, which is a well versed GUI library used in KDE, can make writing a GUI library quite easy. There is a class called QWidgetFactory[*] in QT 3.0 that enables application programmers to dynamically generate a GUI from a .ui file which is an XML file that describes it. If a functional combinator library would be able to generate the XML file in question then a GUI could be created quite easily. You also need to access objects in the created widget and implement slots for it, which I think should be possible using the C bindings. There are new C bindings for KDE and there ought to be some for QT as well. Are there any interested implementors? :) Happy hacking, [!] http://doc.trolltech.com/3.0/index.html [*] http://doc.trolltech.com/3.0/qwidgetfactory.html [+] http://doc.trolltech.com/3.0/designer-manual-5.html - -- Eray Ozkural (exa) <erayo@cs.bilkent.edu.tr> Comp. Sci. Dept., Bilkent University, Ankara www: http://www.cs.bilkent.edu.tr/~erayo GPG public key fingerprint: 360C 852F 88B0 A745 F31B EA0F 7C07 AE16 874D 539C -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE76/b4fAeuFodNU5wRArWAAJ9wN7qFa23Q4p2ZNWIFoXNV4yJwnwCfZBrJ 4MwQbRhI01ZBzfsQs2E41Ig= =zY7d -----END PGP SIGNATURE-----
"Eray Ozkural (exa)" <erayo@cs.bilkent.edu.tr> wrote,
I've just realized that a feature of QT 3.0[!] library, which is a well versed GUI library used in KDE, can make writing a GUI library quite easy.
There is a class called QWidgetFactory[*] in QT 3.0 that enables application programmers to dynamically generate a GUI from a .ui file which is an XML file that describes it.
If a functional combinator library would be able to generate the XML file in question then a GUI could be created quite easily.
You also need to access objects in the created widget and implement slots for it, which I think should be possible using the C bindings. There are new C bindings for KDE and there ought to be some for QT as well.
The time consuming part in creating such a system are the C bindings, not the XML stuff. In fact, similar functionality is available for GTK+ already for a long while. The cool point about it is that the graphical interface builder Glade http://glade.gnome.org/ can generate these XML files, which you just load into your application using a library called libglade (that corresponds to the QWidgetFactory that you mention above). I guess, KDE's interface builder can do the same. There is a binding to libglade for Haskell available, although it is not part of the main Gtk+HS distribution yet, but I am happy to email it on request. Cheers, Manuel
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 13 November 2001 06:18, Manuel M. T. Chakravarty wrote:
The time consuming part in creating such a system are the C bindings, not the XML stuff. In fact, similar functionality is available for GTK+ already for a long while. The cool point about it is that the graphical interface builder Glade
can generate these XML files, which you just load into your application using a library called libglade (that corresponds to the QWidgetFactory that you mention above). I guess, KDE's interface builder can do the same.
Yes, I know. I used to be a poor GTK+ coder myself. :) I'm a konvert. The C bindings are already available, so you can just use them it seems. You can generate full blown interfaces using QT designer, and load them at run time as I said. Thanks, - -- Eray Ozkural (exa) <erayo@cs.bilkent.edu.tr> Comp. Sci. Dept., Bilkent University, Ankara www: http://www.cs.bilkent.edu.tr/~erayo GPG public key fingerprint: 360C 852F 88B0 A745 F31B EA0F 7C07 AE16 874D 539C -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE78RI8fAeuFodNU5wRAktWAKCZK1ax642CFFaoxQhEZXbe/sbATQCgoxdu 5P7mQFjyP3qmFzPt3FyI6Uw= =5ArM -----END PGP SIGNATURE-----
participants (2)
-
Eray Ozkural (exa) -
Manuel M. T. Chakravarty