Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Public Member Functions
Xfc::Gtk::FontSelection Class Reference

A GtkFontSelection C++ wrapper class. More...

#include <xfc/gtk/fontselection.hh>

Inheritance diagram for Xfc::Gtk::FontSelection:
Xfc::Gtk::VBox Xfc::Gtk::Box Xfc::Gtk::Container Xfc::Gtk::Widget Xfc::Gtk::Object Xfc::Atk::Implementor Xfc::G::Object Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::G::TypeInstance Xfc::Trackable Xfc::Trackable

List of all members.

Public Member Functions

Constructors


Detailed Description

A GtkFontSelection C++ wrapper class.

The FontSelection widget lists the available fonts, styles and sizes, allowing the user to select a font. It is used in the FontSelectionDialog widget to provide a dialog box for selecting fonts.

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().

See also: the Font Selection HOWTO and example.


Constructor & Destructor Documentation

Xfc::Gtk::FontSelection::FontSelection ( GtkFontSelection *  font_selection,
bool  owns_reference = false 
) [explicit, protected]

Construct a new FontSelection from an existing GtkFontSelection.

Parameters:
font_selectionA pointer to a GtkFontSelection.
owns_referenceSet false if the initial reference count is floating, set true if it's not.

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


Member Function Documentation

bool Xfc::Gtk::FontSelection::set_font_name ( const String fontname)

Sets the currently selected font.

Parameters:
fontnameA fontname.
Returns:
true if the font was found.
void Xfc::Gtk::FontSelection::set_preview_text ( const String text)

Sets the text displayed in the preview area.

Parameters:
textThe text to display in the preview area.

The documentation for this class was generated from the following file:
Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC