Mac(3)
β¨ 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 spelledmaximunin 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 thoughtset(0)andresetwere 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 theLabelcontaining 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. π
π AUTHOR and COPYRIGHT π
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
- fedora 43: perl-Tk-ProgressBar-Mac 1.2-48.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms