Gtk.FontSelectionDialog

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Bin Gtk.Bin Gtk.Window Gtk.Window Gtk.Bin->Gtk.Window Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Dialog Gtk.Dialog Gtk.FontSelectionDialog Gtk.FontSelectionDialog Gtk.Dialog->Gtk.FontSelectionDialog Gtk.Widget->Gtk.Container Gtk.Window->Gtk.Dialog

Subclasses:

None

Methods

Inherited:

Gtk.Dialog (14), Gtk.Window (119), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new (title)

get_cancel_button ()

get_font_name ()

get_font_selection ()

get_ok_button ()

get_preview_text ()

set_font_name (fontname)

set_preview_text (text)

Virtual Methods

Inherited:

Gtk.Dialog (2), Gtk.Window (5), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Dialog (1), Gtk.Window (33), Gtk.Container (3), Gtk.Widget (39)

Style Properties

Inherited:

Gtk.Dialog (4), Gtk.Window (2), Gtk.Widget (17)

Signals

Inherited:

Gtk.Dialog (2), Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

Gtk.Dialog (2), Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gtk.Dialog

r

Class Details

class Gtk.FontSelectionDialog(*args, **kwargs)
Bases:

Gtk.Dialog

Abstract:

No

Structure:

Gtk.FontSelectionDialogClass

classmethod new(title)[source]
Parameters:

title (str) – the title of the dialog window

Returns:

a new Gtk.FontSelectionDialog

Return type:

Gtk.Widget

Creates a new Gtk.FontSelectionDialog.

Deprecated since version 3.2: Use Gtk.FontChooserDialog

get_cancel_button()[source]
Returns:

the Gtk.Widget used in the dialog for the “Cancel” button.

Return type:

Gtk.Widget

Gets the “Cancel” button.

New in version 2.14.

Deprecated since version 3.2: Use Gtk.FontChooserDialog

get_font_name()[source]
Returns:

A string with the name of the current font, or None if no font is selected. You must free this string with GLib.free().

Return type:

str

Gets the currently-selected font name.

Note that this can be a different string than what you set with Gtk.FontSelectionDialog.set_font_name(), as the font selection widget may normalize font names and thus return a string with a different structure. For example, “Helvetica Italic Bold 12” could be normalized to “Helvetica Bold Italic 12”. Use Pango.FontDescription.equal() if you want to compare two font descriptions.

Deprecated since version 3.2: Use Gtk.FontChooserDialog

get_font_selection()[source]
Returns:

the embedded Gtk.FontSelection

Return type:

Gtk.Widget

Retrieves the Gtk.FontSelection widget embedded in the dialog.

New in version 2.22.

Deprecated since version 3.2: Use Gtk.FontChooserDialog

get_ok_button()[source]
Returns:

the Gtk.Widget used in the dialog for the “OK” button.

Return type:

Gtk.Widget

Gets the “OK” button.

New in version 2.14.

Deprecated since version 3.2: Use Gtk.FontChooserDialog

get_preview_text()[source]
Returns:

the text displayed in the preview area. This string is owned by the widget and should not be modified or freed

Return type:

str

Gets the text displayed in the preview area.

Deprecated since version 3.2: Use Gtk.FontChooserDialog

set_font_name(fontname)[source]
Parameters:

fontname (str) – a font name like “Helvetica 12” or “Times Bold 18”

Returns:

True if the font selected in self is now the fontname specified, False otherwise.

Return type:

bool

Sets the currently selected font.

Deprecated since version 3.2: Use Gtk.FontChooserDialog

set_preview_text(text)[source]
Parameters:

text (str) – the text to display in the preview area

Sets the text displayed in the preview area.

Deprecated since version 3.2: Use Gtk.FontChooserDialog