gi-adwaita-1.0.7: 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.AlertDialog

Description

A dialog presenting a message or a question.

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

Alert 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 signalalertDialog[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 [propertyalertDialog: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, AdwAlertDialog is closed automatically.

An example of using an alert dialog:

c code

AdwDialog *dialog;

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

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

adw_alert_dialog_add_responses (ADW_ALERT_DIALOG (dialog),
                                "cancel",  _("_Cancel"),
                                "replace", _("_Replace"),
                                NULL);

adw_alert_dialog_set_response_appearance (ADW_ALERT_DIALOG (dialog),
                                          "replace",
                                          ADW_RESPONSE_DESTRUCTIVE);

adw_alert_dialog_set_default_response (ADW_ALERT_DIALOG (dialog), "cancel");
adw_alert_dialog_set_close_response (ADW_ALERT_DIALOG (dialog), "cancel");

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

adw_dialog_present (dialog, parent);

Async API

AdwAlertDialog can also be used via the [methodalertDialog.choose] method. This API follows the GIO async pattern, and the result can be obtained by calling [methodalertDialog.choose_finish], for example:

c code

static void
dialog_cb (AdwAlertDialog *dialog,
           GAsyncResult   *result,
           MyWindow       *self)
{
  const char *response = adw_alert_dialog_choose_finish (dialog, result);

  // ...
}

static void
show_dialog (MyWindow *self)
{
  AdwDialog *dialog;

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

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

  adw_alert_dialog_add_responses (ADW_ALERT_DIALOG (dialog),
                                  "cancel",  _("_Cancel"),
                                  "replace", _("_Replace"),
                                  NULL);

  adw_alert_dialog_set_response_appearance (ADW_ALERT_DIALOG (dialog),
                                            "replace",
                                            ADW_RESPONSE_DESTRUCTIVE);

  adw_alert_dialog_set_default_response (ADW_ALERT_DIALOG (dialog), "cancel");
  adw_alert_dialog_set_close_response (ADW_ALERT_DIALOG (dialog), "cancel");

  adw_alert_dialog_choose (ADW_ALERT_DIALOG (dialog), GTK_WIDGET (self),
                           NULL, (GAsyncReadyCallback) dialog_cb, self);
}

AdwAlertDialog as GtkBuildable

AdwAlertDialog 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 [methodalertDialog.set_response_enabled] and [methodalertDialog.set_response_appearance] for details.

Example of an AdwAlertDialog UI definition:

xml code

<object class="AdwAlertDialog" 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>

Since: 1.5

Synopsis

Exported types

newtype AlertDialog Source #

Memory-managed wrapper type.

Constructors

AlertDialog (ManagedPtr AlertDialog) 

Instances

Instances details
Eq AlertDialog Source # 
Instance details

Defined in GI.Adw.Objects.AlertDialog

GObject AlertDialog Source # 
Instance details

Defined in GI.Adw.Objects.AlertDialog

ManagedPtrNewtype AlertDialog Source # 
Instance details

Defined in GI.Adw.Objects.AlertDialog

Methods

toManagedPtr :: AlertDialog -> ManagedPtr AlertDialog

TypedObject AlertDialog Source # 
Instance details

Defined in GI.Adw.Objects.AlertDialog

Methods

glibType :: IO GType

HasParentTypes AlertDialog Source # 
Instance details

Defined in GI.Adw.Objects.AlertDialog

IsGValue (Maybe AlertDialog) Source #

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

Instance details

Defined in GI.Adw.Objects.AlertDialog

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes AlertDialog Source # 
Instance details

Defined in GI.Adw.Objects.AlertDialog

type ParentTypes AlertDialog = '[Dialog, Widget, Object, Accessible, Buildable, ConstraintTarget]

class (GObject o, IsDescendantOf AlertDialog o) => IsAlertDialog o Source #

Type class for types which can be safely cast to AlertDialog, for instance with toAlertDialog.

Instances

Instances details
(GObject o, IsDescendantOf AlertDialog o) => IsAlertDialog o Source # 
Instance details

Defined in GI.Adw.Objects.AlertDialog

toAlertDialog :: (MonadIO m, IsAlertDialog o) => o -> m AlertDialog Source #

Cast to AlertDialog, 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, addBreakpoint, addController, addCssClass, addMnemonicLabel, addResponse, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, childFocus, choose, chooseFinish, close, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceClose, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasResponse, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, present, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeResponse, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBody, getBodyUseMarkup, getBounds, getBuildableId, getCanClose, getCanFocus, getCanTarget, getChild, getChildVisible, getClipboard, getCloseResponse, getColor, getContentHeight, getContentWidth, getCssClasses, getCssName, getCurrentBreakpoint, getCursor, getData, getDefaultResponse, getDefaultWidget, getDirection, getDisplay, getExtraChild, getFirstAccessibleChild, getFirstChild, getFocus, getFocusChild, getFocusOnClick, getFocusable, getFollowsContentSize, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeading, getHeadingUseMarkup, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPresentationMode, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getResponseAppearance, getResponseEnabled, getResponseLabel, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTitle, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

Setters

setAccessibleParent, setBody, setBodyUseMarkup, setCanClose, setCanFocus, setCanTarget, setChild, setChildVisible, setCloseResponse, setContentHeight, setContentWidth, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDefaultResponse, setDefaultWidget, setDirection, setExtraChild, setFocus, setFocusChild, setFocusOnClick, setFocusable, setFollowsContentSize, setFontMap, setFontOptions, setHalign, setHasTooltip, setHeading, setHeadingUseMarkup, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setPresentationMode, setProperty, setReceivesDefault, setResponseAppearance, setResponseEnabled, setResponseLabel, setSensitive, setSizeRequest, setStateFlags, setTitle, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.

addResponse

alertDialogAddResponse Source #

Arguments

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

self: an alert 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 signalalertDialog[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.

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

Since: 1.5

choose

alertDialogChoose Source #

Arguments

:: (HasCallStack, MonadIO m, IsAlertDialog a, IsWidget b, IsCancellable c) 
=> a

self: an alert dialog

-> Maybe b

parent: the parent widget

-> Maybe c

cancellable: a GCancellable to cancel the operation

-> Maybe AsyncReadyCallback

callback: a callback to call when the operation is complete

-> m () 

This function shows self to the user.

The callback will be called when the alert is dismissed. It should call [methodalertDialog.choose_finish] to obtain the result.

If the window is an [classwindow] or [classapplicationWindow], the dialog will be shown within it. Otherwise, it will be a separate window.

Since: 1.5

chooseFinish

alertDialogChooseFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsAlertDialog a, IsAsyncResult b) 
=> a

self: an alert dialog

-> b

result: a GAsyncResult

-> m Text

Returns: the ID of the response that was selected, or [propertyalertDialog:close-response] if the call was cancelled.

Finishes the [methodalertDialog.choose] call and returns the response ID.

Since: 1.5

getBody

alertDialogGetBody Source #

Arguments

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

self: an alert dialog

-> m Text

Returns: the body of self.

Gets the body text of self.

Since: 1.5

getBodyUseMarkup

alertDialogGetBodyUseMarkup Source #

Arguments

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

self: an alert dialog

-> m Bool

Returns: whether self uses markup for body text

Gets whether the body text of self includes Pango markup.

Since: 1.5

getCloseResponse

alertDialogGetCloseResponse Source #

Arguments

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

self: an alert dialog

-> m Text

Returns: the close response ID

Gets the ID of the close response of self.

Since: 1.5

getDefaultResponse

alertDialogGetDefaultResponse Source #

Arguments

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

self: an alert dialog

-> m (Maybe Text)

Returns: the default response ID

Gets the ID of the default response of self.

Since: 1.5

getExtraChild

alertDialogGetExtraChild Source #

Arguments

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

self: an alert dialog

-> m (Maybe Widget)

Returns: the child widget of self.

Gets the child widget of self.

Since: 1.5

getHeading

alertDialogGetHeading Source #

Arguments

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

self: an alert dialog

-> m (Maybe Text)

Returns: the heading of self.

Gets the heading of self.

Since: 1.5

getHeadingUseMarkup

alertDialogGetHeadingUseMarkup Source #

Arguments

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

self: an alert dialog

-> m Bool

Returns: whether self uses markup for heading

Gets whether the heading of self includes Pango markup.

Since: 1.5

getResponseAppearance

alertDialogGetResponseAppearance Source #

Arguments

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

self: an alert dialog

-> Text

response: a response ID

-> m ResponseAppearance

Returns: the appearance of response

Gets the appearance of response.

See [methodalertDialog.set_response_appearance].

Since: 1.5

getResponseEnabled

alertDialogGetResponseEnabled Source #

Arguments

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

self: an alert dialog

-> Text

response: a response ID

-> m Bool

Returns: whether response is enabled

Gets whether response is enabled.

See [methodalertDialog.set_response_enabled].

Since: 1.5

getResponseLabel

alertDialogGetResponseLabel Source #

Arguments

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

self: an alert dialog

-> Text

response: a response ID

-> m Text

Returns: the label of response

Gets the label of response.

See [methodalertDialog.set_response_label].

Since: 1.5

hasResponse

alertDialogHasResponse Source #

Arguments

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

self: an alert 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.5

new

alertDialogNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe Text

heading: the heading

-> Maybe Text

body: the body text

-> m AlertDialog

Returns: the newly created AdwAlertDialog

Creates a new AdwAlertDialog.

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 [methodalertDialog.format_body] or similar methods afterwards:

c code

AdwDialog *dialog;

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

Since: 1.5

removeResponse

alertDialogRemoveResponse Source #

Arguments

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

self: an alert dialog

-> Text

id: the response ID

-> m () 

Removes a response from self.

Since: 1.5

setBody

alertDialogSetBody Source #

Arguments

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

self: an alert dialog

-> Text

body: the body of self

-> m () 

Sets the body text of self.

Since: 1.5

setBodyUseMarkup

alertDialogSetBodyUseMarkup Source #

Arguments

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

self: an alert 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.5

setCloseResponse

alertDialogSetCloseResponse Source #

Arguments

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

self: an alert dialog

-> Text

response: the close response ID

-> m () 

Sets the ID of the close response of self.

It will be passed to signalalertDialog[response] if the dialog 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.5

setDefaultResponse

alertDialogSetDefaultResponse Source #

Arguments

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

self: an alert 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.5

setExtraChild

alertDialogSetExtraChild Source #

Arguments

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

self: an alert 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.5

setHeading

alertDialogSetHeading Source #

Arguments

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

self: an alert dialog

-> Maybe Text

heading: the heading of self

-> m () 

Sets the heading of self.

Since: 1.5

setHeadingUseMarkup

alertDialogSetHeadingUseMarkup Source #

Arguments

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

self: an alert dialog

-> Bool

useMarkup: whether to use markup for heading

-> m () 

Sets whether the heading of self includes Pango markup.

See parseMarkup.

Since: 1.5

setResponseAppearance

alertDialogSetResponseAppearance Source #

Arguments

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

self: an alert dialog

-> Text

response: a response ID

-> ResponseAppearance

appearance: appearance for response

-> m () 

Sets the appearance for response.

<picture> <source srcset="alert-dialog-appearance-dark.png" media="(prefers-color-scheme: dark)"> <img src="alert-dialog-appearance.png" alt="alert-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.5

setResponseEnabled

alertDialogSetResponseEnabled Source #

Arguments

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

self: an alert 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 [propertyalertDialog:close-response] while it's not enabled.

Responses are enabled by default.

Since: 1.5

setResponseLabel

alertDialogSetResponseLabel Source #

Arguments

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

self: an alert 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.5

Properties

body

The body text of the dialog.

Since: 1.5

constructAlertDialogBody :: (IsAlertDialog 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.

getAlertDialogBody :: (MonadIO m, IsAlertDialog o) => o -> m Text Source #

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

get alertDialog #body

setAlertDialogBody :: (MonadIO m, IsAlertDialog o) => o -> Text -> m () Source #

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

set alertDialog [ #body := value ]

bodyUseMarkup

Whether the body text includes Pango markup.

See parseMarkup.

Since: 1.5

constructAlertDialogBodyUseMarkup :: (IsAlertDialog 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.

getAlertDialogBodyUseMarkup :: (MonadIO m, IsAlertDialog o) => o -> m Bool Source #

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

get alertDialog #bodyUseMarkup

setAlertDialogBodyUseMarkup :: (MonadIO m, IsAlertDialog o) => o -> Bool -> m () Source #

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

set alertDialog [ #bodyUseMarkup := value ]

closeResponse

The ID of the close response.

It will be passed to signalalertDialog[response] if the dialog 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.5

constructAlertDialogCloseResponse :: (IsAlertDialog 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.

getAlertDialogCloseResponse :: (MonadIO m, IsAlertDialog o) => o -> m Text Source #

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

get alertDialog #closeResponse

setAlertDialogCloseResponse :: (MonadIO m, IsAlertDialog o) => o -> Text -> m () Source #

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

set alertDialog [ #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.5

clearAlertDialogDefaultResponse :: (MonadIO m, IsAlertDialog o) => o -> m () Source #

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

clear #defaultResponse

constructAlertDialogDefaultResponse :: (IsAlertDialog 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.

getAlertDialogDefaultResponse :: (MonadIO m, IsAlertDialog o) => o -> m (Maybe Text) Source #

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

get alertDialog #defaultResponse

setAlertDialogDefaultResponse :: (MonadIO m, IsAlertDialog o) => o -> Text -> m () Source #

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

set alertDialog [ #defaultResponse := value ]

extraChild

The child widget.

Displayed below the heading and body.

Since: 1.5

clearAlertDialogExtraChild :: (MonadIO m, IsAlertDialog o) => o -> m () Source #

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

clear #extraChild

constructAlertDialogExtraChild :: (IsAlertDialog 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.

getAlertDialogExtraChild :: (MonadIO m, IsAlertDialog o) => o -> m (Maybe Widget) Source #

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

get alertDialog #extraChild

setAlertDialogExtraChild :: (MonadIO m, IsAlertDialog o, IsWidget a) => o -> a -> m () Source #

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

set alertDialog [ #extraChild := value ]

heading

The heading of the dialog.

Since: 1.5

clearAlertDialogHeading :: (MonadIO m, IsAlertDialog o) => o -> m () Source #

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

clear #heading

constructAlertDialogHeading :: (IsAlertDialog 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.

getAlertDialogHeading :: (MonadIO m, IsAlertDialog o) => o -> m (Maybe Text) Source #

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

get alertDialog #heading

setAlertDialogHeading :: (MonadIO m, IsAlertDialog o) => o -> Text -> m () Source #

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

set alertDialog [ #heading := value ]

headingUseMarkup

Whether the heading includes Pango markup.

See parseMarkup.

Since: 1.5

constructAlertDialogHeadingUseMarkup :: (IsAlertDialog 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.

getAlertDialogHeadingUseMarkup :: (MonadIO m, IsAlertDialog o) => o -> m Bool Source #

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

get alertDialog #headingUseMarkup

setAlertDialogHeadingUseMarkup :: (MonadIO m, IsAlertDialog o) => o -> Bool -> m () Source #

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

set alertDialog [ #headingUseMarkup := value ]

Signals

response

type AlertDialogResponseCallback 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 [propertyalertDialog:close-response].

Since: 1.5

afterAlertDialogResponse :: (IsAlertDialog a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => AlertDialogResponseCallback) -> 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 alertDialog #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.

onAlertDialogResponse :: (IsAlertDialog a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => AlertDialogResponseCallback) -> 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 alertDialog #response callback

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