1Gtk2::InfoBar(3)      User Contributed Perl Documentation     Gtk2::InfoBar(3)
2
3
4

NAME

6       Gtk2::InfoBar - wrapper for GtkInfoBar
7

HIERARCHY

9         Glib::Object
10         +----Glib::InitiallyUnowned
11              +----Gtk2::Object
12                   +----Gtk2::Widget
13                        +----Gtk2::Container
14                             +----Gtk2::Box
15                                  +----Gtk2::HBox
16                                       +----Gtk2::InfoBar
17

INTERFACES

19         Glib::Object::_Unregistered::AtkImplementorIface
20         Gtk2::Buildable
21         Gtk2::Orientable
22

METHODS

24   $widget = Gtk2::InfoBar->new;
25   $widget = Gtk2::InfoBar->new (...)
26       ·   ... (list) of button-text => response-id pairs.
27
28       The multi-argument form takes the same list of text => response-id
29       pairs as "$infobar->add_buttons".  Do not pack widgets directly into
30       the infobar; add them to "$infobar->get_content_area ()".
31
32       Here's a simple example:
33
34        $infobar = Gtk2::InfoBar->new ('gtk-ok'     => 'accept',
35                                       'gtk-cancel' => 'reject');
36
37   $widget = Gtk2::InfoBar->new_with_buttons (...)
38       ·   ... (list) of button-text => response-id pairs.
39
40       Alias for the multi-argument version of "Gtk2::InfoBar->new".
41
42   widget = $info_bar->get_action_area
43   $info_bar->add_action_widget ($child, $response_id)
44       ·   $child (Gtk2::Widget)
45
46       ·   $response_id (Gtk2::ResponseType)
47
48   widget = $info_bar->add_button ($button_text, $response_id)
49       ·   $button_text (string)
50
51       ·   $response_id (scalar)
52
53   $info_bar->add_buttons (...)
54       ·   ... (list) of button-text => response-id pairs
55
56       Like calling "$infobar->add_button" repeatedly, except you don't get
57       the created widgets back.  The buttons go from left to right, so the
58       first button added will be the left-most one.
59
60   widget = $info_bar->get_content_area
61   $info_bar->set_default_response ($response_id)
62       ·   $response_id (Gtk2::ResponseType)
63
64   messagetype = $info_bar->get_message_type
65   $info_bar->set_message_type ($type)
66       ·   $type (Gtk2::MessageType)
67
68   $info_bar->response ($response_id)
69       ·   $response_id (Gtk2::ResponseType)
70
71   $info_bar->set_response_sensitive ($response_id, $setting)
72       ·   $response_id (Gtk2::ResponseType)
73
74       ·   $setting (boolean)
75
76       Enable or disable an action button by its $response_id.
77

PROPERTIES

79       'message-type' (Gtk2::MessageType : default "info" : readable /
80       writable / construct / private / static-nick / static-blurb)
81           The type of message
82

STYLE PROPERTIES

84       'action-area-border' (integer : default 5 : readable / private /
85       static-nick / static-blurb)
86           Width of border around the action area
87
88       'button-spacing' (integer : default 6 : readable / private / static-
89       nick / static-blurb)
90           Spacing between buttons
91
92       'content-area-border' (integer : default 8 : readable / private /
93       static-nick / static-blurb)
94           Width of border around the content area
95
96       'content-area-spacing' (integer : default 16 : readable / private /
97       static-nick / static-blurb)
98           Spacing between elements of the area
99

SIGNALS

101       close (Gtk2::InfoBar)
102       response (Gtk2::InfoBar, integer)
103
104       Note that currently in a Perl subclass of "Gtk2::InfoBar" a class
105       closure, ie. class default signal handler, for the "response" signal
106       will be called with the response ID just as an integer, it's not turned
107       into an enum string like "ok" the way a handler setup with
108       "signal_connect" receives.
109
110       Hopefully this will change in the future, so don't count on it.  In the
111       interim the easiest thing to do is install your default handler in
112       "INIT_INSTANCE" with a "signal_connect".  (The subtleties of what order
113       handlers are called in will differ, but often that doesn't matter.)
114

ENUMS AND FLAGS

116   enum Gtk2::MessageType
117       ·   'info' / 'GTK_MESSAGE_INFO'
118
119       ·   'warning' / 'GTK_MESSAGE_WARNING'
120
121       ·   'question' / 'GTK_MESSAGE_QUESTION'
122
123       ·   'error' / 'GTK_MESSAGE_ERROR'
124
125       ·   'other' / 'GTK_MESSAGE_OTHER'
126
127   enum Gtk2::ResponseType
128       The response type is somewhat abnormal as far as gtk2-perl enums go.
129       In C, this enum lists named, predefined integer values for a field that
130       is other composed of whatever integer values you like.  In Perl, we
131       allow this to be either one of the string constants listed here or any
132       positive integer value.  For example, 'ok', 'cancel', 4, and 42 are all
133       valid response ids.  You cannot use arbitrary string values, they must
134       be integers.  Be careful, because unknown string values tend to be
135       mapped to 0.
136
137       ·   'none' / 'GTK_RESPONSE_NONE'
138
139       ·   'reject' / 'GTK_RESPONSE_REJECT'
140
141       ·   'accept' / 'GTK_RESPONSE_ACCEPT'
142
143       ·   'delete-event' / 'GTK_RESPONSE_DELETE_EVENT'
144
145       ·   'ok' / 'GTK_RESPONSE_OK'
146
147       ·   'cancel' / 'GTK_RESPONSE_CANCEL'
148
149       ·   'close' / 'GTK_RESPONSE_CLOSE'
150
151       ·   'yes' / 'GTK_RESPONSE_YES'
152
153       ·   'no' / 'GTK_RESPONSE_NO'
154
155       ·   'apply' / 'GTK_RESPONSE_APPLY'
156
157       ·   'help' / 'GTK_RESPONSE_HELP'
158

SEE ALSO

160       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
161       Gtk2::Container, Gtk2::Box, Gtk2::HBox
162
164       Copyright (C) 2003-2011 by the gtk2-perl team.
165
166       This software is licensed under the LGPL.  See Gtk2 for a full notice.
167
168
169
170perl v5.32.0                      2020-07-28                  Gtk2::InfoBar(3)
Impressum