The O'Haskell interface to Tk
This page describes the O'Haskell module Tk.hs, which provides
the O'Haskell programmer with tools to build programs with graphical
user interfaces (GUI's), using widgets such as windows, menus,
various kinds of buttons, scrollbars etc. All this is accomplished by
interfacing to the
Tk toolkit. A running ohugs program that use these GUI
components communicates with a Tcl/Tk interpreter that handles the
display of graphics and the collection of user interaction. The Tcl/Tk
interpreter, on the other hand,
notifies the ohugs interpreter of user actions and
associated parameters (where was the mouse clicked, which string did
the user type, etc) and computations based on these data are performed
on the ohugs side. The mechanism for this cooperation is based on
ideas (and code) borrowed from the Tk interface to
TkGofer
.
To read this document, no knowledge of Tcl/Tk is assumed.
For the knowledgeable reader, however, we make clear that the present
interface does not give access to all the functionality of Tk.