FontChooserDialog

The gtk.font_chooser_dialog.FontChooserDialog widget is a dialog for selecting a font.

An example GtkFontChooserDialog

gtk.font_chooser_dialog.FontChooserDialog implements the gtk.font_chooser.FontChooser interface and does not provide much API of its own.

To create a gtk.font_chooser_dialog.FontChooserDialog, use gtk.font_chooser_dialog.FontChooserDialog.new_.

GtkFontChooserDialog as GtkBuildable

The gtk.font_chooser_dialog.FontChooserDialog implementation of the gtk.buildable.Buildable interface exposes the buttons with the names “select_button” and “cancel_button”.

CSS nodes

gtk.font_chooser_dialog.FontChooserDialog has a single CSS node with the name window and style class .fontchooser.

More...

Constructors

this
this(string title, gtk.window.Window parent)

Creates a new gtk.font_chooser_dialog.FontChooserDialog.

Mixed In Members

From mixin FontChooserT!()

getFont
string getFont()

Gets the currently-selected font name.

getFontDesc
pango.font_description.FontDescription getFontDesc()

Gets the currently-selected font.

getFontFace
pango.font_face.FontFace getFontFace()

Gets the pango.font_face.FontFace representing the selected font group details (i.e. family, slant, weight, width, etc).

getFontFamily
pango.font_family.FontFamily getFontFamily()

Gets the pango.font_family.FontFamily representing the selected font family.

getFontFeatures
string getFontFeatures()

Gets the currently-selected font features.

getFontMap
pango.font_map.FontMap getFontMap()

Gets the custom font map of this font chooser widget, or null if it does not have one.

getFontSize
int getFontSize()

The selected font size.

getLanguage
string getLanguage()

Gets the language that is used for font features.

getLevel
gtk.types.FontChooserLevel getLevel()

Returns the current level of granularity for selecting fonts.

getPreviewText
string getPreviewText()

Gets the text displayed in the preview area.

getShowPreviewEntry
bool getShowPreviewEntry()

Returns whether the preview entry is shown or not.

setFilterFunc
void setFilterFunc(gtk.types.FontFilterFunc filter)

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(pango.font_description.FontDescription fontDesc)

Sets the currently-selected font from font_desc.

setFontMap
void setFontMap(pango.font_map.FontMap fontmap)

Sets a custom font map to use for this font chooser widget.

setLanguage
void setLanguage(string language)

Sets the language to use for font features.

setLevel
void setLevel(gtk.types.FontChooserLevel level)

Sets the desired level of granularity for selecting fonts.

setPreviewText
void setPreviewText(string text)

Sets the text displayed in the preview area.

setShowPreviewEntry
void setShowPreviewEntry(bool showPreviewEntry)

Shows or hides the editable preview entry.

connectFontActivated
ulong connectFontActivated(T callback, Flag!"After" after)

Connect to FontActivated signal.

Inherited Members

From Dialog

addActionWidget
void addActionWidget(gtk.widget.Widget child, int responseId)

Adds an activatable widget to the action area of a gtk.dialog.Dialog.

addButton
gtk.widget.Widget addButton(string buttonText, int responseId)

Adds a button with the given text.

getContentArea
gtk.box.Box getContentArea()

Returns the content area of dialog.

getHeaderBar
gtk.header_bar.HeaderBar getHeaderBar()

Returns the header bar of dialog.

getResponseForWidget
int getResponseForWidget(gtk.widget.Widget widget)

Gets the response id of a widget in the action area of a dialog.

getWidgetForResponse
gtk.widget.Widget getWidgetForResponse(int responseId)

Gets the widget button that uses the given response ID in the action area of a dialog.

response
void response(int responseId)

Emits the ::response signal with the given response ID.

setDefaultResponse
void setDefaultResponse(int responseId)

Sets the default widget for the dialog based on the response ID.

setResponseSensitive
void setResponseSensitive(int responseId, bool setting)

A convenient way to sensitize/desensitize dialog buttons.

connectClose
ulong connectClose(T callback, Flag!"After" after)

Connect to Close signal.

connectResponse
ulong connectResponse(T callback, Flag!"After" after)

Connect to Response signal.

From FontChooser

getFont
string getFont()

Gets the currently-selected font name.

getFontDesc
pango.font_description.FontDescription getFontDesc()

Gets the currently-selected font.

getFontFace
pango.font_face.FontFace getFontFace()

Gets the pango.font_face.FontFace representing the selected font group details (i.e. family, slant, weight, width, etc).

getFontFamily
pango.font_family.FontFamily getFontFamily()

Gets the pango.font_family.FontFamily representing the selected font family.

getFontFeatures
string getFontFeatures()

Gets the currently-selected font features.

getFontMap
pango.font_map.FontMap getFontMap()

Gets the custom font map of this font chooser widget, or null if it does not have one.

getFontSize
int getFontSize()

The selected font size.

getLanguage
string getLanguage()

Gets the language that is used for font features.

getLevel
gtk.types.FontChooserLevel getLevel()

Returns the current level of granularity for selecting fonts.

getPreviewText
string getPreviewText()

Gets the text displayed in the preview area.

getShowPreviewEntry
bool getShowPreviewEntry()

Returns whether the preview entry is shown or not.

setFilterFunc
void setFilterFunc(gtk.types.FontFilterFunc filter)

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(pango.font_description.FontDescription fontDesc)

Sets the currently-selected font from font_desc.

setFontMap
void setFontMap(pango.font_map.FontMap fontmap)

Sets a custom font map to use for this font chooser widget.

setLanguage
void setLanguage(string language)

Sets the language to use for font features.

setLevel
void setLevel(gtk.types.FontChooserLevel level)

Sets the desired level of granularity for selecting fonts.

setPreviewText
void setPreviewText(string text)

Sets the text displayed in the preview area.

setShowPreviewEntry
void setShowPreviewEntry(bool showPreviewEntry)

Shows or hides the editable preview entry.

connectFontActivated
ulong connectFontActivated(T callback, Flag!"After" after)

Connect to FontActivated signal.

Detailed Description

Deprecated: Use gtk.font_dialog.FontDialog instead