| 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.PreferencesGroup
Description
A group of preference rows.
<picture> <source srcset="preferences-group-dark.png" media="(prefers-color-scheme: dark)"> <img src="preferences-group.png" alt="preferences-group"> </picture>
An AdwPreferencesGroup represents a group or tightly related preferences,
which in turn are represented by [classpreferencesRow].
To summarize the role of the preferences it gathers, a group can have both a
title and a description. The title will be used by [classpreferencesDialog]
to let the user look for a preference.
AdwPreferencesGroup as GtkBuildable
The AdwPreferencesGroup implementation of the Buildable interface
supports adding [classpreferencesRow]s to the list by omitting "type". If "type"
is omitted and the widget isn't a [classpreferencesRow] the child is added to
a box below the list.
When the "type" attribute of a child is header-suffix, the child
is set as the suffix on the end of the title and description.
CSS nodes
AdwPreferencesGroup has a single CSS node with name preferencesgroup.
Accessibility
AdwPreferencesGroup uses the GTK_ACCESSIBLE_ROLE_GROUP role.
Synopsis
- newtype PreferencesGroup = PreferencesGroup (ManagedPtr PreferencesGroup)
- class (GObject o, IsDescendantOf PreferencesGroup o) => IsPreferencesGroup o
- toPreferencesGroup :: (MonadIO m, IsPreferencesGroup o) => o -> m PreferencesGroup
- preferencesGroupAdd :: (HasCallStack, MonadIO m, IsPreferencesGroup a, IsWidget b) => a -> b -> m ()
- preferencesGroupGetDescription :: (HasCallStack, MonadIO m, IsPreferencesGroup a) => a -> m (Maybe Text)
- preferencesGroupGetHeaderSuffix :: (HasCallStack, MonadIO m, IsPreferencesGroup a) => a -> m (Maybe Widget)
- preferencesGroupGetTitle :: (HasCallStack, MonadIO m, IsPreferencesGroup a) => a -> m Text
- preferencesGroupNew :: (HasCallStack, MonadIO m) => m PreferencesGroup
- preferencesGroupRemove :: (HasCallStack, MonadIO m, IsPreferencesGroup a, IsWidget b) => a -> b -> m ()
- preferencesGroupSetDescription :: (HasCallStack, MonadIO m, IsPreferencesGroup a) => a -> Maybe Text -> m ()
- preferencesGroupSetHeaderSuffix :: (HasCallStack, MonadIO m, IsPreferencesGroup a, IsWidget b) => a -> Maybe b -> m ()
- preferencesGroupSetTitle :: (HasCallStack, MonadIO m, IsPreferencesGroup a) => a -> Text -> m ()
- clearPreferencesGroupDescription :: (MonadIO m, IsPreferencesGroup o) => o -> m ()
- constructPreferencesGroupDescription :: (IsPreferencesGroup o, MonadIO m) => Text -> m (GValueConstruct o)
- getPreferencesGroupDescription :: (MonadIO m, IsPreferencesGroup o) => o -> m (Maybe Text)
- setPreferencesGroupDescription :: (MonadIO m, IsPreferencesGroup o) => o -> Text -> m ()
- clearPreferencesGroupHeaderSuffix :: (MonadIO m, IsPreferencesGroup o) => o -> m ()
- constructPreferencesGroupHeaderSuffix :: (IsPreferencesGroup o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getPreferencesGroupHeaderSuffix :: (MonadIO m, IsPreferencesGroup o) => o -> m (Maybe Widget)
- setPreferencesGroupHeaderSuffix :: (MonadIO m, IsPreferencesGroup o, IsWidget a) => o -> a -> m ()
- constructPreferencesGroupTitle :: (IsPreferencesGroup o, MonadIO m) => Text -> m (GValueConstruct o)
- getPreferencesGroupTitle :: (MonadIO m, IsPreferencesGroup o) => o -> m Text
- setPreferencesGroupTitle :: (MonadIO m, IsPreferencesGroup o) => o -> Text -> m ()
Exported types
newtype PreferencesGroup Source #
Memory-managed wrapper type.
Constructors
| PreferencesGroup (ManagedPtr PreferencesGroup) |
Instances
class (GObject o, IsDescendantOf PreferencesGroup o) => IsPreferencesGroup o Source #
Type class for types which can be safely cast to PreferencesGroup, for instance with toPreferencesGroup.
Instances
| (GObject o, IsDescendantOf PreferencesGroup o) => IsPreferencesGroup o Source # | |
Defined in GI.Adw.Objects.PreferencesGroup | |
toPreferencesGroup :: (MonadIO m, IsPreferencesGroup o) => o -> m PreferencesGroup Source #
Cast to PreferencesGroup, 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
Methods
actionSetEnabled, activate, activateAction, activateDefault, add, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, 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, queueAllocate, queueDraw, queueResize, realize, ref, refSink, remove, 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, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDescription, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeaderSuffix, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, 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, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDescription, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHeaderSuffix, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTitle, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.
add
Arguments
| :: (HasCallStack, MonadIO m, IsPreferencesGroup a, IsWidget b) | |
| => a |
|
| -> b |
|
| -> m () |
Adds a child to self.
getDescription
preferencesGroupGetDescription Source #
Arguments
| :: (HasCallStack, MonadIO m, IsPreferencesGroup a) | |
| => a |
|
| -> m (Maybe Text) | Returns: the description of |
Gets the description of self.
getHeaderSuffix
preferencesGroupGetHeaderSuffix Source #
Arguments
| :: (HasCallStack, MonadIO m, IsPreferencesGroup a) | |
| => a |
|
| -> m (Maybe Widget) | Returns: the suffix for |
Gets the suffix for self's header.
Since: 1.1
getTitle
preferencesGroupGetTitle Source #
Arguments
| :: (HasCallStack, MonadIO m, IsPreferencesGroup a) | |
| => a |
|
| -> m Text | Returns: the title of |
Gets the title of self.
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m PreferencesGroup | Returns: the newly created |
Creates a new AdwPreferencesGroup.
remove
preferencesGroupRemove Source #
Arguments
| :: (HasCallStack, MonadIO m, IsPreferencesGroup a, IsWidget b) | |
| => a |
|
| -> b |
|
| -> m () |
Removes a child from self.
setDescription
preferencesGroupSetDescription Source #
Arguments
| :: (HasCallStack, MonadIO m, IsPreferencesGroup a) | |
| => a |
|
| -> Maybe Text |
|
| -> m () |
Sets the description for self.
setHeaderSuffix
preferencesGroupSetHeaderSuffix Source #
Arguments
| :: (HasCallStack, MonadIO m, IsPreferencesGroup a, IsWidget b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Sets the suffix for self's header.
Displayed above the list, next to the title and description.
Suffixes are commonly used to show a button or a spinner for the whole group.
Since: 1.1
setTitle
preferencesGroupSetTitle Source #
Arguments
| :: (HasCallStack, MonadIO m, IsPreferencesGroup a) | |
| => a |
|
| -> Text |
|
| -> m () |
Sets the title for self.
Properties
description
The description for this group of preferences.
clearPreferencesGroupDescription :: (MonadIO m, IsPreferencesGroup o) => o -> m () Source #
Set the value of the “description” property to Nothing.
When overloading is enabled, this is equivalent to
clear #description
constructPreferencesGroupDescription :: (IsPreferencesGroup o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “description” property. This is rarely needed directly, but it is used by new.
getPreferencesGroupDescription :: (MonadIO m, IsPreferencesGroup o) => o -> m (Maybe Text) Source #
Get the value of the “description” property.
When overloading is enabled, this is equivalent to
get preferencesGroup #description
setPreferencesGroupDescription :: (MonadIO m, IsPreferencesGroup o) => o -> Text -> m () Source #
Set the value of the “description” property.
When overloading is enabled, this is equivalent to
setpreferencesGroup [ #description:=value ]
headerSuffix
The header suffix widget.
Displayed above the list, next to the title and description.
Suffixes are commonly used to show a button or a spinner for the whole group.
Since: 1.1
clearPreferencesGroupHeaderSuffix :: (MonadIO m, IsPreferencesGroup o) => o -> m () Source #
Set the value of the “header-suffix” property to Nothing.
When overloading is enabled, this is equivalent to
clear #headerSuffix
constructPreferencesGroupHeaderSuffix :: (IsPreferencesGroup o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “header-suffix” property. This is rarely needed directly, but it is used by new.
getPreferencesGroupHeaderSuffix :: (MonadIO m, IsPreferencesGroup o) => o -> m (Maybe Widget) Source #
Get the value of the “header-suffix” property.
When overloading is enabled, this is equivalent to
get preferencesGroup #headerSuffix
setPreferencesGroupHeaderSuffix :: (MonadIO m, IsPreferencesGroup o, IsWidget a) => o -> a -> m () Source #
Set the value of the “header-suffix” property.
When overloading is enabled, this is equivalent to
setpreferencesGroup [ #headerSuffix:=value ]
title
The title for this group of preferences.
constructPreferencesGroupTitle :: (IsPreferencesGroup 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.
getPreferencesGroupTitle :: (MonadIO m, IsPreferencesGroup o) => o -> m Text Source #
Get the value of the “title” property.
When overloading is enabled, this is equivalent to
get preferencesGroup #title
setPreferencesGroupTitle :: (MonadIO m, IsPreferencesGroup o) => o -> Text -> m () Source #
Set the value of the “title” property.
When overloading is enabled, this is equivalent to
setpreferencesGroup [ #title:=value ]