gtk-0.13.6: Binding to the Gtk+ graphical user interface library.

Maintainergtk2hs-users@lists.sourceforge.net
Stabilityprovisional
Portabilityportable (depends on GHC)
Safe HaskellNone
LanguageHaskell98

Graphics.UI.Gtk.Display.InfoBar

Contents

Description

Report important messages to the user

Synopsis

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

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