Synopsis#include <gtk/gtk.h> GtkFontSelectionDialog; GtkWidget* gtk_font_selection_dialog_new (const gchar *title); GdkFont* gtk_font_selection_dialog_get_font (GtkFontSelectionDialog *fsd); gchar* gtk_font_selection_dialog_get_font_name (GtkFontSelectionDialog *fsd); gboolean gtk_font_selection_dialog_set_font_name (GtkFontSelectionDialog *fsd, const gchar *fontname); const gchar* gtk_font_selection_dialog_get_preview_text (GtkFontSelectionDialog *fsd); void gtk_font_selection_dialog_set_preview_text (GtkFontSelectionDialog *fsd, const gchar *text); GtkWidget* gtk_font_selection_dialog_get_apply_button (GtkFontSelectionDialog *fsd); GtkWidget* gtk_font_selection_dialog_get_cancel_button (GtkFontSelectionDialog *fsd); GtkWidget* gtk_font_selection_dialog_get_ok_button (GtkFontSelectionDialog *fsd); Object HierarchyGObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkDialog +----GtkFontSelectionDialog DescriptionThe GtkFontSelectionDialog widget is a dialog box for selecting a font.
To set the font which is initially selected, use
To get the selected font use
To change the text which is shown in the preview area, use
GtkFontSelectionDialog as GtkBuildableThe GtkFontSelectionDialog implementation of the GtkBuildable interface exposes the embedded GtkFontSelection as internal child with the name "font_selection". It also exposes the buttons with the names "ok_button", "cancel_button" and "apply_button". DetailsGtkFontSelectionDialogtypedef struct { GtkWidget *GSEAL (ok_button); GtkWidget *GSEAL (apply_button); GtkWidget *GSEAL (cancel_button); } GtkFontSelectionDialog; gtk_font_selection_dialog_new ()GtkWidget* gtk_font_selection_dialog_new (const gchar *title);
The Creates a new GtkFontSelectionDialog.
gtk_font_selection_dialog_get_font ()GdkFont* gtk_font_selection_dialog_get_font (GtkFontSelectionDialog *fsd); Warning
Gets the currently-selected font.
gtk_font_selection_dialog_get_font_name ()gchar* gtk_font_selection_dialog_get_font_name (GtkFontSelectionDialog *fsd);
Gets the currently-selected font name. Note that this can be a different
string than what you set with
gtk_font_selection_dialog_set_font_name ()gboolean gtk_font_selection_dialog_set_font_name (GtkFontSelectionDialog *fsd, const gchar *fontname); Sets the currently selected font. Sets the currently-selected font.
gtk_font_selection_dialog_get_preview_text ()const gchar* gtk_font_selection_dialog_get_preview_text (GtkFontSelectionDialog *fsd); The text returned is the preview text used to show how the selected font looks. Gets the text displayed in the preview area.
gtk_font_selection_dialog_set_preview_text ()void gtk_font_selection_dialog_set_preview_text (GtkFontSelectionDialog *fsd, const gchar *text);
The Sets the text displayed in the preview area.
gtk_font_selection_dialog_get_apply_button ()GtkWidget* gtk_font_selection_dialog_get_apply_button (GtkFontSelectionDialog *fsd); Gets the 'Apply' button.
Since 2.14 gtk_font_selection_dialog_get_cancel_button ()GtkWidget* gtk_font_selection_dialog_get_cancel_button (GtkFontSelectionDialog *fsd); Gets the 'Cancel' button.
Since 2.14 gtk_font_selection_dialog_get_ok_button ()GtkWidget* gtk_font_selection_dialog_get_ok_button (GtkFontSelectionDialog *fsd); Gets the 'OK' button.
Since 2.14 |