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.

!An example GtkFontButton

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

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
bool 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.
bool getModal() nothrowGets whether the dialog is modal. Returns: true if the dialog is modal
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 setModal(bool modal) nothrowSets whether the dialog should be modal.
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 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.
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 modal(bool propval) nothrowSet `modal` property. Params: propval = Whether the font chooser dialog should be modal. Returns: Builder instance for fluent chaining
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 = Whether the buttons label will be drawn in the selected font. Returns: Builder instance for fluent chaining
T useSize(bool propval) nothrowSet `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_button.FontButton

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