![]() |
![]() |
![]() |
GtkExtra Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Signals |
#include <gtkextra.h> GtkFontCombo; GtkWidget * gtk_font_combo_new (void); void gtk_font_combo_select (GtkFontCombo *font_combo, const gchar *family, gboolean bold, gboolean italic, gint height); void gtk_font_combo_select_nth (GtkFontCombo *font_combo, gint n, gboolean bold, gboolean italic, gint height); gint gtk_font_combo_get_font_height (GtkFontCombo *font_combo); GtkPSFont * gtk_font_combo_get_psfont (GtkFontCombo *font_combo); PangoFontDescription * gtk_font_combo_get_font_description (GtkFontCombo *font_combo); GdkFont * gtk_font_combo_get_gdkfont (GtkFontCombo *font_combo);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkToolbar +----GtkFontCombo
GtkFontCombo implements AtkImplementorIface, GtkBuildable, GtkToolShell and GtkOrientable.
It is a GtkToolBar subclass with two combos to select among the 35 standard Adobe PostScript fonts with different sizes. It has also two buttons to select bold and italics. When you select a new font, it returns the name of the corresponding Postscript font and the equivalent Xfont. This is what we all expect to have on the top of a GUI for a spreadsheet or word processor.
typedef struct _GtkFontCombo GtkFontCombo;
The GtkFontCombo struct contains only private data. It should only be accessed through the functions described below.
void gtk_font_combo_select (GtkFontCombo *font_combo, const gchar *family, gboolean bold, gboolean italic, gint height);
Select from the combo a font which satisfies the arguments.
|
a GtkFontCombo |
|
font family |
|
TRUE or FALSE |
|
TRUE or FALSE |
|
height of the font |
void gtk_font_combo_select_nth (GtkFontCombo *font_combo, gint n, gboolean bold, gboolean italic, gint height);
Select from the combo the nth font which satisfies the arguments.
|
a GtkFontCombo |
|
nth font |
|
TRUE or FALSE |
|
TRUE or FALSE |
|
height of the font |
gint gtk_font_combo_get_font_height (GtkFontCombo *font_combo);
|
|
Returns : |
GtkPSFont * gtk_font_combo_get_psfont (GtkFontCombo *font_combo);
|
the GtkFontCombo |
Returns : |
(transfer none) the GtkPSFont |
PangoFontDescription * gtk_font_combo_get_font_description (GtkFontCombo *font_combo);
|
|
Returns : |
GdkFont * gtk_font_combo_get_gdkfont (GtkFontCombo *font_combo);
|
|
Returns : |
"changed"
signalvoid user_function (GtkFontCombo *bfont_combo, gpointer user_data) : Run Last
Emmited whenever a different font is choosed.
|
the GtkFontCombo object that received the signal. |
|
user data set when the signal handler was connected. |