UI::Di...Gauged(3pm)

πŸ“¦
version 1.21 Β· 3 versions
, in ubuntu jammy, ubuntu noble

πŸ’– 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::Dialog
  • UI::Dialog::Backend
  • UI::Dialog::Backend::CDialog
  • UI::Dialog::Backend::Nautilus
  • UI::Dialog::Backend::Whiptail
  • UI::Dialog::Backend::XDialog
  • UI::Dialog::Backend::XOSD
  • UI::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 (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