Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gtk::FontSelection Class Reference

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

`#include <inti/gtk/fontselection.h>`

Inheritance diagram for Inti::Gtk::FontSelection:

List of all members.

## Public Member Functions

Constructors

- FontSelection ()
    Construct a new FontSelection.
- virtual ~FontSelection ()
    Destructor.

Accessors

- GtkFontSelection * gtk_font_selection () const
    Get a pointer to the GtkFontSelection structure.
- GtkFontSelectionClass * gtk_font_selection_class () const
    Get a pointer to the GtkFontSelectionClass structure.
- operator GtkFontSelection * () const
    Conversion operator; safely converts a FontSelection to a GtkFontSelection pointer.
- Entry * size_entry () const
    Returns a pointer to the font size Entry.
- Entry * preview_entry () const
    Returns a pointer to the preview text Entry.
- Pango::FontFamily * get_font_family () const
    Gets the current font family.
- Pango::FontFace * get_font_face () const
    Gets the current font face.
- String get_font_name () const
    Gets the currently selected font name.
- 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.

Property Proxies

- const FontNamePropertyProxy prop_font_name ()
    The name of the currently selected font (String : Read / Write).
- const PreviewTextPropertyProxy prop_preview_text ()
    The text displayed in the preview area (String : Read / Write).

## Protected Member Functions

Constructors

- FontSelection (GtkFontSelection *font_selection, bool reference=false)
    Construct a new FontSelection from an existing GtkFontSelection.

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

## Constructor & Destructor Documentation

Inti::Gtk::FontSelection::FontSelection | ( | GtkFontSelection * | font_selection,
|  | bool | reference = false
| ) | `[explicit, protected]`

  | Construct a new FontSelection from an existing GtkFontSelection. Parameters:
  font_selection | A pointer to a GtkFontSelection.
  reference | Set 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 Inti::Gtk::FontSelection::set_font_name | ( | const String & | fontname | ) |

  | Sets the currently selected font. Parameters:
  fontname | A fontname.
Returns: true if the font was found.

void Inti::Gtk::FontSelection::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.h

Main Page - Footer