gtk.font_dialog_button

Module for [FontDialogButton] class

Types 3

The [gtk.font_dialog_button.FontDialogButton] is wrapped around a [gtk.font_dialog.FontDialog] and allows to open a font chooser dialog to change the font.

!An example GtkFontDialogButton

It is suitable widget for selecting a font in a preference dialog.

CSS nodes

fontbutton
╰── button.font
   ╰── [content]

[gtk.font_dialog_button.FontDialogButton] has a single CSS node with name fontbutton which contains a button node with the .font style class.

Methods
GType _gType() @property
FontDialogButton self()Returns `this`, for use in `with` statements.
FontDialogButtonGidBuilder builder()Get builder for [gtk.fontdialogbutton.FontDialogButton] Returns: New builder object
gtk.font_dialog.FontDialog dialog() @propertyGet `dialog` property. Returns: The [gtk.font_dialog.FontDialog] that contains parameters for the font chooser dialog.
void dialog(gtk.font_dialog.FontDialog propval) @propertySet `dialog` property. Params: propval = The [gtk.font_dialog.FontDialog] that contains parameters for the font chooser dialog.
pango.font_description.FontDescription fontDesc() @propertyGet `fontDesc` property. Returns: The selected font.
void fontDesc(pango.font_description.FontDescription propval) @propertySet `fontDesc` property. Params: propval = The selected font.
string fontFeatures() @propertyGet `fontFeatures` property. Returns: The selected font features.
void fontFeatures(string propval) @propertySet `fontFeatures` property. Params: propval = The selected font features.
pango.language.Language language() @propertyGet `language` property. Returns: The selected language for font features.
void language(pango.language.Language propval) @propertySet `language` property. Params: propval = The selected language for font features.
gtk.types.FontLevel level() @propertyGet `level` property. Returns: The level of detail for the font chooser dialog.
void level(gtk.types.FontLevel propval) @propertySet `level` property. Params: propval = The level of detail for the font chooser dialog.
bool useFont() @propertyGet `useFont` property. Returns: Whether the buttons label will be drawn in the selected font.
void useFont(bool propval) @propertySet `useFont` property. Params: propval = Whether the buttons label will be drawn in the selected font.
bool useSize() @propertyGet `useSize` property. Returns: Whether the buttons label will use the selected font size.
void useSize(bool propval) @propertySet `useSize` property. Params: propval = Whether the buttons label will use the selected font size.
gtk.font_dialog.FontDialog getDialog()Returns the [gtk.fontdialog.FontDialog] of self. Returns: the [gtk.fontdialog.FontDialog]
pango.font_description.FontDescription getFontDesc()Returns the font of the button.
string getFontFeatures()Returns the font features of the button.
pango.language.Language getLanguage()Returns the language that is used for font features. Returns: the language
gtk.types.FontLevel getLevel()Returns the level of detail at which this dialog lets the user select fonts. Returns: the level of detail
bool getUseFont()Returns whether the selected font is used in the label. Returns: whether the selected font is used in the label
bool getUseSize()Returns whether the selected font size is used in the label. Returns: whether the selected font size is used in the label
void setDialog(gtk.font_dialog.FontDialog dialog)Sets a [gtk.font_dialog.FontDialog] object to use for creating the font chooser dialog that is presented when the user clicks the button.
void setFontDesc(pango.font_description.FontDescription fontDesc)Sets the font of the button.
void setFontFeatures(string fontFeatures = null)Sets the font features of the button.
void setLanguage(pango.language.Language language = null)Sets the language to use for font features.
void setLevel(gtk.types.FontLevel level)Sets the level of detail at which this dialog lets the user select fonts.
void setUseFont(bool useFont)If use_font is `TRUE`, the font name will be written using the selected font.
void setUseSize(bool useSize)If use_size is `TRUE`, the font name will be written using the selected font size.
gulong connectActivate(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.font_dialog_button.FontDialogButton))) && Parameters!T.length < 2)Connect to `Activate` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this(gtk.font_dialog.FontDialog dialog = null)Creates a new [gtk.fontdialogbutton.FontDialogButton] with the given [gtk.font_dialog.FontDialog].
Methods
T dialog(gtk.font_dialog.FontDialog propval)Set `dialog` property. Params: propval = The [gtk.font_dialog.FontDialog] that contains parameters for the font chooser dialog. Returns: Builder instance for fluent chaining
T fontDesc(pango.font_description.FontDescription propval)Set `fontDesc` property. Params: propval = The selected font.
T fontFeatures(string propval)Set `fontFeatures` property. Params: propval = The selected font features.
T language(pango.language.Language propval)Set `language` property. Params: propval = The selected language for font features.
T level(gtk.types.FontLevel propval)Set `level` property. Params: propval = The level of detail for the font chooser dialog. Returns: Builder instance for fluent chaining
T useFont(bool propval)Set `useFont` property. Params: propval = Whether the buttons label will be drawn in the selected font. Returns: Builder instance for fluent chaining
T useSize(bool propval)Set `useSize` property. Params: propval = Whether the buttons label will use the selected font size. Returns: Builder instance for fluent chaining

Fluent builder for [gtk.font_dialog_button.FontDialogButton]