gi-adwaita-1.0.3: Adwaita bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Adw.Objects.MessageDialog

Description

A dialog presenting a message or a question.

<picture> <source srcset="message-dialog-dark.png" media="(prefers-color-scheme: dark)"> <img src="message-dialog.png" alt="message-dialog"> </picture>

Message dialogs have a heading, a body, an optional child widget, and one or multiple responses, each presented as a button.

Each response has a unique string ID, and a button label. Additionally, each response can be enabled or disabled, and can have a suggested or destructive appearance.

When one of the responses is activated, or the dialog is closed, the signalmessageDialog[response] signal will be emitted. This signal is detailed, and the detail, as well as the response parameter will be set to the ID of the activated response, or to the value of the [propertymessageDialog:close-response] property if the dialog had been closed without activating any of the responses.

Response buttons can be presented horizontally or vertically depending on available space.

When a response is activated, AdwMessageDialog is closed automatically.

An example of using a message dialog:

c code

GtkWidget *dialog;

dialog = adw_message_dialog_new (parent, _("Replace File?"), NULL);

adw_message_dialog_format_body (ADW_MESSAGE_DIALOG (dialog),
                                _("A file named “%s” already exists. Do you want to replace it?"),
                                filename);

adw_message_dialog_add_responses (ADW_MESSAGE_DIALOG (dialog),
                                  "cancel",  _("_Cancel"),
                                  "replace", _("_Replace"),
                                  NULL);

adw_message_dialog_set_response_appearance (ADW_MESSAGE_DIALOG (dialog), "replace", ADW_RESPONSE_DESTRUCTIVE);

adw_message_dialog_set_default_response (ADW_MESSAGE_DIALOG (dialog), "cancel");
adw_message_dialog_set_close_response (ADW_MESSAGE_DIALOG (dialog), "cancel");

g_signal_connect (dialog, "response", G_CALLBACK (response_cb), self);

gtk_window_present (GTK_WINDOW (dialog));

AdwMessageDialog as GtkBuildable

AdwMessageDialog supports adding responses in UI definitions by via the <responses> element that may contain multiple <response> elements, each respresenting a response.

Each of the <response> elements must have the id attribute specifying the response ID. The contents of the element are used as the response label.

Response labels can be translated with the usual translatable, context and comments attributes.

The <response> elements can also have enabled and/or appearance attributes. See [methodmessageDialog.set_response_enabled] and [methodmessageDialog.set_response_appearance] for details.

Example of an AdwMessageDialog UI definition:

xml code

<object class="AdwMessageDialog" id="dialog">
  <property name="heading" translatable="yes">Save Changes?</property>
  <property name="body" translatable="yes">Open documents contain unsaved changes. Changes which are not saved will be permanently lost.</property>
  <property name="default-response">save</property>
  <property name="close-response">cancel</property>
  <signal name="response" handler="response_cb"/>
  <responses>
    <response id="cancel" translatable="yes">_Cancel</response>
    <response id="discard" translatable="yes" appearance="destructive">_Discard</response>
    <response id="save" translatable="yes" appearance="suggested" enabled="false">_Save</response>
  </responses>
</object>

Accessibility

AdwMessageDialog uses the GTK_ACCESSIBLE_ROLE_DIALOG role.

Since: 1.2

Synopsis

Exported types

newtype MessageDialog Source #

Memory-managed wrapper type.

Constructors

MessageDialog (ManagedPtr MessageDialog) 

Instances

Instances details
Eq MessageDialog Source # 
Instance details

Defined in GI.Adw.Objects.MessageDialog

GObject MessageDialog Source # 
Instance details

Defined in GI.Adw.Objects.MessageDialog

ManagedPtrNewtype MessageDialog Source # 
Instance details

Defined in GI.Adw.Objects.MessageDialog

Methods

toManagedPtr :: MessageDialog -> ManagedPtr MessageDialog

TypedObject MessageDialog Source # 
Instance details

Defined in GI.Adw.Objects.MessageDialog

Methods

glibType :: IO GType

HasParentTypes MessageDialog Source # 
Instance details

Defined in GI.Adw.Objects.MessageDialog

IsGValue (Maybe MessageDialog) Source #

Convert MessageDialog to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Adw.Objects.MessageDialog

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe MessageDialog -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe MessageDialog)

type ParentTypes MessageDialog Source # 
Instance details

Defined in GI.Adw.Objects.MessageDialog

type ParentTypes MessageDialog = '[Window, Widget, Object, Accessible, Buildable, ConstraintTarget, Native, Root, ShortcutManager]

class (GObject o, IsDescendantOf MessageDialog o) => IsMessageDialog o Source #

Type class for types which can be safely cast to MessageDialog, for instance with toMessageDialog.

Instances

Instances details
(GObject o, IsDescendantOf MessageDialog o) => IsMessageDialog o Source # 
Instance details

Defined in GI.Adw.Objects.MessageDialog

toMessageDialog :: (MonadIO m, IsMessageDialog o) => o -> m MessageDialog Source #

Cast to MessageDialog, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addResponse, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, close, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, destroy, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, fullscreen, fullscreenOnMonitor, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasGroup, hasResponse, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isActive, isAncestor, isDrawable, isFloating, isFocus, isFullscreen, isMaximized, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, maximize, measure, minimize, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, present, presentWithTime, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, response, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unfullscreen, unmap, unmaximize, unminimize, unparent, unrealize, unref, unsetStateFlags, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getApplication, getBody, getBodyUseMarkup, getBuildableId, getCanFocus, getCanTarget, getChild, getChildVisible, getClipboard, getCloseResponse, getCssClasses, getCssName, getCursor, getData, getDecorated, getDefaultResponse, getDefaultSize, getDefaultWidget, getDeletable, getDestroyWithParent, getDirection, getDisplay, getExtraChild, getFirstChild, getFocus, getFocusChild, getFocusOnClick, getFocusVisible, getFocusable, getFontMap, getFontOptions, getFrameClock, getGroup, getHalign, getHandleMenubarAccel, getHasTooltip, getHeading, getHeadingUseMarkup, getHeight, getHexpand, getHexpandSet, getHideOnClose, getIconName, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMnemonicsVisible, getModal, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRenderer, getRequestMode, getResizable, getResponseAppearance, getResponseEnabled, getResponseLabel, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getSurface, getSurfaceTransform, getTemplateChild, getTitle, getTitlebar, getTooltipMarkup, getTooltipText, getTransientFor, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

Setters

setApplication, setBody, setBodyUseMarkup, setCanFocus, setCanTarget, setChild, setChildVisible, setCloseResponse, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDecorated, setDefaultResponse, setDefaultSize, setDefaultWidget, setDeletable, setDestroyWithParent, setDirection, setDisplay, setExtraChild, setFocus, setFocusChild, setFocusOnClick, setFocusVisible, setFocusable, setFontMap, setFontOptions, setHalign, setHandleMenubarAccel, setHasTooltip, setHeading, setHeadingUseMarkup, setHexpand, setHexpandSet, setHideOnClose, setIconName, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMnemonicsVisible, setModal, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setResizable, setResponseAppearance, setResponseEnabled, setResponseLabel, setSensitive, setSizeRequest, setStartupId, setStateFlags, setTitle, setTitlebar, setTooltipMarkup, setTooltipText, setTransientFor, setValign, setVexpand, setVexpandSet, setVisible.

addResponse

messageDialogAddResponse Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Text

id: the response ID

-> Text

label: the response label

-> m () 

Adds a response with id and label to self.

Responses are represented as buttons in the dialog.

Response ID must be unique. It will be used in signalmessageDialog[response] to tell which response had been activated, as well as to inspect and modify the response later.

An embedded underline in label indicates a mnemonic.

methodmessageDialog.set_response_label
can be used to change the response label after it had been added.
methodmessageDialog.set_response_enabled
and
methodmessageDialog.set_response_appearance
can be used to customize the responses further.

Since: 1.2

getBody

messageDialogGetBody Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> m Text

Returns: the body of self.

Gets the body text of self.

Since: 1.2

getBodyUseMarkup

messageDialogGetBodyUseMarkup Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> m Bool

Returns: whether self uses markup for body text

Gets whether the body text of self includes Pango markup.

Since: 1.2

getCloseResponse

messageDialogGetCloseResponse Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> m Text

Returns: the close response ID

Gets the ID of the close response of self.

Since: 1.2

getDefaultResponse

messageDialogGetDefaultResponse Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> m (Maybe Text)

Returns: the default response ID

Gets the ID of the default response of self.

Since: 1.2

getExtraChild

messageDialogGetExtraChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> m (Maybe Widget)

Returns: the child widget of self.

Gets the child widget of self.

Since: 1.2

getHeading

messageDialogGetHeading Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> m (Maybe Text)

Returns: the heading of self.

Gets the heading of self.

Since: 1.2

getHeadingUseMarkup

messageDialogGetHeadingUseMarkup Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> m Bool

Returns: whether self uses markup for heading

Gets whether the heading of self includes Pango markup.

Since: 1.2

getResponseAppearance

messageDialogGetResponseAppearance Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Text

response: a response ID

-> m ResponseAppearance

Returns: the appearance of response

Gets the appearance of response.

See [methodmessageDialog.set_response_appearance].

Since: 1.2

getResponseEnabled

messageDialogGetResponseEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Text

response: a response ID

-> m Bool

Returns: whether response is enabled

Gets whether response is enabled.

See [methodmessageDialog.set_response_enabled].

Since: 1.2

getResponseLabel

messageDialogGetResponseLabel Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Text

response: a response ID

-> m Text

Returns: the label of response

Gets the label of response.

See [methodmessageDialog.set_response_label].

Since: 1.2

hasResponse

messageDialogHasResponse Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Text

response: response ID

-> m Bool

Returns: whether self has a response with the ID response.

Gets whether self has a response with the ID response.

Since: 1.2

new

messageDialogNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) 
=> Maybe a

parent: transient parent

-> Maybe Text

heading: the heading

-> Maybe Text

body: the body text

-> m MessageDialog

Returns: the newly created AdwMessageDialog

Creates a new AdwMessageDialog.

heading and body can be set to NULL. This can be useful if they need to be formatted or use markup. In that case, set them to NULL and call [methodmessageDialog.format_body] or similar methods afterwards:

c code

GtkWidget *dialog;

dialog = adw_message_dialog_new (parent, _("Replace File?"), NULL);
adw_message_dialog_format_body (ADW_MESSAGE_DIALOG (dialog),
                                _("A file named “%s” already exists.  Do you want to replace it?"),
                                filename);

Since: 1.2

response

messageDialogResponse Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Text

response: response ID

-> m () 

Emits the signalmessageDialog[response] signal with the given response ID.

Used to indicate that the user has responded to the dialog in some way.

Since: 1.2

setBody

messageDialogSetBody Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Text

body: the body of self

-> m () 

Sets the body text of self.

Since: 1.2

setBodyUseMarkup

messageDialogSetBodyUseMarkup Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Bool

useMarkup: whether to use markup for body text

-> m () 

Sets whether the body text of self includes Pango markup.

See parseMarkup.

Since: 1.2

setCloseResponse

messageDialogSetCloseResponse Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Text

response: the close response ID

-> m () 

Sets the ID of the close response of self.

It will be passed to signalmessageDialog[response] if the window is closed by pressing <kbd>Escape</kbd> or with a system action.

It doesn't have to correspond to any of the responses in the dialog.

The default close response is close.

Since: 1.2

setDefaultResponse

messageDialogSetDefaultResponse Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Maybe Text

response: the default response ID

-> m () 

Sets the ID of the default response of self.

If set, pressing <kbd>Enter</kbd> will activate the corresponding button.

If set to NULL or to a non-existent response ID, pressing <kbd>Enter</kbd> will do nothing.

Since: 1.2

setExtraChild

messageDialogSetExtraChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a, IsWidget b) 
=> a

self: a message dialog

-> Maybe b

child: the child widget

-> m () 

Sets the child widget of self.

The child widget is displayed below the heading and body.

Since: 1.2

setHeading

messageDialogSetHeading Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Maybe Text

heading: the heading of self

-> m () 

Sets the heading of self.

Since: 1.2

setHeadingUseMarkup

messageDialogSetHeadingUseMarkup Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Bool

useMarkup: whether to use markup for heading

-> m () 

Sets whether the heading of self includes Pango markup.

See parseMarkup.

Since: 1.2

setResponseAppearance

messageDialogSetResponseAppearance Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Text

response: a response ID

-> ResponseAppearance

appearance: appearance for response

-> m () 

Sets the appearance for response.

<picture> <source srcset="message-dialog-appearance-dark.png" media="(prefers-color-scheme: dark)"> <img src="message-dialog-appearance.png" alt="message-dialog-appearance"> </picture>

Use ADW_RESPONSE_SUGGESTED to mark important responses such as the affirmative action, like the Save button in the example.

Use ADW_RESPONSE_DESTRUCTIVE to draw attention to the potentially damaging consequences of using response. This appearance acts as a warning to the user. The Discard button in the example is using this appearance.

The default appearance is ADW_RESPONSE_DEFAULT.

Negative responses like Cancel or Close should use the default appearance.

Since: 1.2

setResponseEnabled

messageDialogSetResponseEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Text

response: a response ID

-> Bool

enabled: whether to enable response

-> m () 

Sets whether response is enabled.

If response is not enabled, the corresponding button will have Widget:sensitive set to FALSE and it can't be activated as a default response.

response can still be used as [propertymessageDialog:close-response] while it's not enabled.

Responses are enabled by default.

Since: 1.2

setResponseLabel

messageDialogSetResponseLabel Source #

Arguments

:: (HasCallStack, MonadIO m, IsMessageDialog a) 
=> a

self: a message dialog

-> Text

response: a response ID

-> Text

label: the label of response

-> m () 

Sets the label of response to label.

Labels are displayed on the dialog buttons. An embedded underline in label indicates a mnemonic.

Since: 1.2

Properties

body

The body text of the dialog.

Since: 1.2

constructMessageDialogBody :: (IsMessageDialog o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “body” property. This is rarely needed directly, but it is used by new.

getMessageDialogBody :: (MonadIO m, IsMessageDialog o) => o -> m Text Source #

Get the value of the “body” property. When overloading is enabled, this is equivalent to

get messageDialog #body

setMessageDialogBody :: (MonadIO m, IsMessageDialog o) => o -> Text -> m () Source #

Set the value of the “body” property. When overloading is enabled, this is equivalent to

set messageDialog [ #body := value ]

bodyUseMarkup

Whether the body text includes Pango markup.

See parseMarkup.

Since: 1.2

constructMessageDialogBodyUseMarkup :: (IsMessageDialog o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “body-use-markup” property. This is rarely needed directly, but it is used by new.

getMessageDialogBodyUseMarkup :: (MonadIO m, IsMessageDialog o) => o -> m Bool Source #

Get the value of the “body-use-markup” property. When overloading is enabled, this is equivalent to

get messageDialog #bodyUseMarkup

setMessageDialogBodyUseMarkup :: (MonadIO m, IsMessageDialog o) => o -> Bool -> m () Source #

Set the value of the “body-use-markup” property. When overloading is enabled, this is equivalent to

set messageDialog [ #bodyUseMarkup := value ]

closeResponse

The ID of the close response.

It will be passed to signalmessageDialog[response] if the window is closed by pressing <kbd>Escape</kbd> or with a system action.

It doesn't have to correspond to any of the responses in the dialog.

The default close response is close.

Since: 1.2

constructMessageDialogCloseResponse :: (IsMessageDialog o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “close-response” property. This is rarely needed directly, but it is used by new.

getMessageDialogCloseResponse :: (MonadIO m, IsMessageDialog o) => o -> m Text Source #

Get the value of the “close-response” property. When overloading is enabled, this is equivalent to

get messageDialog #closeResponse

setMessageDialogCloseResponse :: (MonadIO m, IsMessageDialog o) => o -> Text -> m () Source #

Set the value of the “close-response” property. When overloading is enabled, this is equivalent to

set messageDialog [ #closeResponse := value ]

defaultResponse

The response ID of the default response.

If set, pressing <kbd>Enter</kbd> will activate the corresponding button.

If set to NULL or a non-existent response ID, pressing <kbd>Enter</kbd> will do nothing.

Since: 1.2

clearMessageDialogDefaultResponse :: (MonadIO m, IsMessageDialog o) => o -> m () Source #

Set the value of the “default-response” property to Nothing. When overloading is enabled, this is equivalent to

clear #defaultResponse

constructMessageDialogDefaultResponse :: (IsMessageDialog o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “default-response” property. This is rarely needed directly, but it is used by new.

getMessageDialogDefaultResponse :: (MonadIO m, IsMessageDialog o) => o -> m (Maybe Text) Source #

Get the value of the “default-response” property. When overloading is enabled, this is equivalent to

get messageDialog #defaultResponse

setMessageDialogDefaultResponse :: (MonadIO m, IsMessageDialog o) => o -> Text -> m () Source #

Set the value of the “default-response” property. When overloading is enabled, this is equivalent to

set messageDialog [ #defaultResponse := value ]

extraChild

The child widget.

Displayed below the heading and body.

Since: 1.2

clearMessageDialogExtraChild :: (MonadIO m, IsMessageDialog o) => o -> m () Source #

Set the value of the “extra-child” property to Nothing. When overloading is enabled, this is equivalent to

clear #extraChild

constructMessageDialogExtraChild :: (IsMessageDialog o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “extra-child” property. This is rarely needed directly, but it is used by new.

getMessageDialogExtraChild :: (MonadIO m, IsMessageDialog o) => o -> m (Maybe Widget) Source #

Get the value of the “extra-child” property. When overloading is enabled, this is equivalent to

get messageDialog #extraChild

setMessageDialogExtraChild :: (MonadIO m, IsMessageDialog o, IsWidget a) => o -> a -> m () Source #

Set the value of the “extra-child” property. When overloading is enabled, this is equivalent to

set messageDialog [ #extraChild := value ]

heading

The heading of the dialog.

Since: 1.2

clearMessageDialogHeading :: (MonadIO m, IsMessageDialog o) => o -> m () Source #

Set the value of the “heading” property to Nothing. When overloading is enabled, this is equivalent to

clear #heading

constructMessageDialogHeading :: (IsMessageDialog o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “heading” property. This is rarely needed directly, but it is used by new.

getMessageDialogHeading :: (MonadIO m, IsMessageDialog o) => o -> m (Maybe Text) Source #

Get the value of the “heading” property. When overloading is enabled, this is equivalent to

get messageDialog #heading

setMessageDialogHeading :: (MonadIO m, IsMessageDialog o) => o -> Text -> m () Source #

Set the value of the “heading” property. When overloading is enabled, this is equivalent to

set messageDialog [ #heading := value ]

headingUseMarkup

Whether the heading includes Pango markup.

See parseMarkup.

Since: 1.2

constructMessageDialogHeadingUseMarkup :: (IsMessageDialog o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “heading-use-markup” property. This is rarely needed directly, but it is used by new.

getMessageDialogHeadingUseMarkup :: (MonadIO m, IsMessageDialog o) => o -> m Bool Source #

Get the value of the “heading-use-markup” property. When overloading is enabled, this is equivalent to

get messageDialog #headingUseMarkup

setMessageDialogHeadingUseMarkup :: (MonadIO m, IsMessageDialog o) => o -> Bool -> m () Source #

Set the value of the “heading-use-markup” property. When overloading is enabled, this is equivalent to

set messageDialog [ #headingUseMarkup := value ]

Signals

response

type MessageDialogResponseCallback Source #

Arguments

 = Text

response: the response ID

-> IO () 

This signal is emitted when the dialog is closed.

response will be set to the response ID of the button that had been activated.

if the dialog was closed by pressing <kbd>Escape</kbd> or with a system action, response will be set to the value of [propertymessageDialog:close-response].

Since: 1.2

afterMessageDialogResponse :: (IsMessageDialog a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => MessageDialogResponseCallback) -> m SignalHandlerId Source #

Connect a signal handler for the response signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after messageDialog #response callback

This signal admits a optional parameter detail. If it's not Nothing, we will connect to “response::detail” instead.

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onMessageDialogResponse :: (IsMessageDialog a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => MessageDialogResponseCallback) -> m SignalHandlerId Source #

Connect a signal handler for the response signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on messageDialog #response callback

This signal admits a optional parameter detail. If it's not Nothing, we will connect to “response::detail” instead.