org.gnome.gtk

## Class InfoBar

- Object
- - org.freedesktop.bindings.Pointer
  - - org.freedesktop.bindings.Proxy
    - - org.gnome.glib.Object
      - - org.gnome.gtk.Widget
        - - org.gnome.gtk.Container
          - - org.gnome.gtk.Box
            - - org.gnome.gtk.HBox
              - - org.gnome.gtk.InfoBar

- All Implemented Interfaces:
    Orientable

      public class InfoBar
      extends HBox

  A `InfoBar` is a widget that can be used to show messages to a user without showing a dialog. You can add buttons and widgets like in a `Dialog`.

  The style of the `InfoBar` can be changed using the `type` of the message to show to the user. It is possible to control the sensitivity of the action widgets by using the `setResponseSensitive()` method.

  Since:
    4.0.16
  Author:
    Guillaume Mazoyer

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `InfoBar.Close` This signal arises when a user uses a keybinding to dismiss the InfoBar.
    `static interface` | `InfoBar.Response` This signal arises when a user activates one of the Widgets laid out in the action area of the InfoBar.

    - ### Nested classes/interfaces inherited from class org.gnome.gtk.Widget

      `Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.QueryTooltip, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InfoBar()` Create a new `InfoBar`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(Widget widget)` Add a Widget to the content area of the InfoBar.
    `void` | `addActionWidget(Widget child, ResponseType response)` Add an activatable widget to the action area of this InfoBar.
    `Button` | `addButton(Stock stock, ResponseType response)` Add a Button whose icon and label are taken from a given Stock.
    `Button` | `addButton(String text, ResponseType response)` Adds an action `Button` with the given text as its label to the end of the InfoBar's action area.
    `void` | `connect(InfoBar.Close handler)` Hook up a `InfoBar.Close` handler.
    `void` | `connect(InfoBar.Response handler)` Hook up a `InfoBar.Response` handler.
    `void` | `response(ResponseType response)` Cause a InfoBar.Response signal with the specified ResponseType to be emitted by this InfoBar.
    `void` | `setDefaultResponse(ResponseType response)` Set the widget with the given response as the default widget of this InfoBar.
    `void` | `setMessageType(MessageType type)` Set the type of the message.
    `void` | `setResponseSensitive(ResponseType response, boolean setting)` Set the sensitivity of the widget associated with the given `response`.

    - ### Methods inherited from class org.gnome.gtk.Box

      `getOrientation, getSpacing, packEnd, packStart, reorderChild, setOrientation, setSpacing`

    - ### Methods inherited from class org.gnome.gtk.Container

      `getChildren, remove, setBorderWidth`

    - ### Methods inherited from class org.gnome.gtk.Widget

      `activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll`

    - ### Methods inherited from class org.freedesktop.bindings.Pointer

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### InfoBar

          public InfoBar()

      Create a new `InfoBar`.
      Since:
        4.0.16

  - ### Method Detail

    - #### add

          public void add(Widget widget)

      Add a Widget to the content area of the InfoBar.
      Overrides:
        `add` in class `Container`
      Since:
        4.0.16

    - #### addActionWidget

          public void addActionWidget(Widget child,
                             ResponseType response)

      Add an activatable widget to the action area of this InfoBar.
      Since:
        4.0.16

    - #### addButton

          public Button addButton(Stock stock,
                         ResponseType response)

      Add a Button whose icon and label are taken from a given Stock. It is, as ever, recommended to use a Stock Button for common actions. See `addButton()`.
      Since:
        4.0.16

    - #### addButton

          public Button addButton(String text,
                         ResponseType response)

      Adds an action `Button` with the given text as its label to the end of the InfoBar's action area. The given ResponseType will be returned back in the InfoBar's `Response` signal when the Button added as a result of this call is clicked.
      Since:
        4.0.16

    - #### connect

          public void connect(InfoBar.Close handler)

      Hook up a `InfoBar.Close` handler.
      Since:
        4.0.16

    - #### connect

          public void connect(InfoBar.Response handler)

      Hook up a `InfoBar.Response` handler.
      Since:
        4.0.16

    - #### response

          public void response(ResponseType response)

      Cause a InfoBar.Response signal with the specified ResponseType to be emitted by this InfoBar.
      Since:
        4.0.16

    - #### setDefaultResponse

          public void setDefaultResponse(ResponseType response)

      Set the widget with the given response as the default widget of this InfoBar. Pressing "Enter" activates the default widget.

      Be careful! The InfoBar must be in a widget hierarchy to use this method.

      Since:
        4.0.16

    - #### setMessageType

          public void setMessageType(MessageType type)

      Set the type of the message. It is used to define what color to use when drawing the message area.
      Since:
        4.0.16

    - #### setResponseSensitive

          public void setResponseSensitive(ResponseType response,
                                  boolean setting)

      Set the sensitivity of the widget associated with the given `response`.
      Since:
        4.0.16