PreferencesDialog

A dialog showing application's preferences.

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

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

CSS nodes

adw.preferences_dialog.PreferencesDialog has a main CSS node with the name dialog and the style class .preferences.

Constructors

this
this()

Creates a new adw.preferences_dialog.PreferencesDialog.

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.

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.

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.

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.

Inherited Members

From Dialog

addBreakpoint
void addBreakpoint(adw.breakpoint.Breakpoint breakpoint)

Adds breakpoint to self.

close
bool close()

Attempts to close self.

forceClose
void forceClose()

Closes self.

getCanClose
bool getCanClose()

Gets whether self can be closed.

getChild
gtk.widget.Widget getChild()

Gets the child widget of self.

getContentHeight
int getContentHeight()

Gets the height of the dialog's contents.

getContentWidth
int getContentWidth()

Gets the width of the dialog's contents.

getCurrentBreakpoint
adw.breakpoint.Breakpoint getCurrentBreakpoint()

Gets the current breakpoint.

getDefaultWidget
gtk.widget.Widget getDefaultWidget()

Gets the default widget for self.

getFocus
gtk.widget.Widget getFocus()

Gets the focus widget for self.

getFollowsContentSize
bool getFollowsContentSize()

Gets whether to size content of self automatically.

getPresentationMode
adw.types.DialogPresentationMode getPresentationMode()

Gets presentation mode for self.

getTitle
string getTitle()

Gets the title of self.

present
void present(gtk.widget.Widget parent)

Presents self within parent's window.

setCanClose
void setCanClose(bool canClose)

Sets whether self can be closed.

setChild
void setChild(gtk.widget.Widget child)

Sets the child widget of self.

setContentHeight
void setContentHeight(int contentHeight)

Sets the height of the dialog's contents.

setContentWidth
void setContentWidth(int contentWidth)

Sets the width of the dialog's contents.

setDefaultWidget
void setDefaultWidget(gtk.widget.Widget defaultWidget)

Sets the default widget for self.

setFocus
void setFocus(gtk.widget.Widget focus)

Sets the focus widget for self.

setFollowsContentSize
void setFollowsContentSize(bool followsContentSize)

Sets whether to size content of self automatically.

setPresentationMode
void setPresentationMode(adw.types.DialogPresentationMode presentationMode)

Sets presentation mode for self.

setTitle
void setTitle(string title)

Sets the title of self.

connectCloseAttempt
ulong connectCloseAttempt(T callback, Flag!"After" after)

Connect to CloseAttempt signal.

connectClosed
ulong connectClosed(T callback, Flag!"After" after)

Connect to Closed signal.