FireButton(3pm)

✨ FireButton β€” bestie, it's a button that just won't quit ✨

So this is the manual page for Tk::FireButton β€” a Perl/Tk widget, no cap. (The manual itself lives in the User Contributed Perl Documentation section, hence the 3pm vibe. πŸ’…)


🌸 NAME 🌸

Tk::FireButton β€” the Button that keeps invoking its callback while you're holding it down. It's giving "press and hold and it fires over and over". πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

use Tk::FireButton;

$fire = $parent->FireButton( ... );

# May/should change:
$w->Whatever(... -bitmap => $Tk::FireButton::INCBITMAP, ...);
$w->Whatever(... -bitmap => $Tk::FireButton::DECBITMAP, ...);
$w->Whatever(... -bitmap => $Tk::FireButton::HORIZINCBITMAP, ...);
$w->Whatever(... -bitmap => $Tk::FireButton::HORIZDECBITMAP, ...);

πŸ¦‹ DESCRIPTION πŸ¦‹

FireButton is-a Button widget β€” like, literally, check Tk::Button β€” except it keeps invoking the callback bound to it for as long as the <FireButton> stays pressed. Hold it down, it keeps going. Main character energy fr fr. πŸ”₯

Four bitmaps come pre-baked in this package so you don't have to go hunting:

  • $INCBITMAP and $DECBITMAP β€” for vertical increment and decrement buttons ⬆️⬇️
  • $HORIZINCBITMAP and $HORIZDECBITMAP β€” for horizontal increment and decrement buttons β¬…οΈβž‘οΈ

The methods that get you at these bitmaps are down below, iykyk. πŸ‘‘


πŸ‘‘ SUPER-CLASS πŸ‘‘

The FireButton widget-class is derived from the Button widget-class and inherits all the methods and options of its super-class (go look at Tk::Button). It's giving nepo baby but in a good way, it earned it. πŸ’œ


✨ STANDARD OPTIONS ✨

FireButton supports all the standard options of a Button widget. For the details on those, hit up Tk::options. Nothing extra, nothing missing, periodt. 🫢


πŸ’… WIDGET-SPECIFIC OPTIONS πŸ’…

Okay bestie, here's the stuff that's just for this widget:

  • Name: repeatDelay Class: RepeatDelay Switch: -repeatdelay Fallback: 300 (milliseconds) β€” How long it waits before the callback gets invoked the very first time, after Button-1 is pressed over the widget. So like… a lil dramatic pause before the fireworks. ⏳
  • Name: repeatInterval Class: RepeatInterval Switch: -repeatinterval Fallback: 100 (milliseconds) β€” How long it waits between invocations of the callback bound to the widget with the "command" option. This is the beat it keeps dropping to. 🎡

🌈 CHANDED OPTION FALLBACK VALUES 🌈

(Yes, the heading is spelled exactly like that in the original, and I am not touching it. Iconic typo behavior. πŸ’€)

These options have fallback values that are different from the Button widget:

-padx               => 0,
-pady               => 0,

So it's a lil tighter around the edges than your standard Button. Slim fit. 🧚


πŸ“ METHODS πŸ“

Same as for the Button widget. πŸ’–

Additionally, there are four methods that hand you the names of the standard increment and decrement bitmaps:

  • INCBITMAP
  • HORIZINCBITMAP
  • DECBITMAP
  • HORIZDECBITMAP

And here's the tea: subclasses of FireButton may override these methods to supply their own different increment and decrement bitmaps. Customize away, bestie. ✨


⭐ ADVERTISED WIDGETS ⭐

None. That's it. That's the whole section. Not me giving you nothing but honesty. πŸ™ˆ


πŸ“œ HISTORY πŸ“œ

The code was extracted from Tk::NumEntry and slightly modified by Achim Bohnet >ach@mpe.mpg.de>. The author of Tk::NumEntry is Graham Barr >gbarr@pobox.com>. And the current maintainer is Slaven Rezic >slaven@rezic.de>.

Shoutout to the ancestors of this widget, fr fr. 🫢


And that's a wrap on the FireButton lore! This page ships with perl v5.32.1, dated 2021-11-06, and the manual name is FireButton(3pm) β€” now go hold a button down and watch it fire. Slay. πŸ’…βœ¨πŸŽ€
πŸ“¦ where this page comes from