gtk.font_dialog

Module for [FontDialog] class

Types 3

A [gtk.font_dialog.FontDialog] object collects the arguments that are needed to present a font chooser dialog to the user, such as a title for the dialog and whether it should be modal.

The dialog is shown with the [gtk.font_dialog.FontDialog.chooseFont] function or its variants. This API follows the GIO async pattern, and the result can be obtained by calling the corresponding finish function, such as [gtk.font_dialog.FontDialog.chooseFontFinish].

See [gtk.font_dialog_button.FontDialogButton] for a convenient control that uses [gtk.font_dialog.FontDialog] and presents the results.

Methods
GType _gType() @property
FontDialog self()Returns `this`, for use in `with` statements.
FontDialogGidBuilder builder()Get builder for [gtk.font_dialog.FontDialog] Returns: New builder object
gtk.filter.Filter filter() @propertyGet `filter` property. Returns: Sets a filter to restrict what fonts are shown in the font chooser dialog.
void filter(gtk.filter.Filter propval) @propertySet `filter` property. Params: propval = Sets a filter to restrict what fonts are shown in the font chooser dialog.
pango.font_map.FontMap fontMap() @propertyGet `fontMap` property. Returns: Sets a custom font map to select fonts from.
void fontMap(pango.font_map.FontMap propval) @propertySet `fontMap` property. Params: propval = Sets a custom font map to select fonts from.
pango.language.Language language() @propertyGet `language` property. Returns: The language for which the font features are selected.
void language(pango.language.Language propval) @propertySet `language` property. Params: propval = The language for which the font features are selected.
bool modal() @propertyGet `modal` property. Returns: Whether the font chooser dialog is modal.
void modal(bool propval) @propertySet `modal` property. Params: propval = Whether the font chooser dialog is modal.
string title() @propertyGet `title` property. Returns: A title that may be shown on the font chooser dialog that is presented by [gtk.font_dialog.FontDialog.chooseFont].
void title(string propval) @propertySet `title` property. Params: propval = A title that may be shown on the font chooser dialog that is presented by [gtk.font_dialog.FontDialog.chooseFont].
void chooseFace(gtk.window.Window parent = null, pango.font_face.FontFace initialValue = null, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)This function initiates a font selection operation by presenting a dialog to the user for selecting a font face (i.e. a font family and style, but not a specific font size).
pango.font_face.FontFace chooseFaceFinish(gio.async_result.AsyncResult result)Finishes the [gtk.font_dialog.FontDialog.chooseFace] call and returns the resulting font face.
void chooseFamily(gtk.window.Window parent = null, pango.font_family.FontFamily initialValue = null, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)This function initiates a font selection operation by presenting a dialog to the user for selecting a font family.
pango.font_family.FontFamily chooseFamilyFinish(gio.async_result.AsyncResult result)Finishes the [gtk.font_dialog.FontDialog.chooseFamily] call and returns the resulting family.
void chooseFont(gtk.window.Window parent = null, pango.font_description.FontDescription initialValue = null, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)This function initiates a font selection operation by presenting a dialog to the user for selecting a font.
void chooseFontAndFeatures(gtk.window.Window parent = null, pango.font_description.FontDescription initialValue = null, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)This function initiates a font selection operation by presenting a dialog to the user for selecting a font and font features.
bool chooseFontAndFeaturesFinish(gio.async_result.AsyncResult result, out pango.font_description.FontDescription fontDesc, out string fontFeatures, out pango.language.Language language)Finishes the [gtk.font_dialog.FontDialog.chooseFontAndFeatures] call and returns the resulting font description and font features.
pango.font_description.FontDescription chooseFontFinish(gio.async_result.AsyncResult result)Finishes the [gtk.font_dialog.FontDialog.chooseFont] call and returns the resulting font description.
gtk.filter.Filter getFilter()Returns the filter that decides which fonts to display in the font chooser dialog. Returns: the filter
pango.font_map.FontMap getFontMap()Returns the fontmap from which fonts are selected, or `NULL` for the default fontmap. Returns: the fontmap
pango.language.Language getLanguage()Returns the language for which font features are applied. Returns: the language for font features
bool getModal()Returns whether the font chooser dialog blocks interaction with the parent window while it is presented. Returns: `TRUE` if the font chooser dialog is modal
string getTitle()Returns the title that will be shown on the font chooser dialog. Returns: the title
void setFilter(gtk.filter.Filter filter = null)Adds a filter that decides which fonts to display in the font chooser dialog.
void setFontMap(pango.font_map.FontMap fontmap = null)Sets the fontmap from which fonts are selected.
void setLanguage(pango.language.Language language)Sets the language for which font features are applied.
void setModal(bool modal)Sets whether the font chooser dialog blocks interaction with the parent window while it is presented.
void setTitle(string title)Sets the title that will be shown on the font chooser dialog.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new [gtk.fontdialog.FontDialog] object. Returns: the new [gtk.fontdialog.FontDialog]
Methods
T filter(gtk.filter.Filter propval)Set `filter` property. Params: propval = Sets a filter to restrict what fonts are shown in the font chooser dialog. Returns: Builder instance for fluent chaining
T fontMap(pango.font_map.FontMap propval)Set `fontMap` property. Params: propval = Sets a custom font map to select fonts from.
T language(pango.language.Language propval)Set `language` property. Params: propval = The language for which the font features are selected. Returns: Builder instance for fluent chaining
T modal(bool propval)Set `modal` property. Params: propval = Whether the font chooser dialog is modal. Returns: Builder instance for fluent chaining
T title(string propval)Set `title` property. Params: propval = A title that may be shown on the font chooser dialog that is presented by [gtk.font_dialog.FontDialog.chooseFont]. Returns: Builder instance for fluent chaining

Fluent builder for [gtk.font_dialog.FontDialog]

Methods