gtk.font_button
Module for [FontButton] class
Types 3
The #GtkFontButton is a button which displays the currently selected font an 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
GtkFontButton has a single CSS node with name button and style class .font.
Methods
FontButton self()Returns `this`, for use in `with` statements.FontButtonGidBuilder builder()Get builder for [gtk.font_button.FontButton] Returns: New builder objectstring fontName() @propertyGet `fontName` property. Returns: The name of the currently selected font.void fontName(string propval) @propertySet `fontName` property. Params: propval = The name of the currently selected font.bool showSize() @propertyGet `showSize` property. Returns: If this property is set to true, the selected font size will be shown in the label. For a more WYSIWYG way to show the selected size, see the ::use-size property.void showSize(bool propval) @propertySet `showSize` property. Params: propval = If this property is set to true, the selected font size will be shown in the label. For a more WYSIWYG way to show the selected size, see the ::use-size p...bool showStyle() @propertyGet `showStyle` property. Returns: If this property is set to true, the name of the selected font style will be shown in the label. For a more WYSIWYG way to show the selected style, see the ::use-...void showStyle(bool propval) @propertySet `showStyle` property. Params: propval = If this property is set to true, the name of the selected font style will be shown in the label. For a more WYSIWYG way to show the selected style, see t...void title(string propval) @propertySet `title` property. Params: propval = The title of the font chooser dialog.bool useFont() @propertyGet `useFont` property. Returns: If this property is set to true, the label will be drawn in the selected font.void useFont(bool propval) @propertySet `useFont` property. Params: propval = If this property is set to true, the label will be drawn in the selected font.bool useSize() @propertyGet `useSize` property. Returns: If this property is set to true, the label will be drawn with the selected font size.void useSize(bool propval) @propertySet `useSize` property. Params: propval = If this property is set to true, the label will be drawn with the selected font size.gtk.font_button.FontButton newWithFont(string fontname)Creates a new font picker widget.string getFontName()Retrieves the name of the currently selected font. This name includes style and size information as well. If you want to render something with the font, use this string with [pango.font_description...bool getShowSize()Returns whether the font size will be shown in the label. Returns: whether the font size will be shown in the label.bool getShowStyle()Returns whether the name of the font style will be shown in the label. Returns: whether the font style will be shown in the label.string 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.bool setFontName(string fontname)Sets or updates the currently-displayed font in font picker dialog.void setShowSize(bool showSize)If show_size is true, the font size will be displayed along with the name of the selected font.void setShowStyle(bool showStyle)If show_style is true, the font style will be displayed along with name of the selected font.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 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.button.ButtonGidBuilderImpl!T, gtk.font_chooser.FontChooserGidBuilderImpl!T
Methods
T fontName(string propval)Set `fontName` property. Params: propval = The name of the currently selected font. Returns: Builder instance for fluent chainingT showSize(bool propval)Set `showSize` property. Params: propval = If this property is set to true, the selected font size will be shown in the label. For a more WYSIWYG way to show the selected size, see the ::use-size p...T showStyle(bool propval)Set `showStyle` property. Params: propval = If this property is set to true, the name of the selected font style will be shown in the label. For a more WYSIWYG way to show the selected style, see t...T 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 = If this property is set to true, the label will be drawn in the selected font. Returns: Builder instance for fluent chainingT useSize(bool propval)Set `useSize` property. Params: propval = If this property is set to true, the label will be drawn with the selected font size. Returns: Builder instance for fluent chainingFluent builder for [gtk.font_button.FontButton]
Methods