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
FontButtonGidBuilder builder() static nothrowGet builder for [gtk.font_button.FontButton] Returns: New builder objectbool modal() @property nothrowGet `modal` property. Returns: Whether the font chooser dialog should be modal.void modal(bool propval) @property nothrowSet `modal` property. Params: propval = Whether the font chooser dialog should be modal.string title() @property nothrowGet `title` property. Returns: The title of the font chooser dialog.void title(string propval) @property nothrowSet `title` property. Params: propval = The title of the font chooser dialog.bool useFont() @property nothrowGet `useFont` property. Returns: Whether the buttons label will be drawn in the selected font.void useFont(bool propval) @property nothrowSet `useFont` property. Params: propval = Whether the buttons label will be drawn in the selected font.bool useSize() @property nothrowGet `useSize` property. Returns: Whether the buttons label will use the selected font size.void useSize(bool propval) @property nothrowSet `useSize` property. Params: propval = Whether the buttons label will use the selected font size.gtk.font_button.FontButton newWithFont(string fontname) static nothrowCreates a new font picker widget showing the given font.string getTitle() nothrowRetrieves the title of the font chooser dialog. Returns: an internal copy of the title string which must not be freed.bool getUseFont() nothrowReturns whether the selected font is used in the label. Returns: whether the selected font is used in the label.bool getUseSize() nothrowReturns whether the selected size is used in the label. Returns: whether the selected size is used in the label.void setUseFont(bool useFont) nothrowIf use_font is true, the font name will be written using the selected font.void setUseSize(bool useSize) nothrowIf 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) nothrowConnect 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) nothrowConnect to `FontSet` signal.classFontButtonGidBuilderImpl(T) : gtk.widget.WidgetGidBuilderImpl!T, gtk.font_chooser.FontChooserGidBuilderImpl!T
Fluent builder implementation template for gtk.font_button.FontButton
Methods
T modal(bool propval) nothrowSet `modal` property. Params: propval = Whether the font chooser dialog should be modal. Returns: Builder instance for fluent chainingT title(string propval) nothrowSet `title` property. Params: propval = The title of the font chooser dialog. Returns: Builder instance for fluent chainingT useFont(bool propval) nothrowSet `useFont` property. Params: propval = Whether the buttons label will be drawn in the selected font. Returns: Builder instance for fluent chainingT useSize(bool propval) nothrowSet `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