                        BALLOON.TCL 
 
                      Help balloon Tcl library
                Copyright(c) by Victor B Wagner, 1997

Usage:

1. init balloon help system by calling init_balloons in startup part
   of yor Tcl application

2. Whenever you want particular widget to show help balloon,
   set an element of global array widget with index of widget name
   to desired text. This is almost all.
   
   for example:

   button .mywin.ok -text Ok -command do_it
   set help_tips(.mywin.ok) {Perform desired action}

3. For menu widget you can would have separate balloons for each item.
   Help_tips indices are formed of menu name and item number,separated by
   comma.
 
  for example
  
   menu .menu.file.m
   .menu.file.m add command -text Open -command open_file
   set help_tips(.menu.file.m,1) {Open an existing file}
  
4. You can toggle displaying of balloons on and off globally by setting 
   global variable use_balloons to 1 (on) or 0 (off).
   Note: it is automatically turned on by init_balloons procedure.

5. Balloons for other widgets.
   comand enable_balloon allows to add balloons to widgets other than
   buttons and menus.

   It accepts following parameters:


   enable_balloon name_to_bind ?script?

   where name_to_bind can be any name, acceptable by bind, i.e
   either name of individual widget or widget class name, and
  script is tcl function, which returns additional index for part of
  widget. If you omit it, you'll have same help text anywhere in widget.
  This script could contain any % substitutuins, acceptable by bind command.
   
  For menu widget I'm using	"%W index active"
    
Further custimization:

  init_balloons accept three options 
    -delay value  
    delay between last mouse event and instant, when balloon appear.
    delay must be specified in milliseconds as for after command
    -width pixels 
    width of balloon, specified in units, suitable for -wraplength option
    of label widget

    -color color 
    background color of ballon. Any form, acceptable by Tk


GETOPT procedure
   
    getopt array ?option value ...?
   
   parses list of options. All options and values can be a separate arguments,
   or form a single list, so if you procedure is declared as.
 
   myproc {param args}

   call
   
   getopt arglist $args
 
   would be correct.
   array should contain an element for each allowed option, probably initiliazed
   by its default value.

   Indices of array shouldn't have a leading dash.

   getopt parses list of options and replaces default values by supplied ones.

   array could be local variable

   
   
   

    





