1Gtk2::Ex::Dialogs::MessUasgeer(3C)ontributed Perl DocumeGnttka2t:i:oEnx::Dialogs::Message(3)
2
3
4

NAME

6       Gtk2::Ex::Dialogs::Message - Provides a simple message dialog.
7

SYNOPSIS

9        use Gtk2::Ex::Dialogs::Message ( destroy_with_parent => TRUE,
10                                         modal => TRUE,
11                                         no_separator => FALSE );
12
13        # do some stuff like creating your app's main $window then,
14        # to ensure that all messages use the right parent, set it:
15        $Gtk2::Ex::Dialogs::Message::parent_window = $window;
16
17        # now popup a new dialog ( blocking the main loop if there is one )
18        new_and_run
19         Gtk2::Ex::Dialogs::Message ( title => "Dialog Title",
20                                      text => "This is a simple message" );
21
22        # now popup a somwhat useful dialog that doesn't block any main loop
23        # but on the other side of the coin, if there is no main loop the
24        # dialog will be completely unresponsive.
25        new_show
26         Gtk2::Ex::Dialogs::Message ( title => "Uhm",
27                                      text => "Use when there is a main loop." );
28

DESCRIPTION

30       This module provides a simple dialog api that wraps Gtk2::Dialog
31       objectively.  The objective is a clean and simple message dialog (only
32       an "OK" button).
33

OPTIONS

35       All public methods (and the entire class) support the following
36       options:
37
38       title => STRING
39           The title of the dialog window. Defaults to an empty string.
40
41       text => STRING
42           The text to be displayed. This is the core purpose of the module
43           and is the only mandatory argument.
44
45       icon => /path/to/image || stock-id || Gtk2::Gdk::Pixbuf || Gtk2::Image
46           The dialog-sized image to place to the left of the text. Note:
47           there are five aliased stock-ids which correspond to the five
48           gtk-dialog-* ids, "warning", "question", "info", "error" and
49           "authentication". Defaults to no icon being created at all.
50
51       parent_window => Gtk2::Window
52           Reference to the main application window.
53
54       destroy_with_parent => BOOL
55           When the parent_window is destroyed, what do we do? Defaults to
56           FALSE.
57
58       modal => BOOL
59           Does this message make the parent_window freeze while the message
60           exists.  Defaults to FALSE.
61
62       no_separator => BOOL
63           Draw the horizontal separator between the content area and the
64           button area below. Defaults to FALSE.
65

PUBLIC METHODS

67       OBJECT = new ( OPTIONS | STRING )
68           Create a new Gtk2::Dialog with only an "OK" button, some text and
69           an optional icon to the left of the text. The icon can be any of
70           the following: a stock-id string, a Gtk2::Image, Gtk2::Gdk::Pixbuf
71           or the full path to an image. Return a Gtk2::Ex::Dialogs::Message
72           object. In the special case of being passed only one argument, all
73           options are set to defaults and the one argument is used as the
74           text option.
75
76       new_and_run ( OPTIONS )
77           Supports all the same arguments as new(). This will create a new
78           Gtk2::Ex::Dialogs::Message, show_all(), run() and then destroy the
79           dialog immediately.
80
81       new_and_show ( OPTIONS )
82           Supports all the same arguments as new(). This will create a new
83           Gtk2::Ex::Dialogs::Message, show_all() and process any pending gtk
84           events. This functionality is only of any practical use when there
85           is a Gtk2 main loop running. If there is no main loop running the
86           dialog will be visible but completely unresponsive to the end-user.
87

SEE ALSO

89        Gtk2::Dialog
90        Gtk2::MessageDialog
91        Gtk2::Ex::Dialogs
92        Gtk2::Ex::Dialogs::ChooseDirectory
93        Gtk2::Ex::Dialogs::ChooseFile
94        Gtk2::Ex::Dialogs::ChoosePreviewFile
95        Gtk2::Ex::Dialogs::ErrorMsg
96        Gtk2::Ex::Dialogs::Message
97

BUGS

99       Please report any bugs to the mailing list.
100

MAILING LIST

102        http://opendoorsoftware.com/lists/gtk2-ex-list
103        gtk2-ex-list@opendoorsoftware.com
104

AUTHORS

106        Kevin C. Krinke, <kckrinke@opendoorsoftware.com>
107        James Greenhalgh, <jgreenhalgh@opendoorsoftware.com>
108
110        Gtk2::Ex::Dialogs::Message - Provides a simple message dialog.
111        Copyright (C) 2005 Open Door Software Inc. <ods@opendoorsoftware.com>
112
113        This library is free software; you can redistribute it and/or
114        modify it under the terms of the GNU Lesser General Public
115        License as published by the Free Software Foundation; either
116        version 2.1 of the License, or (at your option) any later version.
117
118        This library is distributed in the hope that it will be useful,
119        but WITHOUT ANY WARRANTY; without even the implied warranty of
120        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
121        Lesser General Public License for more details.
122
123        You should have received a copy of the GNU Lesser General Public
124        License along with this library; if not, write to the Free Software
125        Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
126
127
128
129perl v5.38.0                      2023-07-20     Gtk2::Ex::Dialogs::Message(3)
Impressum