| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
GI.Adw.Objects.Dialog
Contents
- Exported types
- Methods
- addBreakpoint
- close
- forceClose
- getCanClose
- getChild
- getContentHeight
- getContentWidth
- getCurrentBreakpoint
- getDefaultWidget
- getFocus
- getFollowsContentSize
- getPresentationMode
- getTitle
- new
- present
- setCanClose
- setChild
- setContentHeight
- setContentWidth
- setDefaultWidget
- setFocus
- setFollowsContentSize
- setPresentationMode
- setTitle
- Properties
- Signals
Description
An adaptive dialog container.
<picture> <source srcset="dialog-floating-dark.png" media="(prefers-color-scheme: dark)"> <img src="dialog-floating.png" alt="dialog-floating"> </picture> <picture> <source srcset="dialog-bottom-dark.png" media="(prefers-color-scheme: dark)"> <img src="dialog-bottom.png" alt="dialog-bottom"> </picture>
AdwDialog is similar to a window, but is shown within another window. It
can be used with [classwindow] and [classapplicationWindow], use
[methoddialog.present] to show it.
AdwDialog is not resizable. Use the [propertydialog:content-width] and
[propertydialog:content-height] properties to set its size, or set
[propertydialog:follows-content-size] to TRUE to make the dialog track the
content's size as it changes. AdwDialog can never be larger than its parent
window.
AdwDialog can be presented as a centered floating window or a bottom sheet.
By default it's automatic depending on the available size.
[propertydialog:presentation-mode] can be used to change that.
AdwDialog can be closed via [methoddialog.close].
When presented as a bottom sheet, AdwDialog can also be closed via swiping
it down.
The [propertydialog:can-close] can be used to prevent closing. In that case,
signaldialog[closeAttempt] gets emitted instead.
Use [methoddialog.force_close] to close the dialog even when can-close is set to
FALSE.
Header Bar Integration
When placed inside an AdwDialog, [classheaderBar] will display the dialog
title instead of window title. It will also adjust the decoration layout to
ensure it always has a close button and nothing else. Set
[propertyheaderBar:show-start-title-buttons] and
[propertyheaderBar:show-end-title-buttons] to FALSE to remove it if it's
unwanted.
Breakpoints
AdwDialog can be used with [classbreakpoint] the same way as
[classbreakpointBin]. Refer to that widget's documentation for details.
Like AdwBreakpointBin, if breakpoints are used, AdwDialog doesn't have a
minimum size, and Widget:widthRequest and
Widget:heightRequest properties must be set manually.
Since: 1.5
Synopsis
- newtype Dialog = Dialog (ManagedPtr Dialog)
- class (GObject o, IsDescendantOf Dialog o) => IsDialog o
- toDialog :: (MonadIO m, IsDialog o) => o -> m Dialog
- dialogAddBreakpoint :: (HasCallStack, MonadIO m, IsDialog a, IsBreakpoint b) => a -> b -> m ()
- dialogClose :: (HasCallStack, MonadIO m, IsDialog a) => a -> m Bool
- dialogForceClose :: (HasCallStack, MonadIO m, IsDialog a) => a -> m ()
- dialogGetCanClose :: (HasCallStack, MonadIO m, IsDialog a) => a -> m Bool
- dialogGetChild :: (HasCallStack, MonadIO m, IsDialog a) => a -> m (Maybe Widget)
- dialogGetContentHeight :: (HasCallStack, MonadIO m, IsDialog a) => a -> m Int32
- dialogGetContentWidth :: (HasCallStack, MonadIO m, IsDialog a) => a -> m Int32
- dialogGetCurrentBreakpoint :: (HasCallStack, MonadIO m, IsDialog a) => a -> m (Maybe Breakpoint)
- dialogGetDefaultWidget :: (HasCallStack, MonadIO m, IsDialog a) => a -> m (Maybe Widget)
- dialogGetFocus :: (HasCallStack, MonadIO m, IsDialog a) => a -> m (Maybe Widget)
- dialogGetFollowsContentSize :: (HasCallStack, MonadIO m, IsDialog a) => a -> m Bool
- dialogGetPresentationMode :: (HasCallStack, MonadIO m, IsDialog a) => a -> m DialogPresentationMode
- dialogGetTitle :: (HasCallStack, MonadIO m, IsDialog a) => a -> m Text
- dialogNew :: (HasCallStack, MonadIO m) => m Dialog
- dialogPresent :: (HasCallStack, MonadIO m, IsDialog a, IsWidget b) => a -> Maybe b -> m ()
- dialogSetCanClose :: (HasCallStack, MonadIO m, IsDialog a) => a -> Bool -> m ()
- dialogSetChild :: (HasCallStack, MonadIO m, IsDialog a, IsWidget b) => a -> Maybe b -> m ()
- dialogSetContentHeight :: (HasCallStack, MonadIO m, IsDialog a) => a -> Int32 -> m ()
- dialogSetContentWidth :: (HasCallStack, MonadIO m, IsDialog a) => a -> Int32 -> m ()
- dialogSetDefaultWidget :: (HasCallStack, MonadIO m, IsDialog a, IsWidget b) => a -> Maybe b -> m ()
- dialogSetFocus :: (HasCallStack, MonadIO m, IsDialog a, IsWidget b) => a -> Maybe b -> m ()
- dialogSetFollowsContentSize :: (HasCallStack, MonadIO m, IsDialog a) => a -> Bool -> m ()
- dialogSetPresentationMode :: (HasCallStack, MonadIO m, IsDialog a) => a -> DialogPresentationMode -> m ()
- dialogSetTitle :: (HasCallStack, MonadIO m, IsDialog a) => a -> Text -> m ()
- constructDialogCanClose :: (IsDialog o, MonadIO m) => Bool -> m (GValueConstruct o)
- getDialogCanClose :: (MonadIO m, IsDialog o) => o -> m Bool
- setDialogCanClose :: (MonadIO m, IsDialog o) => o -> Bool -> m ()
- clearDialogChild :: (MonadIO m, IsDialog o) => o -> m ()
- constructDialogChild :: (IsDialog o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getDialogChild :: (MonadIO m, IsDialog o) => o -> m (Maybe Widget)
- setDialogChild :: (MonadIO m, IsDialog o, IsWidget a) => o -> a -> m ()
- constructDialogContentHeight :: (IsDialog o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getDialogContentHeight :: (MonadIO m, IsDialog o) => o -> m Int32
- setDialogContentHeight :: (MonadIO m, IsDialog o) => o -> Int32 -> m ()
- constructDialogContentWidth :: (IsDialog o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getDialogContentWidth :: (MonadIO m, IsDialog o) => o -> m Int32
- setDialogContentWidth :: (MonadIO m, IsDialog o) => o -> Int32 -> m ()
- getDialogCurrentBreakpoint :: (MonadIO m, IsDialog o) => o -> m (Maybe Breakpoint)
- clearDialogDefaultWidget :: (MonadIO m, IsDialog o) => o -> m ()
- constructDialogDefaultWidget :: (IsDialog o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getDialogDefaultWidget :: (MonadIO m, IsDialog o) => o -> m (Maybe Widget)
- setDialogDefaultWidget :: (MonadIO m, IsDialog o, IsWidget a) => o -> a -> m ()
- clearDialogFocusWidget :: (MonadIO m, IsDialog o) => o -> m ()
- constructDialogFocusWidget :: (IsDialog o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getDialogFocusWidget :: (MonadIO m, IsDialog o) => o -> m (Maybe Widget)
- setDialogFocusWidget :: (MonadIO m, IsDialog o, IsWidget a) => o -> a -> m ()
- constructDialogFollowsContentSize :: (IsDialog o, MonadIO m) => Bool -> m (GValueConstruct o)
- getDialogFollowsContentSize :: (MonadIO m, IsDialog o) => o -> m Bool
- setDialogFollowsContentSize :: (MonadIO m, IsDialog o) => o -> Bool -> m ()
- constructDialogPresentationMode :: (IsDialog o, MonadIO m) => DialogPresentationMode -> m (GValueConstruct o)
- getDialogPresentationMode :: (MonadIO m, IsDialog o) => o -> m DialogPresentationMode
- setDialogPresentationMode :: (MonadIO m, IsDialog o) => o -> DialogPresentationMode -> m ()
- constructDialogTitle :: (IsDialog o, MonadIO m) => Text -> m (GValueConstruct o)
- getDialogTitle :: (MonadIO m, IsDialog o) => o -> m Text
- setDialogTitle :: (MonadIO m, IsDialog o) => o -> Text -> m ()
- type DialogCloseAttemptCallback = IO ()
- afterDialogCloseAttempt :: (IsDialog a, MonadIO m) => a -> ((?self :: a) => DialogCloseAttemptCallback) -> m SignalHandlerId
- onDialogCloseAttempt :: (IsDialog a, MonadIO m) => a -> ((?self :: a) => DialogCloseAttemptCallback) -> m SignalHandlerId
- type DialogClosedCallback = IO ()
- afterDialogClosed :: (IsDialog a, MonadIO m) => a -> ((?self :: a) => DialogClosedCallback) -> m SignalHandlerId
- onDialogClosed :: (IsDialog a, MonadIO m) => a -> ((?self :: a) => DialogClosedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
| Eq Dialog Source # | |
| GObject Dialog Source # | |
Defined in GI.Adw.Objects.Dialog | |
| ManagedPtrNewtype Dialog Source # | |
Defined in GI.Adw.Objects.Dialog Methods toManagedPtr :: Dialog -> ManagedPtr Dialog | |
| TypedObject Dialog Source # | |
Defined in GI.Adw.Objects.Dialog | |
| HasParentTypes Dialog Source # | |
Defined in GI.Adw.Objects.Dialog | |
| IsGValue (Maybe Dialog) Source # | Convert |
Defined in GI.Adw.Objects.Dialog Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Dialog -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Dialog) | |
| type ParentTypes Dialog Source # | |
Defined in GI.Adw.Objects.Dialog type ParentTypes Dialog = '[Widget, Object, Accessible, Buildable, ConstraintTarget] | |
class (GObject o, IsDescendantOf Dialog o) => IsDialog o Source #
Instances
| (GObject o, IsDescendantOf Dialog o) => IsDialog o Source # | |
Defined in GI.Adw.Objects.Dialog | |
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addBreakpoint, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, childFocus, close, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceClose, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, 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, 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, getBounds, getBuildableId, getCanClose, getCanFocus, getCanTarget, getChild, getChildVisible, getClipboard, getColor, getContentHeight, getContentWidth, getCssClasses, getCssName, getCurrentBreakpoint, getCursor, getData, getDefaultWidget, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocus, getFocusChild, getFocusOnClick, getFocusable, getFollowsContentSize, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, 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, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTitle, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.
Setters
setAccessibleParent, setCanClose, setCanFocus, setCanTarget, setChild, setChildVisible, setContentHeight, setContentWidth, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDefaultWidget, setDirection, setFocus, setFocusChild, setFocusOnClick, setFocusable, setFollowsContentSize, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setPresentationMode, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTitle, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.
addBreakpoint
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a, IsBreakpoint b) | |
| => a |
|
| -> b |
|
| -> m () |
Adds breakpoint to self.
Since: 1.5
close
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> m Bool | Returns: whether |
Attempts to close self.
If the [propertydialog:can-close] property is set to FALSE, the
signaldialog[closeAttempt] signal is emitted.
See also: [methoddialog.force_close].
Since: 1.5
forceClose
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> m () |
Closes self.
Unlike [methoddialog.close], it succeeds even if [propertydialog:can-close]
is set to FALSE.
Since: 1.5
getCanClose
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> m Bool | Returns: whether the dialog can be closed |
Gets whether self can be closed.
Since: 1.5
getChild
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> m (Maybe Widget) | Returns: the child widget of |
Gets the child widget of self.
Since: 1.5
getContentHeight
dialogGetContentHeight Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> m Int32 | Returns: the content height |
Gets the height of the dialog's contents.
Since: 1.5
getContentWidth
dialogGetContentWidth Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> m Int32 | Returns: the content width |
Gets the width of the dialog's contents.
Since: 1.5
getCurrentBreakpoint
dialogGetCurrentBreakpoint Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> m (Maybe Breakpoint) | Returns: the current breakpoint |
Gets the current breakpoint.
Since: 1.5
getDefaultWidget
dialogGetDefaultWidget Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> m (Maybe Widget) | Returns: the default widget |
Gets the default widget for self.
Since: 1.5
getFocus
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> m (Maybe Widget) | Returns: the focus widget |
Gets the focus widget for self.
Since: 1.5
getFollowsContentSize
dialogGetFollowsContentSize Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> m Bool | Returns: whether to size content automatically |
Gets whether to size content of self automatically.
Since: 1.5
getPresentationMode
dialogGetPresentationMode Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> m DialogPresentationMode | Returns: the presentation mode |
Gets presentation mode for self.
Since: 1.5
getTitle
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> m Text | Returns: the title |
Gets the title of self.
Since: 1.5
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m Dialog | Returns: the new created |
Creates a new AdwDialog.
Since: 1.5
present
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a, IsWidget b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Presents self within parent's window.
If self is already shown, raises it to the top instead.
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
setCanClose
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether self can be closed.
If set to FALSE, the close button, shortcuts and
[methoddialog.close] will result in signaldialog[closeAttempt] being
emitted instead, and bottom sheet close swipe will be disabled.
[methoddialog.force_close] still works.
Since: 1.5
setChild
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a, IsWidget b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Sets the child widget of self.
Since: 1.5
setContentHeight
dialogSetContentHeight Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> Int32 |
|
| -> m () |
Sets the height of the dialog's contents.
Set it to -1 to reset it to the content's natural height.
See also: Window:defaultHeight
Since: 1.5
setContentWidth
dialogSetContentWidth Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> Int32 |
|
| -> m () |
Sets the width of the dialog's contents.
Set it to -1 to reset it to the content's natural width.
See also: Window:defaultWidth
Since: 1.5
setDefaultWidget
dialogSetDefaultWidget Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a, IsWidget b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Sets the default widget for self.
It's activated when the user presses Enter.
Since: 1.5
setFocus
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a, IsWidget b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Sets the focus widget for self.
If focus is not the current focus widget, and is focusable, sets it as the
focus widget for the dialog.
If focus is NULL, unsets the focus widget for this dialog. To set the focus
to a particular widget in the dialog, it is usually more convenient to use
widgetGrabFocus instead of this function.
Since: 1.5
setFollowsContentSize
dialogSetFollowsContentSize Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether to size content of self automatically.
If set to TRUE, always use the content's natural size instead of
[propertydialog:content-width] and [propertydialog:content-height]. If
the content resizes, the dialog will immediately resize as well.
See also: Window:resizable
Since: 1.5
setPresentationMode
dialogSetPresentationMode Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> DialogPresentationMode |
|
| -> m () |
Sets presentation mode for self.
When set to ADW_DIALOG_AUTO, the dialog appears as a bottom sheet when the
following condition is met: max-width: 450px or max-height: 360px, and as a
floating window otherwise.
Set it to ADW_DIALOG_FLOATING or ADW_DIALOG_BOTTOM_SHEET to always
present it a floating window or a bottom sheet respectively, regardless of
available size.
Presentation mode does nothing for dialogs presented as a window.
Since: 1.5
setTitle
Arguments
| :: (HasCallStack, MonadIO m, IsDialog a) | |
| => a |
|
| -> Text |
|
| -> m () |
Sets the title of self.
Since: 1.5
Properties
canClose
Whether the dialog can be closed.
If set to FALSE, the close button, shortcuts and
[methoddialog.close] will result in signaldialog[closeAttempt] being
emitted instead, and bottom sheet close swipe will be disabled.
[methoddialog.force_close] still works.
Since: 1.5
constructDialogCanClose :: (IsDialog o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “can-close” property. This is rarely needed directly, but it is used by new.
getDialogCanClose :: (MonadIO m, IsDialog o) => o -> m Bool Source #
Get the value of the “can-close” property.
When overloading is enabled, this is equivalent to
get dialog #canClose
setDialogCanClose :: (MonadIO m, IsDialog o) => o -> Bool -> m () Source #
Set the value of the “can-close” property.
When overloading is enabled, this is equivalent to
setdialog [ #canClose:=value ]
child
The child widget of the AdwDialog.
Since: 1.5
clearDialogChild :: (MonadIO m, IsDialog o) => o -> m () Source #
Set the value of the “child” property to Nothing.
When overloading is enabled, this is equivalent to
clear #child
constructDialogChild :: (IsDialog o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “child” property. This is rarely needed directly, but it is used by new.
getDialogChild :: (MonadIO m, IsDialog o) => o -> m (Maybe Widget) Source #
Get the value of the “child” property.
When overloading is enabled, this is equivalent to
get dialog #child
setDialogChild :: (MonadIO m, IsDialog o, IsWidget a) => o -> a -> m () Source #
Set the value of the “child” property.
When overloading is enabled, this is equivalent to
setdialog [ #child:=value ]
contentHeight
The height of the dialog's contents.
Set it to -1 to reset it to the content's natural height.
See also: Window:defaultHeight
Since: 1.5
constructDialogContentHeight :: (IsDialog o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “content-height” property. This is rarely needed directly, but it is used by new.
getDialogContentHeight :: (MonadIO m, IsDialog o) => o -> m Int32 Source #
Get the value of the “content-height” property.
When overloading is enabled, this is equivalent to
get dialog #contentHeight
setDialogContentHeight :: (MonadIO m, IsDialog o) => o -> Int32 -> m () Source #
Set the value of the “content-height” property.
When overloading is enabled, this is equivalent to
setdialog [ #contentHeight:=value ]
contentWidth
The width of the dialog's contents.
Set it to -1 to reset it to the content's natural width.
See also: Window:defaultWidth
Since: 1.5
constructDialogContentWidth :: (IsDialog o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “content-width” property. This is rarely needed directly, but it is used by new.
getDialogContentWidth :: (MonadIO m, IsDialog o) => o -> m Int32 Source #
Get the value of the “content-width” property.
When overloading is enabled, this is equivalent to
get dialog #contentWidth
setDialogContentWidth :: (MonadIO m, IsDialog o) => o -> Int32 -> m () Source #
Set the value of the “content-width” property.
When overloading is enabled, this is equivalent to
setdialog [ #contentWidth:=value ]
currentBreakpoint
The current breakpoint.
Since: 1.5
getDialogCurrentBreakpoint :: (MonadIO m, IsDialog o) => o -> m (Maybe Breakpoint) Source #
Get the value of the “current-breakpoint” property.
When overloading is enabled, this is equivalent to
get dialog #currentBreakpoint
defaultWidget
The default widget.
It's activated when the user presses Enter.
Since: 1.5
clearDialogDefaultWidget :: (MonadIO m, IsDialog o) => o -> m () Source #
Set the value of the “default-widget” property to Nothing.
When overloading is enabled, this is equivalent to
clear #defaultWidget
constructDialogDefaultWidget :: (IsDialog o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “default-widget” property. This is rarely needed directly, but it is used by new.
getDialogDefaultWidget :: (MonadIO m, IsDialog o) => o -> m (Maybe Widget) Source #
Get the value of the “default-widget” property.
When overloading is enabled, this is equivalent to
get dialog #defaultWidget
setDialogDefaultWidget :: (MonadIO m, IsDialog o, IsWidget a) => o -> a -> m () Source #
Set the value of the “default-widget” property.
When overloading is enabled, this is equivalent to
setdialog [ #defaultWidget:=value ]
focusWidget
The focus widget.
Since: 1.5
clearDialogFocusWidget :: (MonadIO m, IsDialog o) => o -> m () Source #
Set the value of the “focus-widget” property to Nothing.
When overloading is enabled, this is equivalent to
clear #focusWidget
constructDialogFocusWidget :: (IsDialog o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “focus-widget” property. This is rarely needed directly, but it is used by new.
getDialogFocusWidget :: (MonadIO m, IsDialog o) => o -> m (Maybe Widget) Source #
Get the value of the “focus-widget” property.
When overloading is enabled, this is equivalent to
get dialog #focusWidget
setDialogFocusWidget :: (MonadIO m, IsDialog o, IsWidget a) => o -> a -> m () Source #
Set the value of the “focus-widget” property.
When overloading is enabled, this is equivalent to
setdialog [ #focusWidget:=value ]
followsContentSize
Whether to size content automatically.
If set to TRUE, always use the content's natural size instead of
[propertydialog:content-width] and [propertydialog:content-height]. If
the content resizes, the dialog will immediately resize as well.
See also: Window:resizable
Since: 1.5
constructDialogFollowsContentSize :: (IsDialog o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “follows-content-size” property. This is rarely needed directly, but it is used by new.
getDialogFollowsContentSize :: (MonadIO m, IsDialog o) => o -> m Bool Source #
Get the value of the “follows-content-size” property.
When overloading is enabled, this is equivalent to
get dialog #followsContentSize
setDialogFollowsContentSize :: (MonadIO m, IsDialog o) => o -> Bool -> m () Source #
Set the value of the “follows-content-size” property.
When overloading is enabled, this is equivalent to
setdialog [ #followsContentSize:=value ]
presentationMode
The dialog's presentation mode.
When set to ADW_DIALOG_AUTO, the dialog appears as a bottom sheet when
the following condition is met: max-width: 450px or max-height: 360px,
and as a floating window otherwise.
Set it to ADW_DIALOG_FLOATING or ADW_DIALOG_BOTTOM_SHEET to always
present it a floating window or a bottom sheet respectively, regardless of
available size.
Presentation mode does nothing for dialogs presented as a window.
Since: 1.5
constructDialogPresentationMode :: (IsDialog o, MonadIO m) => DialogPresentationMode -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “presentation-mode” property. This is rarely needed directly, but it is used by new.
getDialogPresentationMode :: (MonadIO m, IsDialog o) => o -> m DialogPresentationMode Source #
Get the value of the “presentation-mode” property.
When overloading is enabled, this is equivalent to
get dialog #presentationMode
setDialogPresentationMode :: (MonadIO m, IsDialog o) => o -> DialogPresentationMode -> m () Source #
Set the value of the “presentation-mode” property.
When overloading is enabled, this is equivalent to
setdialog [ #presentationMode:=value ]
title
The title of the dialog.
Since: 1.5
constructDialogTitle :: (IsDialog o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “title” property. This is rarely needed directly, but it is used by new.
getDialogTitle :: (MonadIO m, IsDialog o) => o -> m Text Source #
Get the value of the “title” property.
When overloading is enabled, this is equivalent to
get dialog #title
setDialogTitle :: (MonadIO m, IsDialog o) => o -> Text -> m () Source #
Set the value of the “title” property.
When overloading is enabled, this is equivalent to
setdialog [ #title:=value ]
Signals
closeAttempt
type DialogCloseAttemptCallback = IO () Source #
Emitted when the close button or shortcut is used, or
[methoddialog.close] is called while [propertydialog:can-close] is set to
FALSE.
Since: 1.5
afterDialogCloseAttempt :: (IsDialog a, MonadIO m) => a -> ((?self :: a) => DialogCloseAttemptCallback) -> m SignalHandlerId Source #
Connect a signal handler for the closeAttempt signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after dialog #closeAttempt callback
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.
onDialogCloseAttempt :: (IsDialog a, MonadIO m) => a -> ((?self :: a) => DialogCloseAttemptCallback) -> m SignalHandlerId Source #
Connect a signal handler for the closeAttempt signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on dialog #closeAttempt callback
closed
type DialogClosedCallback = IO () Source #
Emitted when the dialog is successfully closed.
Since: 1.5
afterDialogClosed :: (IsDialog a, MonadIO m) => a -> ((?self :: a) => DialogClosedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the closed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after dialog #closed callback
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.
onDialogClosed :: (IsDialog a, MonadIO m) => a -> ((?self :: a) => DialogClosedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the closed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on dialog #closed callback