Maintainer | gtk2hs-users@lists.sourceforge.net |
---|---|
Stability | provisional |
Portability | portable (depends on GHC) |
Safe Haskell | None |
Language | Haskell98 |
Report important messages to the user
- 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
Types
class HBoxClass o => InfoBarClass o Source #
castToInfoBar :: GObjectClass obj => obj -> InfoBar Source #
toInfoBar :: InfoBarClass o => o -> InfoBar Source #
Constructors
Methods
infoBarAddActionWidget Source #
:: (InfoBarClass self, WidgetClass child) | |
=> self | |
-> child |
|
-> Int |
|
-> 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
:: (InfoBarClass self, GlibString string) | |
=> self | |
-> string |
|
-> Int |
|
-> 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 #
:: InfoBarClass self | |
=> self | |
-> Int |
|
-> Bool |
|
-> 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 #
:: InfoBarClass self | |
=> self | |
-> Int |
|
-> 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
:: InfoBarClass self | |
=> self | |
-> Int |
|
-> IO () |
Emits the 'response' signal with the given responseId
.
- Available since Gtk+ version 2.18
:: InfoBarClass self | |
=> self | |
-> IO Widget | returns the action area. |
Returns the action area of infoBar
.
- Available since Gtk+ version 2.18
infoBarGetContentArea Source #
:: 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