FontChooserDialog

The #GtkFontChooserDialog widget is a dialog for selecting a font. It implements the #GtkFontChooser interface.

GtkFontChooserDialog as GtkBuildable

The GtkFontChooserDialog implementation of the #GtkBuildable interface exposes the buttons with the names “select_button” and “cancel_button”.

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this(string title, gtk.window.Window parent)

Creates a new #GtkFontChooserDialog.

Members

Functions

self
FontChooserDialog self()

Returns this, for use in with statements.

Properties

_gType
GType _gType [@property getter]

Static functions

_getGType
GType _getGType()
builder
FontChooserDialogGidBuilder builder()

Get builder for gtk.font_chooser_dialog.FontChooserDialog

Mixed In Members

From mixin FontChooserT!()

font
string font [@property getter]

Get font property.

font
string font [@property setter]

Set font property.

fontDesc
pango.font_description.FontDescription fontDesc [@property getter]

Get fontDesc property.

fontDesc
pango.font_description.FontDescription fontDesc [@property setter]

Set fontDesc property.

fontFeatures
string fontFeatures [@property getter]

Get fontFeatures property.

language
string language [@property getter]

Get language property.

language
string language [@property setter]

Set language property.

level
gtk.types.FontChooserLevel level [@property getter]

Get level property.

level
gtk.types.FontChooserLevel level [@property setter]

Set level property.

previewText
string previewText [@property getter]

Get previewText property.

previewText
string previewText [@property setter]

Set previewText property.

showPreviewEntry
bool showPreviewEntry [@property getter]

Get showPreviewEntry property.

showPreviewEntry
bool showPreviewEntry [@property setter]

Set showPreviewEntry property.

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 #PangoFontFace representing the selected font group details (i.e. family, slant, weight, width, etc).

getFontFamily
pango.font_family.FontFamily getFontFamily()

Gets the #PangoFontFamily representing the selected font family. Font families are a collection of font faces.

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. A custom font map can be used to present application-specific fonts instead of or in addition to the normal system fonts.

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. The text is used to show how the selected font looks.

setShowPreviewEntry
void setShowPreviewEntry(bool showPreviewEntry)

Shows or hides the editable preview entry.

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

Connect to FontActivated signal.

Inherited Members

From Dialog

_getGType
GType _getGType()
_gType
GType _gType [@property getter]
self
Dialog self()

Returns this, for use in with statements.

builder
DialogGidBuilder builder()

Get builder for gtk.dialog.Dialog

useHeaderBar
int useHeaderBar [@property getter]

Get useHeaderBar property.

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

Adds an activatable widget to the action area of a #GtkDialog, connecting a signal handler that will emit the #GtkDialog::response signal on the dialog when the widget is activated. The widget is appended to the end of the dialog’s action area. If you want to add a non-activatable widget, simply pack it into the action_area field of the #GtkDialog struct.

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

Adds a button with the given text and sets things up so that clicking the button will emit the #GtkDialog::response signal with the given response_id. The button is appended to the end of the dialog’s action area. The button widget is returned, but usually you don’t need it.

getActionArea
gtk.box.Box getActionArea()

Returns the action area of dialog.

getContentArea
gtk.box.Box getContentArea()

Returns the content area of dialog.

getHeaderBar
gtk.header_bar.HeaderBar getHeaderBar()

Returns the header bar of dialog. Note that the headerbar is only used by the dialog if the #GtkDialog:use-header-bar property is true.

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 #GtkDialog::response signal with the given response ID. Used to indicate that the user has responded to the dialog in some way; typically either you or gtk.dialog.Dialog.run will be monitoring the ::response signal and take appropriate action.

run
int run()

Blocks in a recursive main loop until the dialog either emits the #GtkDialog::response signal, or is destroyed. If the dialog is destroyed during the call to gtk.dialog.Dialog.run, gtk.dialog.Dialog.run returns #GTK_RESPONSE_NONE. Otherwise, it returns the response ID from the ::response signal emission.

setAlternativeButtonOrderFromArray
void setAlternativeButtonOrderFromArray(int[] newOrder)

Sets an alternative button order. If the #GtkSettings:gtk-alternative-button-order setting is set to true, the dialog buttons are reordered according to the order of the response ids in new_order.

setDefaultResponse
void setDefaultResponse(int responseId)

Sets the last widget in the dialog’s action area with the given response_id as the default widget for the dialog. Pressing “Enter” normally activates the default widget.

setResponseSensitive
void setResponseSensitive(int responseId, bool setting)

Calls gtk_widget_set_sensitive (widget, setting) for each widget in the dialog’s action area with the given response_id. A convenient way to sensitize/desensitize dialog buttons.

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

Connect to Close signal.

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

Connect to Response signal.

From FontChooser

_getGType
GType _getGType()
font
string font [@property getter]

Get font property.

font
string font [@property setter]

Set font property.

fontDesc
pango.font_description.FontDescription fontDesc [@property getter]

Get fontDesc property.

fontDesc
pango.font_description.FontDescription fontDesc [@property setter]

Set fontDesc property.

fontFeatures
string fontFeatures [@property getter]

Get fontFeatures property.

language
string language [@property getter]

Get language property.

language
string language [@property setter]

Set language property.

level
gtk.types.FontChooserLevel level [@property getter]

Get level property.

level
gtk.types.FontChooserLevel level [@property setter]

Set level property.

previewText
string previewText [@property getter]

Get previewText property.

previewText
string previewText [@property setter]

Set previewText property.

showPreviewEntry
bool showPreviewEntry [@property getter]

Get showPreviewEntry property.

showPreviewEntry
bool showPreviewEntry [@property setter]

Set showPreviewEntry property.

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 #PangoFontFace representing the selected font group details (i.e. family, slant, weight, width, etc).

getFontFamily
pango.font_family.FontFamily getFontFamily()

Gets the #PangoFontFamily representing the selected font family. Font families are a collection of font faces.

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. A custom font map can be used to present application-specific fonts instead of or in addition to the normal system fonts.

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. The text is used to show how the selected font looks.

setShowPreviewEntry
void setShowPreviewEntry(bool showPreviewEntry)

Shows or hides the editable preview entry.

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

Connect to FontActivated signal.