1.41 <AdwPreferencesGroup>

Class: <AdwPreferencesGroup>

It derives from <GtkWidget>.

A group of preference rows.

An <AdwPreferencesGroup> represents a group or tightly related preferences, which in turn are represented by PreferencesRow.

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 PreferencesDialog to let the user look for a preference.

The PreferencesGroup:separate-rows property can be used to separate the rows within the group, same as when using the ‘.boxed-list-separate‘ style class instead of .boxed-list.

AdwPreferencesGroup as GtkBuildable

The <AdwPreferencesGroup> implementation of the <GtkBuildable> interface supports adding PreferencesRows to the list by omitting "type". If "type" is omitted and the widget isn’t a PreferencesRow 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.AccessibleRole.group role.

Fields

parent-instance

Properties

Property: preferences-group:description self

The description for this group of preferences.

Its value is a string, or #f.

Set it with (set! (preferences-group:description self) value).

Property: preferences-group:header-suffix self

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.

Its value is a <GtkWidget>, or #f.

Set it with (set! (preferences-group:header-suffix self) value).

Property: preferences-group:separate-rows self

Whether to separate rows.

Equivalent to using the ‘.boxed-list-separate‘ style class on a <GtkListBox> instead of .boxed-list.

Its value is a boolean.

Set it with (set! (preferences-group:separate-rows self) value).

Property: preferences-group:title self

The title for this group of preferences.

Its value is a string, or #f.

Set it with (set! (preferences-group:title self) value).

Procedures

Method: preferences-group:add self child
Method: add self child

Adds a child to self.

self

Passed: a <AdwPreferencesGroup>.

a preferences group

child

Passed: a <GtkWidget>.

the widget to add

Method: preferences-group:bind-model self [model] [create-row-func]
Method: bind-model self [model] [create-row-func]

Binds model to self.

See list-box:bind-model.

self

Passed: a <AdwPreferencesGroup>.

a preferences group

model

Passed, or left out: a <GListModel>, or #f.

a list model to bind

create-row-func

Passed, or left out: a procedure, or #f.

a function creating a row for each item, or NULL in case model is NULL

See GtkListBoxCreateWidgetFunc for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to create-row-func

user-data-free-func

Not passed: guile-gi supplies it.

function for freeing user-data

See GDestroyNotify for how it is called.

Method: preferences-group:get-description self ⇒ %return
Method: get-description self ⇒ %return

Gets the description of self.

self

Passed: a <AdwPreferencesGroup>.

a preferences group

%return

Returned: a string, or #f.

the description of self

Method: preferences-group:get-header-suffix self ⇒ %return
Method: get-header-suffix self ⇒ %return

Gets the suffix for self’s header.

self

Passed: a <AdwPreferencesGroup>.

a preferences group

%return

Returned: a <GtkWidget>, or #f.

the suffix for self’s header.

Method: preferences-group:get-row self index ⇒ %return
Method: get-row self index ⇒ %return

Gets the row at index.

Can return NULL if index is larger than the number of rows in the group.

self

Passed: a <AdwPreferencesGroup>.

a preferences group

index

Passed: an unsigned 32-bit integer.

a row index

%return

Returned: a <GtkWidget>, or #f.

the row at index

Method: preferences-group:get-separate-rows? self ⇒ %return
Method: get-separate-rows? self ⇒ %return

Gets whether self’s rows are separated.

self

Passed: a <AdwPreferencesGroup>.

a preferences group

%return

Returned: a boolean.

whether rows are separated

Method: preferences-group:get-title self ⇒ %return
Method: get-title self ⇒ %return

Gets the title of self.

self

Passed: a <AdwPreferencesGroup>.

a preferences group

%return

Returned: a string.

the title of self

Procedure: preferences-group:new ⇒ %return

Creates a new <AdwPreferencesGroup>.

%return

Returned: a <GtkWidget>.

the newly created <AdwPreferencesGroup>

Method: preferences-group:remove self child
Method: remove self child

Removes a child from self.

self

Passed: a <AdwPreferencesGroup>.

a preferences group

child

Passed: a <GtkWidget>.

the child to remove

Method: preferences-group:set-description self [description]
Method: set-description self [description]

Sets the description for self.

self

Passed: a <AdwPreferencesGroup>.

a preferences group

description

Passed, or left out: a string, or #f.

the description

Method: preferences-group:set-header-suffix self [suffix]
Method: set-header-suffix self [suffix]

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.

self

Passed: a <AdwPreferencesGroup>.

a preferences group

suffix

Passed, or left out: a <GtkWidget>, or #f.

the suffix to set

Method: preferences-group:set-separate-rows self separate-rows
Method: set-separate-rows self separate-rows

Sets whether self’s rows are separated.

Equivalent to using the ‘.boxed-list-separate‘ style class on a <GtkListBox> instead of .boxed-list.

self

Passed: a <AdwPreferencesGroup>.

a preferences group

separate-rows

Passed: a boolean.

whether to separate rows

Method: preferences-group:set-title self title
Method: set-title self title

Sets the title for self.

self

Passed: a <AdwPreferencesGroup>.

a preferences group

title

Passed: a string.

the title