MateFontPicker

## MateFontPicker MateFontPicker |

## Synopsis

    #include <libmateui/libmateui.h>

    enum                MateFontPickerMode;
                        MateFontPickerPrivate;
    struct              MateFontPicker;
    GtkWidget *         mate_font_picker_new               (void);
    void                mate_font_picker_set_title         (MateFontPicker *gfp,
                                                             const gchar *title);
    const gchar *       mate_font_picker_get_title         (MateFontPicker *gfp);
    MateFontPickerMode  mate_font_picker_get_mode         (MateFontPicker *gfp);
    void                mate_font_picker_set_mode          (MateFontPicker *gfp,
                                                             MateFontPickerMode mode);
    void                mate_font_picker_fi_set_use_font_in_label
                                                            (MateFontPicker *gfp,
                                                             gboolean use_font_in_label,
                                                             gint size);
    void                mate_font_picker_fi_set_show_size  (MateFontPicker *gfp,
                                                             gboolean show_size);
    void                mate_font_picker_uw_set_widget     (MateFontPicker *gfp,
                                                             GtkWidget *widget);
    GtkWidget *         mate_font_picker_uw_get_widget     (MateFontPicker *gfp);
    const gchar *       mate_font_picker_get_font_name     (MateFontPicker *gfp);
    GdkFont *           mate_font_picker_get_font          (MateFontPicker *gfp);
    gboolean            mate_font_picker_set_font_name     (MateFontPicker *gfp,
                                                             const gchar *fontname);
    const gchar *       mate_font_picker_get_preview_text  (MateFontPicker *gfp);
    void                mate_font_picker_set_preview_text  (MateFontPicker *gfp,
                                                             const gchar *text);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBin
                                     +----GtkButton
                                           +----MateFontPicker

## Implemented Interfaces

MateFontPicker implements AtkImplementorIface, GtkBuildable and GtkActivatable.

## Properties

      "font"                     gpointer              : Read
      "font-name"                gchar*                : Read / Write
      "label-font-size"          gint                  : Read / Write
      "mode"                     MateFontPickerMode   : Read / Write
      "preview-text"             gchar*                : Read / Write
      "show-size"                gboolean              : Read / Write
      "title"                    gchar*                : Read / Write
      "use-font-in-label"        gboolean              : Read / Write

## Signals

      "font-set"                                       : Run First

## Description

## Details

### enum MateFontPickerMode

    typedef enum {
        MATE_FONT_PICKER_MODE_PIXMAP,
        MATE_FONT_PICKER_MODE_FONT_INFO,
        MATE_FONT_PICKER_MODE_USER_WIDGET,
        MATE_FONT_PICKER_MODE_UNKNOWN
    } MateFontPickerMode;

### Warning

`MateFontPickerMode` is deprecated and should not be used in newly-written code.

### MateFontPickerPrivate

    typedef struct _MateFontPickerPrivate MateFontPickerPrivate;

### Warning

`MateFontPickerPrivate` is deprecated and should not be used in newly-written code.

### struct MateFontPicker

    struct MateFontPicker;

### Warning

`MateFontPicker` is deprecated and should not be used in newly-written code.

### mate_font_picker_new ()

    GtkWidget *         mate_font_picker_new               (void);

### Warning

`mate_font_picker_new` is deprecated and should not be used in newly-written code.

Create new font picker widget.

Returns : | Pointer to new font picker widget.

### mate_font_picker_set_title ()

    void                mate_font_picker_set_title         (MateFontPicker *gfp,
                                                             const gchar *title);

### Warning

`mate_font_picker_set_title` is deprecated and should not be used in newly-written code.

Sets the title for the font selection dialog. If `title` is `NULL`, then the default is used.

`gfp` : | Pointer to MATE font picker widget.
`title` : | String containing font selection dialog title.

### mate_font_picker_get_title ()

    const gchar *       mate_font_picker_get_title         (MateFontPicker *gfp);

### Warning

`mate_font_picker_get_title` is deprecated and should not be used in newly-written code.

Retrieve name of the font selection dialog title

`gfp` : | Pointer to MATE font picker widget.
Returns : | Pointer to an internal copy of the title string

### mate_font_picker_get_mode ()

    MateFontPickerMode  mate_font_picker_get_mode         (MateFontPicker *gfp);

### Warning

`mate_font_picker_get_mode` is deprecated and should not be used in newly-written code.

Returns current font picker button mode (or what to show). Possible values include `MATE_FONT_PICKER_MODE_PIXMAP`, `MATE_FONT_PICKER_MODE_FONT_INFO`, and `MATE_FONT_PICKER_MODE_USER_WIDGET`.

`gfp` : | Pointer to MATE font picker widget.
Returns : | Button mode currently set in font picker widget, or `MATE_FONT_PICKER_MODE_UNKNOWN` on error.

### mate_font_picker_set_mode ()

    void                mate_font_picker_set_mode          (MateFontPicker *gfp,
                                                             MateFontPickerMode mode);

### Warning

`mate_font_picker_set_mode` is deprecated and should not be used in newly-written code.

Set value of subsequent font picker button mode (or what to show).

`gfp` : | Pointer to MATE font picker widget.
`mode` : | Value of subsequent font picker button mode (or what to show)

### mate_font_picker_fi_set_use_font_in_label ()

    void                mate_font_picker_fi_set_use_font_in_label
                                                            (MateFontPicker *gfp,
                                                             gboolean use_font_in_label,
                                                             gint size);

### Warning

`mate_font_picker_fi_set_use_font_in_label` is deprecated and should not be used in newly-written code.

If `use_font_in_label` is `TRUE`, font name will be written using font chosen by user and using `size` passed to this function. This only applies if current button mode is `MATE_FONT_PICKER_MODE_FONT_INFO`.

`gfp` : | Pointer to MATE font picker widget.
`use_font_in_label` : | If `TRUE`, font name will be written using font chosen.
`size` : | Display font using this point size.

### mate_font_picker_fi_set_show_size ()

    void                mate_font_picker_fi_set_show_size  (MateFontPicker *gfp,
                                                             gboolean show_size);

### Warning

`mate_font_picker_fi_set_show_size` is deprecated and should not be used in newly-written code.

If `show_size` is `TRUE`, font size will be displayed along with font chosen by user. This only applies if current button mode is `MATE_FONT_PICKER_MODE_FONT_INFO`.

`gfp` : | Pointer to MATE font picker widget.
`show_size` : | `TRUE` if font size should be displayed in dialog.

### mate_font_picker_uw_set_widget ()

    void                mate_font_picker_uw_set_widget     (MateFontPicker *gfp,
                                                             GtkWidget *widget);

### Warning

`mate_font_picker_uw_set_widget` is deprecated and should not be used in newly-written code.

Set the user-supplied `widget` as the inside of the font picker. This only applies with MATE_FONT_PICKER_MODE_USER_WIDGET.

`gfp` : | Pointer to MATE font picker widget.
`widget` : | User widget to display for inside of font picker.

### mate_font_picker_uw_get_widget ()

    GtkWidget *         mate_font_picker_uw_get_widget     (MateFontPicker *gfp);

### Warning

`mate_font_picker_uw_get_widget` is deprecated and should not be used in newly-written code.

Get the user-supplied widget inside of the font picker. This only applies with MATE_FONT_PICKER_MODE_USER_WIDGET.

`gfp` : | Pointer to MATE font picker widget.
Returns : | a GtkWidget, or `NULL` if not in MATE_FONT_PICKER_MODE_USER_WIDGET mode

### mate_font_picker_get_font_name ()

    const gchar *       mate_font_picker_get_font_name     (MateFontPicker *gfp);

### Warning

`mate_font_picker_get_font_name` is deprecated and should not be used in newly-written code.

Retrieve name of font from font selection dialog.

`gfp` : | Pointer to MATE font picker widget.
Returns : | Pointer to an internal copy of the font name.

### mate_font_picker_get_font ()

    GdkFont *           mate_font_picker_get_font          (MateFontPicker *gfp);

### Warning

`mate_font_picker_get_font` is deprecated and should not be used in newly-written code.

Retrieve font info from font selection dialog.

`gfp` : | Pointer to MATE font picker widget.
Returns : | Return value of gtk_font_selection_dialog_get_font, or `NULL` if font dialog is not being displayed. The value is not a copy but an internal value and should not be modified.

### mate_font_picker_set_font_name ()

    gboolean            mate_font_picker_set_font_name     (MateFontPicker *gfp,
                                                             const gchar *fontname);

### Warning

`mate_font_picker_set_font_name` is deprecated and should not be used in newly-written code.

Set or update currently-displayed font in font picker dialog.

`gfp` : | Pointer to MATE font picker widget.
`fontname` : | Name of font to display in font selection dialog
Returns : | Return value of gtk_font_selection_dialog_set_font_name if the font selection dialog exists, otherwise `FALSE`.

### mate_font_picker_get_preview_text ()

    const gchar *       mate_font_picker_get_preview_text  (MateFontPicker *gfp);

### Warning

`mate_font_picker_get_preview_text` is deprecated and should not be used in newly-written code.

Retrieve preview text from font selection dialog if available.

`gfp` : | Pointer to MATE font picker widget.
Returns : | Reference to internal copy of preview text string, or `NULL` if no font dialog is being displayed.

### mate_font_picker_set_preview_text ()

    void                mate_font_picker_set_preview_text  (MateFontPicker *gfp,
                                                             const gchar *text);

### Warning

`mate_font_picker_set_preview_text` is deprecated and should not be used in newly-written code.

Set preview text in font picker, and in font selection dialog if one is being displayed.

`gfp` : | Pointer to MATE font picker widget.
`text` : | New preview text

## Property Details

### The `"font"` property

      "font"                     gpointer              : Read

The selected GtkFont.

### The `"font-name"` property

      "font-name"                gchar*                : Read / Write

Name of the selected font.

Default value: "sans 12"

### The `"label-font-size"` property

      "label-font-size"          gint                  : Read / Write

Font size for label in font info mode.

Allowed values: [8,72]

Default value: 14

### The `"mode"` property

      "mode"                     MateFontPickerMode   : Read / Write

The mode of operation of the font picker.

Default value: MATE_FONT_PICKER_MODE_PIXMAP

### The `"preview-text"` property

      "preview-text"             gchar*                : Read / Write

Preview text shown in the dialog.

Default value: "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"

### The `"show-size"` property

      "show-size"                gboolean              : Read / Write

Show size in font info mode.

Default value: TRUE

### The `"title"` property

      "title"                    gchar*                : Read / Write

The title of the selection dialog box.

Default value: "Pick a Font"

### The `"use-font-in-label"` property

      "use-font-in-label"        gboolean              : Read / Write

Use font in the label in font info mode.

Default value: FALSE

## Signal Details

### The `"font-set"` signal

    void                user_function                      (MateFontPicker *fontpicker,
                                                            gchar           *arg1,
                                                            gpointer         user_data)       : Run First

`fontpicker` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.