GtkFontCombo
3
GTKEXTRA Library

# GtkFontCombo

A font combo widget for GTK.

## Synopsis

    #include <gtkextra.h>

                        GtkFontCombo;
    GtkWidget *         gtk_font_combo_new                  (void);
    void                gtk_font_combo_select               (GtkFontCombo *font_combo,
                                                             const gchar *family,
                                                             gboolean bold,
                                                             gboolean italic,
                                                             gint height);
    void                gtk_font_combo_select_nth           (GtkFontCombo *font_combo,
                                                             gint n,
                                                             gboolean bold,
                                                             gboolean italic,
                                                             gint height);
    gint                gtk_font_combo_get_font_height      (GtkFontCombo *font_combo);
    GtkPSFont *         gtk_font_combo_get_psfont           (GtkFontCombo *font_combo);
    PangoFontDescription * gtk_font_combo_get_font_description
                                                            (GtkFontCombo *font_combo);
    GdkFont *           gtk_font_combo_get_gdkfont          (GtkFontCombo *font_combo);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkToolbar
                                     +----GtkFontCombo

## Implemented Interfaces

GtkFontCombo implements AtkImplementorIface, GtkBuildable, GtkToolShell and GtkOrientable.

## Signals

      "changed"                                        : Run Last

## Description

It is a GtkToolBar subclass with two combos to select among the 35 standard Adobe PostScript fonts with different sizes. It has also two buttons to select bold and italics. When you select a new font, it returns the name of the corresponding Postscript font and the equivalent Xfont. This is what we all expect to have on the top of a GUI for a spreadsheet or word processor.

## Details

### GtkFontCombo

    typedef struct _GtkFontCombo GtkFontCombo;

The GtkFontCombo struct contains only private data. It should only be accessed through the functions described below.

### gtk_font_combo_new ()

    GtkWidget *         gtk_font_combo_new                  (void);

Returns :

### gtk_font_combo_select ()

    void                gtk_font_combo_select               (GtkFontCombo *font_combo,
                                                             const gchar *family,
                                                             gboolean bold,
                                                             gboolean italic,
                                                             gint height);

Select from the combo a font which satisfies the arguments.

`font_combo` :

  a GtkFontCombo

`family` :

  font family

`bold` :

  TRUE or FALSE

`italic` :

  TRUE or FALSE

`height` :

  height of the font

### gtk_font_combo_select_nth ()

    void                gtk_font_combo_select_nth           (GtkFontCombo *font_combo,
                                                             gint n,
                                                             gboolean bold,
                                                             gboolean italic,
                                                             gint height);

Select from the combo the nth font which satisfies the arguments.

`font_combo` :

  a GtkFontCombo

`n` :

  nth font

`bold` :

  TRUE or FALSE

`italic` :

  TRUE or FALSE

`height` :

  height of the font

### gtk_font_combo_get_font_height ()

    gint                gtk_font_combo_get_font_height      (GtkFontCombo *font_combo);

`font_combo` :

Returns :

### gtk_font_combo_get_psfont ()

    GtkPSFont *         gtk_font_combo_get_psfont           (GtkFontCombo *font_combo);

`font_combo` :

Returns :

### gtk_font_combo_get_font_description ()

    PangoFontDescription * gtk_font_combo_get_font_description
                                                            (GtkFontCombo *font_combo);

`font_combo` :

Returns :

### gtk_font_combo_get_gdkfont ()

    GdkFont *           gtk_font_combo_get_gdkfont          (GtkFontCombo *font_combo);

`font_combo` :

Returns :

## Signal Details

### The `"changed"` signal

    void                user_function                      (GtkFontCombo *bfont_combo,
                                                            gpointer      user_data)        : Run Last

Emmited whenever a different font is choosed.

`bfont_combo` :

  the GtkFontCombo object that received the signal.

`user_data` :

  user data set when the signal handler was connected.