PreferencesWindow

A window to present an application's preferences.

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

The adw.preferences_window.PreferencesWindow widget presents an application's preferences gathered into pages and groups. The preferences are searchable by the user.

CSS nodes

adw.preferences_window.PreferencesWindow has a main CSS node with the name window and the style class .preferences.

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this()

Creates a new adw.preferences_window.PreferencesWindow.

Members

Functions

add
void add(adw.preferences_page.PreferencesPage page)

Adds a preferences page to self.

addToast
void addToast(adw.toast.Toast toast)

Displays toast.

closeSubpage
void closeSubpage()

Closes the current subpage.

getCanNavigateBack
bool getCanNavigateBack()

Gets whether gestures and shortcuts for closing subpages are enabled.

getSearchEnabled
bool getSearchEnabled()

Gets whether search is enabled for self.

getVisiblePage
adw.preferences_page.PreferencesPage getVisiblePage()

Gets the currently visible page of self.

getVisiblePageName
string getVisiblePageName()

Gets the name of currently visible page of self.

popSubpage
bool popSubpage()

Pop the visible page from the subpage stack of self.

presentSubpage
void presentSubpage(gtk.widget.Widget subpage)

Sets subpage as the window's subpage and opens it.

pushSubpage
void pushSubpage(adw.navigation_page.NavigationPage page)

Pushes page onto the subpage stack of self.

remove
void remove(adw.preferences_page.PreferencesPage page)

Removes a page from self.

self
PreferencesWindow self()

Returns this, for use in with statements.

setCanNavigateBack
void setCanNavigateBack(bool canNavigateBack)

Sets whether gestures and shortcuts for closing subpages are enabled.

setSearchEnabled
void setSearchEnabled(bool searchEnabled)

Sets whether search is enabled for self.

setVisiblePage
void setVisiblePage(adw.preferences_page.PreferencesPage page)

Makes page the visible page of self.

setVisiblePageName
void setVisiblePageName(string name)

Makes the page with the given name visible.

Properties

canNavigateBack
bool canNavigateBack [@property getter]

Get canNavigateBack property.

canNavigateBack
bool canNavigateBack [@property setter]

Set canNavigateBack property.

gType
GType gType [@property getter]
searchEnabled
bool searchEnabled [@property getter]

Get searchEnabled property.

searchEnabled
bool searchEnabled [@property setter]

Set searchEnabled property.

visiblePage
gtk.widget.Widget visiblePage [@property getter]

Get visiblePage property.

visiblePage
gtk.widget.Widget visiblePage [@property setter]

Set visiblePage property.

visiblePageName
string visiblePageName [@property getter]

Get visiblePageName property.

visiblePageName
string visiblePageName [@property setter]

Set visiblePageName property.

Static functions

getGType
GType getGType()

Inherited Members

From Window

getGType
GType getGType()
gType
GType gType [@property getter]
self
Window self()

Returns this, for use in with statements.

content
gtk.widget.Widget content [@property getter]

Get content property.

content
gtk.widget.Widget content [@property setter]

Set content property.

currentBreakpoint
adw.breakpoint.Breakpoint currentBreakpoint [@property getter]

Get currentBreakpoint property.

dialogs
gio.list_model.ListModel dialogs [@property getter]

Get dialogs property.

visibleDialog
adw.dialog.Dialog visibleDialog [@property getter]

Get visibleDialog property.

addBreakpoint
void addBreakpoint(adw.breakpoint.Breakpoint breakpoint)

Adds breakpoint to self.

getContent
gtk.widget.Widget getContent()

Gets the content widget of self.

getCurrentBreakpoint
adw.breakpoint.Breakpoint getCurrentBreakpoint()

Gets the current breakpoint.

getDialogs
gio.list_model.ListModel getDialogs()

Returns a gio.list_model.ListModel that contains the open dialogs of self.

getVisibleDialog
adw.dialog.Dialog getVisibleDialog()

Returns the currently visible dialog in self, if there's one.

setContent
void setContent(gtk.widget.Widget content)

Sets the content widget of self.