Sets our main struct and passes it to the parent class.
Creates a new gtk.Scale
Creates a new scale widget with the given orientation that lets the user input a number between min and max (including min and max) with the increment step. step must be nonzero; it’s the distance the slider moves when using the arrow keys to adjust the scale value.
Adds a mark at value.
Signal which allows you to change how the scale value is displayed. Connect a signal handler which returns an allocated string representing value. That string will then be used to display the scale's value.
Removes any marks that have been added with Scale.addMark.
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 gtk.Layout used to display the scale. The returned object is owned by the scale so does not need to be freed by the caller.
Obtains the coordinates where the scale will draw the gtk.Layout representing the text in the scale. Remember when using the gtk.Layout function you need to convert to and from pixels using PANGO_PIXELS() or PANGO_SCALE
Get the main Gtk struct
the main Gtk struct as a void*
Gets the position in which the current value is displayed.
Sets the number of decimal places that are displayed in the value. Also causes the value of the adjustment to be rounded to this number of digits, so the retrieved value matches the displayed one, if draw-value is TRUE when the value changes. If you want to enforce rounding the value when draw-value is FALSE, you can set round-digits instead.
Specifies whether the current value is displayed as a string next to the slider.
If has-origin is set to TRUE (the default), the scale will highlight the part of the trough between the origin (bottom or left side) and the current value.
Sets the position in which the current value is displayed.
the main Gtk struct
the main Gtk struct
Get the main Gtk struct
the main Gtk struct as a void*
Get the gtk.Adjustment which is the “model” object for gtk.Range See Range.setAdjustment for details. The return value does not have a reference added, so should not be unreferenced.
Gets the current position of the fill level indicator.
Gets the value set by Range.setFlippable.
Gets the value set by Range.setInverted.
Gets the sensitivity policy for the stepper that points to the 'lower' end of the GtkRange’s adjustment.
This function is useful mainly for gtk.Range subclasses.
This function returns the area that contains the range’s trough and its steppers, in widget->window coordinates.
Gets whether the range is restricted to the fill level.
Gets the number of digits to round the value to when it changes. See change-value.
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 subclasses.
Gets the sensitivity policy for the stepper that points to the 'upper' end of the GtkRange’s adjustment.
Gets the current value of the range.
Sets the adjustment to be used as the “model” object for this range widget. The adjustment indicates the current range value, the minimum and maximum range values, the step/page increments used for keybindings and scrolling, and the page size. The page size is normally 0 for gtk.Scale and nonzero for gtk.Scrollbar, and indicates the size of the visible area of the widget being scrolled. The page size affects the size of the scrollbar slider.
Set the new position of the fill level indicator.
If a range is flippable, it will switch its direction if it is horizontal and its direction is GTK_TEXT_DIR_RTL.
Sets the step and page sizes for the range. The step size is used when the user clicks the gtk.Scrollbar arrows or moves gtk.Scale via arrow keys. The page size is used for example when moving via Page Up or Page Down keys.
Ranges normally move from lower to higher values as the slider moves from top to bottom or left to right. Inverted ranges have higher values at the top or on the right rather than on the bottom or left.
Sets the sensitivity policy for the stepper that points to the 'lower' end of the GtkRange’s adjustment.
Sets the minimum size of the range’s slider.
Sets the allowable values in the gtk.Range, and clamps the range value to be between min and max. (If the range has a non-zero page size, it is clamped between min and max - page-size.)
Sets whether the slider is restricted to the fill level. See Range.setFillLevel for a general description of the fill level concept.
Sets the number of digits to round the value to when it changes. See change-value.
Sets whether a graphical fill level is show on the trough. See Range.setFillLevel for a general description of the fill level concept.
Sets whether the range’s slider has a fixed size, or a size that depends on its adjustment’s page size.
Sets the sensitivity policy for the stepper that points to the 'upper' end of the GtkRange’s adjustment.
Sets the current value of the range; if the value is outside the minimum or maximum range values, it will be clamped to fit inside them. The range emits the value-changed signal if the value changes.
Emitted before clamping a value, to give the application a chance to adjust the bounds.
The change-value signal is emitted when a scroll action is performed on a range. It allows an application to determine the type of scroll event that occurred and the resultant new value. The application can handle the event itself and return TRUE to prevent further processing. Or, by returning FALSE, it can pass the event to other handlers until the default GTK+ handler is reached.
Virtual function that moves the slider. Used for keybindings.
Emitted when the range value changes.
A GtkScale 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, in addition to the methods for GtkScale itself. To set the value of a scale, you would normally use Range.setValue. To detect changes to the value, you would normally use the value-changed signal.
Note that using the same upper and lower bounds for the gtk.Scale (through the gtk.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
GtkScale supports a custom <marks> element, which can contain multiple <mark> elements. The “value” and “position” attributes have the same meaning as 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
|[<!-- language="plain" --> scale[.fine-tune][.marks-before][.marks-after] ├── marks.top │ ├── mark │ ┊ ├── label │ ┊ ╰── indicator ┊ ┊ │ ╰── mark ├── value ├── contents │ ╰── trough │ ├── slider │ ├── highlight │ ╰── fill ╰── marks.bottom ├── mark ┊ ├── indicator ┊ ╰── label ╰── mark