Graphics.UI.Gtk.Display.InfoBar

gtk3-0.14.5: 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 #

Instances

Eq InfoBar # |
Methods (==) :: InfoBar -> InfoBar -> Bool # (/=) :: InfoBar -> InfoBar -> Bool #
Ord InfoBar # |
Methods compare :: InfoBar -> InfoBar -> Ordering # (<) :: InfoBar -> InfoBar -> Bool # (<=) :: InfoBar -> InfoBar -> Bool # (>) :: InfoBar -> InfoBar -> Bool # (>=) :: InfoBar -> InfoBar -> Bool # max :: InfoBar -> InfoBar -> InfoBar # min :: InfoBar -> InfoBar -> InfoBar #
GObjectClass InfoBar # |
Methods toGObject :: InfoBar -> GObject # unsafeCastGObject :: GObject -> InfoBar #
InfoBarClass InfoBar # |
HBoxClass InfoBar # |
BoxClass InfoBar # |
ContainerClass InfoBar # |
WidgetClass InfoBar # |

class HBoxClass o => InfoBarClass o #

Instances

InfoBarClass InfoBar # |

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

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

# Constructors

infoBarNew :: IO InfoBar #

Creates a new `InfoBar` object.

- Available since Gtk+ version 2.18

# Methods

infoBarAddActionWidget #

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 #

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 #

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 #

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 #

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 #

Arguments

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

Returns the action area of `infoBar`.

- Available since Gtk+ version 2.18

infoBarGetContentArea #

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 #

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 ()) #

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 ()) #

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