Term::Stool::BuUser(Contributed Perl DocumeTerm::Stool::Button(n) NAME Term::Stool::Button - button widget DESCRIPTION This is a button widget. Term::Stool::Widget is the parent of this class. FIELDS text Text to display on the face of the button. If it con- tains a '&' character, then the letter after that character is highlighted, and a hotkey is set up for it, to allow the user to quickly trigger the button. press_hook If this contains a sub reference, the subroutine will be called when the button is pressed. Otherwise, the main event loop is exited when a button is pressed. METHODS init Set up colors, etc. text Actually, text is implemented as a method to make the hotkey stuff work. Also, when the text of the button is set/changed, the button's width is automatically adjusted to fit it. TODO: this cannot work with lvalues, so it needs to be redesigned. display Displays the button keypress Hitting space or enter causes the button to be pressed. AUTHOR Joey Hess <joey@kitenet.net> 2001-05-23 perl v5.6.1 Term::Stool::Button(n)