Top |
Functions
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 char * | gtk_font_button_get_title () |
void | gtk_font_button_set_modal () |
gboolean | gtk_font_button_get_modal () |
Implemented Interfaces
GtkFontButton implements GtkAccessible, GtkBuildable, GtkConstraintTarget and GtkFontChooser.
Description
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.
Functions
gtk_font_button_new_with_font ()
GtkWidget *
gtk_font_button_new_with_font (const char *fontname
);
Creates a new font picker widget.
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.
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.
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.
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.
gtk_font_button_set_title ()
void gtk_font_button_set_title (GtkFontButton *font_button
,const char *title
);
Sets the title for the font chooser dialog.
gtk_font_button_get_title ()
const char *
gtk_font_button_get_title (GtkFontButton *font_button
);
Retrieves the title of the font chooser dialog.
gtk_font_button_set_modal ()
void gtk_font_button_set_modal (GtkFontButton *font_button
,gboolean modal
);
Sets whether the dialog should be modal.
gtk_font_button_get_modal ()
gboolean
gtk_font_button_get_modal (GtkFontButton *font_button
);
Gets whether the dialog is modal.
Property Details
The “modal”
property
“modal” gboolean
Whether the dialog is modal.
Owner: GtkFontButton
Flags: Read / Write
Default value: TRUE
The “title”
property
“title” char *
The title of the font chooser dialog.
Owner: GtkFontButton
Flags: Read / Write
Default value: "Pick a Font"
The “use-font”
property
“use-font” gboolean
If this property is set to TRUE
, the label will be drawn
in the selected font.
Owner: GtkFontButton
Flags: Read / Write
Default value: FALSE
Signal Details
The “font-set”
signal
void 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_chooser_get_font()
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.
Parameters
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First