It derives from <GtkWidget>.
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 <GtkVolumeButton> subclass that
is tailored for this use case.
The following signals have default keybindings:
scalebutton.scale
╰── button.toggle
╰── <icon>
<GtkScaleButton> has a single CSS node with
name scalebutton and .scale style class, and contains a
button node with a .toggle style class.
parent-instanceIf the scale button should be pressed in.
Its value is a boolean.
It is read only.
The <GtkAdjustment> that is used as the model.
Its value is a <GtkAdjustment>, or #f.
Set it with (set! (scale-button:adjustment self) value).
If the scale button has a frame.
Its value is a boolean.
Set it with (set! (scale-button:has-frame self) value).
The names of the icons to be used by the scale button.
The first item in the array will be used in the button when the current value is the lowest value, the second item for the highest value. All the subsequent icons will be used for all the other values, spread evenly over the range of values.
If there’s only one icon name in the icons array, it will be used for all the values. If only two icon names are in the icons array, the first one will be used for the bottom 50% of the scale, and the second one for the top 50%.
It is recommended to use at least 3 icons so that the
<GtkScaleButton> reflects the current value of
the scale better for the users.
Its value is a vector, each a string (or, to set it, a list), or
#f.
Set it with (set! (scale-button:icons self) value).
The value of the scale.
Its value is a real number.
Set it with (set! (scale-button:value self) value).
Queries a <GtkScaleButton> and returns its
current state.
Returns #t if the scale button is pressed in and #f if it
is raised.
Passed: a <GtkScaleButton>.
Returned: a boolean.
whether the button is pressed
Gets the <GtkAdjustment> associated with the
<GtkScaleButton>’s scale.
See range:get-adjustment for details.
Passed: a <GtkScaleButton>.
Returned: a <GtkAdjustment>.
the adjustment associated with the scale
Returns whether the button has a frame.
Passed: a <GtkScaleButton>.
Returned: a boolean.
#t if the button has a frame
Retrieves the minus button of the
<GtkScaleButton>.
Passed: a <GtkScaleButton>.
Returned: a <GtkButton>.
the minus button of the <GtkScaleButton>
Retrieves the plus button of the GtkScaleButton.
Passed: a <GtkScaleButton>.
Returned: a <GtkButton>.
the plus button of the <GtkScaleButton>
Retrieves the popup of the <GtkScaleButton>.
Passed: a <GtkScaleButton>.
Returned: a <GtkWidget>.
the popup of the <GtkScaleButton>
Gets the current value of the scale button.
Passed: a <GtkScaleButton>.
Returned: a real number.
current value of the scale button
Creates a <GtkScaleButton>.
The new scale button has a range between min and max, with a stepping of step.
Passed: a real number.
the minimum value of the scale (usually 0)
Passed: a real number.
the maximum value of the scale (usually 100)
Passed: a real number.
the stepping of value when a scroll-wheel event, or up/down arrow event occurs (usually 2)
Passed, or left out: a list or vector, each a string, or #f.
a #f-terminated array of icon names, or #f if you want to
set the list later with scale-button:set-icons
Returned: a <GtkWidget>.
a new <GtkScaleButton>
Sets the <GtkAdjustment> to be used as a model
for the <GtkScaleButton>’s scale.
See range:set-adjustment for details.
Passed: a <GtkScaleButton>.
Passed: a <GtkAdjustment>.
Sets the style of the button.
Passed: a <GtkScaleButton>.
Passed: a boolean.
whether the button should have a visible frame
Sets the icons to be used by the scale button.
Passed: a <GtkScaleButton>.
Passed: a list or vector, each a string.
a #f-terminated array of icon names
Sets the current value of the scale.
If the value is outside the minimum or maximum range values, it will be clamped to fit inside them.
The scale button emits the scale-button:value-changed signal if the value changes.
Passed: a <GtkScaleButton>.
Passed: a real number.
new value of the scale button
Connect a handler with (connect object scale-button:popdown
handler). It is called as (handler self).
Emitted to dismiss the popup.
This is a keybinding signal.
The default binding for this signal is Escape.
Passed: a <GtkScaleButton>.
Connect a handler with (connect object scale-button:popup
handler). It is called as (handler self).
Emitted to popup the scale widget.
This is a keybinding signal.
The default bindings for this signal are Space, Enter and Return.
Passed: a <GtkScaleButton>.
Connect a handler with (connect object scale-button:value-changed
handler). It is called as (handler self value).
Emitted when the value field has changed.
Passed: a <GtkScaleButton>.
Passed: a real number.
the new value
To override it in a new class, give register-type #:vfuncs
`((value-changed . ,procedure)). The procedure is called as
(procedure self value).
Passed: the class whose implementation to call:
<GtkScaleButton>, or a class that derives from
it, or its GType number.
Passed: a <GtkScaleButton>.
Passed: a real number.