/usr/share/perl5/Gtk2/MessageDialog.pod is in libgtk2-perl-doc 2:1.223-1build3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | =head1 NAME
Gtk2::MessageDialog - wrapper for GtkMessageDialog
=cut
=for position SYNOPSIS
=head1 SYNOPSIS
#
# A modal dialog. Note that the message is a printf-style format.
#
$dialog = Gtk2::MessageDialog->new ($main_application_window,
'destroy-with-parent',
'question', # message type
'yes-no', # which set of buttons?
"Pay me $%.2f?", $amount);
$response = $dialog->run;
if ($response eq 'yes') {
send_bill ();
}
$dialog->destroy;
#
# A non-modal dialog.
#
$dialog = Gtk2::MessageDialog->new ($main_application_window,
'destroy-with-parent',
'question', # message type
'ok-cancel', # which set of buttons?
"Self-destruct now?");
# react whenever the user responds.
$dialog->signal_connect (response => sub {
my ($self, $response) = @_;
if ($response eq 'ok') {
do_the_thing ();
}
$self->destroy;
});
$dialog->show_all;
=cut
=for position DESCRIPTION
=head1 DESCRIPTION
Gtk2::MessageDialog is a dialog with an image representing the type of message
(Error, Question, etc.) alongside some message text. It's simply a convenience
widget; you could construct the equivalent of Gtk2::MessageDialog from Gtk2::Dialog
without too much effort, but Gtk2::MessageDialog saves typing and helps create a
consistent look and feel for your application.
The easiest way to do a modal message dialog is to use C<< $dialog->run >>, which
automatically makes your dialog modal and waits for the user to respond to it.
You can also pass in the GTK_DIALOG_MODAL flag when creating the MessageDialog.
=cut
=head1 HIERARCHY
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::Container
+----Gtk2::Bin
+----Gtk2::Window
+----Gtk2::Dialog
+----Gtk2::MessageDialog
=cut
=head1 INTERFACES
Glib::Object::_Unregistered::AtkImplementorIface
Gtk2::Buildable
=cut
=head1 METHODS
=head2 widget = Gtk2::MessageDialog-E<gt>B<new> ($parent, $flags, $type, $buttons, $format, ...)
=over
=item * $parent (Gtk2::Window or undef)
=item * $flags (Gtk2::DialogFlags)
=item * $type (Gtk2::MessageType)
=item * $buttons (Gtk2::ButtonsType)
=item * $format (scalar)
=item * ... (list)
=back
=for args format a printf format specifier. may be undef.
=for args ... arguments for I<$format>
Create a new Gtk2::Dialog with a simple message. It will also include an
icon, as determined by I<$type>. If you need buttons not available through
Gtk2::ButtonsType, use 'none' and add buttons with C<< $dialog->add_buttons >>.
=head2 widget = Gtk2::MessageDialog-E<gt>B<new_with_markup> ($parent, $flags, $type, $buttons, $message)
=over
=item * $parent (Gtk2::Window or undef)
=item * $flags (Gtk2::DialogFlags)
=item * $type (Gtk2::MessageType)
=item * $buttons (Gtk2::ButtonsType)
=item * $message (string or undef) a string containing Pango markup
=back
Like C<new>, but allowing Pango markup tags in the message. Note that this
version is not variadic.
Since: gtk+ 2.4
=head2 $message_dialog-E<gt>B<format_secondary_markup> ($message)
=over
=item * $message (string or undef)
=back
Since: gtk+ 2.6
=head2 $message_dialog-E<gt>B<format_secondary_text> ($message_format, ...)
=over
=item * $message_format (scalar)
=item * ... (list)
=back
Since: gtk+ 2.6
=head2 widget = $dialog-E<gt>B<get_image>
Since: gtk+ 2.14
=head2 $dialog-E<gt>B<set_image> ($image)
=over
=item * $image (Gtk2::Widget)
=back
Since: gtk+ 2.10
=head2 $message_dialog-E<gt>B<set_markup> ($str)
=over
=item * $str (string)
=back
Since: gtk+ 2.4
=cut
=head1 PROPERTIES
=over
=item 'buttons' (Gtk2::ButtonsType : default "none" : writable / construct-only / private)
The buttons shown in the message dialog
=item 'image' (Gtk2::Widget : default undef : readable / writable / private)
The image
=item 'message-area' (Gtk2::Widget : default undef : readable / private)
GtkVBox that holds the dialog's primary and secondary labels
=item 'message-type' (Gtk2::MessageType : default "info" : readable / writable / construct / private)
The type of message
=item 'secondary-text' (string : default undef : readable / writable / private)
The secondary text of the message dialog
=item 'secondary-use-markup' (boolean : default false : readable / writable / private)
The secondary text includes Pango markup.
=item 'text' (string : default "" : readable / writable / private)
The primary text of the message dialog
=item 'use-markup' (boolean : default false : readable / writable / private)
The primary text of the title includes Pango markup.
=back
=cut
=head1 ENUMS AND FLAGS
=head2 enum Gtk2::ButtonsType
=over
=item * 'none' / 'GTK_BUTTONS_NONE'
=item * 'ok' / 'GTK_BUTTONS_OK'
=item * 'close' / 'GTK_BUTTONS_CLOSE'
=item * 'cancel' / 'GTK_BUTTONS_CANCEL'
=item * 'yes-no' / 'GTK_BUTTONS_YES_NO'
=item * 'ok-cancel' / 'GTK_BUTTONS_OK_CANCEL'
=back
=head2 flags Gtk2::DialogFlags
=over
=item * 'modal' / 'GTK_DIALOG_MODAL'
=item * 'destroy-with-parent' / 'GTK_DIALOG_DESTROY_WITH_PARENT'
=item * 'no-separator' / 'GTK_DIALOG_NO_SEPARATOR'
=back
=head2 enum Gtk2::MessageType
=over
=item * 'info' / 'GTK_MESSAGE_INFO'
=item * 'warning' / 'GTK_MESSAGE_WARNING'
=item * 'question' / 'GTK_MESSAGE_QUESTION'
=item * 'error' / 'GTK_MESSAGE_ERROR'
=item * 'other' / 'GTK_MESSAGE_OTHER'
=back
=cut
=head1 SEE ALSO
L<Gtk2>, L<Glib::Object>, L<Glib::InitiallyUnowned>, L<Gtk2::Object>, L<Gtk2::Widget>, L<Gtk2::Container>, L<Gtk2::Bin>, L<Gtk2::Window>, L<Gtk2::Dialog>
=cut
=head1 COPYRIGHT
Copyright (C) 2003-2008 by the gtk2-perl team.
This software is licensed under the LGPL. See L<Gtk2> for a full notice.
=cut
|