[comp.archives] [comp.sys.sgi] menu and color table editor code

tjh@ouzo.bu.edu (Tim Hall) (04/04/90)

Archive-name: sgi-menu/03-Apr-90
Original-posting-by: tjh@ouzo.bu.edu (Tim Hall)
Original-subject: menu and color table editor code
Archive-site: bu-it.bu.edu [128.197.2.40]
Archive-directory: sgi
Reposted-by: emv@math.lsa.umich.edu (Edward Vielmetti)

There have been, in the past, questions about what the SGI pop up
menus can and cannot do.  Most of these questions were about problems
that I had also run into.  As a result awhile ago I started to write
my own menus to provide myself with more functionality.  Anyhow, this
code is available via anonymous ftp to bu-it.bu.edu (128.197.2.40).
It is in the "sgi" directory.  There are two files "Menu.tar" (the 
menu code) and "Ctedit.tar".  Ctedit is a color table editor that
uses splines or a frequency/phase method of modifying a color table.

The following is a part of the README file from the menus...

Some things it does that people on the net have inquired about are....

1) You can attach a pop up menu to any or all mouse buttons.

2) It has menus that will stay open until closed.  This way you can
   choose more than one item at a time.

3) You can specify the point on the screen that menus will open.

4) A value associated with a menu item is passed to the callback
   function along with the index of the chosen menu item.

Some additional things it does....

1) It has panels.  By a "panel" I mean a menu whose elements are
   sliders.

2) A means of "ripping out" and "putting in" menu elements.  I use
   this to associate menu elements with one another.  For example in 
   my "scientific visualization" code I have a menu of files that
   have submenus of data elements within the file.  A different menu 
   has slots that define the points and colors of a plot/surface/volume
   /whatever.  The user can then "rip out" the data elements and "put 
   in" to one of the slots of the plot menu and thus build a plot.

3) A way of modifing a menu without deallocating and rebuilding the
   whole thing.

-Tim Hall
tjh@bu-pub.bu.edu