FontDialog
Object Hierarchy:
Description:
[
CCode ( type_id =
"gtk_font_dialog_get_type ()" ) ]
[
Version ( since =
"4.10" ) ]
public class FontDialog :
Object
Asynchronous API to present a font chooser dialog.
`GtkFontDialog` collects the arguments that are needed to present the 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.
See [class@Gtk.FontDialogButton] for a convenient control that uses `GtkFontDialog` and presents the results.
Content:
Properties:
- public Filter filter { get; set; }
A filter to restrict what fonts are shown in the font chooser dialog.
- public FontMap font_map { get; set; }
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
Presents a font chooser dialog to the user.
- public async FontFamily choose_family (Window? parent, FontFamily? initial_value, Cancellable? cancellable) throws Error
Presents a font chooser dialog to the user.
- public async FontDescription choose_font (Window? parent, FontDescription? initial_value, Cancellable? cancellable) throws Error
Presents a font chooser dialog to the user.
- 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
Presents a font chooser dialog to the user.
- 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