gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Range

Contents

Description

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

Exported types

newtype Range Source #

Constructors

Range (ManagedPtr Range) 

Methods

getAdjustment

rangeGetAdjustment Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> m Adjustment

Returns: a Adjustment

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

rangeGetFillLevel Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: A Range

-> m Double

Returns: The current fill level

Gets the current position of the fill level indicator.

Since: 2.12

getFlippable

rangeGetFlippable Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> m Bool

Returns: True if the range is flippable

Gets the value set by rangeSetFlippable.

Since: 2.18

getInverted

data RangeGetInvertedMethodInfo Source #

Instances

((~) * signature (m Bool), MonadIO m, IsRange a) => MethodInfo * RangeGetInvertedMethodInfo a signature Source # 

rangeGetInverted Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> m Bool

Returns: True if the range is inverted

Gets the value set by rangeSetInverted.

getLowerStepperSensitivity

rangeGetLowerStepperSensitivity Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> 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.

See rangeSetMinSliderSize.

Since: 2.20

getRangeRect

rangeGetRangeRect Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: A Range

-> m Bool

Returns: True if range is restricted to the fill level.

Gets whether the range is restricted to the fill level.

Since: 2.12

getRoundDigits

rangeGetRoundDigits Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> 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::change-value.

Since: 2.24

getShowFillLevel

rangeGetShowFillLevel Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: A Range

-> m Bool

Returns: True if range shows the fill level.

Gets whether the range displays the fill level graphically.

Since: 2.12

getSliderRange

rangeGetSliderRange Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> m (Int32, Int32) 

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 #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> m Bool

Returns: whether the range’s slider has a fixed size.

This function is useful mainly for Range subclasses.

See rangeSetSliderSizeFixed.

Since: 2.20

getUpperStepperSensitivity

rangeGetUpperStepperSensitivity Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> 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

data RangeGetValueMethodInfo Source #

Instances

((~) * signature (m Double), MonadIO m, IsRange a) => MethodInfo * RangeGetValueMethodInfo a signature Source # 

rangeGetValue Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> m Double

Returns: current value of the range.

Gets the current value of the range.

setAdjustment

data RangeSetAdjustmentMethodInfo Source #

Instances

((~) * signature (b -> m ()), MonadIO m, IsRange a, IsAdjustment b) => MethodInfo * RangeSetAdjustmentMethodInfo a signature Source # 

rangeSetAdjustment Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a, IsAdjustment b) 
=> a

range: a Range

-> b

adjustment: a Adjustment

-> 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

data RangeSetFillLevelMethodInfo Source #

Instances

((~) * signature (Double -> m ()), MonadIO m, IsRange a) => MethodInfo * RangeSetFillLevelMethodInfo a signature Source # 

rangeSetFillLevel Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> 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 controller by rangeSetRestrictToFillLevel and is by default enabled.

Since: 2.12

setFlippable

data RangeSetFlippableMethodInfo Source #

Instances

((~) * signature (Bool -> m ()), MonadIO m, IsRange a) => MethodInfo * RangeSetFlippableMethodInfo a signature Source # 

rangeSetFlippable Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> Bool

flippable: True to make the range flippable

-> 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

data RangeSetIncrementsMethodInfo Source #

Instances

((~) * signature (Double -> Double -> m ()), MonadIO m, IsRange a) => MethodInfo * RangeSetIncrementsMethodInfo a signature Source # 

rangeSetIncrements Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> 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 Scrollbar arrows or moves Scale via arrow keys. The page size is used for example when moving via Page Up or Page Down keys.

setInverted

data RangeSetInvertedMethodInfo Source #

Instances

((~) * signature (Bool -> m ()), MonadIO m, IsRange a) => MethodInfo * RangeSetInvertedMethodInfo a signature Source # 

rangeSetInverted Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> Bool

setting: True to invert the range

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> SensitivityType

sensitivity: the lower stepper’s sensitivity policy.

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> Int32

minSize: The slider’s minimum size

-> 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

data RangeSetRangeMethodInfo Source #

Instances

((~) * signature (Double -> Double -> m ()), MonadIO m, IsRange a) => MethodInfo * RangeSetRangeMethodInfo a signature Source # 

rangeSetRange Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> Double

min: minimum range value

-> Double

max: maximum range value

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: A Range

-> 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.

Since: 2.12

setRoundDigits

data RangeSetRoundDigitsMethodInfo Source #

Instances

((~) * signature (Int32 -> m ()), MonadIO m, IsRange a) => MethodInfo * RangeSetRoundDigitsMethodInfo a signature Source # 

rangeSetRoundDigits Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> Int32

roundDigits: the precision in digits, or -1

-> m () 

Sets the number of digits to round the value to when it changes. See Range::change-value.

Since: 2.24

setShowFillLevel

rangeSetShowFillLevel Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: A Range

-> 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.

Since: 2.12

setSliderSizeFixed

rangeSetSliderSizeFixed Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> 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 Range subclasses.

Since: 2.20

setUpperStepperSensitivity

rangeSetUpperStepperSensitivity Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

-> SensitivityType

sensitivity: the upper stepper’s sensitivity policy.

-> m () 

Sets the sensitivity policy for the stepper that points to the 'upper' end of the GtkRange’s adjustment.

Since: 2.10

setValue

data RangeSetValueMethodInfo Source #

Instances

((~) * signature (Double -> m ()), MonadIO m, IsRange a) => MethodInfo * RangeSetValueMethodInfo a signature Source # 

rangeSetValue Source #

Arguments

:: (HasCallStack, MonadIO m, IsRange a) 
=> a

range: a Range

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

Properties

adjustment

data RangeAdjustmentPropertyInfo Source #

Instances

AttrInfo RangeAdjustmentPropertyInfo Source # 
type AttrOrigin RangeAdjustmentPropertyInfo Source # 
type AttrLabel RangeAdjustmentPropertyInfo Source # 
type AttrGetType RangeAdjustmentPropertyInfo Source # 
type AttrBaseTypeConstraint RangeAdjustmentPropertyInfo Source # 
type AttrSetTypeConstraint RangeAdjustmentPropertyInfo Source # 
type AttrAllowedOps RangeAdjustmentPropertyInfo Source # 

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

fillLevel

data RangeFillLevelPropertyInfo Source #

Instances

AttrInfo RangeFillLevelPropertyInfo Source # 
type AttrOrigin RangeFillLevelPropertyInfo Source # 
type AttrLabel RangeFillLevelPropertyInfo Source # 
type AttrGetType RangeFillLevelPropertyInfo Source # 
type AttrBaseTypeConstraint RangeFillLevelPropertyInfo Source # 
type AttrSetTypeConstraint RangeFillLevelPropertyInfo Source # 
type AttrAllowedOps RangeFillLevelPropertyInfo Source # 

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

inverted

data RangeInvertedPropertyInfo Source #

Instances

AttrInfo RangeInvertedPropertyInfo Source # 
type AttrOrigin RangeInvertedPropertyInfo Source # 
type AttrLabel RangeInvertedPropertyInfo Source # 
type AttrGetType RangeInvertedPropertyInfo Source # 
type AttrBaseTypeConstraint RangeInvertedPropertyInfo Source # 
type AttrSetTypeConstraint RangeInvertedPropertyInfo Source # 
type AttrAllowedOps RangeInvertedPropertyInfo Source # 

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

lowerStepperSensitivity

data RangeLowerStepperSensitivityPropertyInfo Source #

Instances

AttrInfo RangeLowerStepperSensitivityPropertyInfo Source # 
type AttrOrigin RangeLowerStepperSensitivityPropertyInfo Source # 
type AttrLabel RangeLowerStepperSensitivityPropertyInfo Source # 
type AttrLabel RangeLowerStepperSensitivityPropertyInfo = "lower-stepper-sensitivity"
type AttrGetType RangeLowerStepperSensitivityPropertyInfo Source # 
type AttrBaseTypeConstraint RangeLowerStepperSensitivityPropertyInfo Source # 
type AttrSetTypeConstraint RangeLowerStepperSensitivityPropertyInfo Source # 
type AttrAllowedOps RangeLowerStepperSensitivityPropertyInfo Source # 

restrictToFillLevel

data RangeRestrictToFillLevelPropertyInfo Source #

Instances

AttrInfo RangeRestrictToFillLevelPropertyInfo Source # 
type AttrOrigin RangeRestrictToFillLevelPropertyInfo Source # 
type AttrLabel RangeRestrictToFillLevelPropertyInfo Source # 
type AttrLabel RangeRestrictToFillLevelPropertyInfo = "restrict-to-fill-level"
type AttrGetType RangeRestrictToFillLevelPropertyInfo Source # 
type AttrBaseTypeConstraint RangeRestrictToFillLevelPropertyInfo Source # 
type AttrSetTypeConstraint RangeRestrictToFillLevelPropertyInfo Source # 
type AttrAllowedOps RangeRestrictToFillLevelPropertyInfo Source # 

roundDigits

data RangeRoundDigitsPropertyInfo Source #

Instances

AttrInfo RangeRoundDigitsPropertyInfo Source # 
type AttrOrigin RangeRoundDigitsPropertyInfo Source # 
type AttrLabel RangeRoundDigitsPropertyInfo Source # 
type AttrGetType RangeRoundDigitsPropertyInfo Source # 
type AttrBaseTypeConstraint RangeRoundDigitsPropertyInfo Source # 
type AttrSetTypeConstraint RangeRoundDigitsPropertyInfo Source # 
type AttrAllowedOps RangeRoundDigitsPropertyInfo Source # 

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

showFillLevel

data RangeShowFillLevelPropertyInfo Source #

Instances

AttrInfo RangeShowFillLevelPropertyInfo Source # 
type AttrOrigin RangeShowFillLevelPropertyInfo Source # 
type AttrLabel RangeShowFillLevelPropertyInfo Source # 
type AttrLabel RangeShowFillLevelPropertyInfo = "show-fill-level"
type AttrGetType RangeShowFillLevelPropertyInfo Source # 
type AttrBaseTypeConstraint RangeShowFillLevelPropertyInfo Source # 
type AttrSetTypeConstraint RangeShowFillLevelPropertyInfo Source # 
type AttrAllowedOps RangeShowFillLevelPropertyInfo Source # 

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

upperStepperSensitivity

data RangeUpperStepperSensitivityPropertyInfo Source #

Instances

AttrInfo RangeUpperStepperSensitivityPropertyInfo Source # 
type AttrOrigin RangeUpperStepperSensitivityPropertyInfo Source # 
type AttrLabel RangeUpperStepperSensitivityPropertyInfo Source # 
type AttrLabel RangeUpperStepperSensitivityPropertyInfo = "upper-stepper-sensitivity"
type AttrGetType RangeUpperStepperSensitivityPropertyInfo Source # 
type AttrBaseTypeConstraint RangeUpperStepperSensitivityPropertyInfo Source # 
type AttrSetTypeConstraint RangeUpperStepperSensitivityPropertyInfo Source # 
type AttrAllowedOps RangeUpperStepperSensitivityPropertyInfo Source # 

Signals

adjustBounds

changeValue

moveSlider

type C_RangeMoveSliderCallback = Ptr () -> CUInt -> Ptr () -> IO () Source #

valueChanged