Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# Xfc::Gtk::FontSelectionDialog Class Reference

A GtkFontSelectionDialog C++ wrapper class. More...

`#include <xfc/gtk/fontselection.hh>`

Inheritance diagram for Xfc::Gtk::FontSelectionDialog:

List of all members.

## Public Member Functions

Constructors

- FontSelectionDialog ()
    Construct a new FontSelectionDialog with the default title.
- FontSelectionDialog (const String &title)
    Construct a new FontSelectionDialog with the specified title.
- virtual ~FontSelectionDialog ()
    Destructor.

Accessors

- GtkFontSelectionDialog * gtk_font_selection_dialog () const
    Get a pointer to the GtkFontSelectionDialog structure.
- operator GtkFontSelectionDialog * () const
    Conversion operator; safely converts a FontSelectionDialog to a GtkFontSelectionDialog pointer.
- FontSelection * fontsel () const
    Returns a pointer to the FontSelection widget.
- Button * ok_button () const
    Gets a pointer to the "OK" button.
- Button * apply_button () const
    Gets a pointer to the "Apply" button (not shown by default but you can show/hide it).
- Button * cancel_button () const
    Get a pointer to the "Cancel" button.
- String get_font_name () const
    Gets the currently-selected font name or a null String if no font is selected.
- String get_preview_text () const
    Gets the text displayed in the preview area.

Methods

- bool set_font_name (const String &fontname)
    Sets the currently selected font.
- void set_preview_text (const String &text)
    Sets the text displayed in the preview area.

## Protected Member Functions

Constructors

- FontSelectionDialog (GtkFontSelectionDialog *font_selection_dialog, bool owns_reference=false)
    Construct a new FontSelectionDialog from an existing GtkFontSelectionDialog.

## Detailed Description

A GtkFontSelectionDialog C++ wrapper class.

The FontSelectionDialog widget is a dialog box for selecting 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().

## Constructor & Destructor Documentation

Xfc::Gtk::FontSelectionDialog::FontSelectionDialog | ( | GtkFontSelectionDialog * | font_selection_dialog,
|  | bool | owns_reference = `false`
| ) | `[explicit, protected]`

Construct a new FontSelectionDialog from an existing GtkFontSelectionDialog.

Parameters:

  | font_selection_dialog | A pointer to a GtkFontSelectionDialog.
  | owns_reference | Set false if the initial reference count is floating, set true if it's not.

The font_selection_dialog can be a newly created GtkFontSelectionDialog or an existing GtkFontSelectionDialog (see G::Object::Object).

Xfc::Gtk::FontSelectionDialog::FontSelectionDialog | ( | const String & | title | ) | `[explicit]`

Construct a new FontSelectionDialog with the specified title.

Parameters:

  | title | The title of the dialog box.

## Member Function Documentation

bool Xfc::Gtk::FontSelectionDialog::set_font_name | ( | const String & | fontname | ) |

Sets the currently selected font.

Parameters:

  | fontname | A fontname.

Returns:
  true if the font was found.

void Xfc::Gtk::FontSelectionDialog::set_preview_text | ( | const String & | text | ) |

Sets the text displayed in the preview area.

Parameters:

  | text | The text to display in the preview area.

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

- fontselection.hh

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3