Reference Manual

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

# Inti::Gtk::FontSelectionDialog Class Reference

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

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

Inheritance diagram for Inti::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.
- GtkFontSelectionDialogClass * gtk_font_selection_dialog_class () const
    Get a pointer to the GtkFontSelectionDialogClass 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 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

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

Construct a new FontSelectionDialog from an existing GtkFontSelectionDialog.

Parameters:

  font_selection_dialog | A pointer to a GtkFontSelectionDialog.
  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).

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

Main Page - Footer