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.Windows.MessageDialog

Contents

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

Description

A convenient message window

Synopsis

- data MessageDialog
- class DialogClass o => MessageDialogClass o
- castToMessageDialog :: GObjectClass obj => obj -> MessageDialog
- gTypeMessageDialog :: GType
- toMessageDialog :: MessageDialogClass o => o -> MessageDialog
- data MessageType
  - = MessageInfo
  - | MessageWarning
  - | MessageQuestion
  - | MessageError
  - | MessageOther
- data ButtonsType
  - = ButtonsNone
  - | ButtonsOk
  - | ButtonsClose
  - | ButtonsCancel
  - | ButtonsYesNo
  - | ButtonsOkCancel
- data DialogFlags
  - = DialogModal
  - | DialogDestroyWithParent
  - | DialogUseHeaderBar
- messageDialogNew :: GlibString string => Maybe Window -> [DialogFlags] -> MessageType -> ButtonsType -> string -> IO MessageDialog
- messageDialogNewWithMarkup :: GlibString string => Maybe Window -> [DialogFlags] -> MessageType -> ButtonsType -> string -> IO MessageDialog
- messageDialogSetMarkup :: (MessageDialogClass self, GlibString string) => self -> string -> IO ()
- messageDialogSetImage :: (MessageDialogClass self, WidgetClass image) => self -> image -> IO ()
- messageDialogSetSecondaryMarkup :: (MessageDialogClass self, GlibString string) => self -> string -> IO ()
- messageDialogSetSecondaryText :: (MessageDialogClass self, GlibString string) => self -> string -> IO ()
- messageDialogMessageType :: MessageDialogClass self => Attr self MessageType
- messageDialogText :: (MessageDialogClass self, GlibString string) => Attr self (Maybe string)
- messageDialogUseMarkup :: MessageDialogClass self => Attr self Bool
- messageDialogSecondaryText :: (MessageDialogClass self, GlibString string) => Attr self (Maybe string)
- messageDialogSecondaryUseMarkup :: MessageDialogClass self => Attr self Bool
- messageDialogImage :: (MessageDialogClass self, WidgetClass widget) => ReadWriteAttr self Widget widget
- messageDialogButtons :: MessageDialogClass self => WriteAttr self ButtonsType
- messageDialogMessageArea :: MessageDialogClass self => ReadAttr self VBox

# Detail

`MessageDialog` presents a dialog with an image representing the type of message (Error, Question, etc.) alongside some message text. It's simply a convenience widget; you could construct the equivalent of `MessageDialog` from `Dialog` without too much effort, but `MessageDialog` saves typing.

The easiest way to do a modal message dialog is to use `dialogRun`, though you can also pass in the `DialogModal` flag, `dialogRun` automatically makes the dialog modal and waits for the user to respond to it. `dialogRun` returns when any dialog button is clicked.

# Class Hierarchy

    | GObject
    | +----Object
    | +----Widget
    | +----Container
    | +----Bin
    | +----Window
    | +----Dialog
    | +----MessageDialog

# Types

data MessageDialog Source #

#### Instances

Instances details

Eq MessageDialog Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: MessageDialog -> MessageDialog -> Bool Source # (/=) :: MessageDialog -> MessageDialog -> Bool Source #
Ord MessageDialog Source # |

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: MessageDialog -> MessageDialog -> Ordering Source #

(<) :: MessageDialog -> MessageDialog -> Bool Source #

(<=) :: MessageDialog -> MessageDialog -> Bool Source #

(>) :: MessageDialog -> MessageDialog -> Bool Source #

(>=) :: MessageDialog -> MessageDialog -> Bool Source #

max :: MessageDialog -> MessageDialog -> MessageDialog Source #

min :: MessageDialog -> MessageDialog -> MessageDialog Source #

GObjectClass MessageDialog Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: MessageDialog -> GObject Source # unsafeCastGObject :: GObject -> MessageDialog Source #
BinClass MessageDialog Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ContainerClass MessageDialog Source # |
Instance details Defined in Graphics.UI.Gtk.Types
DialogClass MessageDialog Source # |
Instance details Defined in Graphics.UI.Gtk.Types
MessageDialogClass MessageDialog Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WidgetClass MessageDialog Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WindowClass MessageDialog Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class DialogClass o => MessageDialogClass o Source #

#### Instances

Instances details

MessageDialogClass MessageDialog Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToMessageDialog :: GObjectClass obj => obj -> MessageDialog Source #

gTypeMessageDialog :: GType Source #

toMessageDialog :: MessageDialogClass o => o -> MessageDialog Source #

data MessageType Source #

Constructors

MessageInfo |
MessageWarning |
MessageQuestion |
MessageError |
MessageOther |

#### Instances

Instances details

Enum MessageType Source # |

Instance details

Defined in Graphics.UI.Gtk.Windows.MessageDialog

Methods

succ :: MessageType -> MessageType Source #

pred :: MessageType -> MessageType Source #

toEnum :: Int -> MessageType Source #

fromEnum :: MessageType -> Int Source #

enumFrom :: MessageType -> [MessageType] Source #

enumFromThen :: MessageType -> MessageType -> [MessageType] Source #

enumFromTo :: MessageType -> MessageType -> [MessageType] Source #

enumFromThenTo :: MessageType -> MessageType -> MessageType -> [MessageType] Source #

Show MessageType Source # |
Instance details Defined in Graphics.UI.Gtk.Windows.MessageDialog Methods showsPrec :: Int -> MessageType -> ShowS Source # show :: MessageType -> String Source # showList :: [MessageType] -> ShowS Source #
Eq MessageType Source # |
Instance details Defined in Graphics.UI.Gtk.Windows.MessageDialog Methods (==) :: MessageType -> MessageType -> Bool Source # (/=) :: MessageType -> MessageType -> Bool Source #

data ButtonsType Source #

Specify what buttons this dialog should show.

- Prebuilt sets of buttons for the dialog. If none of these choices are appropriate, simply use `ButtonsNone` then call `dialogAddButton`.

Constructors

ButtonsNone |
ButtonsOk |
ButtonsClose |
ButtonsCancel |
ButtonsYesNo |
ButtonsOkCancel |

#### Instances

Instances details

Enum ButtonsType Source # |

Instance details

Defined in Graphics.UI.Gtk.Windows.MessageDialog

Methods

succ :: ButtonsType -> ButtonsType Source #

pred :: ButtonsType -> ButtonsType Source #

toEnum :: Int -> ButtonsType Source #

fromEnum :: ButtonsType -> Int Source #

enumFrom :: ButtonsType -> [ButtonsType] Source #

enumFromThen :: ButtonsType -> ButtonsType -> [ButtonsType] Source #

enumFromTo :: ButtonsType -> ButtonsType -> [ButtonsType] Source #

enumFromThenTo :: ButtonsType -> ButtonsType -> ButtonsType -> [ButtonsType] Source #

Show ButtonsType Source # |
Instance details Defined in Graphics.UI.Gtk.Windows.MessageDialog Methods showsPrec :: Int -> ButtonsType -> ShowS Source # show :: ButtonsType -> String Source # showList :: [ButtonsType] -> ShowS Source #
Eq ButtonsType Source # |
Instance details Defined in Graphics.UI.Gtk.Windows.MessageDialog Methods (==) :: ButtonsType -> ButtonsType -> Bool Source # (/=) :: ButtonsType -> ButtonsType -> Bool Source #

data DialogFlags Source #

Flags used to influence dialog construction.

- Marking a dialog as model will call `widgetSetModal` on the dialog window, the `DialogDestroyWithParent` will call `windowSetDestroyWithParent` on the dialog window. Note that in case the dialog is simply destroyed, no response signal is ever emitted. Finally, `DialogNoSeparator` omits the separator between the action area and the dialog content which is preferable for very simple messages, i.e. those that only contain one button.

Constructors

DialogModal |
DialogDestroyWithParent |
DialogUseHeaderBar |

#### Instances

Instances details

Bounded DialogFlags Source # |
Instance details Defined in Graphics.UI.Gtk.Windows.MessageDialog Methods minBound :: DialogFlags Source # maxBound :: DialogFlags Source #
Enum DialogFlags Source # |

Instance details

Defined in Graphics.UI.Gtk.Windows.MessageDialog

Methods

succ :: DialogFlags -> DialogFlags Source #

pred :: DialogFlags -> DialogFlags Source #

toEnum :: Int -> DialogFlags Source #

fromEnum :: DialogFlags -> Int Source #

enumFrom :: DialogFlags -> [DialogFlags] Source #

enumFromThen :: DialogFlags -> DialogFlags -> [DialogFlags] Source #

enumFromTo :: DialogFlags -> DialogFlags -> [DialogFlags] Source #

enumFromThenTo :: DialogFlags -> DialogFlags -> DialogFlags -> [DialogFlags] Source #

Show DialogFlags Source # |
Instance details Defined in Graphics.UI.Gtk.Windows.MessageDialog Methods showsPrec :: Int -> DialogFlags -> ShowS Source # show :: DialogFlags -> String Source # showList :: [DialogFlags] -> ShowS Source #
Eq DialogFlags Source # |
Instance details Defined in Graphics.UI.Gtk.Windows.MessageDialog Methods (==) :: DialogFlags -> DialogFlags -> Bool Source # (/=) :: DialogFlags -> DialogFlags -> Bool Source #
Flags DialogFlags Source # |
Instance details Defined in Graphics.UI.Gtk.Windows.MessageDialog

# Constructors

messageDialogNew Source #

Arguments

:: GlibString string |
=> Maybe Window | Transient parent of the dialog (or none)
-> [DialogFlags] |
-> MessageType |
-> ButtonsType |
-> string | The text of the message
-> IO MessageDialog |

Create a new message dialog, which is a simple dialog with an icon indicating the dialog type (error, warning, etc.) and some text the user may want to see. When the user clicks a button a "response" signal is emitted with response IDs from `ResponseType`. See `Dialog` for more details.

messageDialogNewWithMarkup Source #

Arguments

:: GlibString string |
=> Maybe Window | Transient parent of the dialog (or none)
-> [DialogFlags] |
-> MessageType |
-> ButtonsType |
-> string | The text of the message
-> IO MessageDialog |

Creates a new message dialog, which is a simple dialog with an icon indicating the dialog type (error, warning, etc.) and some text which is marked up with the Pango text markup language. When the user clicks a button a "response" signal is emitted with response IDs from `ResponseType`. See `Dialog` and `PangoMarkup` for more details.

- Available since Gtk+ version 2.4

# Methods

messageDialogSetMarkup Source #

Arguments

:: (MessageDialogClass self, GlibString string) |
=> self |
-> string | `str` - markup string (see Pango markup format)
-> IO () |

Sets the text of the message dialog to be `str`, which is marked up with the Pango text markup language.

- Available since Gtk+ version 2.4

messageDialogSetImage Source #

Arguments

:: (MessageDialogClass self, WidgetClass image) |
=> self |
-> image | `image` - the image
-> IO () |

Sets the dialog's image to `image`.

- Available since Gtk+ version 2.10

messageDialogSetSecondaryMarkup Source #

Arguments

:: (MessageDialogClass self, GlibString string) |
=> self |
-> string | `str` - markup string (see Pango markup format)
-> IO () |

messageDialogSetSecondaryText Source #

Arguments

:: (MessageDialogClass self, GlibString string) |
=> self |
-> string | `str` - text to be shown as second line
-> IO () |

# Attributes

messageDialogMessageType :: MessageDialogClass self => Attr self MessageType Source #

The type of message.

Default value: `MessageInfo`

messageDialogText :: (MessageDialogClass self, GlibString string) => Attr self (Maybe string) Source #

The primary text of the message dialog. If the dialog has a secondary text, this will appear as the title.

Default value: `Nothing`

- Available since Gtk+ version 2.10

messageDialogUseMarkup :: MessageDialogClass self => Attr self Bool Source #

Interpret the string `messageDialogText` as markup.

Default value: `False`

- Available since Gtk+ version 2.10

messageDialogSecondaryText :: (MessageDialogClass self, GlibString string) => Attr self (Maybe string) Source #

The secondary text of the message dialog.

Default value: `Nothing`

- Available since Gtk+ version 2.10

messageDialogSecondaryUseMarkup :: MessageDialogClass self => Attr self Bool Source #

Default value: `False`

- Available since Gtk+ version 2.10

messageDialogImage :: (MessageDialogClass self, WidgetClass widget) => ReadWriteAttr self Widget widget Source #

The image for this dialog.

- Available since Gtk+ version 2.10

messageDialogButtons :: MessageDialogClass self => WriteAttr self ButtonsType Source #

The buttons shown in the message dialog.

Default value: `ButtonsNone`

messageDialogMessageArea :: MessageDialogClass self => ReadAttr self VBox Source #

The `VBox` that corresponds to the message area of this dialog.

- Available since Gtk+ version 2.22