Gtk2HsContentsIndex
Graphics.UI.Gtk.Abstract.Range
Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Contents
Description
Class Hierarchy
Types
Methods
Attributes
Signals
Description
Base class for widgets which visualize an adjustment
Synopsis
data Range
class WidgetClass o => RangeClass o
castToRange :: GObjectClass obj => obj -> Range
rangeGetAdjustment :: RangeClass self => self -> IO Adjustment
rangeSetAdjustment :: RangeClass self => self -> Adjustment -> IO ()
data UpdateType
= UpdateContinuous
| UpdateDiscontinuous
| UpdateDelayed
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
= ScrollNone
| ScrollJump
| ScrollStepBackward
| ScrollStepForward
| ScrollPageBackward
| ScrollPageForward
| ScrollStepUp
| ScrollStepDown
| ScrollPageUp
| ScrollPageDown
| ScrollStepLeft
| ScrollStepRight
| ScrollPageLeft
| ScrollPageRight
| ScrollStart
| ScrollEnd
rangeUpdatePolicy :: RangeClass self => Attr self UpdateType
rangeAdjustment :: RangeClass self => Attr self Adjustment
rangeInverted :: RangeClass self => Attr self Bool
rangeValue :: RangeClass self => Attr self Double
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)
Description
For signals regarding a change in the range or increments, refer to Adjustment which is contained in the Range object.
Class Hierarchy
 |  GObject
 |   +----Object
 |         +----Widget
 |               +----Range
 |                     +----Scale
 |                     +----Scrollbar
 
Types
data Range
show/hide Instances
class WidgetClass o => RangeClass o
show/hide Instances
castToRange :: GObjectClass obj => obj -> Range
Methods
rangeGetAdjustment
:: RangeClass self
=> self
-> IO Adjustmentreturns a Adjustment
Get the Adjustment which is the "model" object for Range. See rangeSetAdjustment for details.
rangeSetAdjustment
:: RangeClass self
=> self
-> Adjustmentadjustment - a 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
Updating types for range widgets (determines when the "connectToValueChanged" signal is emitted by the widget)
Constructors
UpdateContinuous
UpdateDiscontinuous
UpdateDelayed
show/hide Instances
rangeGetUpdatePolicy
:: RangeClass self
=> self
-> IO UpdateTypereturns the current update policy
Gets the update policy of range. See rangeSetUpdatePolicy.
rangeSetUpdatePolicy
:: RangeClass self
=> self
-> UpdateTypepolicy - update policy
-> 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.
rangeGetInverted
:: RangeClass self
=> self
-> IO Boolreturns True if the range is inverted
Gets the value set by rangeSetInverted.
rangeSetInverted
:: RangeClass self
=> self
-> Boolsetting - True to invert the range
-> 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.
rangeGetValue
:: RangeClass self
=> self
-> IO Doublereturns current value of the range.
Gets the current value of the range.
rangeSetValue
:: RangeClass self
=> self
-> Doublevalue - new value of the range
-> 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 "value_changed" signal if the value changes.
rangeSetIncrements
:: RangeClass self
=> self
-> Doublestep - step size
-> Doublepage - page size
-> IO ()
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.
rangeSetRange
:: RangeClass self
=> self
-> Doublemin - minimum range value
-> Doublemax - maximum range value
-> 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
Scrolling type
Constructors
ScrollNone
ScrollJump
ScrollStepBackward
ScrollStepForward
ScrollPageBackward
ScrollPageForward
ScrollStepUp
ScrollStepDown
ScrollPageUp
ScrollPageDown
ScrollStepLeft
ScrollStepRight
ScrollPageLeft
ScrollPageRight
ScrollStart
ScrollEnd
show/hide Instances
Attributes
rangeUpdatePolicy :: RangeClass self => Attr self UpdateType

How the range should be updated on the screen.

Default value: UpdateContinuous

rangeAdjustment :: RangeClass self => Attr self Adjustment
The Adjustment that contains the current value of this range object.
rangeInverted :: RangeClass self => Attr self Bool

Invert direction slider moves to increase range value.

Default value: False

rangeValue :: RangeClass self => Attr self Double
'value' property. See rangeGetValue and rangeSetValue
Signals
onMoveSlider :: RangeClass self => self -> (ScrollType -> IO ()) -> IO (ConnectId self)

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 onValueChanged / afterValueChanged instead.

afterMoveSlider :: RangeClass self => self -> (ScrollType -> IO ()) -> IO (ConnectId self)
onAdjustBounds :: RangeClass self => self -> (Double -> IO ()) -> IO (ConnectId self)

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 onValueChanged / afterValueChanged instead.

afterAdjustBounds :: RangeClass self => self -> (Double -> IO ()) -> IO (ConnectId self)
Produced by Haddock version 0.7