Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | gtk_font_button_new () |
GtkWidget * | gtk_font_button_new_with_font () |
void | gtk_font_button_set_use_font () |
gboolean | gtk_font_button_get_use_font () |
void | gtk_font_button_set_use_size () |
gboolean | gtk_font_button_get_use_size () |
void | gtk_font_button_set_title () |
const gchar * | gtk_font_button_get_title () |
GtkFontButton implements AtkImplementorIface, GtkBuildable and GtkFontChooser.
The GtkFontButton is a button which displays the currently selected font an allows to open a font chooser dialog to change the font. It is suitable widget for selecting a font in a preference dialog.
GtkWidget *
gtk_font_button_new (void
);
Creates a new font picker widget.
Since: 2.4
GtkWidget *
gtk_font_button_new_with_font (const gchar *fontname
);
Creates a new font picker widget.
Since: 2.4
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.
Since: 2.4
gboolean
gtk_font_button_get_use_font (GtkFontButton *font_button
);
Returns whether the selected font is used in the label.
Since: 2.4
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.
Since: 2.4
gboolean
gtk_font_button_get_use_size (GtkFontButton *font_button
);
Returns whether the selected size is used in the label.
Since: 2.4
void gtk_font_button_set_title (GtkFontButton *font_button
,const gchar *title
);
Sets the title for the font chooser dialog.
Since: 2.4
const gchar *
gtk_font_button_get_title (GtkFontButton *font_button
);
Retrieves the title of the font chooser dialog.
Since: 2.4
“title”
property“title” gchar *
The title of the font chooser dialog.
Flags: Read / Write
Default value: "Pick a Font"
Since: 2.4
“use-font”
property“use-font” gboolean
If this property is set to TRUE
, the label will be drawn
in the selected font.
Flags: Read / Write
Default value: FALSE
Since: 2.4
“font-set”
signalvoid user_function (GtkFontButton *widget, gpointer user_data)
The ::font-set signal is emitted when the user selects a font.
When handling this signal, use gtk_font_button_get_font_name()
to find out which font was just selected.
Note that this signal is only emitted when the user changes the font. If you need to react to programmatic font changes as well, use the notify::font signal.
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
Since: 2.4