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
GType _getGType() static nothrow
GType _gType() @property nothrow
FontButton self() nothrowReturns `this`, for use in `with` statements.
FontButtonGidBuilder builder() static nothrowGet builder for [gtk.font_button.FontButton] Returns: New builder object
string fontName() @property nothrowGet `fontName` property. Returns: The name of the currently selected font.
void fontName(string propval) @property nothrowSet `fontName` property. Params: propval = The name of the currently selected font.
bool showSize() @property nothrowGet `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) @property nothrowSet `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() @property nothrowGet `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) @property nothrowSet `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...
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: If this property is set to true, the label will be drawn in the selected font.
void useFont(bool propval) @property nothrowSet `useFont` property. Params: propval = If this property is set to true, the label will be drawn in the selected font.
bool useSize() @property nothrowGet `useSize` property. Returns: If this property is set to true, the label will be drawn with the selected font size.
void useSize(bool propval) @property nothrowSet `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) static nothrowCreates a new font picker widget.
string getFontName() nothrowRetrieves 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() nothrowReturns whether the font size will be shown in the label. Returns: whether the font size will be shown in the label.
bool getShowStyle() nothrowReturns 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() 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.
bool setFontName(string fontname) nothrowSets or updates the currently-displayed font in font picker dialog.
void setShowSize(bool showSize) nothrowIf show_size is true, the font size will be displayed along with the name of the selected font.
void setShowStyle(bool showStyle) nothrowIf show_style is true, the font style will be displayed along with name of the selected font.
void setTitle(string title) nothrowSets the title for the font chooser dialog.
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 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.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new font picker widget. Returns: a new font picker widget.

Fluent builder implementation template for gtk.font_button.FontButton

Methods
T fontName(string propval) nothrowSet `fontName` property. Params: propval = The name of the currently selected font. Returns: Builder instance for fluent chaining
T showSize(bool propval) nothrowSet `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) nothrowSet `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) nothrowSet `title` property. Params: propval = The title of the font chooser dialog. Returns: Builder instance for fluent chaining
T useFont(bool propval) nothrowSet `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 chaining
T useSize(bool propval) nothrowSet `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 chaining

Fluent builder for gtk.font_button.FontButton

Methods
FontButton build() nothrowCreate object from builder. Returns: New object