Splashscreen(3pm)
π Splashscreen β Tk::Splashscreen π
okay bestie, this is Splashscreen(3pm) from the perl/Tk Documentation, and it's literally the glow-up your slow-loading program deserves β¨
πΈ NAME πΈ
Tk::Splashscreen β display a Splashscreen during program initialization.
no cap, that's the whole vibe: a cute little screen that shows up while your program is still waking up π¦
β¨ SYNOPSIS β¨
$splash = $parent->Splashscreen(-opt => val, ... );
that's it. that's the whole first move π
π DESCRIPTION π
so like, for programs that require large load times, it's a common practice to display a Splashscreen that occupies the user's attention π this Toplevel mega widget provides all the display, destroy and timing events. All you do is create the Splashscreen mega widget, populate it as you see fit, then invoke Splash() to display it and Destroy() to tear it down. you don't have to do the timing math yourself, she does it for you π
Important note, fr fr: be sure to sprinkleupdate()calls throughout your initialization code so that any Splashscreen events are handled. Remember, the screen may be animated, or the user may be simply moving the Splashscreen about. if you forget theupdate()s, your splash is gonna be giving frozen screenshot energy π and not in a cute way
π OPTIONS π
The following option/value pairs are supported:
-millisecondsβ the minimum number of milliseconds the Splashscreen should remain on the screen. Default is0, which means that the Splashscreen is destroyed as soon asDestroy()is called. Otherwise,Destroy()waits for the specified time interval to elapse before destroying the Splashscreen. so0= bye immediately, anything else = she lingers, iconic behavior honestly β³
π«Ά METHODS π«Ά
$splash->Splash([milliseconds]);
If milliseconds is specified, it's the minimum number of milliseconds the Splashscreen should remain on the screen. This value takes precedence over that specified on the Splashscreen constructor call. so this one wins the argument, periodt π₯
$splash->Destroy([milliseconds]);
If milliseconds is specified, it's the minimum number of milliseconds the Splashscreen should remain on the screen. This value takes precedence over that specified on the Splash() call, which takes precedence over that specified during Splashscreen construction. it's giving strict hierarchy: Destroy() > Splash() > constructor π
π BINDINGS π
<ButtonPress-3>
Notifies the Splashscreen to set a mark for an impending move.
<ButtonRelease-3>
Moves the Splashscreen from the mark to the cursor's current position.
so like, press to drop a pin, release to yeet it wherever your cursor is now π±οΈβ¨
π¦ ADVERTISED WIDGETS π¦
Component subwidgets can be accessed via the Subwidget method. This mega widget has no advertised subwidgets. Instead, treat the widget reference as a Toplevel and populate it as desired. no subwidgets, no problem β she's a blank canvas and you're the artist π¨
β EXAMPLE β
$splash = $mw->Splashscreen;
... populate the Splashscreen toplevel as desired ...
$splash->Splash(4000);
... program initialization ...
$splash->Destroy;
look at that flow π make it, fill it, show it for 4000 milliseconds, do your little init thing, then destroy it. chef's kiss.
π AUTHOR π
Stephen.O.Lidie@Lehigh.EDU
Copyright (C) 2001 - 2002, Steve Lidie. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
πΈ KEYWORDS πΈ
Splashscreen, Toplevel
and that's the whole page bestie π this was Tk1.0, dated 2022-06-28, and it's Splashscreen(3pm) β go make your load times look cute πβ¨π«Ά
π¦ where this page comes from
- debian bookworm: libtk-splashscreen-perl 1.0-5
- debian trixie: libtk-splashscreen-perl 1.0-5
- ubuntu noble: libtk-splashscreen-perl 1.0-5
- ubuntu resolute: libtk-splashscreen-perl 1.0-5
- ubuntu stonking: libtk-splashscreen-perl 1.0-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms