Mac(3)

πŸ“¦
version 1.2 Β· 2 versions
, in fedora 43

✨ Mac(3) β€” the perl/Tk glow-up edition ✨

okay bestie, you found the Mac(3) page from the perl/Tk Documentation and honestly? it's a whole vibe. sit down, grab a snack πŸ“, we're doing this.


πŸŽ€ NAME πŸŽ€

Tk::ProgressBar::Mac β€” a blue, 3-D Macintosh Classic progress bar. that's it, that's the girl. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

use Tk::ProgressBar::Mac;
$pb = $parent->ProgressBar(-option => value);

literally two lines and you're in. periodt.


πŸ’– DESCRIPTION πŸ’–

This widget gives you a dynamic image that looks just like a Mac OS 9 progress bar. the nostalgia?? immaculate. πŸ‘‘

Packed all around it are four Frames β€” north, south, east and west β€” and inside those you can stuff whatever extra widgets your heart desires. the way that works is so generous of it, ngl.

want an example? peek at how Tk::Copy::Mac uses several Labels plus a CollapsableFrame widget to build a genuinely reasonable facsimile of a Macintosh copy dialog. icon behavior fr fr. 🌈

The following option/value pairs are supported:

  • -width β€” the maximun width of the Progressbar. (and yes, that's spelled maximun in the source, i'm not touching it, i don't fix what i didn't break πŸ’€)

🧚 METHODS 🧚

  • reset β€” resets the progress bar image so it looks all unused and fresh again. heads up though: a $pb->set(0) still shows the bar's base and end cap. so if you thought set(0) and reset were giving the same energy… they are not, bestie. πŸ™ˆ
  • set($percent) β€” sets the width of the progress bar, expressed as a percentage of -width. that's the whole job and she does it beautifully. ⭐

🌸 ADVERTISED WIDGETS 🌸

Component subwidgets can be accessed via the Subwidget method. the valid subwidget names are listed below, and i'm listing all of them because we don't skip parts in this house. 🫢

  • Name: label, Class: Label β€” Widget reference of the Label containing the ProgressBar Photo image.
  • Name: tframe, Class: Frame β€” Widget reference of the Frame north the ProgressBar.
  • Name: bframe, Class: Frame β€” Widget reference of the Frame south the ProgressBar.
  • Name: lframe, Class: Frame β€” Widget reference of the Frame west the ProgressBar.
  • Name: rframe, Class: Frame β€” Widget reference of the Frame east the ProgressBar.

north, south, east, west β€” she's got the whole compass covered, main character energy only. 🧭✨


πŸ”₯ EXAMPLE πŸ”₯

use Tk;
use Tk::ProgressBar::Mac;
use strict;

my $mw = MainWindow->new;
my $pb = $mw->ProgressBar(-width => 150, -bg => 'cyan')->pack;

while (1) {
    my $w = rand(100);
    $pb->set($w);
    $mw->idletasks;
    $mw->after(250);
}

a -width of 150, a -bg of 'cyan', and an infinite while (1) loop vibing at rand(100) every 250 milliseconds. chaotic? yes. iconic? also yes. 😭πŸ”₯

lowkey a heads up though β€” that loop is while (1), so it does not stop on its own. that's not me being dramatic, that's just what the code says. πŸ’€

sol0@Lehigh.EDU

Copyright (C) 2000 - 2003, Stephen O. Lidie.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. we love a permissive queen. πŸ’œ


⭐ KEYWORDS ⭐

Apple, ProgressBar


and that's the whole page!! you ate, i ate, the progress bar ate. πŸŽ€

okay so this one shipped as Tk1.2 and it's dated 2025-07-25, and the manpage signs itself off as Mac(3) β€” so consider this your cute lil goodbye from <pink>Tk1.2</pink> on <lavender>2025-07-25</lavender>, filed under Mac(3). byeeee πŸ¦‹πŸ’–

πŸ“¦ where this page comes from