Portability | portable (depends on GHC) |
---|---|
Stability | provisional |
Maintainer | gtk2hs-users@lists.sourceforge.net |
Safe Haskell | None |
Base class for widgets which visualize an adjustment
- data Range
- class WidgetClass o => RangeClass o
- castToRange :: GObjectClass obj => obj -> Range
- gTypeRange :: GType
- toRange :: RangeClass o => o -> Range
- rangeGetAdjustment :: RangeClass self => self -> IO Adjustment
- rangeSetAdjustment :: RangeClass self => self -> Adjustment -> IO ()
- data UpdateType
- rangeGetUpdatePolicy :: RangeClass self => self -> IO UpdateType
- rangeSetUpdatePolicy :: RangeClass self => self -> UpdateType -> IO ()
- rangeGetInverted :: RangeClass self => self -> IO Bool
- rangeSetInverted :: RangeClass self => self -> Bool -> IO ()
- rangeGetValue :: RangeClass self => self -> IO Double
- rangeSetValue :: RangeClass self => self -> Double -> IO ()
- rangeSetIncrements :: RangeClass self => self -> Double -> Double -> IO ()
- rangeSetRange :: RangeClass self => self -> Double -> Double -> IO ()
- data ScrollType
- data SensitivityType
- rangeSetLowerStepperSensitivity :: RangeClass self => self -> SensitivityType -> IO ()
- rangeGetLowerStepperSensitivity :: RangeClass self => self -> IO SensitivityType
- rangeSetUpperStepperSensitivity :: RangeClass self => self -> SensitivityType -> IO ()
- rangeGetUpperStepperSensitivity :: RangeClass self => self -> IO SensitivityType
- rangeGetMinSliderSize :: RangeClass self => self -> IO Int
- rangeGetRangeRect :: RangeClass self => self -> IO Rectangle
- rangeGetSliderRange :: RangeClass self => self -> IO (Maybe (Int, Int))
- rangeGetSliderSizeFixed :: RangeClass self => self -> IO Bool
- rangeSetMinSliderSize :: RangeClass self => self -> Bool -> IO ()
- rangeSetSliderSizeFixed :: RangeClass self => self -> Bool -> IO ()
- rangeUpdatePolicy :: RangeClass self => Attr self UpdateType
- rangeAdjustment :: RangeClass self => Attr self Adjustment
- rangeInverted :: RangeClass self => Attr self Bool
- rangeLowerStepperSensitivity :: RangeClass self => Attr self SensitivityType
- rangeUpperStepperSensitivity :: RangeClass self => Attr self SensitivityType
- rangeValue :: RangeClass self => Attr self Double
- rangeSliderSizeFixed :: RangeClass self => Attr self Bool
- rangeMinSliderSize :: RangeClass self => ReadWriteAttr self Int Bool
- adjustBounds :: RangeClass self => Signal self (Double -> IO ())
- valueChanged :: RangeClass self => Signal self (IO ())
- changeValue :: RangeClass self => Signal self (ScrollType -> Double -> IO Bool)
- onMoveSlider :: RangeClass self => self -> (ScrollType -> IO ()) -> IO (ConnectId self)
- afterMoveSlider :: RangeClass self => self -> (ScrollType -> IO ()) -> IO (ConnectId self)
- onAdjustBounds :: RangeClass self => self -> (Double -> IO ()) -> IO (ConnectId self)
- afterAdjustBounds :: RangeClass self => self -> (Double -> IO ()) -> IO (ConnectId self)
- onRangeChangeValue :: RangeClass self => self -> (ScrollType -> Double -> IO Bool) -> IO (ConnectId self)
- afterRangeChangeValue :: RangeClass self => self -> (ScrollType -> Double -> IO Bool) -> IO (ConnectId self)
- onRangeValueChanged :: RangeClass self => self -> IO () -> IO (ConnectId self)
- afterRangeValueChanged :: RangeClass self => self -> IO () -> IO (ConnectId self)
Description
For signals regarding a change in the range or increments, refer to
Adjustment
which is contained in the Range
object.
Class Hierarchy
Types
class WidgetClass o => RangeClass o Source
castToRange :: GObjectClass obj => obj -> RangeSource
toRange :: RangeClass o => o -> RangeSource
Methods
:: RangeClass self | |
=> self | |
-> IO Adjustment | returns a |
Get the Adjustment
which is the "model" object for Range
. See
rangeSetAdjustment
for details.
:: RangeClass self | |
=> self | |
-> Adjustment |
|
-> IO () |
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.
data UpdateType Source
Updating types for range widgets (determines when the
"connectToValueChanged"
signal is emitted by the widget)
:: RangeClass self | |
=> self | |
-> IO UpdateType | returns the current update policy |
Gets the update policy of range
. See rangeSetUpdatePolicy
.
:: RangeClass self | |
=> self | |
-> UpdateType |
|
-> IO () |
Sets the update policy for the range. UpdateContinuous
means that
anytime the range slider is moved, the range value will change and the
value_changed signal will be emitted. UpdateDelayed
means that the value
will be updated after a brief timeout where no slider motion occurs, so
updates are spaced by a short time rather than continuous.
UpdateDiscontinuous
means that the value will only be updated when the
user releases the button and ends the slider drag operation.
:: RangeClass self | |
=> self | |
-> IO Bool | returns |
Gets the value set by rangeSetInverted
.
:: RangeClass self | |
=> self | |
-> Bool |
|
-> IO () |
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.
:: RangeClass self | |
=> self | |
-> IO Double | returns current value of the range. |
Gets the current value of the range.
:: RangeClass self | |
=> self | |
-> Double |
|
-> IO () |
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.
:: RangeClass self | |
=> self | |
-> Double |
|
-> Double |
|
-> IO () |
:: RangeClass self | |
=> self | |
-> Double |
|
-> Double |
|
-> IO () |
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.)
data ScrollType Source
Scrolling type
data SensitivityType Source
Determines how Gtk+ handles the sensitivity of stepper arrows at the end of range widgets.
-
SensitivityAuto
: the arrow is made insensitive if the thumb is at the end -
SensitivityOn
: the arrow is alwasy sensitive -
SensitivityOff
: the arrow is always insensitive
rangeSetLowerStepperSensitivitySource
:: RangeClass self | |
=> self | |
-> SensitivityType |
|
-> IO () |
Sets the sensitivity policy for the stepper that points to the 'lower'
end of the Range'
s adjustment.
- Available since Gtk+ version 2.10
rangeGetLowerStepperSensitivitySource
:: RangeClass self | |
=> self | |
-> IO SensitivityType | returns The lower stepper's sensitivity policy. |
Gets the sensitivity policy for the stepper that points to the 'lower'
end of the Range'
s adjustment.
- Available since Gtk+ version 2.10
rangeSetUpperStepperSensitivitySource
:: RangeClass self | |
=> self | |
-> SensitivityType |
|
-> IO () |
Sets the sensitivity policy for the stepper that points to the 'upper'
end of the Range'
s adjustment.
- Available since Gtk+ version 2.10
rangeGetUpperStepperSensitivitySource
:: RangeClass self | |
=> self | |
-> IO SensitivityType | returns The upper stepper's sensitivity policy. |
Gets the sensitivity policy for the stepper that points to the 'upper'
end of the Range'
s adjustment.
- Available since Gtk+ version 2.10
:: RangeClass self | |
=> self | |
-> IO Int | returns The minimum size of the range's slider. |
This function is useful mainly for Range
subclasses.
rangeGetRangeRect :: RangeClass self => self -> IO RectangleSource
This function returns the area that contains the range's trough and its steppers, in DrawWindow
coordinates.
This function is useful mainly for Range
subclasses.
rangeGetSliderRange :: RangeClass self => self -> IO (Maybe (Int, Int))Source
This function returns sliders range along the long dimension, in DrawWindow
coordinates.
This function is useful mainly for Range
subclasses.
:: RangeClass self | |
=> self | |
-> IO Bool | returns whether the range's slider has a fixed size. |
This function is useful mainly for Range
subclasses.
rangeSetMinSliderSize :: RangeClass self => self -> Bool -> IO ()Source
Sets the minimum size of the range's slider.
This function is useful mainly for Range
subclasses.
:: RangeClass self | |
=> self | |
-> Bool |
|
-> IO () |
Sets whether the range's slider has a fixed size, or a size that depends on it's adjustment's page size.
This function is useful mainly for Range
subclasses.
Attributes
rangeUpdatePolicy :: RangeClass self => Attr self UpdateTypeSource
How the range should be updated on the screen.
Default value: UpdateContinuous
rangeAdjustment :: RangeClass self => Attr self AdjustmentSource
The Adjustment
that contains the current value of this range object.
rangeInverted :: RangeClass self => Attr self BoolSource
Invert direction slider moves to increase range value.
Default value: False
rangeLowerStepperSensitivity :: RangeClass self => Attr self SensitivityTypeSource
The sensitivity policy for the stepper that points to the adjustment's lower side.
Default value: SensitivityAuto
rangeUpperStepperSensitivity :: RangeClass self => Attr self SensitivityTypeSource
The sensitivity policy for the stepper that points to the adjustment's upper side.
Default value: SensitivityAuto
rangeValue :: RangeClass self => Attr self DoubleSource
'value' property. See rangeGetValue
and rangeSetValue
rangeSliderSizeFixed :: RangeClass self => Attr self BoolSource
Wheter range's slikder has a fixed size, or a size that depends on it's adjustment's page size.
rangeMinSliderSize :: RangeClass self => ReadWriteAttr self Int BoolSource
Get/Set sliders range along the long dimension, in DrawWindow
coordinates.
Signals
adjustBounds :: RangeClass self => Signal self (Double -> IO ())Source
valueChanged :: RangeClass self => Signal self (IO ())Source
Emitted when the range value changes.
changeValue :: RangeClass self => Signal self (ScrollType -> Double -> IO Bool)Source
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
changeValue
signal is responsible for clamping the value to the desired
number of decimal digits.
It is not possible to use delayed update policies in an overridden
changeValue
handler.
- Available since Gtk+ version 2.6
Deprecated
onMoveSlider :: RangeClass self => self -> (ScrollType -> IO ()) -> IO (ConnectId self)Source
Emitted when the user presses a key (e.g. Page Up, Home, Right Arrow) to
move the slider. The ScrollType
parameter gives the key that was pressed.
Usually you should use onRangeValueChanged
/
afterRangeValueChanged
instead.
afterMoveSlider :: RangeClass self => self -> (ScrollType -> IO ()) -> IO (ConnectId self)Source
Emitted when the user presses a key (e.g. Page Up, Home, Right Arrow) to
move the slider. The ScrollType
parameter gives the key that was pressed.
Usually you should use onRangeValueChanged
/
afterRangeValueChanged
instead.
onAdjustBounds :: RangeClass self => self -> (Double -> IO ()) -> IO (ConnectId self)Source
Emitted when the range is adjusted by user action. Note the value can be outside the bounds of the range since it depends on the mouse position.
Usually you should use onRangeValueChanged
/ afterRangeValueChanged
instead.
afterAdjustBounds :: RangeClass self => self -> (Double -> IO ()) -> IO (ConnectId self)Source
Emitted when the range is adjusted by user action. Note the value can be outside the bounds of the range since it depends on the mouse position.
Usually you should use onRangeValueChanged
/ afterRangeValueChanged
instead.
onRangeChangeValue :: RangeClass self => self -> (ScrollType -> Double -> IO Bool) -> IO (ConnectId self)Source
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.
- Since Gtk 2.6
afterRangeChangeValue :: RangeClass self => self -> (ScrollType -> Double -> IO Bool) -> IO (ConnectId self)Source
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.
- Since Gtk 2.6
onRangeValueChanged :: RangeClass self => self -> IO () -> IO (ConnectId self)Source
Emitted when the range value is changed either programmatically or by user action.
afterRangeValueChanged :: RangeClass self => self -> IO () -> IO (ConnectId self)Source
Emitted when the range value is changed either programmatically or by user action.