# Gtk::FontChooser Class Reference

An interface implemented by widgets displaying fonts. More...

Inheritance diagram for Gtk::FontChooser:
[legend]

List of all members.

## Public Member Functions

virtual | ~FontChooser ()
GtkFontChooser* | gobj ()
| Provides access to the underlying C GObject.
const GtkFontChooser* | gobj () const
| Provides access to the underlying C GObject.
Glib::RefPtr< Pango::FontFamily > | get_font_family ()
Glib::RefPtr< const Pango::FontFamily > | get_font_family () const
Glib::RefPtr< Pango::FontFace > | get_font_face ()
Glib::RefPtr< const Pango::FontFace > | get_font_face () const
int | get_font_size () const
Pango::FontDescription | get_font_desc () const
void | set_font_desc (const Pango::FontDescription& font_desc)
Glib::ustring | get_font () const
void | set_font (const Glib::ustring& font)
Glib::ustring | get_preview_text () const
void | set_preview_text (const Glib::ustring& fontname)
bool | get_show_preview_entry () const
void | set_show_preview_entry (bool show_preview_entry=true)

## Static Public Member Functions

static void | add_interface (GType gtype_implementer)

## Related Functions

(Note that these are not member functions.)
Glib::RefPtr< Gtk::FontChooser > | wrap (GtkFontChooser* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

An interface implemented by widgets displaying fonts.

FontChooser widgets list the available fonts, styles and sizes, allowing the user to select a font.

To set the font which is initially selected, use set_font_name().

To get the selected font use get_font_name().

To change the text which is shown in the preview area, use set_preview_text().

Since gtkmm 3.2:

## Constructor & Destructor Documentation

virtual Gtk::FontChooser::~FontChooser | ( |  | ) | `[virtual]`

## Member Function Documentation

static void Gtk::FontChooser::add_interface | ( | GType | gtype_implementer | ) | `[static]`

Glib::ustring Gtk::FontChooser::get_font | ( |  | ) | const

Pango::FontDescription Gtk::FontChooser::get_font_desc | ( |  | ) | const

Glib::RefPtr<Pango::FontFace> Gtk::FontChooser::get_font_face | ( |  | ) |

Glib::RefPtr<const Pango::FontFace> Gtk::FontChooser::get_font_face | ( |  | ) | const

Glib::RefPtr<Pango::FontFamily> Gtk::FontChooser::get_font_family | ( |  | ) |

Glib::RefPtr<const Pango::FontFamily> Gtk::FontChooser::get_font_family | ( |  | ) | const

int Gtk::FontChooser::get_font_size | ( |  | ) | const

Glib::ustring Gtk::FontChooser::get_preview_text | ( |  | ) | const

bool Gtk::FontChooser::get_show_preview_entry | ( |  | ) | const

GtkFontChooser* Gtk::FontChooser::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gtk::FontChooserDialog, and Gtk::FontChooserWidget.

const GtkFontChooser* Gtk::FontChooser::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gtk::FontChooserDialog, and Gtk::FontChooserWidget.

void Gtk::FontChooser::set_font | ( | const Glib::ustring & | font | ) |

void Gtk::FontChooser::set_font_desc | ( | const Pango::FontDescription & | font_desc | ) |

void Gtk::FontChooser::set_preview_text | ( | const Glib::ustring & | fontname | ) |

void Gtk::FontChooser::set_show_preview_entry | ( | bool | show_preview_entry = `true` | ) |

## Friends And Related Function Documentation

Glib::RefPtr< Gtk::FontChooser > wrap | ( | GtkFontChooser * | object,
|  | bool | take_copy = `false`
| ) |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- gtkmm/fontchooser.h