gtk.range

Module for [Range] class

Types 3

gtk.range.Range is the common base class for widgets which visualize an adjustment.

Widgets that are derived from gtk.range.Range include gtk.scale.Scale and gtk.scrollbar.Scrollbar.

Apart from signals for monitoring the parameters of the adjustment, gtk.range.Range provides properties and methods for setting a “fill level” on range widgets. See gtk.range.Range.setFillLevel.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
Range self() nothrowReturns `this`, for use in `with` statements.
RangeGidBuilder builder() static nothrowGet builder for [gtk.range.Range] Returns: New builder object
gtk.adjustment.Adjustment adjustment() @property nothrowGet `adjustment` property. Returns: The adjustment that is controlled by the range.
void adjustment(gtk.adjustment.Adjustment propval) @property nothrowSet `adjustment` property. Params: propval = The adjustment that is controlled by the range.
double fillLevel() @property nothrowGet `fillLevel` property. Returns: The fill level (e.g. prebuffering of a network stream).
void fillLevel(double propval) @property nothrowSet `fillLevel` property. Params: propval = The fill level (e.g. prebuffering of a network stream).
bool inverted() @property nothrowGet `inverted` property. Returns: If true, the direction in which the slider moves is inverted.
void inverted(bool propval) @property nothrowSet `inverted` property. Params: propval = If true, the direction in which the slider moves is inverted.
bool restrictToFillLevel() @property nothrowGet `restrictToFillLevel` property. Returns: Controls whether slider movement is restricted to an upper boundary set by the fill level.
void restrictToFillLevel(bool propval) @property nothrowSet `restrictToFillLevel` property. Params: propval = Controls whether slider movement is restricted to an upper boundary set by the fill level.
int roundDigits() @property nothrowGet `roundDigits` property. Returns: The number of digits to round the value to when it changes.
void roundDigits(int propval) @property nothrowSet `roundDigits` property. Params: propval = The number of digits to round the value to when it changes.
bool showFillLevel() @property nothrowGet `showFillLevel` property. Returns: Controls whether fill level indicator graphics are displayed on the trough.
void showFillLevel(bool propval) @property nothrowSet `showFillLevel` property. Params: propval = Controls whether fill level indicator graphics are displayed on the trough.
gtk.adjustment.Adjustment getAdjustment() nothrowGet the adjustment which is the “model” object for [gtk.range.Range]. Returns: a [gtk.adjustment.Adjustment]
double getFillLevel() nothrowGets the current position of the fill level indicator. Returns: The current fill level
bool getFlippable() nothrowGets whether the [gtk.range.Range] respects text direction.
bool getInverted() nothrowGets whether the range is inverted.
void getRangeRect(out gdk.rectangle.Rectangle rangeRect) nothrowThis function returns the area that contains the range’s trough, in coordinates relative to range's origin.
bool getRestrictToFillLevel() nothrowGets whether the range is restricted to the fill level. Returns: true if range is restricted to the fill level.
int getRoundDigits() nothrowGets the number of digits to round the value to when it changes.
bool getShowFillLevel() nothrowGets whether the range displays the fill level graphically. Returns: true if range shows the fill level.
void getSliderRange(out int sliderStart, out int sliderEnd) nothrowThis function returns sliders range along the long dimension, in widget->window coordinates.
bool getSliderSizeFixed() nothrowThis function is useful mainly for [gtk.range.Range] subclasses.
double getValue() nothrowGets the current value of the range. Returns: current value of the range.
void setAdjustment(gtk.adjustment.Adjustment adjustment) nothrowSets the adjustment to be used as the “model” object for the [gtk.range.Range]
void setFillLevel(double fillLevel) nothrowSet the new position of the fill level indicator.
void setFlippable(bool flippable) nothrowSets whether the [gtk.range.Range] respects text direction.
void setIncrements(double step, double page) nothrowSets the step and page sizes for the range.
void setInverted(bool setting) nothrowSets whether to invert the range.
void setRange(double min, double max) nothrowSets the allowable values in the [gtk.range.Range].
void setRestrictToFillLevel(bool restrictToFillLevel) nothrowSets whether the slider is restricted to the fill level.
void setRoundDigits(int roundDigits) nothrowSets the number of digits to round the value to when it changes.
void setShowFillLevel(bool showFillLevel) nothrowSets whether a graphical fill level is show on the trough.
void setSliderSizeFixed(bool sizeFixed) nothrowSets whether the range’s slider has a fixed size, or a size that depends on its adjustment’s page size.
void setValue(double value) nothrowSets the current value of the range.
gulong connectAdjustBounds(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.range.Range))) && Parameters!T.length < 3) nothrowConnect to `AdjustBounds` signal.
gulong connectChangeValue(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == bool) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == gtk.types.ScrollType))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == double))) && (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : gtk.range.Range))) && Parameters!T.length < 4) nothrowConnect to `ChangeValue` signal.
gulong connectMoveSlider(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.types.ScrollType))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.range.Range))) && Parameters!T.length < 3) nothrowConnect to `MoveSlider` 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] : gtk.range.Range))) && Parameters!T.length < 2) nothrowConnect to `ValueChanged` signal.
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder implementation template for gtk.range.Range

Methods
T adjustment(gtk.adjustment.Adjustment propval) nothrowSet `adjustment` property. Params: propval = The adjustment that is controlled by the range. Returns: Builder instance for fluent chaining
T fillLevel(double propval) nothrowSet `fillLevel` property. Params: propval = The fill level (e.g. prebuffering of a network stream). Returns: Builder instance for fluent chaining
T inverted(bool propval) nothrowSet `inverted` property. Params: propval = If true, the direction in which the slider moves is inverted. Returns: Builder instance for fluent chaining
T restrictToFillLevel(bool propval) nothrowSet `restrictToFillLevel` property. Params: propval = Controls whether slider movement is restricted to an upper boundary set by the fill level. Returns: Builder instance for fluent chaining
T roundDigits(int propval) nothrowSet `roundDigits` property. Params: propval = The number of digits to round the value to when it changes.
T showFillLevel(bool propval) nothrowSet `showFillLevel` property. Params: propval = Controls whether fill level indicator graphics are displayed on the trough. Returns: Builder instance for fluent chaining

Fluent builder for gtk.range.Range

Methods
Range build() nothrowCreate object from builder. Returns: New object