Class: Gtk::FontSelectionDialog

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#cancel_buttonGtk::Widget

Gets the “Cancel” button.

Returns:

  • (Gtk::Widget)

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

#font_nameString

Gets the currently-selected font name.

Note that this can be a different string than what you set with gtk_font_selection_dialog_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_font_description_equal() if you want to compare two font descriptions.

Returns:

  • (String)

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

#font_name=(fontname) ⇒ TrueClass

Sets the currently selected font.

Parameters:

  • fontname (String)

    a font name like “Helvetica 12” or “Times Bold 18”

Returns:

  • (TrueClass)

    true if the font selected in fsd is now the fontname specified, false otherwise.

#font_selectionGtk::Widget

Retrieves the Gtk::FontSelection widget embedded in the dialog.

Returns:

#new(title) ⇒ Gtk::Widget

Creates a new Gtk::FontSelectionDialog.

Parameters:

  • title (String)

    the title of the dialog window

Returns:

#ok_buttonGtk::Widget

Gets the “OK” button.

Returns:

  • (Gtk::Widget)

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

#preview_textString

Gets the text displayed in the preview area.

Returns:

  • (String)

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

#preview_text=(text) ⇒ nil

Sets the text displayed in the preview area.

Parameters:

  • text (String)

    the text to display in the preview area

Returns:

  • (nil)