gtk.scale_button
Module for [ScaleButton] class
Types 3
classScaleButton : gtk.widget.Widget, gtk.accessible_range.AccessibleRange, gtk.orientable.Orientable
[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
ScaleButton self()Returns `this`, for use in `with` statements.ScaleButtonGidBuilder builder()Get builder for [gtk.scale_button.ScaleButton] Returns: New builder objectgtk.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.void hasFrame(bool propval) @propertySet `hasFrame` property. Params: propval = If the scale button has a frame.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 framegtk.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 buttonvoid 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.classScaleButtonGidBuilderImpl(T) : gtk.widget.WidgetGidBuilderImpl!T, gtk.accessible_range.AccessibleRangeGidBuilderImpl!T, gtk.orientable.OrientableGidBuilderImpl!T
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 chainingT hasFrame(bool propval)Set `hasFrame` property. Params: propval = If the scale button has a frame. Returns: Builder instance for fluent chainingT value(double propval)Set `value` property. Params: propval = The value of the scale. Returns: Builder instance for fluent chainingFluent builder for [gtk.scale_button.ScaleButton]
Methods