FontChooserIF

GtkFontChooser is an interface that can be implemented by widgets displaying the list of fonts. In GTK+, the main objects that implement this interface are GtkFontChooserWidget, GtkFontChooserDialog and GtkFontButton.

Members

Functions

addOnFontActivated
void addOnFontActivated(void delegate(string, FontChooserIF) dlg, ConnectFlags connectFlags)

Emitted when a font is activated. This usually happens when the user double clicks an item, or an item is selected and the user presses one of the keys Space, Shift+Space, Return or Enter. See Also GtkFontChooserDialog, GtkFontChooserWidget, GtkFontButton

getFont
string getFont()

Gets the currently-selected font name. Note that this can be a different string than what you set with gtk_font_chooser_set_font(), as the font chooser widget may normalize font names and thus return a string with a different structure. For example, "Helvetica Italic Bold 12" could be normalized to "Helvetica Bold Italic 12". Use pango_font_description_equal() if you want to compare two font descriptions.

getFontChooserTStruct
GtkFontChooser* getFontChooserTStruct()
Undocumented in source.
getFontDesc
PgFontDescription getFontDesc()

Gets the currently-selected font. Note that this can be a different string than what you set with gtk_font_chooser_set_font(), as the font chooser widget may normalize font names and thus return a string with a different structure. For example, "Helvetica Italic Bold 12" could be normalized to "Helvetica Bold Italic 12". Use pango_font_description_equal() if you want to compare two font descriptions.

getFontFace
PgFontFace getFontFace()

Gets the PangoFontFace representing the selected font group details (i.e. family, slant, weight, width, etc). If the selected font is not installed, returns NULL.

getFontFamily
PgFontFamily getFontFamily()

Gets the PangoFontFamily representing the selected font family. Font families are a collection of font faces. If the selected font is not installed, returns NULL.

getFontSize
int getFontSize()

The selected font size.

getPreviewText
string getPreviewText()

Gets the text displayed in the preview area.

getShowPreviewEntry
int getShowPreviewEntry()

Returns whether the preview entry is shown or not.

getStruct
void* getStruct()

the main Gtk struct as a void*

setFilterFunc
void setFilterFunc(GtkFontFilterFunc filter, void* userData, GDestroyNotify destroy)

Adds a filter function that decides which fonts to display in the font chooser.

setFont
void setFont(string fontname)

Sets the currently-selected font.

setFontDesc
void setFontDesc(PgFontDescription fontDesc)

Sets the currently-selected font from font_desc.

setPreviewText
void setPreviewText(string text)

Sets the text displayed in the preview area. The text is used to show how the selected font looks.

setShowPreviewEntry
void setShowPreviewEntry(int showPreviewEntry)

Shows or hides the editable preview entry.

Properties

onFontActivatedListeners
void delegate(string, FontChooserIF)[] onFontActivatedListeners [@property getter]

Meta