Creates a new gtk.scale.Scale.
Adds a mark at value.
Removes any marks that have been added.
Gets the number of decimal places that are displayed in the value.
Returns whether the current value is displayed as a string next to the slider.
Returns whether the scale has an origin.
Gets the pango.layout.Layout used to display the scale.
Obtains the coordinates where the scale will draw the pango.layout.Layout representing the text in the scale.
Gets the position in which the current value is displayed.
Sets the number of decimal places that are displayed in the value.
Specifies whether the current value is displayed as a string next to the slider.
func allows you to change how the scale value is displayed.
Sets whether the scale has an origin.
Sets the position in which the current value is displayed.
Creates a new scale widget with a range from min to max.
Get the adjustment which is the “model” object for gtk.range.Range.
Gets the current position of the fill level indicator.
Gets whether the gtk.range.Range respects text direction.
Gets whether the range is inverted.
This function returns the area that contains the range’s trough, in coordinates relative to range's origin.
Gets whether the range is restricted to the fill level.
Gets the number of digits to round the value to when it changes.
Gets whether the range displays the fill level graphically.
This function returns sliders range along the long dimension, in widget->window coordinates.
This function is useful mainly for gtk.range.Range subclasses.
Gets the current value of the range.
Sets the adjustment to be used as the “model” object for the gtk.range.Range
Set the new position of the fill level indicator.
Sets whether the gtk.range.Range respects text direction.
Sets the step and page sizes for the range.
Sets whether to invert the range.
Sets the allowable values in the gtk.range.Range.
Sets whether the slider is restricted to the fill level.
Sets the number of digits to round the value to when it changes.
Sets whether a graphical fill level is show on the trough.
Sets whether the range’s slider has a fixed size, or a size that depends on its adjustment’s page size.
Sets the current value of the range.
Connect to AdjustBounds signal.
Connect to ChangeValue signal.
Connect to MoveSlider signal.
Connect to ValueChanged signal.
A gtk.scale.Scale is a slider control used to select a numeric value.
To use it, you’ll probably want to investigate the methods on its base class, gtk.range.Range, in addition to the methods for gtk.scale.Scale itself. To set the value of a scale, you would normally use gtk.range.Range.setValue. To detect changes to the value, you would normally use the signal@Gtk.Range::value-changed signal.
Note that using the same upper and lower bounds for the gtk.scale.Scale (through the gtk.range.Range methods) will hide the slider itself. This is useful for applications that want to show an undeterminate value on the scale, without changing the layout of the application (such as movie or music players).
GtkScale as GtkBuildable
gtk.scale.Scale supports a custom <marks> element, which can contain multiple <mark\> elements. The “value” and “position” attributes have the same meaning as gtk.scale.Scale.addMark parameters of the same name. If the element is not empty, its content is taken as the markup to show at the mark. It can be translated with the usual ”translatable” and “context” attributes.
CSS nodes
gtk.scale.Scale has a main CSS node with name scale and a subnode for its contents, with subnodes named trough and slider.
The main node gets the style class .fine-tune added when the scale is in 'fine-tuning' mode.
If the scale has an origin (see gtk.scale.Scale.setHasOrigin), there is a subnode with name highlight below the trough node that is used for rendering the highlighted part of the trough.
If the scale is showing a fill level (see gtk.range.Range.setShowFillLevel), there is a subnode with name fill below the trough node that is used for rendering the filled in part of the trough.
If marks are present, there is a marks subnode before or after the trough node, below which each mark gets a node with name mark. The marks nodes get either the .top or .bottom style class.
The mark node has a subnode named indicator. If the mark has text, it also has a subnode named label. When the mark is either above or left of the scale, the label subnode is the first when present. Otherwise, the indicator subnode is the first.
The main CSS node gets the 'marks-before' and/or 'marks-after' style classes added depending on what marks are present.
If the scale is displaying the value (see property@Gtk.Scale:draw-value), there is subnode with name value. This node will get the .top or .bottom style classes similar to the marks node.
Accessibility
gtk.scale.Scale uses the gtk.types.AccessibleRole.Slider role.