gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.Range

Contents

- Exported types
- Methods
  - getAdjustment
  - getFillLevel
  - getFlippable
  - getInverted
  - getRangeRect
  - getRestrictToFillLevel
  - getRoundDigits
  - getShowFillLevel
  - getSliderRange
  - getSliderSizeFixed
  - getValue
  - setAdjustment
  - setFillLevel
  - setFlippable
  - setIncrements
  - setInverted
  - setRange
  - setRestrictToFillLevel
  - setRoundDigits
  - setShowFillLevel
  - setSliderSizeFixed
  - setValue
- Properties
  - adjustment
  - fillLevel
  - inverted
  - restrictToFillLevel
  - roundDigits
  - showFillLevel
- Signals
  - adjustBounds
  - changeValue
  - moveSlider
  - valueChanged

Description

Base class for widgets which visualize an adjustment.

Widgets that are derived from `GtkRange` include `Scale` and `Scrollbar`.

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

# Shortcuts and Gestures

The `GtkRange` slider is draggable. Holding the <kbd>Shift</kbd> key while dragging, or initiating the drag with a long-press will enable the fine-tuning mode.

Synopsis

- newtype Range = Range (ManagedPtr Range)
- class (GObject o, IsDescendantOf Range o) => IsRange o
- toRange :: (MonadIO m, IsRange o) => o -> m Range
- rangeGetAdjustment :: (HasCallStack, MonadIO m, IsRange a) => a -> m Adjustment
- rangeGetFillLevel :: (HasCallStack, MonadIO m, IsRange a) => a -> m Double
- rangeGetFlippable :: (HasCallStack, MonadIO m, IsRange a) => a -> m Bool
- rangeGetInverted :: (HasCallStack, MonadIO m, IsRange a) => a -> m Bool
- rangeGetRangeRect :: (HasCallStack, MonadIO m, IsRange a) => a -> m Rectangle
- rangeGetRestrictToFillLevel :: (HasCallStack, MonadIO m, IsRange a) => a -> m Bool
- rangeGetRoundDigits :: (HasCallStack, MonadIO m, IsRange a) => a -> m Int32
- rangeGetShowFillLevel :: (HasCallStack, MonadIO m, IsRange a) => a -> m Bool
- rangeGetSliderRange :: (HasCallStack, MonadIO m, IsRange a) => a -> m (Int32, Int32)
- rangeGetSliderSizeFixed :: (HasCallStack, MonadIO m, IsRange a) => a -> m Bool
- rangeGetValue :: (HasCallStack, MonadIO m, IsRange a) => a -> m Double
- rangeSetAdjustment :: (HasCallStack, MonadIO m, IsRange a, IsAdjustment b) => a -> b -> m ()
- rangeSetFillLevel :: (HasCallStack, MonadIO m, IsRange a) => a -> Double -> m ()
- rangeSetFlippable :: (HasCallStack, MonadIO m, IsRange a) => a -> Bool -> m ()
- rangeSetIncrements :: (HasCallStack, MonadIO m, IsRange a) => a -> Double -> Double -> m ()
- rangeSetInverted :: (HasCallStack, MonadIO m, IsRange a) => a -> Bool -> m ()
- rangeSetRange :: (HasCallStack, MonadIO m, IsRange a) => a -> Double -> Double -> m ()
- rangeSetRestrictToFillLevel :: (HasCallStack, MonadIO m, IsRange a) => a -> Bool -> m ()
- rangeSetRoundDigits :: (HasCallStack, MonadIO m, IsRange a) => a -> Int32 -> m ()
- rangeSetShowFillLevel :: (HasCallStack, MonadIO m, IsRange a) => a -> Bool -> m ()
- rangeSetSliderSizeFixed :: (HasCallStack, MonadIO m, IsRange a) => a -> Bool -> m ()
- rangeSetValue :: (HasCallStack, MonadIO m, IsRange a) => a -> Double -> m ()
- constructRangeAdjustment :: (IsRange o, MonadIO m, IsAdjustment a) => a -> m (GValueConstruct o)
- getRangeAdjustment :: (MonadIO m, IsRange o) => o -> m Adjustment
- setRangeAdjustment :: (MonadIO m, IsRange o, IsAdjustment a) => o -> a -> m ()
- constructRangeFillLevel :: (IsRange o, MonadIO m) => Double -> m (GValueConstruct o)
- getRangeFillLevel :: (MonadIO m, IsRange o) => o -> m Double
- setRangeFillLevel :: (MonadIO m, IsRange o) => o -> Double -> m ()
- constructRangeInverted :: (IsRange o, MonadIO m) => Bool -> m (GValueConstruct o)
- getRangeInverted :: (MonadIO m, IsRange o) => o -> m Bool
- setRangeInverted :: (MonadIO m, IsRange o) => o -> Bool -> m ()
- constructRangeRestrictToFillLevel :: (IsRange o, MonadIO m) => Bool -> m (GValueConstruct o)
- getRangeRestrictToFillLevel :: (MonadIO m, IsRange o) => o -> m Bool
- setRangeRestrictToFillLevel :: (MonadIO m, IsRange o) => o -> Bool -> m ()
- constructRangeRoundDigits :: (IsRange o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getRangeRoundDigits :: (MonadIO m, IsRange o) => o -> m Int32
- setRangeRoundDigits :: (MonadIO m, IsRange o) => o -> Int32 -> m ()
- constructRangeShowFillLevel :: (IsRange o, MonadIO m) => Bool -> m (GValueConstruct o)
- getRangeShowFillLevel :: (MonadIO m, IsRange o) => o -> m Bool
- setRangeShowFillLevel :: (MonadIO m, IsRange o) => o -> Bool -> m ()
- type RangeAdjustBoundsCallback = Double -> IO ()
- afterRangeAdjustBounds :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeAdjustBoundsCallback) -> m SignalHandlerId
- onRangeAdjustBounds :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeAdjustBoundsCallback) -> m SignalHandlerId
- type RangeChangeValueCallback = ScrollType -> Double -> IO Bool
- afterRangeChangeValue :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeChangeValueCallback) -> m SignalHandlerId
- onRangeChangeValue :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeChangeValueCallback) -> m SignalHandlerId
- type RangeMoveSliderCallback = ScrollType -> IO ()
- afterRangeMoveSlider :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeMoveSliderCallback) -> m SignalHandlerId
- onRangeMoveSlider :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeMoveSliderCallback) -> m SignalHandlerId
- type RangeValueChangedCallback = IO ()
- afterRangeValueChanged :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeValueChangedCallback) -> m SignalHandlerId
- onRangeValueChanged :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeValueChangedCallback) -> m SignalHandlerId

# Exported types

newtype Range Source #

Memory-managed wrapper type.

Constructors

Range (ManagedPtr Range) |

#### Instances

Instances details

Eq Range Source # |
Instance details Defined in GI.Gtk.Objects.Range Methods (==) :: Range -> Range -> Bool Source # (/=) :: Range -> Range -> Bool Source #
GObject Range Source # |
Instance details Defined in GI.Gtk.Objects.Range
ManagedPtrNewtype Range Source # |
Instance details Defined in GI.Gtk.Objects.Range Methods toManagedPtr :: Range -> ManagedPtr Range Source #
TypedObject Range Source # |
Instance details Defined in GI.Gtk.Objects.Range Methods glibType :: IO GType Source #
HasParentTypes Range Source # |
Instance details Defined in GI.Gtk.Objects.Range
IsGValue (Maybe Range) Source # | Convert `Range` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.Range Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe Range -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe Range) Source #
type ParentTypes Range Source # |
Instance details Defined in GI.Gtk.Objects.Range type ParentTypes Range = '[Widget, Object, Accessible, AccessibleRange, Buildable, ConstraintTarget, Orientable]

class (GObject o, IsDescendantOf Range o) => IsRange o Source #

Type class for types which can be safely cast to `Range`, for instance with `toRange`.

#### Instances

Instances details

(GObject o, IsDescendantOf Range o) => IsRange o Source # |
Instance details Defined in GI.Gtk.Objects.Range

toRange :: (MonadIO m, IsRange o) => o -> m Range Source #

Cast to `Range`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updatePlatformState, updateProperty, updateRelation, updateState, watchClosure.

#### Getters

getAccessibleId, getAccessibleParent, getAccessibleRole, getAdjustment, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFillLevel, getFirstAccessibleChild, getFirstChild, getFlippable, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getInverted, getLastChild, getLayoutManager, getLimitEvents, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOrientation, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRangeRect, getRealized, getReceivesDefault, getRequestMode, getRestrictToFillLevel, getRoot, getRoundDigits, getScaleFactor, getSensitive, getSettings, getShowFillLevel, getSize, getSizeRequest, getSliderRange, getSliderSizeFixed, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getValue, getVexpand, getVexpandSet, getVisible, getWidth.

#### Setters

setAccessibleParent, setAdjustment, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFillLevel, setFlippable, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setIncrements, setInverted, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOrientation, setOverflow, setParent, setProperty, setRange, setReceivesDefault, setRestrictToFillLevel, setRoundDigits, setSensitive, setShowFillLevel, setSizeRequest, setSliderSizeFixed, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setValue, setVexpand, setVexpandSet, setVisible.

## getAdjustment

rangeGetAdjustment Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> m Adjustment | Returns: a `GtkAdjustment`

Get the adjustment which is the “model” object for `GtkRange`.

## getFillLevel

rangeGetFillLevel Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: A `GtkRange`
-> m Double | Returns: The current fill level

Gets the current position of the fill level indicator.

## getFlippable

rangeGetFlippable Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> m Bool | Returns: `True` if the range is flippable

Gets whether the `GtkRange` respects text direction.

See `rangeSetFlippable`.

## getInverted

rangeGetInverted Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> m Bool | Returns: `True` if the range is inverted

Gets whether the range is inverted.

See `rangeSetInverted`.

## getRangeRect

rangeGetRangeRect Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> m Rectangle |

This function returns the area that contains the range’s trough, in coordinates relative to `range`'s origin.

This function is useful mainly for `GtkRange` subclasses.

## getRestrictToFillLevel

rangeGetRestrictToFillLevel Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: A `GtkRange`
-> m Bool | Returns: `True` if `range` is restricted to the fill level.

Gets whether the range is restricted to the fill level.

## getRoundDigits

rangeGetRoundDigits Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> m Int32 | Returns: the number of digits to round to

Gets the number of digits to round the value to when it changes.

See Range::changeValue.

## getShowFillLevel

rangeGetShowFillLevel Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: A `GtkRange`
-> m Bool | Returns: `True` if `range` shows the fill level.

Gets whether the range displays the fill level graphically.

## getSliderRange

rangeGetSliderRange Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> m (Int32, Int32) |

This function returns sliders range along the long dimension, in widget->window coordinates.

This function is useful mainly for `GtkRange` subclasses.

## getSliderSizeFixed

rangeGetSliderSizeFixed Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> m Bool | Returns: whether the range’s slider has a fixed size.

This function is useful mainly for `GtkRange` subclasses.

See `rangeSetSliderSizeFixed`.

## getValue

rangeGetValue Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> m Double | Returns: current value of the range.

Gets the current value of the range.

## setAdjustment

rangeSetAdjustment Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a, IsAdjustment b) |
=> a | `range`: a `GtkRange`
-> b | `adjustment`: a `GtkAdjustment`
-> m () |

Sets the adjustment to be used as the “model” object for the `GtkRange`

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 `GtkScale` and nonzero for `GtkScrollbar`, and indicates the size of the visible area of the widget being scrolled. The page size affects the size of the scrollbar slider.

## setFillLevel

rangeSetFillLevel Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> Double | `fillLevel`: the new position of the fill level indicator
-> m () |

Set the new position of the fill level indicator.

The “fill level” is probably best described by its most prominent use case, which is an indicator for the amount of pre-buffering in a streaming media player. In that use case, the value of the range would indicate the current play position, and the fill level would be the position up to which the file/stream has been downloaded.

This amount of prebuffering can be displayed on the range’s trough and is themeable separately from the trough. To enable fill level display, use `rangeSetShowFillLevel`. The range defaults to not showing the fill level.

Additionally, it’s possible to restrict the range’s slider position to values which are smaller than the fill level. This is controlled by `rangeSetRestrictToFillLevel` and is by default enabled.

## setFlippable

rangeSetFlippable Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> Bool | `flippable`: `True` to make the range flippable
-> m () |

Sets whether the `GtkRange` respects text direction.

If a range is flippable, it will switch its direction if it is horizontal and its direction is `TextDirectionRtl`.

See `widgetGetDirection`.

## setIncrements

rangeSetIncrements Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> Double | `step`: step size
-> Double | `page`: page size
-> m () |

Sets the step and page sizes for the range.

The step size is used when the user clicks the `GtkScrollbar` arrows or moves a `GtkScale` via arrow keys. The page size is used for example when moving via Page Up or Page Down keys.

## setInverted

rangeSetInverted Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> Bool | `setting`: `True` to invert the range
-> m () |

Sets whether to invert the range.

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.

## setRange

rangeSetRange Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> Double | `min`: minimum range value
-> Double | `max`: maximum range value
-> m () |

Sets the allowable values in the `GtkRange`.

The range value is clamped to be between `min` and `max`. (If the range has a non-zero page size, it is clamped between `min` and `max` - page-size.)

## setRestrictToFillLevel

rangeSetRestrictToFillLevel Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: A `GtkRange`
-> Bool | `restrictToFillLevel`: Whether the fill level restricts slider movement.
-> m () |

Sets whether the slider is restricted to the fill level.

See `rangeSetFillLevel` for a general description of the fill level concept.

## setRoundDigits

rangeSetRoundDigits Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> Int32 | `roundDigits`: the precision in digits, or -1
-> m () |

Sets the number of digits to round the value to when it changes.

See Range::changeValue.

## setShowFillLevel

rangeSetShowFillLevel Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: A `GtkRange`
-> Bool | `showFillLevel`: Whether a fill level indicator graphics is shown.
-> m () |

Sets whether a graphical fill level is show on the trough.

See `rangeSetFillLevel` for a general description of the fill level concept.

## setSliderSizeFixed

rangeSetSliderSizeFixed Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> Bool | `sizeFixed`: `True` to make the slider size constant
-> m () |

Sets whether the range’s slider has a fixed size, or a size that depends on its adjustment’s page size.

This function is useful mainly for `GtkRange` subclasses.

## setValue

rangeSetValue Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) |
=> a | `range`: a `GtkRange`
-> Double | `value`: new value of the range
-> m () |

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 Range::valueChanged signal if the value changes.

# Properties

## adjustment

The adjustment that is controlled by the range.

constructRangeAdjustment :: (IsRange o, MonadIO m, IsAdjustment a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`adjustment`” property. This is rarely needed directly, but it is used by `new`.

getRangeAdjustment :: (MonadIO m, IsRange o) => o -> m Adjustment Source #

Get the value of the “`adjustment`” property. When overloading is enabled, this is equivalent to

    get range #adjustment

setRangeAdjustment :: (MonadIO m, IsRange o, IsAdjustment a) => o -> a -> m () Source #

Set the value of the “`adjustment`” property. When overloading is enabled, this is equivalent to

    set range [ #adjustment := value ]

## fillLevel

The fill level (e.g. prebuffering of a network stream).

constructRangeFillLevel :: (IsRange o, MonadIO m) => Double -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`fill-level`” property. This is rarely needed directly, but it is used by `new`.

getRangeFillLevel :: (MonadIO m, IsRange o) => o -> m Double Source #

Get the value of the “`fill-level`” property. When overloading is enabled, this is equivalent to

    get range #fillLevel

setRangeFillLevel :: (MonadIO m, IsRange o) => o -> Double -> m () Source #

Set the value of the “`fill-level`” property. When overloading is enabled, this is equivalent to

    set range [ #fillLevel := value ]

## inverted

If `True`, the direction in which the slider moves is inverted.

constructRangeInverted :: (IsRange o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`inverted`” property. This is rarely needed directly, but it is used by `new`.

getRangeInverted :: (MonadIO m, IsRange o) => o -> m Bool Source #

Get the value of the “`inverted`” property. When overloading is enabled, this is equivalent to

    get range #inverted

setRangeInverted :: (MonadIO m, IsRange o) => o -> Bool -> m () Source #

Set the value of the “`inverted`” property. When overloading is enabled, this is equivalent to

    set range [ #inverted := value ]

## restrictToFillLevel

Controls whether slider movement is restricted to an upper boundary set by the fill level.

constructRangeRestrictToFillLevel :: (IsRange o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`restrict-to-fill-level`” property. This is rarely needed directly, but it is used by `new`.

getRangeRestrictToFillLevel :: (MonadIO m, IsRange o) => o -> m Bool Source #

Get the value of the “`restrict-to-fill-level`” property. When overloading is enabled, this is equivalent to

    get range #restrictToFillLevel

setRangeRestrictToFillLevel :: (MonadIO m, IsRange o) => o -> Bool -> m () Source #

Set the value of the “`restrict-to-fill-level`” property. When overloading is enabled, this is equivalent to

    set range [ #restrictToFillLevel := value ]

## roundDigits

The number of digits to round the value to when it changes.

See Range::changeValue.

constructRangeRoundDigits :: (IsRange o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`round-digits`” property. This is rarely needed directly, but it is used by `new`.

getRangeRoundDigits :: (MonadIO m, IsRange o) => o -> m Int32 Source #

Get the value of the “`round-digits`” property. When overloading is enabled, this is equivalent to

    get range #roundDigits

setRangeRoundDigits :: (MonadIO m, IsRange o) => o -> Int32 -> m () Source #

Set the value of the “`round-digits`” property. When overloading is enabled, this is equivalent to

    set range [ #roundDigits := value ]

## showFillLevel

Controls whether fill level indicator graphics are displayed on the trough.

constructRangeShowFillLevel :: (IsRange o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`show-fill-level`” property. This is rarely needed directly, but it is used by `new`.

getRangeShowFillLevel :: (MonadIO m, IsRange o) => o -> m Bool Source #

Get the value of the “`show-fill-level`” property. When overloading is enabled, this is equivalent to

    get range #showFillLevel

setRangeShowFillLevel :: (MonadIO m, IsRange o) => o -> Bool -> m () Source #

Set the value of the “`show-fill-level`” property. When overloading is enabled, this is equivalent to

    set range [ #showFillLevel := value ]

# Signals

## adjustBounds

type RangeAdjustBoundsCallback Source #

Arguments

= Double | `value`: the value before we clamp
-> IO () |

Emitted before clamping a value, to give the application a chance to adjust the bounds.

afterRangeAdjustBounds :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeAdjustBoundsCallback) -> m SignalHandlerId Source #

Connect a signal handler for the adjustBounds signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after range #adjustBounds callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onRangeAdjustBounds :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeAdjustBoundsCallback) -> m SignalHandlerId Source #

Connect a signal handler for the adjustBounds signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on range #adjustBounds callback

## changeValue

type RangeChangeValueCallback Source #

Arguments

= ScrollType | `scroll`: the type of scroll action that was performed
-> Double | `value`: the new value resulting from the scroll action
-> IO Bool | Returns: `True` to prevent other handlers from being invoked for the signal, `False` to propagate the signal further

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.

The value parameter is unrounded. An application that overrides the changeValue signal is responsible for clamping the value to the desired number of decimal digits; the default GTK handler clamps the value based on Range:roundDigits.

afterRangeChangeValue :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeChangeValueCallback) -> m SignalHandlerId Source #

Connect a signal handler for the changeValue signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after range #changeValue callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onRangeChangeValue :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeChangeValueCallback) -> m SignalHandlerId Source #

Connect a signal handler for the changeValue signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on range #changeValue callback

## moveSlider

type RangeMoveSliderCallback Source #

Arguments

= ScrollType | `step`: how to move the slider
-> IO () |

Virtual function that moves the slider.

Used for keybindings.

afterRangeMoveSlider :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeMoveSliderCallback) -> m SignalHandlerId Source #

Connect a signal handler for the moveSlider signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after range #moveSlider callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onRangeMoveSlider :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeMoveSliderCallback) -> m SignalHandlerId Source #

Connect a signal handler for the moveSlider signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on range #moveSlider callback

## valueChanged

type RangeValueChangedCallback = IO () Source #

Emitted when the range value changes.

afterRangeValueChanged :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeValueChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the valueChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after range #valueChanged callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onRangeValueChanged :: (IsRange a, MonadIO m) => a -> ((?self :: a) => RangeValueChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the valueChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on range #valueChanged callback