                                TWO Library

                         TWO = Tcl/tk Widget add-On

The TWO Library is a collection of TCL-only "megawidgets". A megawidget is
built using normal Tk widgets and can be used like an ordinary Tk widget
(wherever possible).

For new versions have a look at the TWO homepage: http://www.fjl.de/two/

Table of Contents

  1. Screenshots
  2. Widgets
  3. Additional Commands
  4. Test Applications
  5. Using this library

----------------------------------------------------------------------------

1. Screenshots

The first screenshot shows a toplevel window with a toolbar. There are
several buttons, checkbuttons and a combobox in it. Please note that the
toolbar can be torn off.

The main area is a MDI with 5 slave widgets, 2 of them are minimized. All
slave windows are editor widgets, the active one is split into two parts
(both showing the same editable text, separated by a panner).

The style of all megawidgets (where suitable) is set to windows, but the
application is run on UNIX.

The second screenshot shows a help window. It also has ist own toolbar. The
main are contains the widget (sorry, Text is in german language). There are
some embedded images, and some links.

----------------------------------------------------------------------------

2. Widgets

autosb.n
     An automatic scrollbar: it is only visible when it is really needed,
     i.e. it automatically disappears whenever there is nothing to be
     scrolled.
combobox.n
     Like the windows combobox. Combines an entry widget and a drop-down
     list (menu) in one widget. The drop-down list is exposed by clicking
     the button on the right side of the the entry widget; the drop-down
     list can be resized interactively.
editor.n
     An ASCII text editor; extends xtext (also part of this library). It
     provides methods to open/save files into the widget and can be split
     into two parts (using the panner) which show different parts of the
     same file.
help.n
     A simple widget used to display online help. It defines its own (rather
     simple) markup language (HML, help markup language), knows hyperlinks
     and a page history.
mb.n
     A tk_messageBox which sets the parent widget to a reasonable value.
mdi.n
     An implementation of the MDI widget known from Windows. An MDI is like
     a windowmanager within another window: you can open an arbitrary number
     of slave windows, move, resize, maximize and minimize them, and sure
     enough close them. There are window menus and a root menu.
panner.n
     Slave widgets (panes) are arranged in rows or columns. The size of each
     pane can be controlled by draging the resize handler between each pane.
shell.n
     A fake shell widget used to run interactive applications. It shows a
     fake prompt and fake command string.
toolbar.n
     A toolbar may consist of buttons, checkbuttons, radiobuttons, and
     combobox, it can be torn off and the buttons have a flat appearance.
xmenu.n
     Tk menu command with better support for setting accelerator keys,
     underlinig and tooltips.
xtext.n
     Tk text widget with some different keyboard bindings (no emacs
     bindings, better CTRL-left/right handling etc.) and a (simple) auto
     indent mode. It has unlimited undo/redo capability and can be coupled
     with a slave xtext.

----------------------------------------------------------------------------

3. Additional Commands

bugmail.n
     A replacements for the standard Tk bgerror handler: the user can send
     bug reports to the maintianer of the software (eror message, call
     stack, and user's own comments).
icons.n
     This library proviedes several icons wich an be used in a toolbar.
invoke.n
     Invoke a Tk button with visual feedback (flashing the button as if it
     were pressed with the mouse).
lsarray.n
     Load and save TCL arrays to files.
opt.n
     Several option settings for making Tk applications more beautiful on
     several UNIX systems (written for CDE on HP/UX) and some workarounds.
tclpre.1
     Precompile a tcl file. It does inlining of TCL source and image create
     commands .
     Comments can be removed and the additional tclpre set/if/else/endif
     commands are processed.
tclpre.n
     Emulates the tclpre.pl command, which in turn emulates the C
     preprocessor.
tooltip.n
     Show little help messages if the mouse pointer rests a minimum amount
     of time over a widget.

----------------------------------------------------------------------------

4. Test Applications

This distribution comes with several test applications. Their main purpose
is to show how to use the widgets. Some of them can easily be used as
building blocks for larger applications.

----------------------------------------------------------------------------

5. Using this Library

There are several ways to use this library:

  1. If you don't want to install the files, then you can simply use the tcl
     source command for each file that you need. Please note that some files
     require some others, so there are restrictions on their order.
  2. An alternative is to only source the tclpre.tcl and libw.tcl files.
  3. Use the command lappend auto_path /path/to/lib to make the package
     require commands work without installing the library
  4. Install the library and use package require

TWO is available under same license terms as TCL: a BSD-Style
lincense.
