1Curses::UI::Dialog::DirUbsreorwsCeorn(t3r)ibuted Perl DoCcuurmseenst:a:tUiIo:n:Dialog::Dirbrowser(3)
2
3
4
6 Curses::UI::Dialog::Dirbrowser - Create and manipulate filebrowser
7 dialogs
8
10 Curses::UI::Widget
11 |
12 +----Curses::UI::Container
13 |
14 +----Curses::UI::Window
15 |
16 +----Curses::UI::Dialog::Dirbrowser
17
19 use Curses::UI;
20 my $cui = new Curses::UI;
21 my $win = $cui->add('window_id', 'Window');
22
23 # The hard way.
24 # -------------
25 my $dialog = $win->add(
26 'mydialog', 'Dialog::Dirbrowser'
27 );
28 $dialog->focus;
29 my $file = $dialog->get();
30 $win->delete('mydialog');
31
32 # The easy way (see Curses::UI documentation).
33 # --------------------------------------------
34 $file = $cui->filebrowser();
35 $file = $cui->loadfilebrowser();
36 $file = $cui->savefilebrowser();
37
39 Curses::UI::Dialog::Dirbrowser is a dirbrowser dialog. This type of
40 dialog can be used to select a directory, anywhere on the filesystem.
41
42 See exampes/demo-Curses::UI::Dialog::Dirbrowser in the distribution for
43 a short demo.
44
46 · -title < TEXT >
47
48 Set the title of the dialog window to TEXT.
49
50 · -path < PATH >
51
52 Set the path to start with to PATH. If this path does not exist,
53 the filebrowser will start in the rootdirectory.
54
55 · -show_hidden < BOOLEAN >
56
57 If BOOLEAN has a true value, hidden files (the filename starts with
58 a dot) will also be shown. By default this option is set to false.
59
61 · new ( OPTIONS )
62
63 · layout ( )
64
65 · draw ( BOOLEAN )
66
67 · focus ( )
68
69 These are standard methods. See Curses::UI::Container for an
70 explanation of these.
71
72 · get ( )
73
74 This method will return the complete path to the file that was
75 selected using the filebrowser. If no file was selected, this
76 method will return an undefined value.
77
79 · escape
80
81 This will invoke the cancel button, so the filebrowser widget
82 returns without selecting any file.
83
84 · ~
85
86 If the directory- or filelistbox of the dialog window has the focus
87 and the tilde (~) button is pressed, the filebrowser will chdir to
88 the homedirectory of the current user.
89
91 Curses::UI, Curses::UI::Container, Curses::UI::Buttonbox
92
94 Copyright (c) 2001-2002 Maurice Makaay. All rights reserved.
95
96 Maintained by Marcus Thiesen (marcus@cpan.thiesenweb.de)
97
98 This package is free software and is provided "as is" without express
99 or implied warranty. It may be used, redistributed and/or modified
100 under the same terms as perl itself.
101
102
103
104perl v5.30.0 2019-07-26 Curses::UI::Dialog::Dirbrowser(3)