UI::Di...Gauged(3pm)
π UI::Dialog::Gauged β the gauge girlie of Perl modules π
ok so bestie, this is UI::Dialog::Gauged, part of the User Contributed Perl Documentation squad, and it's literally the module you want when you need a lil progress meter situation. it's serving wrapper support of gauge related functions and nothing else, periodt. π
β¨ SYNOPSIS β¨
ok so here's the whole vibe, copy it exactly bestie:
use UI::Dialog::Gauged;
my $d = new UI::Dialog::Gauged ( title => 'Default title',
height => 20, width => 65 ,
listheight => 5,
order => [ 'zenity', 'xdialog' ] );
# Either a Zenity or Xdialog msgbox widget should popup,
# with a preference for Zenity.
$d->msgbox( title => 'Welcome!', text => 'Welcome one and all!' );
so basically either a Zenity or Xdialog msgbox widget should popup, and the order you passed in means it's with a preference for Zenity. iconic. π₯
π¦ ABSTRACT π¦
ngl, UI::Dialog::Gauged is simply another meta-class for UI::Dialog. the way that it's built different is it just has a different order of priority than UI::Dialog, and it only uses backends that support a standard set of gauge related functions. that's the whole plot bestie. πΈ
π DESCRIPTION π
this class is simply a nice way to try and ensure a GNOME based widget set. that's it, that's the description. lowkey perfect. β¨
π EXPORT π
None
we export nothing bestie, we're humble like that. π
π§ INHERITS π§
UI::Dialog
it's giving nepo baby but make it UI::Dialog energy. π
π CONSTRUCTOR π
new( @options )
β¨ EXAMPLE
my $d = new( title => 'Default Title', backtitle => 'Backtitle',
width => 65, height => 20, listheight => 5,
order => [ 'zenity', 'xdialog' ] );
πΈ DESCRIPTION
so this is the Class Constructor method. it accepts a list of key => value pairs and uses them as the defaults when interacting with the various widgets. you're basically setting the whole aesthetic up front, main character energy. π
π RETURNS
it hands you back a blessed object reference of the UI::Dialog::Gauged class. slay.
β OPTIONS
ok so the (...)'s after each option show you the default for the option. no cap.
debug=0,1,2(0)order=[ zenity, xdialog, cdialog, whiptail ](as indicated)PATH=[ /bin, /usr/bin, /usr/local/bin, /opt/bin ](as indicated)backtitle="backtitle"('')title="title"('')beepbefore=0,1(0)beepafter=0,1(0)height=\d+(20)width=\d+(65)listheight=\d+(5)
π₯ WIDGET METHODS π₯
gauge_start( )
β¨ EXAMPLE
$d->gauge_start( text => 'gauge...', percentage => 1 );
πΈ DESCRIPTION
this display a meter bar to the user. it get's the widget realized but it requires the use of the other gauge_*() methods for functionality. so like, don't think this one method does it all bestie, it needs its little friends. π«Ά
π RETURNS
TRUE (1) if the widget loaded fine and FALSE (0) for anything else.
gauge_inc( )
β¨ EXAMPLE
$d->gauge_inc( 1 );
πΈ DESCRIPTION
increment the meter by the given amount. lil baby steps. π
π RETURNS
TRUE (1) if the widget incremented fine and FALSE (0) for anything else.
gauge_set( )
β¨ EXAMPLE
$d->gauge_set( 99 );
πΈ DESCRIPTION
set the meter bar to the given amount. jump straight to 99, we love a dramatic entrance. π
π RETURNS
TRUE (1) if the widget set fine and FALSE (0) for anything else.
gauge_text( )
β¨ EXAMPLE
$d->gauge_text( 'string' );
πΈ DESCRIPTION
set the meter bar message to the given string. put a cute lil caption on it, it's free. π
π RETURNS
TRUE (1) if the widget set fine and FALSE (0) for anything else.
gauge_stop( )
β¨ EXAMPLE
$d->gauge_stop();
πΈ DESCRIPTION
end the meter bar widget process. ok so real talk, one of the flaws with gdialog is that the gauge widget does not close properly and requies the end user to close the gauge window when 100% has been reached. yes, "requies". i said what i said. and honestly this is the second reason why I'm glad gdialog is going the way of the dodo. π
bestie if you're on gdialog, expect to manually click that window closed at 100%. it's giving user-hostile. π
π RETURNS
TRUE (1) if the widget closed fine and FALSE (0) for anything else.
π SEE ALSO π
π PERLDOC
UI::DialogUI::Dialog::BackendUI::Dialog::Backend::CDialogUI::Dialog::Backend::NautilusUI::Dialog::Backend::WhiptailUI::Dialog::Backend::XDialogUI::Dialog::Backend::XOSDUI::Dialog::Backend::Zenity
π MAN FILES
π BUGS π
please email the author with any bug reports. and bestie, include the name of the module in the subject line or it's gonna get lost in the group chat. π
π AUTHOR π
Kevin C. Krinke, <kevin@krinke.ca>
π COPYRIGHT AND LICENSE π
Copyright (C) 2004-2016 Kevin C. Krinke <kevin@krinke.ca>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
ok that's the whole thing bestie, and for the sign-off: this lil masterpiece is perl v5.28.0, dated 2018-10-27, and it lives under the UI::Di...Gauged(3pm) name in the User Contributed Perl Documentation collection. go forth and gauge, you've got this. πβ¨ππ¦πΈ
π¦ where this page comes from
- ubuntu jammy: libui-dialog-perl 1.21-0.1 Β· LGPL-2.1-or-later
- ubuntu noble: libui-dialog-perl 1.21-0.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms