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 |
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 [classpreferencesWindow
]
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.
Since: 1.0
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 -> 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 ()
- 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.
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, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, 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, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDescription, getDirection, getDisplay, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeaderSuffix, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, 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
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
:: (HasCallStack, MonadIO m, IsPreferencesGroup a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds a child to self
.
Since: 1.0
getDescription
preferencesGroupGetDescription Source #
:: (HasCallStack, MonadIO m, IsPreferencesGroup a) | |
=> a |
|
-> m (Maybe Text) | Returns: the description of |
Gets the description of self
.
Since: 1.0
getHeaderSuffix
preferencesGroupGetHeaderSuffix Source #
:: (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 #
:: (HasCallStack, MonadIO m, IsPreferencesGroup a) | |
=> a |
|
-> m Text | Returns: the title of |
Gets the title of self
.
Since: 1.0
new
:: (HasCallStack, MonadIO m) | |
=> m PreferencesGroup | Returns: the newly created |
Creates a new AdwPreferencesGroup
.
Since: 1.0
remove
preferencesGroupRemove Source #
:: (HasCallStack, MonadIO m, IsPreferencesGroup a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Removes a child from self
.
Since: 1.0
setDescription
preferencesGroupSetDescription Source #
:: (HasCallStack, MonadIO m, IsPreferencesGroup a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the description for self
.
Since: 1.0
setHeaderSuffix
preferencesGroupSetHeaderSuffix Source #
:: (HasCallStack, MonadIO m, IsPreferencesGroup a, IsWidget b) | |
=> a |
|
-> b | |
-> m () |
Sets the suffix for self
's header.
Since: 1.1
setTitle
preferencesGroupSetTitle Source #
:: (HasCallStack, MonadIO m, IsPreferencesGroup a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the title for self
.
Since: 1.0
Properties
description
The description for this group of preferences.
Since: 1.0
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
set
preferencesGroup [ #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
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
set
preferencesGroup [ #headerSuffix:=
value ]
title
The title for this group of preferences.
Since: 1.0
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
set
preferencesGroup [ #title:=
value ]