[GUI] Haskell GUI examples

George Russell ger@tzi.de
Tue, 04 Mar 2003 20:23:49 +0100


This is a multi-part message in MIME format.
--------------090408070300020207010203
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

I took a few minutes (5) to implement the Haskell GUI example in HTk.  Code attached.

Forgive me for boasting but it seems clearer, simpler and shorter than any other of the examples
codings on John Meacham's website.  The closest competitor seems to be GIO.

This code should work (I haven't tested it) on any of Windows, Linux, Solaris and FreeBSD,
all of which we support.



--------------090408070300020207010203
Content-Type: text/plain;
 name="MainsimpleButton.hs"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="MainsimpleButton.hs"

ey0gIkdvb2RieWUiIGRlbW8gYXMgZGlzY3Vzc2VkIG9uIHRoZSBIYXNrZWxsIG1haWxpbmcg
bGlzdC4gCiAgIFNwZWNpZmljYXRpb246IHBvcHMgdXAgYSB3aW5kb3cgc2F5aW5nICJIZWxs
byBXb3JsZCIgYW5kIHByZXNlbnRpbmcgYQogICBidXR0b24gc2F5aW5nICJCeWUiLiAgQ2xp
Y2tpbmcgdGhlIGJ1dHRvbiBvbmNlIGNoYW5nZXMgdGhlIG1lc3NhZ2UgdG8KICAgIkdvb2Ri
eWUiOyBjbGlja2luZyBpdCBhIHNlY29uZCB0aW1lIGNhdXNlcyB0aGUgcHJvZ3JhbSB0byBx
dWl0LgogICAtfQptb2R1bGUgTWFpbiB3aGVyZQoKaW1wb3J0IENvbXB1dGF0aW9uCgppbXBv
cnQgRXZlbnRzCgppbXBvcnQgSFRrCgptYWluID0KICAgZG8KICAgICAgbWFpbldpbiA8LSBp
bml0SFRrIFt0ZXh0ICJIZWxsbyBXb3JsZCJdCiAgICAgIGxhYmVsIDwtIG5ld0xhYmVsIG1h
aW5XaW4gW3RleHQgIkhlbGxvIFdvcmxkIl0KICAgICAgYnV0dG9uIDwtIG5ld0J1dHRvbiBt
YWluV2luIFt0ZXh0ICJCeWUiXQogICAgICBwYWNrIGxhYmVsIFtdCiAgICAgIHBhY2sgYnV0
dG9uIFtdCiAgICAgIGJ1dHRvbkNsaWNrZWQgPC0gY2xpY2tlZCBidXR0b24KICAgICAgc3lu
YyBidXR0b25DbGlja2VkCiAgICAgIGxhYmVsICMgdGV4dCAiR29vZGJ5ZSIKICAgICAgc3lu
YyBidXR0b25DbGlja2VkCiAgICAgIGRlc3Ryb3kgbWFpbldpbgogICAgICA=
--------------090408070300020207010203--