Chapter 42. Font Selection Dialogs

Inheritance Hierarchy

Object
   +--- Widget
         +--- Container
               +--- Bin
                     +--- Window
                           +--- FontSelectionDialog
         

The FontSelectionDialog is a dialog that allows the user to choose fonts and font styles using the builtin FontSelection widget.

The following function creates a FontSelectionDialog:

$font_dialog = new Gtk::FontSelectionDialog( $title );

To get the selected font from the dialog, you would call:

$font_dialog->get_font();

To get the name of the currently selected font, you would call:

$font_dialog->get_font_name();

To set the currently selected font in the dialog box, you would call:

font_dialog->set_font_name( $font_name );