Add an activatable widget to the action area of a #GtkInfoBar, connecting a signal handler that will emit the #GtkInfoBar::response signal on the message area when the widget is activated. The widget is appended to the end of the message areas action area.
Adds a button with the given text and sets things up so that clicking the button will emit the “response” signal with the given response_id. The button is appended to the end of the info bars's action area. The button widget is returned, but usually you don't need it.
Connect to Close signal.
Connect to Response signal.
Returns the action area of info_bar.
Returns the content area of info_bar.
Returns the message type of the message area.
Returns whether the widget will display a standard close button.
Emits the “response” signal with the given response_id.
Returns this, for use in with statements.
Sets the last widget in the info bar’s action area with the given response_id as the default widget for the dialog. Pressing “Enter” normally activates the default widget.
Sets the message type of the message area.
Calls gtk_widget_set_sensitive (widget, setting) for each widget in the info bars’s action area with the given response_id. A convenient way to sensitize/desensitize dialog buttons.
Sets the GtkInfoBar:revealed property to revealed. This will cause info_bar to show up with a slide-in transition.
If true, a standard close button is shown. When clicked it emits the response gtk.types.ResponseType.Close.
Get messageType property.
Set messageType property.
Get showCloseButton property.
Set showCloseButton property.
Get builder for gtk.info_bar.InfoBar
Returns this, for use in with statements.
Get builder for gtk.box.Box
Gets the value set by gtk.box.Box.setBaselinePosition.
Retrieves the center widget of the box.
Returns whether the box is homogeneous (all children are the same size). See gtk.box.Box.setHomogeneous.
Gets the value set by gtk.box.Box.setSpacing.
Adds child to box, packed with reference to the end of box. The child is packed after (away from end of) any other child packed with reference to the end of box.
Adds child to box, packed with reference to the start of box. The child is packed after any other child packed with reference to the start of box.
Obtains information about how child is packed into box.
Moves child to a new position in the list of box children. The list contains widgets packed #GTK_PACK_START as well as widgets packed #GTK_PACK_END, in the order that these widgets were added to box.
Sets the baseline position of a box. This affects only horizontal boxes with at least one baseline aligned child. If there is more vertical space available than requested, and the baseline is not allocated by the parent then position is used to allocate the baseline wrt the extra space available.
Sets a center widget; that is a child widget that will be centered with respect to the full width of the box, even if the children at either side take up different amounts of space.
Sets the way child is packed into box.
Sets the #GtkBox:homogeneous property of box, controlling whether or not all children of box are given equal space in the box.
Sets the #GtkBox:spacing property of box, which is the number of pixels to place between children of box.
#GtkInfoBar is a widget that can be used to show messages to the user without showing a dialog. It is often temporarily shown at the top or bottom of a document. In contrast to #GtkDialog, which has a action area at the bottom, #GtkInfoBar has an action area at the side.
The API of #GtkInfoBar is very similar to #GtkDialog, allowing you to add buttons to the action area with gtk.info_bar.InfoBar.addButton or gtk.info_bar.InfoBar.newWithButtons. The sensitivity of action widgets can be controlled with gtk.info_bar.InfoBar.setResponseSensitive. To add widgets to the main content area of a #GtkInfoBar, use gtk.info_bar.InfoBar.getContentArea and add your widgets to the container.
Similar to #GtkMessageDialog, the contents of a #GtkInfoBar can by classified as error message, warning, informational message, etc, by using gtk.info_bar.InfoBar.setMessageType. GTK+ may use the message type to determine how the message is displayed.
A simple example for using a #GtkInfoBar:
GtkInfoBar as GtkBuildable
The GtkInfoBar implementation of the GtkBuildable interface exposes the content area and action area as internal children with the names “content_area” and “action_area”.
GtkInfoBar supports a custom <action-widgets> element, which can contain multiple <action-widget> elements. The “response” attribute specifies a numeric response, and the content of the element is the id of widget (which should be a child of the dialogs @action_area).
CSS nodes
GtkInfoBar has a single CSS node with name infobar. The node may get one of the style classes .info, .warning, .error or .question, depending on the message type.