gtk.scale_button

Module for [ScaleButton] class

Types 3

gtk.scale_button.ScaleButton provides a button which pops up a scale widget.

This kind of widget is commonly used for volume controls in multimedia applications, and GTK provides a gtk.volume_button.VolumeButton subclass that is tailored for this use case.

CSS nodes

scalebutton.scale
╰── button.toggle
    ╰── <icon>

gtk.scale_button.ScaleButton has a single CSS node with name scalebutton and .scale style class, and contains a button node with a .toggle style class.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
ScaleButton self() nothrowReturns `this`, for use in `with` statements.
ScaleButtonGidBuilder builder() static nothrowGet builder for [gtk.scale_button.ScaleButton] Returns: New builder object
bool active() @property nothrowGet `active` property. Returns: If the scale button should be pressed in.
gtk.adjustment.Adjustment adjustment() @property nothrowGet `adjustment` property. Returns: The [gtk.adjustment.Adjustment] that is used as the model.
void adjustment(gtk.adjustment.Adjustment propval) @property nothrowSet `adjustment` property. Params: propval = The [gtk.adjustment.Adjustment] that is used as the model.
bool hasFrame() @property nothrowGet `hasFrame` property. Returns: If the scale button has a frame.
void hasFrame(bool propval) @property nothrowSet `hasFrame` property. Params: propval = If the scale button has a frame.
double value() @property nothrowGet `value` property. Returns: The value of the scale.
void value(double propval) @property nothrowSet `value` property. Params: propval = The value of the scale.
bool getActive() nothrowQueries a [gtk.scale_button.ScaleButton] and returns its current state.
gtk.adjustment.Adjustment getAdjustment() nothrowGets the [gtk.adjustment.Adjustment] associated with the [gtk.scale_button.ScaleButton]’s scale.
bool getHasFrame() nothrowReturns whether the button has a frame. Returns: true if the button has a frame
gtk.button.Button getMinusButton() nothrowRetrieves the minus button of the [gtk.scale_button.ScaleButton]. Returns: the minus button of the [gtk.scale_button.ScaleButton]
gtk.button.Button getPlusButton() nothrowRetrieves the plus button of the `GtkScaleButton.` Returns: the plus button of the [gtk.scale_button.ScaleButton]
gtk.widget.Widget getPopup() nothrowRetrieves the popup of the [gtk.scale_button.ScaleButton]. Returns: the popup of the [gtk.scale_button.ScaleButton]
double getValue() nothrowGets the current value of the scale button. Returns: current value of the scale button
void setAdjustment(gtk.adjustment.Adjustment adjustment) nothrowSets the [gtk.adjustment.Adjustment] to be used as a model for the [gtk.scale_button.ScaleButton]’s scale.
void setHasFrame(bool hasFrame) nothrowSets the style of the button.
void setIcons(string[] icons) nothrowSets the icons to be used by the scale button.
void setValue(double value) nothrowSets the current value of the scale.
gulong connectPopdown(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.scale_button.ScaleButton))) && Parameters!T.length < 2) nothrowConnect to `Popdown` signal.
gulong connectPopup(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.scale_button.ScaleButton))) && Parameters!T.length < 2) nothrowConnect to `Popup` signal.
gulong connectValueChanged(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] == double))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.scale_button.ScaleButton))) && Parameters!T.length < 3) nothrowConnect to `ValueChanged` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this(double min, double max, double step, string[] icons = null)Creates a [gtk.scale_button.ScaleButton].

Fluent builder implementation template for gtk.scale_button.ScaleButton

Methods
T adjustment(gtk.adjustment.Adjustment propval) nothrowSet `adjustment` property. Params: propval = The [gtk.adjustment.Adjustment] that is used as the model. Returns: Builder instance for fluent chaining
T hasFrame(bool propval) nothrowSet `hasFrame` property. Params: propval = If the scale button has a frame. Returns: Builder instance for fluent chaining
T value(double propval) nothrowSet `value` property. Params: propval = The value of the scale. Returns: Builder instance for fluent chaining

Fluent builder for gtk.scale_button.ScaleButton

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