Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / Tk / Dialog.pod
CommitLineData
86530b38
AT
1# Copyright (c) 1992 The Regents of the University of California.
2# Copyright (c) 1994-1996 Sun Microsystems, Inc.
3# See the file "license.terms" for information on usage and redistribution
4# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
5#
6#
7
8=head1 NAME
9
10Tk::Dialog - Create modal dialog and wait for a response.
11
12=for pm Tk/Dialog.pm
13
14=for category Popups and Dialogs
15
16=head1 SYNOPSIS
17
18S< >I<$dialog> = I<$parent>-E<gt>B<Dialog>(I<-option> =E<gt> I<value>, ... );
19
20=head1 DESCRIPTION
21
22This procedure is part of the Tk script library - its arguments describe a
23dialog box.
24After creating a dialog box, B<Dialog> waits for the user to
25select one of the buttons either by clicking on the button with the
26mouse or by typing return to invoke the default button (if any).
27Then it returns the text string of the selected button.
28
29While waiting for the user to respond, B<Dialog> sets a local
30grab. This prevents the user from interacting with the application
31in any way except to invoke the dialog box. See B<Show()> method.
32
33The following option/value pairs are supported:
34
35=over 4
36
37=item B<-title>
38
39Text to appear in the window manager's title bar for the dialog.
40
41=item B<-text>
42
43Message to appear in the top portion of the dialog box.
44
45=item B<-bitmap>
46
47If non-empty, specifies a bitmap to display in the top portion of
48the dialog, to the left of the text.
49If this is an empty string then no bitmap is displayed in the dialog.
50
51=item B<-default_button>
52
53Text label string of the button that displays the default ring.
54
55=item B<-buttons>
56
57A reference to a list of button label strings.
58Each I<string> specifies text to display in a button,
59in order from left to right.
60
61=back
62
63=head1 METHODS
64
65=over 4
66
67=item C<$answer = $dialog-E<gt>B<Show>(?-global?);>
68
69This method displays the dialog, waits for the user's response, and stores
70the text string of the selected button in C<$answer>. If I<-global> is
71specified a global (rather than local) grab is performed.
72
73=back
74
75=head1 EXAMPLE
76
77I<$dialog> = I<$mw>-E<gt>B<Dialog>(-text =E<gt> 'Save File?', -bitmap =E<gt> 'question', -title =E<gt> 'Save File Dialog', -default_button =E<gt> 'Yes', -buttons =E<gt> [qw/Yes No Cancel/);
78
79=head1 KEYWORDS
80
81bitmap, dialog, modal, messageBox
82
83=cut
84