11.65Class GtkFontButton

A button to launch a font selection dialog.

Class GtkFontButton

The GtkFontButton is a button which displays the currently selected font an allows to open a font selection dialog to change the font. It is suitable widget for selecting a font in a preference dialog.

Methods
get_font_nameRetrieves the name of the currently selected font.
get_show_sizeReturns whether the font size will be shown in the label.
get_show_styleReturns whether the name of the font style will be shown in the label.
get_titleRetrieves the title of the font selection dialog.
get_use_fontReturns whether the selected font is used in the label.
get_use_sizeReturns whether the selected size is used in the label.
new_with_fontCreates a new font picker widget.
set_font_nameSets or updates the currently-displayed font in font picker dialog.
set_show_sizeIf show_size is TRUE, the font size will be displayed along with the name of the selected font.
set_show_styleIf show_style is TRUE, the font style will be displayed along with name of the selected font.
set_titleSets the title for the font selection dialog.
set_use_fontIf use_font is TRUE, the font name will be written using the selected font.
set_use_sizeIf use_size is TRUE, the font name will be written using the selected size.
signal_font_setThe font-set signal is emitted when the user selects a font.

Methods

get_font_name

Retrieves the name of the currently selected font.

GtkFontButton.get_font_name()
Returnthe font name.

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.

get_show_size

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

GtkFontButton.get_show_size()
Returnwhether the font size will be shown in the label.

get_show_style

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

GtkFontButton.get_show_style()
Returnwhether the font style will be shown in the label.

get_title

Retrieves the title of the font selection dialog.

GtkFontButton.get_title()
Returnthe title string

get_use_font

Returns whether the selected font is used in the label.

GtkFontButton.get_use_font()
Returnwhether the selected font is used in the label.

get_use_size

Returns whether the selected size is used in the label.

GtkFontButton.get_use_size()
Returnwhether the selected size is used in the label.

new_with_font

Creates a new font picker widget.

GtkFontButton.new_with_font( fontname )
fontname Name of font to display in font selection dialog
Returna new font picker widget.

set_font_name

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

GtkFontButton.set_font_name( fontname )
fontname Name of font to display in font selection dialog
ReturnReturn value of gtk_font_selection_dialog_set_font_name() if the font selection dialog exists, otherwise FALSE.

set_show_size

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

GtkFontButton.set_show_size( show_size )
show_size TRUE if font size should be displayed in dialog.

set_show_style

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

GtkFontButton.set_show_style( show_style )
show_style TRUE if font style should be displayed in label.

set_title

Sets the title for the font selection dialog.

GtkFontButton.set_title( title )
title a string containing the font selection dialog title

set_use_font

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

GtkFontButton.set_use_font( use_font )
use_font If TRUE, font name will be written using font chosen.

set_use_size

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

GtkFontButton.set_use_size( use_size )
use_size If TRUE, font name will be written using the selected size.

signal_font_set

The font-set signal is emitted when the user selects a font.

GtkFontButton.signal_font_set()

When handling this signal, use 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-name signal.

Made with http://www.falconpl.org