gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Display.InfoBar

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Attributes
- Signals

Description

Report important messages to the user

Synopsis

- data InfoBar
- class HBoxClass o => InfoBarClass o
- castToInfoBar :: GObjectClass obj => obj -> InfoBar
- toInfoBar :: InfoBarClass o => o -> InfoBar
- infoBarNew :: IO InfoBar
- infoBarAddActionWidget :: (InfoBarClass self, WidgetClass child) => self -> child -> Int -> IO ()
- infoBarAddButton :: (InfoBarClass self, GlibString string) => self -> string -> Int -> IO Button
- infoBarSetResponseSensitive :: InfoBarClass self => self -> Int -> Bool -> IO ()
- infoBarSetDefaultResponse :: InfoBarClass self => self -> Int -> IO ()
- infoBarEmitResponse :: InfoBarClass self => self -> Int -> IO ()
- infoBarGetActionArea :: InfoBarClass self => self -> IO Widget
- infoBarGetContentArea :: InfoBarClass self => self -> IO Widget
- infoBarMessageType :: InfoBarClass self => Attr self MessageType
- infoBarResponse :: InfoBarClass self => Signal self (Int -> IO ())
- infoBarClose :: InfoBarClass self => Signal self (IO ())

# Detail

`InfoBar` 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 `Dialog`, which has a horizontal action area at the bottom, `InfoBar` has a vertical action area at the side.

The API of `InfoBar` is very similar to `Dialog`, allowing you to add buttons to the action area with `infoBarAddButton`. The sensitivity of action widgets can be controlled with `infoBarSetResponseSensitive`. To add widgets to the main content area of a `InfoBar`, use `infoBarGetContentArea` and add your widgets to the container.

Similar to `MessageDialog`, the contents of a `InfoBar` can by classified as error message, warning, informational message, etc, by using `infoBarSetMessageType`. Gtk+ uses the message type to determine the background color of the message area.

# Class Hierarchy

    | GObject
    | +----Object
    | +----Widget
    | +----Container
    | +----Box
    | +----HBox
    | +----InfoBar

# Types

data InfoBar Source #

#### Instances

Instances details

Eq InfoBar Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: InfoBar -> InfoBar -> Bool Source # (/=) :: InfoBar -> InfoBar -> Bool Source #
Ord InfoBar Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods compare :: InfoBar -> InfoBar -> Ordering Source # (<) :: InfoBar -> InfoBar -> Bool Source # (<=) :: InfoBar -> InfoBar -> Bool Source # (>) :: InfoBar -> InfoBar -> Bool Source # (>=) :: InfoBar -> InfoBar -> Bool Source # max :: InfoBar -> InfoBar -> InfoBar Source # min :: InfoBar -> InfoBar -> InfoBar Source #
GObjectClass InfoBar Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: InfoBar -> GObject Source # unsafeCastGObject :: GObject -> InfoBar Source #
BoxClass InfoBar Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ContainerClass InfoBar Source # |
Instance details Defined in Graphics.UI.Gtk.Types
HBoxClass InfoBar Source # |
Instance details Defined in Graphics.UI.Gtk.Types
InfoBarClass InfoBar Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WidgetClass InfoBar Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class HBoxClass o => InfoBarClass o Source #

#### Instances

Instances details

InfoBarClass InfoBar Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToInfoBar :: GObjectClass obj => obj -> InfoBar Source #

toInfoBar :: InfoBarClass o => o -> InfoBar Source #

# Constructors

infoBarNew :: IO InfoBar Source #

Creates a new `InfoBar` object.

- Available since Gtk+ version 2.18

# Methods

infoBarAddActionWidget Source #

Arguments

:: (InfoBarClass self, WidgetClass child) |
=> self |
-> child | `child` - an activatable widget
-> Int | `responseId` - response ID for `child`
-> IO () |

Add an activatable widget to the action area of a `InfoBar`, connecting a signal handler that will emit the "response" signal on the message area when the widget is activated. The widget is appended to the end of the message areas action area.

- Available since Gtk+ version 2.18

infoBarAddButton Source #

Arguments

:: (InfoBarClass self, GlibString string) |
=> self |
-> string | `buttonText` - text of button, or stock ID
-> Int | `responseId` - response ID for the button
-> IO Button | returns the button widget that was added

Adds a button with the given text (or a stock button, if buttonText is a stock ID) and sets things up so that clicking the button will emit the "response" signal with the given responseId. 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.

- Available since Gtk+ version 2.18

infoBarSetResponseSensitive Source #

Arguments

:: InfoBarClass self |
=> self |
-> Int | `responseId` - a response ID
-> Bool | `setting` - `True` for sensitive
-> IO () |

Calls `widgetSetSensitive` for each widget in the info bars's action area with the given responseId. A convenient way to sensitize/desensitize dialog buttons.

- Available since Gtk+ version 2.18

infoBarSetDefaultResponse Source #

Arguments

:: InfoBarClass self |
=> self |
-> Int | `responseId` - a response ID
-> IO () |

Sets the last widget in the info bar's action area with the given responseId as the default widget for the dialog. Pressing "Enter" normally activates the default widget.

- Available since Gtk+ version 2.18

infoBarEmitResponse Source #

Arguments

:: InfoBarClass self |
=> self |
-> Int | `responseId` - a response ID
-> IO () |

Emits the 'response' signal with the given `responseId`.

- Available since Gtk+ version 2.18

infoBarGetActionArea Source #

Arguments

:: InfoBarClass self |
=> self |
-> IO Widget | returns the action area.

Returns the action area of `infoBar`.

- Available since Gtk+ version 2.18

infoBarGetContentArea Source #

Arguments

:: InfoBarClass self |
=> self |
-> IO Widget | returns the content area.

Returns the content area of `infoBar`.

- Available since Gtk+ version 2.18

# Attributes

infoBarMessageType :: InfoBarClass self => Attr self MessageType Source #

The type of the message.

The type is used to determine the colors to use in the info bar.

If the type is `MessageOther`, no info bar is painted but the colors are still set.

Default value: `MessageInfo`

- Available since Gtk+ version 2.18

# Signals

infoBarResponse :: InfoBarClass self => Signal self (Int -> IO ()) Source #

Emitted when an action widget is clicked or the application programmer calls `dialogResponse`. The `responseId` depends on which action widget was clicked.

- Available since Gtk+ version 2.18

infoBarClose :: InfoBarClass self => Signal self (IO ()) Source #

The `close` signal is a keybinding signal which gets emitted when the user uses a keybinding to dismiss the info bar.

The default binding for this signal is the Escape key.

Since 2.18