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
FontDialogGidBuilder builder() static nothrowGet builder for [gtk.font_dialog.FontDialog] Returns: New builder objectgtk.filter.Filter filter() @property nothrowGet `filter` property. Returns: Sets a filter to restrict what fonts are shown in the font chooser dialog.void filter(gtk.filter.Filter propval) @property nothrowSet `filter` property. Params: propval = Sets a filter to restrict what fonts are shown in the font chooser dialog.pango.font_map.FontMap fontMap() @property nothrowGet `fontMap` property. Returns: Sets a custom font map to select fonts from.void fontMap(pango.font_map.FontMap propval) @property nothrowSet `fontMap` property. Params: propval = Sets a custom font map to select fonts from.pango.language.Language language() @property nothrowGet `language` property. Returns: The language for which the font features are selected.void language(pango.language.Language propval) @property nothrowSet `language` property. Params: propval = The language for which the font features are selected.bool modal() @property nothrowGet `modal` property. Returns: Whether the font chooser dialog is modal.void modal(bool propval) @property nothrowSet `modal` property. Params: propval = Whether the font chooser dialog is modal.string title() @property nothrowGet `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) @property nothrowSet `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) nothrowThis 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) nothrowThis 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) nothrowThis 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) nothrowThis 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() nothrowReturns the filter that decides which fonts to display in the font chooser dialog. Returns: the filterpango.font_map.FontMap getFontMap() nothrowReturns the fontmap from which fonts are selected, or `NULL` for the default fontmap. Returns: the fontmappango.language.Language getLanguage() nothrowReturns the language for which font features are applied. Returns: the language for font featuresbool getModal() nothrowReturns whether the font chooser dialog blocks interaction with the parent window while it is presented. Returns: `TRUE` if the font chooser dialog is modalstring getTitle() nothrowReturns the title that will be shown on the font chooser dialog. Returns: the titlevoid setFilter(gtk.filter.Filter filter = null) nothrowAdds a filter that decides which fonts to display in the font chooser dialog.void setFontMap(pango.font_map.FontMap fontmap = null) nothrowSets the fontmap from which fonts are selected.void setLanguage(pango.language.Language language) nothrowSets the language for which font features are applied.void setModal(bool modal) nothrowSets whether the font chooser dialog blocks interaction with the parent window while it is presented.Fluent builder implementation template for gtk.font_dialog.FontDialog
Methods
T filter(gtk.filter.Filter propval) nothrowSet `filter` property. Params: propval = Sets a filter to restrict what fonts are shown in the font chooser dialog. Returns: Builder instance for fluent chainingT fontMap(pango.font_map.FontMap propval) nothrowSet `fontMap` property. Params: propval = Sets a custom font map to select fonts from.T language(pango.language.Language propval) nothrowSet `language` property. Params: propval = The language for which the font features are selected. Returns: Builder instance for fluent chainingT modal(bool propval) nothrowSet `modal` property. Params: propval = Whether the font chooser dialog is modal. Returns: Builder instance for fluent chainingT title(string propval) nothrowSet `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 chainingFluent builder for gtk.font_dialog.FontDialog
Methods