FontDialog
Object Hierarchy:
Gtk.FontDialog
Gtk.FontDialog
Gtk.FontDialog
GLib.Object
GLib.Object
GLib.Object->Gtk.FontDialog
Description:
[
CCode ( type_id =
"gtk_font_dialog_get_type ()" ) ]
[
Version ( since =
"4.10" ) ]
public sealed class FontDialog :
Object
A `GtkFontDialog` 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 [method@Gtk.FontDialog.choose_font] 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 [method@Gtk.FontDialog.choose_font_finish].
See [class@Gtk.FontDialogButton] for a convenient control that uses `GtkFontDialog` and presents the results.
Content:
Properties:
public Filter filter { get ; set ; }
Sets a filter to restrict what fonts are shown in the font chooser dialog.
public FontMap font_map { get ; set ; }
Sets a custom font map to select fonts from.
public Language language { owned get ; set ; }
The language for which the font features are selected.
public bool modal { get ; set ; }
Whether the font chooser dialog is modal.
public string title { get ; set ; }
A title that may be shown on the font chooser dialog that is presented by [
method@Gtk.
Creation methods:
Methods:
public async FontFace ? choose_face (Window ? parent, FontFace ? initial_value, Cancellable ? cancellable) throws Error
This function initiates a font selection operation by presenting a dialog to
the user for selecting a font face (i.
public async FontFamily ? choose_family (Window ? parent, FontFamily ? initial_value, Cancellable ? cancellable) throws Error
This function initiates a font selection operation by presenting a dialog to
the user for selecting a font family.
public async FontDescription ? choose_font (Window ? parent, FontDescription ? initial_value, Cancellable ? cancellable) throws Error
This function initiates a font selection operation by presenting a dialog to
the user for selecting a font.
public async bool choose_font_and_features (Window ? parent, FontDescription ? initial_value, Cancellable ? cancellable, out FontDescription font_desc, out string font_features, out Language language) throws Error
This function initiates a font selection operation by presenting a dialog to
the user for selecting a font and font features.
public unowned Filter ? get_filter ()
Returns the filter that decides which fonts to display in the font chooser
dialog.
public unowned FontMap ? get_font_map ()
Returns the fontmap from which fonts are selected, or `NULL` for the default
fontmap.
public Language ? get_language ()
Returns the language for which font features are applied.
public bool get_modal ()
Returns whether the font chooser dialog blocks interaction with the parent
window while it is presented.
public unowned string get_title ()
Returns the title that will be shown on the font chooser dialog.
public void set_filter (Filter ? filter)
Adds a filter that decides which fonts to display in the font chooser
dialog.
public void set_font_map (FontMap ? fontmap)
Sets the fontmap from which fonts are selected.
public void set_language (Language language)
Sets the language for which font features are applied.
public void set_modal (bool modal)
Sets whether the font chooser dialog blocks interaction with the parent
window while it is presented.
public void set_title (string title)
Sets the title that will be shown on the font chooser dialog.
Inherited Members:
All known members inherited from class GLib.Object