Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
- Exported types
- Methods
- getAdjustment
- getFillLevel
- getFlippable
- getInverted
- getLowerStepperSensitivity
- getMinSliderSize
- getRangeRect
- getRestrictToFillLevel
- getRoundDigits
- getShowFillLevel
- getSliderRange
- getSliderSizeFixed
- getUpperStepperSensitivity
- getValue
- setAdjustment
- setFillLevel
- setFlippable
- setIncrements
- setInverted
- setLowerStepperSensitivity
- setMinSliderSize
- setRange
- setRestrictToFillLevel
- setRoundDigits
- setShowFillLevel
- setSliderSizeFixed
- setUpperStepperSensitivity
- setValue
- Properties
- Signals
Range
is the common base class for widgets which visualize an
adjustment, e.g Scale
or Scrollbar
.
Apart from signals for monitoring the parameters of the adjustment,
Range
provides properties and methods for influencing the sensitivity
of the “steppers”. It also provides properties and methods for setting a
“fill level” on range widgets. See rangeSetFillLevel
.
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
- rangeGetLowerStepperSensitivity :: (HasCallStack, MonadIO m, IsRange a) => a -> m SensitivityType
- rangeGetMinSliderSize :: (HasCallStack, MonadIO m, IsRange a) => a -> m Int32
- 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
- rangeGetUpperStepperSensitivity :: (HasCallStack, MonadIO m, IsRange a) => a -> m SensitivityType
- 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 ()
- rangeSetLowerStepperSensitivity :: (HasCallStack, MonadIO m, IsRange a) => a -> SensitivityType -> m ()
- rangeSetMinSliderSize :: (HasCallStack, MonadIO m, IsRange a) => a -> Int32 -> 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 ()
- rangeSetUpperStepperSensitivity :: (HasCallStack, MonadIO m, IsRange a) => a -> SensitivityType -> 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 ()
- constructRangeLowerStepperSensitivity :: (IsRange o, MonadIO m) => SensitivityType -> m (GValueConstruct o)
- getRangeLowerStepperSensitivity :: (MonadIO m, IsRange o) => o -> m SensitivityType
- setRangeLowerStepperSensitivity :: (MonadIO m, IsRange o) => o -> SensitivityType -> 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 ()
- constructRangeUpperStepperSensitivity :: (IsRange o, MonadIO m) => SensitivityType -> m (GValueConstruct o)
- getRangeUpperStepperSensitivity :: (MonadIO m, IsRange o) => o -> m SensitivityType
- setRangeUpperStepperSensitivity :: (MonadIO m, IsRange o) => o -> SensitivityType -> m ()
- type C_RangeAdjustBoundsCallback = Ptr () -> CDouble -> Ptr () -> IO ()
- type RangeAdjustBoundsCallback = Double -> IO ()
- afterRangeAdjustBounds :: (IsRange a, MonadIO m) => a -> RangeAdjustBoundsCallback -> m SignalHandlerId
- genClosure_RangeAdjustBounds :: MonadIO m => RangeAdjustBoundsCallback -> m (GClosure C_RangeAdjustBoundsCallback)
- mk_RangeAdjustBoundsCallback :: C_RangeAdjustBoundsCallback -> IO (FunPtr C_RangeAdjustBoundsCallback)
- noRangeAdjustBoundsCallback :: Maybe RangeAdjustBoundsCallback
- onRangeAdjustBounds :: (IsRange a, MonadIO m) => a -> RangeAdjustBoundsCallback -> m SignalHandlerId
- wrap_RangeAdjustBoundsCallback :: RangeAdjustBoundsCallback -> C_RangeAdjustBoundsCallback
- type C_RangeChangeValueCallback = Ptr () -> CUInt -> CDouble -> Ptr () -> IO CInt
- type RangeChangeValueCallback = ScrollType -> Double -> IO Bool
- afterRangeChangeValue :: (IsRange a, MonadIO m) => a -> RangeChangeValueCallback -> m SignalHandlerId
- genClosure_RangeChangeValue :: MonadIO m => RangeChangeValueCallback -> m (GClosure C_RangeChangeValueCallback)
- mk_RangeChangeValueCallback :: C_RangeChangeValueCallback -> IO (FunPtr C_RangeChangeValueCallback)
- noRangeChangeValueCallback :: Maybe RangeChangeValueCallback
- onRangeChangeValue :: (IsRange a, MonadIO m) => a -> RangeChangeValueCallback -> m SignalHandlerId
- wrap_RangeChangeValueCallback :: RangeChangeValueCallback -> C_RangeChangeValueCallback
- type C_RangeMoveSliderCallback = Ptr () -> CUInt -> Ptr () -> IO ()
- type RangeMoveSliderCallback = ScrollType -> IO ()
- afterRangeMoveSlider :: (IsRange a, MonadIO m) => a -> RangeMoveSliderCallback -> m SignalHandlerId
- genClosure_RangeMoveSlider :: MonadIO m => RangeMoveSliderCallback -> m (GClosure C_RangeMoveSliderCallback)
- mk_RangeMoveSliderCallback :: C_RangeMoveSliderCallback -> IO (FunPtr C_RangeMoveSliderCallback)
- noRangeMoveSliderCallback :: Maybe RangeMoveSliderCallback
- onRangeMoveSlider :: (IsRange a, MonadIO m) => a -> RangeMoveSliderCallback -> m SignalHandlerId
- wrap_RangeMoveSliderCallback :: RangeMoveSliderCallback -> C_RangeMoveSliderCallback
- type C_RangeValueChangedCallback = Ptr () -> Ptr () -> IO ()
- type RangeValueChangedCallback = IO ()
- afterRangeValueChanged :: (IsRange a, MonadIO m) => a -> RangeValueChangedCallback -> m SignalHandlerId
- genClosure_RangeValueChanged :: MonadIO m => RangeValueChangedCallback -> m (GClosure C_RangeValueChangedCallback)
- mk_RangeValueChangedCallback :: C_RangeValueChangedCallback -> IO (FunPtr C_RangeValueChangedCallback)
- noRangeValueChangedCallback :: Maybe RangeValueChangedCallback
- onRangeValueChanged :: (IsRange a, MonadIO m) => a -> RangeValueChangedCallback -> m SignalHandlerId
- wrap_RangeValueChangedCallback :: RangeValueChangedCallback -> C_RangeValueChangedCallback
Exported types
Memory-managed wrapper type.
Instances
Eq Range Source # | |
GObject Range Source # | |
Defined in GI.Gtk.Objects.Range | |
ManagedPtrNewtype Range Source # | |
Defined in GI.Gtk.Objects.Range toManagedPtr :: Range -> ManagedPtr Range | |
TypedObject Range Source # | |
Defined in GI.Gtk.Objects.Range | |
HasParentTypes Range Source # | |
Defined in GI.Gtk.Objects.Range | |
IsGValue (Maybe Range) Source # | Convert |
Defined in GI.Gtk.Objects.Range gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Range -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Range) | |
type ParentTypes Range Source # | |
Defined in GI.Gtk.Objects.Range |
class (GObject o, IsDescendantOf Range o) => IsRange o Source #
Instances
(GObject o, IsDescendantOf Range o) => IsRange o Source # | |
Defined in GI.Gtk.Objects.Range |
Methods
Click to display all available methods, including inherited ones
Methods
activate, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, childFocus, childNotify, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forceFloating, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetStateFlags, watchClosure.
Getters
getAccessible, getActionGroup, getAdjustment, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getCanDefault, getCanFocus, getChildRequisition, getChildVisible, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFillLevel, getFlippable, getFocusOnClick, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInternalChild, getInverted, getLowerStepperSensitivity, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getMinSliderSize, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getOrientation, getPangoContext, getParent, getParentWindow, getPath, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRangeRect, getRealized, getReceivesDefault, getRequestMode, getRequisition, getRestrictToFillLevel, getRootWindow, getRoundDigits, getScaleFactor, getScreen, getSensitive, getSettings, getShowFillLevel, getSizeRequest, getSliderRange, getSliderSizeFixed, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getUpperStepperSensitivity, getValign, getValignWithBaseline, getValue, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.
Setters
setAccelPath, setAdjustment, setAllocation, setAppPaintable, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFillLevel, setFlippable, setFocusOnClick, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setIncrements, setInverted, setLowerStepperSensitivity, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setMinSliderSize, setName, setNoShowAll, setOpacity, setOrientation, setParent, setParentWindow, setProperty, setRange, setRealized, setReceivesDefault, setRedrawOnAllocate, setRestrictToFillLevel, setRoundDigits, setSensitive, setShowFillLevel, setSizeRequest, setSliderSizeFixed, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setUpperStepperSensitivity, setValign, setValue, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.
getAdjustment
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> m Adjustment | Returns: a |
Get the Adjustment
which is the “model” object for Range
.
See rangeSetAdjustment
for details.
The return value does not have a reference added, so should not
be unreferenced.
getFillLevel
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> m Double | Returns: The current fill level |
Gets the current position of the fill level indicator.
Since: 2.12
getFlippable
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> m Bool | Returns: |
Gets the value set by rangeSetFlippable
.
Since: 2.18
getInverted
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> m Bool | Returns: |
Gets the value set by rangeSetInverted
.
getLowerStepperSensitivity
rangeGetLowerStepperSensitivity Source #
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> m SensitivityType | Returns: The lower stepper’s sensitivity policy. |
Gets the sensitivity policy for the stepper that points to the 'lower' end of the GtkRange’s adjustment.
Since: 2.10
getMinSliderSize
rangeGetMinSliderSize Source #
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> m Int32 | Returns: The minimum size of the range’s slider. |
Deprecated: (Since version 3.20)Use the min-height/min-width CSS properties on the slider node.
This function is useful mainly for Range
subclasses.
Since: 2.20
getRangeRect
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> m Rectangle |
This function returns the area that contains the range’s trough and its steppers, in widget->window coordinates.
This function is useful mainly for Range
subclasses.
Since: 2.20
getRestrictToFillLevel
rangeGetRestrictToFillLevel Source #
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether the range is restricted to the fill level.
Since: 2.12
getRoundDigits
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> m Int32 | Returns: the number of digits to round to |
Gets the number of digits to round the value to when it changes. See changeValue.
Since: 2.24
getShowFillLevel
rangeGetShowFillLevel Source #
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether the range displays the fill level graphically.
Since: 2.12
getSliderRange
This function returns sliders range along the long dimension, in widget->window coordinates.
This function is useful mainly for Range
subclasses.
Since: 2.20
getSliderSizeFixed
rangeGetSliderSizeFixed Source #
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> m Bool | Returns: whether the range’s slider has a fixed size. |
getUpperStepperSensitivity
rangeGetUpperStepperSensitivity Source #
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> m SensitivityType | Returns: The upper stepper’s sensitivity policy. |
Gets the sensitivity policy for the stepper that points to the 'upper' end of the GtkRange’s adjustment.
Since: 2.10
getValue
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> m Double | Returns: current value of the range. |
Gets the current value of the range.
setAdjustment
:: (HasCallStack, MonadIO m, IsRange a, IsAdjustment b) | |
=> a |
|
-> b |
|
-> m () |
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 Scale
and nonzero for Scrollbar
, and
indicates the size of the visible area of the widget being scrolled.
The page size affects the size of the scrollbar slider.
setFillLevel
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> Double |
|
-> 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 controller
by rangeSetRestrictToFillLevel
and is by default
enabled.
Since: 2.12
setFlippable
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> Bool |
|
-> m () |
If a range is flippable, it will switch its direction if it is
horizontal and its direction is TextDirectionRtl
.
See widgetGetDirection
.
Since: 2.18
setIncrements
setInverted
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> Bool |
|
-> m () |
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.
setLowerStepperSensitivity
rangeSetLowerStepperSensitivity Source #
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> SensitivityType |
|
-> m () |
Sets the sensitivity policy for the stepper that points to the 'lower' end of the GtkRange’s adjustment.
Since: 2.10
setMinSliderSize
rangeSetMinSliderSize Source #
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> Int32 |
|
-> m () |
Deprecated: (Since version 3.20)Use the min-height/min-width CSS properties on the slider node.
Sets the minimum size of the range’s slider.
This function is useful mainly for Range
subclasses.
Since: 2.20
setRange
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> Double |
|
-> Double |
|
-> m () |
Sets the allowable values in the 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.)
setRestrictToFillLevel
rangeSetRestrictToFillLevel Source #
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the slider is restricted to the fill level. See
rangeSetFillLevel
for a general description of the fill
level concept.
Since: 2.12
setRoundDigits
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the number of digits to round the value to when it changes. See changeValue.
Since: 2.24
setShowFillLevel
rangeSetShowFillLevel Source #
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether a graphical fill level is show on the trough. See
rangeSetFillLevel
for a general description of the fill
level concept.
Since: 2.12
setSliderSizeFixed
rangeSetSliderSizeFixed Source #
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> Bool |
|
-> 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 Range
subclasses.
Since: 2.20
setUpperStepperSensitivity
rangeSetUpperStepperSensitivity Source #
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> SensitivityType |
|
-> m () |
Sets the sensitivity policy for the stepper that points to the 'upper' end of the GtkRange’s adjustment.
Since: 2.10
setValue
:: (HasCallStack, MonadIO m, IsRange a) | |
=> a |
|
-> Double |
|
-> 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 valueChanged signal if the value changes.
Properties
adjustment
No description available in the introspection data.
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).
See rangeSetFillLevel
.
Since: 2.12
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
No description available in the introspection data.
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 ]
lowerStepperSensitivity
No description available in the introspection data.
constructRangeLowerStepperSensitivity :: (IsRange o, MonadIO m) => SensitivityType -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “lower-stepper-sensitivity
” property. This is rarely needed directly, but it is used by new
.
getRangeLowerStepperSensitivity :: (MonadIO m, IsRange o) => o -> m SensitivityType Source #
Get the value of the “lower-stepper-sensitivity
” property.
When overloading is enabled, this is equivalent to
get
range #lowerStepperSensitivity
setRangeLowerStepperSensitivity :: (MonadIO m, IsRange o) => o -> SensitivityType -> m () Source #
Set the value of the “lower-stepper-sensitivity
” property.
When overloading is enabled, this is equivalent to
set
range [ #lowerStepperSensitivity:=
value ]
restrictToFillLevel
The restrict-to-fill-level property controls whether slider
movement is restricted to an upper boundary set by the
fill level. See rangeSetRestrictToFillLevel
.
Since: 2.12
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, or -1. See changeValue.
Since: 2.24
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
The show-fill-level property controls whether fill level indicator
graphics are displayed on the trough. See
rangeSetShowFillLevel
.
Since: 2.12
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 ]
upperStepperSensitivity
No description available in the introspection data.
constructRangeUpperStepperSensitivity :: (IsRange o, MonadIO m) => SensitivityType -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “upper-stepper-sensitivity
” property. This is rarely needed directly, but it is used by new
.
getRangeUpperStepperSensitivity :: (MonadIO m, IsRange o) => o -> m SensitivityType Source #
Get the value of the “upper-stepper-sensitivity
” property.
When overloading is enabled, this is equivalent to
get
range #upperStepperSensitivity
setRangeUpperStepperSensitivity :: (MonadIO m, IsRange o) => o -> SensitivityType -> m () Source #
Set the value of the “upper-stepper-sensitivity
” property.
When overloading is enabled, this is equivalent to
set
range [ #upperStepperSensitivity:=
value ]
Signals
adjustBounds
type C_RangeAdjustBoundsCallback = Ptr () -> CDouble -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type RangeAdjustBoundsCallback Source #
Emitted before clamping a value, to give the application a chance to adjust the bounds.
afterRangeAdjustBounds :: (IsRange a, MonadIO m) => 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
genClosure_RangeAdjustBounds :: MonadIO m => RangeAdjustBoundsCallback -> m (GClosure C_RangeAdjustBoundsCallback) Source #
Wrap the callback into a GClosure
.
mk_RangeAdjustBoundsCallback :: C_RangeAdjustBoundsCallback -> IO (FunPtr C_RangeAdjustBoundsCallback) Source #
Generate a function pointer callable from C code, from a C_RangeAdjustBoundsCallback
.
noRangeAdjustBoundsCallback :: Maybe RangeAdjustBoundsCallback Source #
A convenience synonym for
.Nothing
:: Maybe
RangeAdjustBoundsCallback
onRangeAdjustBounds :: (IsRange a, MonadIO m) => 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
wrap_RangeAdjustBoundsCallback :: RangeAdjustBoundsCallback -> C_RangeAdjustBoundsCallback Source #
Wrap a RangeAdjustBoundsCallback
into a C_RangeAdjustBoundsCallback
.
changeValue
type C_RangeChangeValueCallback = Ptr () -> CUInt -> CDouble -> Ptr () -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
type RangeChangeValueCallback Source #
= ScrollType |
|
-> Double |
|
-> IO Bool | Returns: |
The changeValue 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.
The value parameter is unrounded. An application that overrides
the GtkRange[changeValue](#g:signal: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
:round-digits
.
Since: 2.6
afterRangeChangeValue :: (IsRange a, MonadIO m) => 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
genClosure_RangeChangeValue :: MonadIO m => RangeChangeValueCallback -> m (GClosure C_RangeChangeValueCallback) Source #
Wrap the callback into a GClosure
.
mk_RangeChangeValueCallback :: C_RangeChangeValueCallback -> IO (FunPtr C_RangeChangeValueCallback) Source #
Generate a function pointer callable from C code, from a C_RangeChangeValueCallback
.
noRangeChangeValueCallback :: Maybe RangeChangeValueCallback Source #
A convenience synonym for
.Nothing
:: Maybe
RangeChangeValueCallback
onRangeChangeValue :: (IsRange a, MonadIO m) => 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
wrap_RangeChangeValueCallback :: RangeChangeValueCallback -> C_RangeChangeValueCallback Source #
Wrap a RangeChangeValueCallback
into a C_RangeChangeValueCallback
.
moveSlider
type C_RangeMoveSliderCallback = Ptr () -> CUInt -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type RangeMoveSliderCallback Source #
= ScrollType |
|
-> IO () |
Virtual function that moves the slider. Used for keybindings.
afterRangeMoveSlider :: (IsRange a, MonadIO m) => 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
genClosure_RangeMoveSlider :: MonadIO m => RangeMoveSliderCallback -> m (GClosure C_RangeMoveSliderCallback) Source #
Wrap the callback into a GClosure
.
mk_RangeMoveSliderCallback :: C_RangeMoveSliderCallback -> IO (FunPtr C_RangeMoveSliderCallback) Source #
Generate a function pointer callable from C code, from a C_RangeMoveSliderCallback
.
noRangeMoveSliderCallback :: Maybe RangeMoveSliderCallback Source #
A convenience synonym for
.Nothing
:: Maybe
RangeMoveSliderCallback
onRangeMoveSlider :: (IsRange a, MonadIO m) => 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
wrap_RangeMoveSliderCallback :: RangeMoveSliderCallback -> C_RangeMoveSliderCallback Source #
Wrap a RangeMoveSliderCallback
into a C_RangeMoveSliderCallback
.
valueChanged
type C_RangeValueChangedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type RangeValueChangedCallback = IO () Source #
Emitted when the range value changes.
afterRangeValueChanged :: (IsRange a, MonadIO m) => 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
genClosure_RangeValueChanged :: MonadIO m => RangeValueChangedCallback -> m (GClosure C_RangeValueChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_RangeValueChangedCallback :: C_RangeValueChangedCallback -> IO (FunPtr C_RangeValueChangedCallback) Source #
Generate a function pointer callable from C code, from a C_RangeValueChangedCallback
.
noRangeValueChangedCallback :: Maybe RangeValueChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
RangeValueChangedCallback
onRangeValueChanged :: (IsRange a, MonadIO m) => 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