Splashscreen(3pm)

πŸ“¦
version 1.0 Β· 2 versions
  • 1.0 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.0 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 sprinkle update() 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 the update()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 is 0, which means that the Splashscreen is destroyed as soon as Destroy() is called. Otherwise, Destroy() waits for the specified time interval to elapse before destroying the Splashscreen. so 0 = 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 πŸŽ€βœ¨πŸ«Ά