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)
81           The type of message
82

STYLE PROPERTIES

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

SIGNALS

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

ENUMS AND FLAGS

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

SEE ALSO

156       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
157       Gtk2::Container, Gtk2::Box, Gtk2::HBox
158
160       Copyright (C) 2003-2011 by the gtk2-perl team.
161
162       This software is licensed under the LGPL.  See Gtk2 for a full notice.
163
164
165
166perl v5.30.1                      2020-01-30                  Gtk2::InfoBar(3)
Impressum