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(void* ptr, Flag!"Take" take)
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.

self
PreferencesDialog self()

Returns this, for use in with statements.

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

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 Dialog

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

Returns this, for use in with statements.

canClose
bool canClose [@property getter]

Get canClose property.

canClose
bool canClose [@property setter]

Set canClose property.

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

Get child property.

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

Set child property.

contentHeight
int contentHeight [@property getter]

Get contentHeight property.

contentHeight
int contentHeight [@property setter]

Set contentHeight property.

contentWidth
int contentWidth [@property getter]

Get contentWidth property.

contentWidth
int contentWidth [@property setter]

Set contentWidth property.

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

Get currentBreakpoint property.

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

Get defaultWidget property.

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

Set defaultWidget property.

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

Get focusWidget property.

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

Set focusWidget property.

followsContentSize
bool followsContentSize [@property getter]

Get followsContentSize property.

followsContentSize
bool followsContentSize [@property setter]

Set followsContentSize property.

presentationMode
adw.types.DialogPresentationMode presentationMode [@property getter]

Get presentationMode property.

presentationMode
adw.types.DialogPresentationMode presentationMode [@property setter]

Set presentationMode property.

title
string title [@property getter]

Get title property.

title
string title [@property setter]

Set title property.

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.