moreButtons : button widgets for Tk -- Release 1.2, June 14, 1994
=================================================================

(Note: See the file "ChangeLog" for changes from previous releases.)

INTRODUCTION
------------

This is a small collection of extensions to Tk (the wonderful
X-windows programming environment built on Tcl (the wonderful
extension language written by John Ouhsterhout at University of
California, Berkeley)).  (UUGGG!  With all those parentheses I feel
like I'm programming in lisp. :-)

I know these extensions work with Tk3.4 and Tcl7.1, and that they
compile nicely under HP-UX 9.01 with HP's development environment on
HP 9000/710 and 9000/827.  They should also work with earlier and
later versions of Tcl and Tk (I have run them with Tcl 6.7 and Tk 3.2,
but I don't remember if I changed anything since).  Also, I hope that
they are reasonably portable.  I don't think I've done much of
anything different from the standard Tk widgets, so they will probably
port and may even compile with non-ANSI compilers.

"moreButtons" adds two new widgets: triButton and studButton.  Both of
these were developed as a part of the TclMe menu system project
designed to provide a flexible, expandable environment for computing
at Idaho State University.  Some features of these widgets will
probably never be used in any other program.  Some features, however,
may be just what you are looking for.  (Or so I hope.)

While this package does include the pieces necessary to build a
mb_wish (wish extended to include moreButtons), I suspect these
widgets will really be more useful compiled onto the side of your own
C programs.  Also, it is not difficult to add moreButtons to a BLT or
[incr Tcl] (or both) interpreter.  The easiest way to do this would be
to manually merge the contents of mb_wish.c with the tkAppInit.c of
some other package.  (Naturally, this OUGHT to be much easier--with
dynamic libraries or something, but for now you will have to do some
manual coding to make various extension packages go together.  It
shouldn't be terribly difficult, though.)

triButton -
	Simple triangular button built to be exactly like the arrows
	at the ends of a scrollbar.  The size and the direction of the
	point can be specified as well as a command to execute upon
	activation (just like a button except there is no text or
	bitmap only a triangle).

studButton -
	This is a "kitchen sink" button.  While standard Tk buttons
	may have EITHER a bitmap or text and this text may only be a
	single line, a studButton may have both a bitmap and text.
	The text may span multiple lines--word wrapping very much like
	a message widget.  Also, it may have a "tag" which is
	displayed right justified within the button and vertically
	aligned with the top of the text.  This tag may either be a
	text string (possibly in a font different from the text's
	font) or a bitmap.  Aside from the much more complicated image
	on the top of a studButton, however, it functions exactly like
	a normal button.  When pressed, it sinks in with a pleasant 3D
	appearance, etc.

These widgets were developed directly from the C source code of
existing Tk widgets.  Therefore, much of the credit goes to John O
(please see notices within the C source).  Nevertheless, this
extension package carries the following copyright and distribution
restrictions (or UN-restrictions, as the case may be):

Copyright (C) 1993 Daniel Simmons, Michael Hewitt & Idaho State University
For distribution terms see the file COPYING (GNU GPL).


COMPILING
---------
- Manually edit the Makefile to specify installation directories,
  switches necessary to put your compiler in ANSI mode, and any flags
  necessary for your compiler to find X, Tcl and Tk libraries and
  headers.
- "make"
- Test it out: "./mb_wish"
- "make install"


ADDING TO YOUR OWN PROGRAM
--------------------------
- link the object files to your program (for either or both widgets)
- include the header file
- create the widget commands

    /*
     * Call Tcl_CreateCommand for application-specific commands, if
     * they weren't already created by the init procedures called above.
     */

    Tcl_CreateCommand(interp, "studbutton", studButtonCmd,
		      (ClientData) main, (Tcl_CmdDeleteProc *) NULL);
    Tcl_CreateCommand(interp, "tributton", triButtonCmd,
		      (ClientData) main, (Tcl_CmdDeleteProc *) NULL);

- source mb.tcl to get the class bindings

    /*
     * Load mb.tcl to get class bindings.
     */

    Tcl_VarEval(interp, "if [file exists $tk_library/mb.tcl] {",
                        "  source $tk_library/mb.tcl",
                        "} else {",
                        "  if [file exists ./mb.tcl] {",
                        "    source ./mb.tcl",
                        "  }",
                        "}", (char *) NULL);


FTP AVAILABILITY
----------------
If you can't find this at the Tcl Archive site
(harbor.ecn.purdue.edu), it should be available from:

	ftp.isu.edu:pub/moreButtons


UP-KEEP DISCLAIMER
------------------
The TclMe project is ongoing and important to me.  It depends heavily
on these widgets.  So, I will be keeping them up.  I don't have a
whole lot of time, however, and I know that my boss would not look
kindly on any kind of support guarantee.  Let's just see how it goes.
(The biggest problem is likely to be the time it takes to extract
and package the widgets separate from the rest of TclMe.)

   
QUESTIONS, COMMENTS (, CASH :-) TO:
-----------------------------------
Daniel Simmons          electronic mail : simmdan@isu.edu
Idaho State University       voice mail : (208) 236-3199
Computer Center              snail mail : Box 8037
                                          Pocatello, Idaho
                                          83209



