GtkFontButton

GtkFontButton

Synopsis

#include <gtk/gtk.h>

                    GtkFontButton;
GtkWidget *         gtk_font_button_new                 (void);
GtkWidget *         gtk_font_button_new_with_font       (const gchar *fontname);
gboolean            gtk_font_button_set_font_name       (GtkFontButton *font_button,
                                                         const gchar *fontname);
const gchar*        gtk_font_button_get_font_name       (GtkFontButton *font_button);
void                gtk_font_button_set_show_style      (GtkFontButton *font_button,
                                                         gboolean show_style);
gboolean            gtk_font_button_get_show_style      (GtkFontButton *font_button);
void                gtk_font_button_set_show_size       (GtkFontButton *font_button,
                                                         gboolean show_size);
gboolean            gtk_font_button_get_show_size       (GtkFontButton *font_button);
void                gtk_font_button_set_use_font        (GtkFontButton *font_button,
                                                         gboolean use_font);
gboolean            gtk_font_button_get_use_font        (GtkFontButton *font_button);
void                gtk_font_button_set_use_size        (GtkFontButton *font_button,
                                                         gboolean use_size);
gboolean            gtk_font_button_get_use_size        (GtkFontButton *font_button);
void                gtk_font_button_set_title           (GtkFontButton *font_button,
                                                         const gchar *title);
const gchar *       gtk_font_button_get_title           (GtkFontButton *font_button);

Description

Details

GtkFontButton

typedef struct {
  GtkButton button;
} GtkFontButton;


gtk_font_button_new ()

GtkWidget *         gtk_font_button_new                 (void);

Creates a new font picker widget.

Returns :

a new font picker widget.

Since 2.4


gtk_font_button_new_with_font ()

GtkWidget *         gtk_font_button_new_with_font       (const gchar *fontname);

Creates a new font picker widget.

fontname :

Name of font to display in font selection dialog

Returns :

a new font picker widget.

Since 2.4


gtk_font_button_set_font_name ()

gboolean            gtk_font_button_set_font_name       (GtkFontButton *font_button,
                                                         const gchar *fontname);

Sets or updates the currently-displayed font in font picker dialog.

font_button :

a GtkFontButton

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.

Since 2.4


gtk_font_button_get_font_name ()

const gchar*        gtk_font_button_get_font_name       (GtkFontButton *font_button);

Retrieves the name of the currently selected font. This name includes style and size information as well. If you want to render something with the font, use this string with pango_font_description_from_string() . If you're interested in peeking certain values (family name, style, size, weight) just query these properties from the PangoFontDescription object.

font_button :

a GtkFontButton

Returns :

an internal copy of the font name which must not be freed.

Since 2.4


gtk_font_button_set_show_style ()

void                gtk_font_button_set_show_style      (GtkFontButton *font_button,
                                                         gboolean show_style);

If show_style is TRUE, the font style will be displayed along with name of the selected font.

font_button :

a GtkFontButton

show_style :

TRUE if font style should be displayed in label.

Since 2.4


gtk_font_button_get_show_style ()

gboolean            gtk_font_button_get_show_style      (GtkFontButton *font_button);

Returns whether the name of the font style will be shown in the label.

font_button :

a GtkFontButton

Returns :

whether the font style will be shown in the label.

Since 2.4


gtk_font_button_set_show_size ()

void                gtk_font_button_set_show_size       (GtkFontButton *font_button,
                                                         gboolean show_size);

If show_size is TRUE, the font size will be displayed along with the name of the selected font.

font_button :

a GtkFontButton

show_size :

TRUE if font size should be displayed in dialog.

Since 2.4


gtk_font_button_get_show_size ()

gboolean            gtk_font_button_get_show_size       (GtkFontButton *font_button);

Returns whether the font size will be shown in the label.

font_button :

a GtkFontButton

Returns :

whether the font size will be shown in the label.

Since 2.4


gtk_font_button_set_use_font ()

void                gtk_font_button_set_use_font        (GtkFontButton *font_button,
                                                         gboolean use_font);

If use_font is TRUE, the font name will be written using the selected font.

font_button :

a GtkFontButton

use_font :

If TRUE, font name will be written using font chosen.

Since 2.4


gtk_font_button_get_use_font ()

gboolean            gtk_font_button_get_use_font        (GtkFontButton *font_button);

Returns whether the selected font is used in the label.

font_button :

a GtkFontButton

Returns :

whether the selected font is used in the label.

Since 2.4


gtk_font_button_set_use_size ()

void                gtk_font_button_set_use_size        (GtkFontButton *font_button,
                                                         gboolean use_size);

If use_size is TRUE, the font name will be written using the selected size.

font_button :

a GtkFontButton

use_size :

If TRUE, font name will be written using the selected size.

Since 2.4


gtk_font_button_get_use_size ()

gboolean            gtk_font_button_get_use_size        (GtkFontButton *font_button);

Returns whether the selected size is used in the label.

font_button :

a GtkFontButton

Returns :

whether the selected size is used in the label.

Since 2.4


gtk_font_button_set_title ()

void                gtk_font_button_set_title           (GtkFontButton *font_button,
                                                         const gchar *title);

Sets the title for the font selection dialog.

font_button :

a GtkFontButton

title :

a string containing the font selection dialog title

Since 2.4


gtk_font_button_get_title ()

const gchar *       gtk_font_button_get_title           (GtkFontButton *font_button);

Retrieves the title of the font selection dialog.

font_button :

a GtkFontButton

Returns :

an internal copy of the title string which must not be freed.

Since 2.4