[Paul Obermeier] 2002/09/16 Tk based program inspired by SGI's buttonfly. Ten words about what it does, how it looks, would be nice. -- [CLN] [PO] Well, working more than 15 years on SGI, ... Here are some screenshots: [http://www.poSoft.de/images/buttonfly0.png] [http://www.poSoft.de/images/buttonfly1.png] An excerpt from the manual page: NAME buttonfly - a pretty user interface for Silicon Graphics demos SYNOPSIS buttonfly [ menufile ] DESCRIPTION Buttonfly is a user reconfigurable, hierarchical, graphical menu system. Buttonfly opens up a window and displays one or more buttons, each with its own title. Moving the mouse pointer over a button and pressing the left mouse button selects that button, and will cause it to either exe- cute UNIX commands (such as running a program) or fly forward and flip over, exposing one or more new buttons. Each of the newly exposed but- tons may also be selected to either execute UNIX commands or expose a new level of buttons, and so on. To go back to the previous set of buttons move the mouse pointer so it isn't over any of the buttons, and press the left mouse button (i.e. select the background). The buttons will flip over backwards to bring up the previous set. Selecting the background at the top level does noth- ing. ---- Here are screenshots from the Tk version (no 3D currently): [http://www.poSoft.de/images/tkButtonFly0.png] [http://www.poSoft.de/images/tkButtonFly1.png] ---- ====== #!/bin/sh # The next line restarts using wish \ exec wish "$0" -- ${1+"$@"} # tkButtonFly: A Tk-based replacement of SGI's buttonfly program. # Notice: Currently not supported: # ".popup." and ".menu. -". # Toggling between window and fullscreen mode. # No 3D buttons - and therfore no "fly". set auto_path [linsert $auto_path 0 [file dirname [info script]]] set auto_path [linsert $auto_path 0 [file dirname [info nameofexecutable]]] # Some functions to implement a simple toolhelp. proc poToolhelp:Init { w { bgColor yellow } { fgColor black } } { if { [winfo exists $w] } { destroy $w } toplevel $w set ::topWidget $w label $w.l -text "This is toolhelp" -bg $bgColor -fg $fgColor -relief ridge pack $w.l wm overrideredirect $w true wm geometry $w [format "+%d+%d" -100 -100] } proc poToolhelp:ShowToolhelp { x y str } { $::topWidget.l configure -text $str raise $::topWidget wm geometry $::topWidget [format "+%d+%d" $x [expr $y +10]] } proc poToolhelp:HideToolhelp {} { wm geometry $::topWidget [format "+%d+%d" -100 -100] } proc poToolhelp:AddBinding { w str } { if { ![info exists ::topWidget]} { poToolhelp:Init .poToolhelp } bind $w "poToolhelp:ShowToolhelp %X %Y [list $str]" bind $w { poToolhelp:HideToolhelp } bind $w