.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Gtk2::MessageDialog 3pm" .TH Gtk2::MessageDialog 3pm "2019-09-16" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Gtk2::MessageDialog \- wrapper for GtkMessageDialog .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 10 \& # \& # A modal dialog. Note that the message is a printf\-style format. \& # \& $dialog = Gtk2::MessageDialog\->new ($main_application_window, \& \*(Aqdestroy\-with\-parent\*(Aq, \& \*(Aqquestion\*(Aq, # message type \& \*(Aqyes\-no\*(Aq, # which set of buttons? \& "Pay me $%.2f?", $amount); \& $response = $dialog\->run; \& if ($response eq \*(Aqyes\*(Aq) { \& send_bill (); \& } \& $dialog\->destroy; \& \& # \& # A non\-modal dialog. \& # \& $dialog = Gtk2::MessageDialog\->new ($main_application_window, \& \*(Aqdestroy\-with\-parent\*(Aq, \& \*(Aqquestion\*(Aq, # message type \& \*(Aqok\-cancel\*(Aq, # which set of buttons? \& "Self\-destruct now?"); \& # react whenever the user responds. \& $dialog\->signal_connect (response => sub { \& my ($self, $response) = @_; \& if ($response eq \*(Aqok\*(Aq) { \& do_the_thing (); \& } \& $self\->destroy; \& }); \& $dialog\->show_all; .Ve .SH "DESCRIPTION" .IX Header "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. .PP The easiest way to do a modal message dialog is to use \f(CW\*(C`$dialog\->run\*(C'\fR, which automatically makes your dialog modal and waits for the user to respond to it. You can also pass in the \s-1GTK_DIALOG_MODAL\s0 flag when creating the MessageDialog. .SH "HIERARCHY" .IX Header "HIERARCHY" .Vb 9 \& Glib::Object \& +\-\-\-\-Glib::InitiallyUnowned \& +\-\-\-\-Gtk2::Object \& +\-\-\-\-Gtk2::Widget \& +\-\-\-\-Gtk2::Container \& +\-\-\-\-Gtk2::Bin \& +\-\-\-\-Gtk2::Window \& +\-\-\-\-Gtk2::Dialog \& +\-\-\-\-Gtk2::MessageDialog .Ve .SH "INTERFACES" .IX Header "INTERFACES" .Vb 2 \& Glib::Object::_Unregistered::AtkImplementorIface \& Gtk2::Buildable .Ve .SH "METHODS" .IX Header "METHODS" .ie n .SS "widget = Gtk2::MessageDialog\->\fBnew\fP ($parent, $flags, $type, $buttons, $format, ...)" .el .SS "widget = Gtk2::MessageDialog\->\fBnew\fP ($parent, \f(CW$flags\fP, \f(CW$type\fP, \f(CW$buttons\fP, \f(CW$format\fP, ...)" .IX Subsection "widget = Gtk2::MessageDialog->new ($parent, $flags, $type, $buttons, $format, ...)" .IP "\(bu" 4 \&\f(CW$parent\fR (Gtk2::Window or undef) .IP "\(bu" 4 \&\f(CW$flags\fR (Gtk2::DialogFlags) .IP "\(bu" 4 \&\f(CW$type\fR (Gtk2::MessageType) .IP "\(bu" 4 \&\f(CW$buttons\fR (Gtk2::ButtonsType) .IP "\(bu" 4 \&\f(CW$format\fR (scalar) .IP "\(bu" 4 \&... (list) .ie n .SS "widget = Gtk2::MessageDialog\->\fBnew_with_markup\fP ($parent, $flags, $type, $buttons, $message)" .el .SS "widget = Gtk2::MessageDialog\->\fBnew_with_markup\fP ($parent, \f(CW$flags\fP, \f(CW$type\fP, \f(CW$buttons\fP, \f(CW$message\fP)" .IX Subsection "widget = Gtk2::MessageDialog->new_with_markup ($parent, $flags, $type, $buttons, $message)" .IP "\(bu" 4 \&\f(CW$parent\fR (Gtk2::Window or undef) .IP "\(bu" 4 \&\f(CW$flags\fR (Gtk2::DialogFlags) .IP "\(bu" 4 \&\f(CW$type\fR (Gtk2::MessageType) .IP "\(bu" 4 \&\f(CW$buttons\fR (Gtk2::ButtonsType) .IP "\(bu" 4 \&\f(CW$message\fR (string or undef) a string containing Pango markup .PP Like \f(CW\*(C`new\*(C'\fR, but allowing Pango markup tags in the message. Note that this version is not variadic. .PP Since: gtk+ 2.4 .ie n .SS "$message_dialog\->\fBformat_secondary_markup\fP ($message_format, ...)" .el .SS "\f(CW$message_dialog\fP\->\fBformat_secondary_markup\fP ($message_format, ...)" .IX Subsection "$message_dialog->format_secondary_markup ($message_format, ...)" .IP "\(bu" 4 \&\f(CW$message_format\fR (scalar) .IP "\(bu" 4 \&... (list) .PP Since: gtk+ 2.6 .ie n .SS "$message_dialog\->\fBformat_secondary_text\fP ($message_format, ...)" .el .SS "\f(CW$message_dialog\fP\->\fBformat_secondary_text\fP ($message_format, ...)" .IX Subsection "$message_dialog->format_secondary_text ($message_format, ...)" .IP "\(bu" 4 \&\f(CW$message_format\fR (scalar) .IP "\(bu" 4 \&... (list) .PP Since: gtk+ 2.6 .ie n .SS "widget = $dialog\->\fBget_image\fP" .el .SS "widget = \f(CW$dialog\fP\->\fBget_image\fP" .IX Subsection "widget = $dialog->get_image" Since: gtk+ 2.14 .ie n .SS "$dialog\->\fBset_image\fP ($image)" .el .SS "\f(CW$dialog\fP\->\fBset_image\fP ($image)" .IX Subsection "$dialog->set_image ($image)" .IP "\(bu" 4 \&\f(CW$image\fR (Gtk2::Widget) .PP Since: gtk+ 2.10 .ie n .SS "$message_dialog\->\fBset_markup\fP ($str)" .el .SS "\f(CW$message_dialog\fP\->\fBset_markup\fP ($str)" .IX Subsection "$message_dialog->set_markup ($str)" .IP "\(bu" 4 \&\f(CW$str\fR (string) .PP Since: gtk+ 2.4 .ie n .SS "widget = $message_dialog\->\fBget_message_area\fP" .el .SS "widget = \f(CW$message_dialog\fP\->\fBget_message_area\fP" .IX Subsection "widget = $message_dialog->get_message_area" Since: gtk+ 2.22 .SH "PROPERTIES" .IX Header "PROPERTIES" .ie n .IP "'buttons' (Gtk2::ButtonsType : default ""none"" : writable / construct-only / private)" 4 .el .IP "'buttons' (Gtk2::ButtonsType : default ``none'' : writable / construct-only / private)" 4 .IX Item "'buttons' (Gtk2::ButtonsType : default none : writable / construct-only / private)" The buttons shown in the message dialog .IP "'image' (Gtk2::Widget : default undef : readable / writable / private)" 4 .IX Item "'image' (Gtk2::Widget : default undef : readable / writable / private)" The image .IP "'message\-area' (Gtk2::Widget : default undef : readable / private)" 4 .IX Item "'message-area' (Gtk2::Widget : default undef : readable / private)" GtkVBox that holds the dialog's primary and secondary labels .ie n .IP "'message\-type' (Gtk2::MessageType : default ""info"" : readable / writable / construct / private)" 4 .el .IP "'message\-type' (Gtk2::MessageType : default ``info'' : readable / writable / construct / private)" 4 .IX Item "'message-type' (Gtk2::MessageType : default info : readable / writable / construct / private)" The type of message .IP "'secondary\-text' (string : default undef : readable / writable / private)" 4 .IX Item "'secondary-text' (string : default undef : readable / writable / private)" The secondary text of the message dialog .IP "'secondary\-use\-markup' (boolean : default false : readable / writable / private)" 4 .IX Item "'secondary-use-markup' (boolean : default false : readable / writable / private)" The secondary text includes Pango markup. .ie n .IP "'text' (string : default """" : readable / writable / private)" 4 .el .IP "'text' (string : default ``'' : readable / writable / private)" 4 .IX Item "'text' (string : default """" : readable / writable / private)" The primary text of the message dialog .IP "'use\-markup' (boolean : default false : readable / writable / private)" 4 .IX Item "'use-markup' (boolean : default false : readable / writable / private)" The primary text of the title includes Pango markup. .SH "STYLE PROPERTIES" .IX Header "STYLE PROPERTIES" .IP "'message\-border' (integer : default 12 : readable / private)" 4 .IX Item "'message-border' (integer : default 12 : readable / private)" Width of border around the label and image in the message dialog .IP "'use\-separator' (boolean : default false : readable / private)" 4 .IX Item "'use-separator' (boolean : default false : readable / private)" Whether to put a separator between the message dialog's text and the buttons .SH "ENUMS AND FLAGS" .IX Header "ENUMS AND FLAGS" .SS "enum Gtk2::ButtonsType" .IX Subsection "enum Gtk2::ButtonsType" .IP "\(bu" 4 \&'none' / '\s-1GTK_BUTTONS_NONE\s0' .IP "\(bu" 4 \&'ok' / '\s-1GTK_BUTTONS_OK\s0' .IP "\(bu" 4 \&'close' / '\s-1GTK_BUTTONS_CLOSE\s0' .IP "\(bu" 4 \&'cancel' / '\s-1GTK_BUTTONS_CANCEL\s0' .IP "\(bu" 4 \&'yes\-no' / '\s-1GTK_BUTTONS_YES_NO\s0' .IP "\(bu" 4 \&'ok\-cancel' / '\s-1GTK_BUTTONS_OK_CANCEL\s0' .SS "flags Gtk2::DialogFlags" .IX Subsection "flags Gtk2::DialogFlags" .IP "\(bu" 4 \&'modal' / '\s-1GTK_DIALOG_MODAL\s0' .IP "\(bu" 4 \&'destroy\-with\-parent' / '\s-1GTK_DIALOG_DESTROY_WITH_PARENT\s0' .IP "\(bu" 4 \&'no\-separator' / '\s-1GTK_DIALOG_NO_SEPARATOR\s0' .SS "enum Gtk2::MessageType" .IX Subsection "enum Gtk2::MessageType" .IP "\(bu" 4 \&'info' / '\s-1GTK_MESSAGE_INFO\s0' .IP "\(bu" 4 \&'warning' / '\s-1GTK_MESSAGE_WARNING\s0' .IP "\(bu" 4 \&'question' / '\s-1GTK_MESSAGE_QUESTION\s0' .IP "\(bu" 4 \&'error' / '\s-1GTK_MESSAGE_ERROR\s0' .IP "\(bu" 4 \&'other' / '\s-1GTK_MESSAGE_OTHER\s0' .SH "SEE ALSO" .IX Header "SEE ALSO" Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::Window, Gtk2::Dialog .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2003\-2011 by the gtk2\-perl team. .PP This software is licensed under the \s-1LGPL.\s0 See Gtk2 for a full notice.