1Curses::UI::Dialog::BasUisce(r3)Contributed Perl DocumenCtuartsieosn::UI::Dialog::Basic(3)
2
3
4
6 Curses::UI::Dialog::Basic - Create and manipulate basic dialogs
7
9 Curses::UI::Widget
10 |
11 +----Curses::UI::Container
12 |
13 +----Curses::UI::Window
14 |
15 +----Curses::UI::Dialog::Basic
16
18 use Curses::UI;
19 my $cui = new Curses::UI;
20 my $win = $cui->add('window_id', 'Window');
21
22 # The hard way.
23 # -------------
24 my $dialog = $win->add(
25 'mydialog', 'Dialog::Basic',
26 -message => 'Hello, world!'
27 );
28 $dialog->focus;
29 $win->delete('mydialog');
30
31 # The easy way (see Curses::UI documentation).
32 # --------------------------------------------
33 my $buttonvalue = $cui->dialog(-message => 'Hello, world!');
34
35 # or even
36 $cui->dialog('Hello, world!');
37
39 Curses::UI::Dialog::Basic is a basic dialog. This type of dialog has a
40 message on it and one or more buttons. It can be used to show a message
41 to the user of your program ("The thingy has been updated") or to get
42 some kind of confirmation from the user ("Are you sure you want to
43 update the thingy?").
44
45 See exampes/demo-Curses::UI::Dialog::Basic in the distribution for a
46 short demo.
47
49 • -title < TEXT >
50
51 Set the title of the dialog window to TEXT.
52
53 • -message < TEXT >
54
55 This option sets the message to show to TEXT. The text may contain
56 newline (\n) characters.
57
58 • -buttons < ARRAYREF >
59
60 • -selected < INDEX >
61
62 • -buttonalignment < VALUE >
63
64 These options sets the buttons that have to be used. For an
65 explanation of these options, see the Curses::UI::Buttonbox
66 documentation.
67
69 • new ( HASH )
70
71 • layout ( )
72
73 • draw ( BOOLEAN )
74
75 • focus ( )
76
77 These are standard methods. See Curses::UI::Container for an
78 explanation of these.
79
80 • get ( )
81
82 This method will call get on the buttons object of the dialog and
83 return its returnvalue. See Curses::UI::Buttonbox for more
84 information on this.
85
87 Curses::UI, Curses::UI::Container, Curses::UI::Buttonbox
88
90 Copyright (c) 2001-2002 Maurice Makaay. All rights reserved.
91
92 Maintained by Marcus Thiesen (marcus@cpan.thiesenweb.de)
93
94 This package is free software and is provided "as is" without express
95 or implied warranty. It may be used, redistributed and/or modified
96 under the same terms as perl itself.
97
98
99
100perl v5.34.0 2022-01-21 Curses::UI::Dialog::Basic(3)