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 _gType() @property
ScaleButton self()Returns `this`, for use in `with` statements.
ScaleButtonGidBuilder builder()Get builder for [gtk.scale_button.ScaleButton] Returns: New builder object
bool active() @propertyGet `active` property. Returns: If the scale button should be pressed in.
gtk.adjustment.Adjustment adjustment() @propertyGet `adjustment` property. Returns: The [gtk.adjustment.Adjustment] that is used as the model.
void adjustment(gtk.adjustment.Adjustment propval) @propertySet `adjustment` property. Params: propval = The [gtk.adjustment.Adjustment] that is used as the model.
bool hasFrame() @propertyGet `hasFrame` property. Returns: If the scale button has a frame.
void hasFrame(bool propval) @propertySet `hasFrame` property. Params: propval = If the scale button has a frame.
double value() @propertyGet `value` property. Returns: The value of the scale.
void value(double propval) @propertySet `value` property. Params: propval = The value of the scale.
bool getActive()Queries a [gtk.scale_button.ScaleButton] and returns its current state.
gtk.adjustment.Adjustment getAdjustment()Gets the [gtk.adjustment.Adjustment] associated with the [gtk.scale_button.ScaleButton]’s scale.
bool getHasFrame()Returns whether the button has a frame. Returns: true if the button has a frame
gtk.button.Button getMinusButton()Retrieves the minus button of the [gtk.scalebutton.ScaleButton]. Returns: the minus button of the [gtk.scalebutton.ScaleButton]
gtk.button.Button getPlusButton()Retrieves the plus button of the `GtkScaleButton.` Returns: the plus button of the [gtk.scale_button.ScaleButton]
gtk.widget.Widget getPopup()Retrieves the popup of the [gtk.scalebutton.ScaleButton]. Returns: the popup of the [gtk.scalebutton.ScaleButton]
double getValue()Gets the current value of the scale button. Returns: current value of the scale button
void setAdjustment(gtk.adjustment.Adjustment adjustment)Sets the [gtk.adjustment.Adjustment] to be used as a model for the [gtk.scale_button.ScaleButton]’s scale.
void setHasFrame(bool hasFrame)Sets the style of the button.
void setIcons(string[] icons)Sets the icons to be used by the scale button.
void setValue(double value)Sets 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)Connect 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)Connect 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)Connect 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].
Methods
T adjustment(gtk.adjustment.Adjustment propval)Set `adjustment` property. Params: propval = The [gtk.adjustment.Adjustment] that is used as the model. Returns: Builder instance for fluent chaining
T hasFrame(bool propval)Set `hasFrame` property. Params: propval = If the scale button has a frame. Returns: Builder instance for fluent chaining
T value(double propval)Set `value` property. Params: propval = The value of the scale. Returns: Builder instance for fluent chaining

Fluent builder for [gtk.scale_button.ScaleButton]