Interface
GtkFontChooser
Description [src]
interface Gtk.FontChooser : GObject.Object
GtkFontChooser
is an interface that can be implemented by widgets
displaying the list of fonts. In GTK+, the main objects
that implement this interface are GtkFontChooserWidget
,
GtkFontChooserDialog
and GtkFontButton
. The GtkFontChooser interface
has been introducted in GTK+ 3.2.
Prerequisite
In order to implement FontChooser, your type must inherit fromGObject
.
Instance methods
gtk_font_chooser_get_font_face
Gets the PangoFontFace
representing the selected font group
details (i.e. family, slant, weight, width, etc).
since: 3.2
gtk_font_chooser_get_font_family
Gets the PangoFontFamily
representing the selected font family.
Font families are a collection of font faces.
since: 3.2
gtk_font_chooser_get_font_map
Gets the custom font map of this font chooser widget,
or NULL
if it does not have one.
since: 3.18
gtk_font_chooser_get_level
Returns the current level of granularity for selecting fonts.
since: 3.24
gtk_font_chooser_get_show_preview_entry
Returns whether the preview entry is shown or not.
since: 3.2
gtk_font_chooser_set_filter_func
Adds a filter function that decides which fonts to display in the font chooser.
since: 3.2
gtk_font_chooser_set_font_map
Sets a custom font map to use for this font chooser widget. A custom font map can be used to present application-specific fonts instead of or in addition to the normal system fonts.
since: 3.18
gtk_font_chooser_set_preview_text
Sets the text displayed in the preview area.
The text
is used to show how the selected font looks.
since: 3.2
Properties
Gtk.FontChooser:font-features
The selected font features, in a format that is compatible with CSS and with Pango attributes.
unstable since: 3.24.1
Gtk.FontChooser:language
The language for which the GtkFontChooser:font-features
were
selected, in a format that is compatible with CSS and with Pango attributes.
unstable since: 3.24.1
Signals
Gtk.FontChooser::font-activated
Emitted when a font is activated. This usually happens when the user double clicks an item, or an item is selected and the user presses one of the keys Space, Shift+Space, Return or Enter.
Interface structure
struct GtkFontChooserIface {
GTypeInterface base_iface;
PangoFontFamily* (* get_font_family) (
GtkFontChooser* fontchooser
);
PangoFontFace* (* get_font_face) (
GtkFontChooser* fontchooser
);
gint (* get_font_size) (
GtkFontChooser* fontchooser
);
void (* set_filter_func) (
GtkFontChooser* fontchooser,
GtkFontFilterFunc filter,
gpointer user_data,
GDestroyNotify destroy
);
void (* font_activated) (
GtkFontChooser* chooser,
const gchar* fontname
);
void (* set_font_map) (
GtkFontChooser* fontchooser,
PangoFontMap* fontmap
);
PangoFontMap* (* get_font_map) (
GtkFontChooser* fontchooser
);
gpointer padding;
}
No description available.
Interface members
base_iface |
|
No description available. |
|
get_font_family |
|
No description available. |
|
get_font_face |
|
No description available. |
|
get_font_size |
|
No description available. |
|
set_filter_func |
|
No description available. |
|
font_activated |
|
No description available. |
|
set_font_map |
|
No description available. |
|
get_font_map |
|
No description available. |
|
padding |
|
No description available. |
Virtual methods
Gtk.FontChooser.get_font_face
Gets the PangoFontFace
representing the selected font group
details (i.e. family, slant, weight, width, etc).
since: 3.2
Gtk.FontChooser.get_font_family
Gets the PangoFontFamily
representing the selected font family.
Font families are a collection of font faces.
since: 3.2
Gtk.FontChooser.get_font_map
Gets the custom font map of this font chooser widget,
or NULL
if it does not have one.
since: 3.18
Gtk.FontChooser.set_filter_func
Adds a filter function that decides which fonts to display in the font chooser.
since: 3.2
Gtk.FontChooser.set_font_map
Sets a custom font map to use for this font chooser widget. A custom font map can be used to present application-specific fonts instead of or in addition to the normal system fonts.
since: 3.18