Curses:...browser(3)

🌸 NAME 🌸

Okay bestie, welcome to the <rainbow>Curses:...browser(3)</rainbow> page β€” User Contributed Perl Documentation, fr fr. This is the manual for Curses::UI::Dialog::Dirbrowser: create and manipulate filebrowser dialogs. πŸ’–


πŸ¦‹ CLASS HIERARCHY πŸ¦‹

The ancestry is giving main character energy, and it goes exactly like this:

        Curses::UI::Widget
           |
           +----Curses::UI::Container
                   |
                   +----Curses::UI::Window
                           |
                           +----Curses::UI::Dialog::Dirbrowser

✨ SYNOPSIS ✨

Here's the whole vibe in code, bestie:

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

           # The hard way.
           # -------------
           my $dialog = $win->add(
               'mydialog', 'Dialog::Dirbrowser'
           );
           $dialog->focus;
           my $file = $dialog->get();
           $win->delete('mydialog');

           # The easy way (see Curses::UI documentation).
           # --------------------------------------------
           $file = $cui->filebrowser();
           $file = $cui->loadfilebrowser();
           $file = $cui->savefilebrowser();

πŸŽ€ DESCRIPTION πŸŽ€

Curses::UI::Dialog::Dirbrowser is a dirbrowser dialog. This type of dialog can be used to select a directory, anywhere on the filesystem. πŸ—‚οΈ

See exampes/demo-Curses::UI::Dialog::Dirbrowser in the distribution for a short demo. That path is literally exampes/..., iykyk. πŸ™ˆ


πŸ’… OPTIONS πŸ’…

  • -title < TEXT > β€” Set the title of the dialog window to TEXT. ✨
  • -path < PATH > β€” Set the path to start with to PATH. If this path does not exist, the filebrowser will start in the rootdirectory. 🫢
  • -show_hidden < BOOLEAN > β€” If BOOLEAN has a true value, hidden files (the filename starts with a dot) will also be shown. By default this option is set to false. πŸ‘€

🧚 METHODS 🧚

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

These are standard methods. See Curses::UI::Container for an explanation of these. πŸ’…

  • get ( ) β€” This method will return the complete path to the file that was selected using the filebrowser. If no file was selected, this method will return an undefined value. πŸ¦‹

πŸ”₯ SPECIAL BINDINGS πŸ”₯

  • escape β€” This will invoke the cancel button, so the filebrowser widget returns without selecting any file. 😭
  • ~ β€” If the directory- or filelistbox of the dialog window has the focus and the tilde (~) button is pressed, the filebrowser will chdir to the homedirectory of the current user. 🧚

🌈 SEE ALSO 🌈

  • Curses::UI
  • Curses::UI::Container
  • Curses::UI::Buttonbox

πŸ‘‘ AUTHOR πŸ‘‘

Copyright tea and license facts, served fresh:

  • 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.

Sign-off, bestie: perl v5.42.2, dated 2023-07-03, page Curses:...browser(3) β€” that's the whole page, mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from