[MLton] Re: New mGTK pre-release
Wesley W. Terpstra
terpstra@gkec.tu-darmstadt.de
Thu, 9 Dec 2004 19:52:05 +0100
--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Thu, Dec 02, 2004 at 12:35:44AM +0100, Ken Friis Larsen wrote:
> Give it a spin and let us know what you think.
So, I tried it out, but was surprised that Table.attach vanished.
How are you supposed to pack tables now?
I also still miss being able to hook a filedescriptor into GMain.
Why do all the widgets live in the top-level namespace?
A nested Gtk.Window.* would be much more convenient, imo.
I've also made progress on a glade->mgtk converter.
I was first going to use fxp, but then realized that XSL is
probably a more appropriate language for the task at hand.
It can take in a glade file and produce an sml file.
Only a few widgets are supported, and not completely.
Only two signals are supported: clicked + destroyed.
It only works with mgtk 0.92 b/c of the Table issue.
I am hoping the code autogenerator you guys use could also output
some XSL code to tie the two together. I also think that a future,
improved version of glade2sml should be part of the mgtk distribution
since it makes rapid interface development much easier.
One of the things I strived to acheive is that the output SML file
does not need to be modified. Instead, you write the funcionality in
a separate file. Even if the GUI is changed, the modules are setup
in such a way that the mess will still compile. That's what these
'Hooks' modules do for you.
I've attached the tar.gz and an example gui.
To run the generator, you need to do:
xsltproc sml.xsl bah.glade
(xsltproc is part of libxslt which is part of the gnome project)
If you make your own GUIs with glade, be aware that you need to mark the
project as C++ so that you can set the visibility. Only 'public/protected'
widgets are exposed in the XXX_GUI signature. The base window should almost
always be protected. Also, be warned that only glade-2 is supported, and due
to a bug in the glade-2 xml, you will need net access when running xsltproc.
Is it possible that the files
sig.xsl
pack.xsl
make.xsl
could be autogenerated for a more complete widget coverage using your tools?
I think that sig.xsl should be quite easy.
pack.xsl and make.xsl need to know about how the glade xml format relates to
the mgtk api calls, so this may not be doable automatically.
--
Wesley W. Terpstra
--YiEDa0DAkWCtVeE4
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="glade2sml.tar.gz"
Content-Transfer-Encoding: base64
H4sIAKeZuEEAA+1ce3PbNhLPv6dPg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t/I85wZi9sgNG2D8Rm+j12qJ
0WsGy9Ocy4O3xGD39E+C4eICWbH6ZnzODeTx45BueQd1vFsT4dtFCbTjjAQERB2vvRp5H6sD
YYrbS0JImWU7NEc3MokrqZXvg0uRWhHcswotUeJRoRUAu/ckYG+VDPZm6Xr6+VeeHLqnGp0V
Bsc/OLgOvuzooR78S8cvC3y1/OChAL0E8Jxze7me811CbyXXHkYr+Q2OGi3zlxK0uZOEC7ZP
KsiV22CdsfDlUQT62JIT0V/u9UgCCO5OfQ70XT/gSOFJ0F9abxL00S6l455WePBOxbvpUuSt
EyPMSIJtaOMxBMlNJ9/ZQCLhaXjQxDAEB6pg3vxW0IK+HfGJsnfnTteqvFy1qlWtalWrWtWq
VrWqVa1qVata1apWtapVrWpVq1rVqla1qoXbfwF8AmADAHgAAA==
--YiEDa0DAkWCtVeE4
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="bah.glade.gz"
Content-Transfer-Encoding: base64
H4sICF6YuEEAA2JhaC5nbGFkZQDtWF1z4jYUfd78Cq0eO+Uz204nA+xsGofQksCAu5k8aYQt
bBVZ8khygP76yjaELIjIbHans528yfY598r33iPpqvNxlTDwSKSigndhq96EQGnMQ8wEJ13I
BfzYA533tdpPNZCIkFyAnGCear2zzvur0e/+w9gDEcMhqVGuiZzjgIDpw9T3bgGMtU4vGo3i
cz3iIiF1IaPyudauN+uhDmHv7KyzZyB/taRhRDQIGFaqC/t6cU95KJYQ0LALL3FseAB0UilS
IvUa4Ihw3YWFoSSBgOPEzD9YrdAjVXRGGdVr2DNwTQJNwk5jy/zSTEkrKIzAni8z8jJUU22A
QEvMFcMaG1oXromCvWUx35aDvk6Nm77/J7of3F2N7pE/Gg+9z97wZVppG6VCUW0y92QBjUdT
dDe6816mm0xiBnvXmCnH70mi6D+4YixCorQUa7SkOkYpliYjlZyEJBASm6xUcaIWNEUaq8UM
SxTTii4KVmqK5AROnpsNun+1S5ApeHQzuPNNnCe3nxyJiiR+LCovt9CffPo88B9yon+D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