gtk.font_button
Module for [FontButton] class
Types 3
The [gtk.font_button.FontButton] allows to open a font chooser dialog to change the font.
It is suitable widget for selecting a font in a preference dialog.
CSS nodes
fontbutton
╰── button.font
╰── [content][gtk.font_button.FontButton] has a single CSS node with name fontbutton which contains a button node with the .font style class.
Deprecated
Use [gtk.font_dialog_button.FontDialogButton] instead
Methods
FontButton self()Returns `this`, for use in `with` statements.FontButtonGidBuilder builder()Get builder for [gtk.font_button.FontButton] Returns: New builder objectbool modal() @propertyGet `modal` property. Returns: Whether the font chooser dialog should be modal.void modal(bool propval) @propertySet `modal` property. Params: propval = Whether the font chooser dialog should be modal.void title(string propval) @propertySet `title` property. Params: propval = The title of 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_button.FontButton newWithFont(string fontname)Creates a new font picker widget showing the given font.bool getModal()Gets whether the dialog is modal. Returns: true if the dialog is modalstring getTitle()Retrieves the title of the font chooser dialog. Returns: an internal copy of the title string which must not be freed.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 size is used in the label. Returns: whether the selected size is used in the label.void setModal(bool modal)Sets whether the dialog should be modal.void setTitle(string title)Sets the title for the font chooser dialog.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 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_button.FontButton)))
&& Parameters!T.length < 2)Connect to `Activate` signal.gulong connectFontSet(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_button.FontButton)))
&& Parameters!T.length < 2)Connect to `FontSet` signal.classFontButtonGidBuilderImpl(T) : gtk.widget.WidgetGidBuilderImpl!T, gtk.font_chooser.FontChooserGidBuilderImpl!T
Methods
T modal(bool propval)Set `modal` property. Params: propval = Whether the font chooser dialog should be modal. Returns: Builder instance for fluent chainingT title(string propval)Set `title` property. Params: propval = The title of the font chooser dialog. Returns: Builder instance for fluent chainingT useFont(bool propval)Set `useFont` property. Params: propval = Whether the buttons label will be drawn in the selected font. Returns: Builder instance for fluent chainingT useSize(bool propval)Set `useSize` property. Params: propval = Whether the buttons label will use the selected font size. Returns: Builder instance for fluent chainingFluent builder for [gtk.font_button.FontButton]
Methods