Curses:...gressbar(3)

πŸ’… Curses::UI::Progressbar πŸ’…

okay so bestie, welcome to the Curses:...gressbar(3) page from User Contributed Perl Documentation. this is the whole tea on the progressbar widget, and we're keeping every single detail because that's the vibe. no cap. 🫢


🌸 NAME 🌸

Curses::UI::Progressbar β€” create and manipulate progressbar widgets. slay. ✨


🧚 CLASS HIERARCHY 🧚

the family tree is literally right here, bestie:

Curses::UI::Widget
   |
   +----Curses::UI::Progressbar

πŸ¦‹ SYNOPSIS πŸ¦‹

here's the starter pack, exact code and all:

           use Curses::UI;
           my $cui = new Curses::UI;
           my $win = $cui->add('window_id', 'Window');

           my $progressbar = $win->add(
               'myprogressbar', 'Progressbar',
               -max       => 250,
               -pos       => 42,
           );

           $progressbar->draw;

πŸŽ€ DESCRIPTION πŸŽ€

Curses::UI::Progressbar is a widget that can be used to give some sort of progress information to your program's user. it's giving "loading screen main character energy," honestly. the progressbar looks like this:

 +------------------------------------------+
 |||||||||---------- 14% ------------------ |
 +------------------------------------------+

there's a short demo in the distribution at exampes/demo-Curses::UI::Progressbar β€” yes, that's the path exactly as the page says it. iykyk. πŸ“


✨ STANDARD OPTIONS ✨

the standard-option lineup is literally:

  • -parent
  • -x
  • -y
  • -width
  • -height
  • -pad
  • -padleft
  • -padright
  • -padtop
  • -padbottom
  • -ipad
  • -ipadleft
  • -ipadright
  • -ipadtop
  • -ipadbottom
  • -title
  • -titlefullwidth
  • -titlereverse

for an explanation of these standard options, see Curses::UI::Widget. πŸ’–


πŸ‘‘ WIDGET-SPECIFIC OPTIONS πŸ‘‘

these are the options that are specifically about the progressbar, bestie:

  • -min < VALUE > β€” this option sets the minimum value for the progress bar. the default is 0.
  • -max < VALUE > β€” this option sets the maximum value for the progress bar.
  • -pos < VALUE > β€” this option sets the startposition for the progress bar.
  • -nopercentage < BOOLEAN > β€” this option controls whether a percentage indicator should be drawn in the widget. the default for the BOOLEAN value is false, so a percentage indicator will be drawn. πŸ’…
  • -showvalue < BOOLEAN > β€” if this option is set to a true value, the current position value will be drawn in the widget.
  • -nocenterline < BOOLEAN > β€” this option controls whether a horizontal line should be drawn in the widget. the default for the BOOLEAN value is false, so a horizontal line will be drawn.

🌈 METHODS 🌈

  • new ( OPTIONS )
  • layout ( )
  • draw ( BOOLEAN )
  • intellidraw ( )
  • focus ( )

these are standard methods. see Curses::UI::Widget for an explanation of these. πŸ“š

  • get ( ) β€” this method will return the current -pos value of the widget.
  • pos ( VALUE ) β€” this method will set the -pos value of the widget to SCALAR.

πŸ’€ DEFAULT BINDINGS πŸ’€

since a Progressbar is a non-interacting widget, it does not have any bindings. periodt. no keyboard drama here. πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯

  • Curses::UI
  • Curses::UI::Widget
  • Curses::UI::Common

πŸ’œ AUTHOR πŸ’œ

Copyright (c) 2001-2002 Maurice Makaay. All rights reserved.

Maintained by Marcus Thiesen (marcus@cpan.thiesenweb.de)

This package is free software and is provided "as is" without express or implied warranty. It may be used, redistributed and/or modified under the same terms as perl itself.


cute little sign-off snuggle: perl v5.42.2, 2023-07-03 β€” mwah, byeee πŸ’–

πŸ“¦ where this page comes from