Next: The Toolkit
Up: A Short Introduction to
Previous: Focus
http://tix.sourceforge.net Tix (the Tk Interface eXtension)
is an enhanced version of Tcl/Tk; in particular, it replaces Tcl/Tk's
rustic default looks by something a bit more modern, and it has a lot
more widgets built in.
To use tix, you pass the compiled program the command line option
-uni-wish=tixwish (where tixwish is the name of
Tix' wish; try which tixwish at the command line, and if that
says command not found in whatever language your shell is configured
to talk to you to, you are out of luck I am afraid.) Thus, the source
code does not change; Tix is a conservative
extension of Tcl/Tk.
To find out whether the HTKprogram is currently running under a Tix
wish, use the function isTixAvailable:: IO Bool; a return
value True indicates Tix.
Here is an overview over the Tix widgets encapsulated by HTK:
- The class HasTooltip, instantiated by all widgets,
allows tooltips: text which is attached to the widget, and appears
in a wee yellow box if the mouse hovers over the widget for a short
while. Personally, I find this sort of thing immensely helpful.
- A paned window is a window divided into vertical or
horizontal panes, which can be resized by the user. A well-known
example of this is Netscape's mail interface, or
Adobe's acrobat reader, where you can change the size of the pane on
the left (the mailboxes or the bookmarks) by grabbing the dividing
line and moving it horizontally. For its usage, see
PanedWindow.htmlPanedWindow and the example
MainPanedWindow.hs in htk/examples/tix.
- A NoteBook.htmlnote book has a number of pages
with tabs on top. It displays one page at a time, selected by the
tab. The pages are represented by the type NoteBookPage,
which is an instance of the Container class, so you can
pack widgets into them.
- A LabelFrame.htmlLabelFrame is a frame with a
label; useful for grouping information together.
- A ComboBox.htmlcombo box is a combination of an entry
and a list box, and as such has a value. Used much like list boxes,
but with not quite as versatile selection schemes.
Figure 6: Tix Widgets
Fig. 6 shows notebooks, labelled frames and a combo
box.
There are many more Tix widgets, but we have found not all of them as
immediately useful as the ones above. Feel free to encapsulate more
(it should not be too hard). However, if you want to use Tix' tree
widgets, consider using the tree list from the toolkit (see below),
which is much nicer.
Next: The Toolkit
Up: A Short Introduction to
Previous: Focus
Christoph Lueth
Wed May 29 13:20:38 MEST 2002