gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Abstract.Range

Contents

- Description
- Class Hierarchy
- Types
- Methods
- Attributes
- Signals
- Deprecated

Description

Base class for widgets which visualize an adjustment

Synopsis

- 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 ()
- 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
- data SensitivityType
  - = SensitivityAuto
  - | SensitivityOn
  - | SensitivityOff
- 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 ()
- 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)

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

#### Instances

Instances details

Eq Range Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: Range -> Range -> Bool Source # (/=) :: Range -> Range -> Bool Source #
Ord Range Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods compare :: Range -> Range -> Ordering Source # (<) :: Range -> Range -> Bool Source # (<=) :: Range -> Range -> Bool Source # (>) :: Range -> Range -> Bool Source # (>=) :: Range -> Range -> Bool Source # max :: Range -> Range -> Range Source # min :: Range -> Range -> Range Source #
GObjectClass Range Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: Range -> GObject Source # unsafeCastGObject :: GObject -> Range Source #
RangeClass Range Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WidgetClass Range Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class WidgetClass o => RangeClass o Source #

#### Instances

Instances details

RangeClass HScale Source # |
Instance details Defined in Graphics.UI.Gtk.Types
RangeClass HScrollbar Source # |
Instance details Defined in Graphics.UI.Gtk.Types
RangeClass Range Source # |
Instance details Defined in Graphics.UI.Gtk.Types
RangeClass Scale Source # |
Instance details Defined in Graphics.UI.Gtk.Types
RangeClass Scrollbar Source # |
Instance details Defined in Graphics.UI.Gtk.Types
RangeClass VScale Source # |
Instance details Defined in Graphics.UI.Gtk.Types
RangeClass VScrollbar Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToRange :: GObjectClass obj => obj -> Range Source #

gTypeRange :: GType Source #

toRange :: RangeClass o => o -> Range Source #

# Methods

rangeGetAdjustment Source #

Arguments

:: RangeClass self |
=> self |
-> IO Adjustment | returns a `Adjustment`

Get the `Adjustment` which is the "model" object for `Range`. See `rangeSetAdjustment` for details.

rangeSetAdjustment Source #

Arguments

:: RangeClass self |
=> self |
-> Adjustment | `adjustment` - 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.

rangeGetInverted Source #

Arguments

:: RangeClass self |
=> self |
-> IO Bool | returns `True` if the range is inverted

Gets the value set by `rangeSetInverted`.

rangeSetInverted Source #

Arguments

:: RangeClass self |
=> self |
-> Bool | `setting` - `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 Source #

Arguments

:: RangeClass self |
=> self |
-> IO Double | returns current value of the range.

Gets the current value of the range.

rangeSetValue Source #

Arguments

:: RangeClass self |
=> self |
-> Double | `value` - 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 `valueChanged` signal if the value changes.

rangeSetIncrements Source #

Arguments

:: RangeClass self |
=> self |
-> Double | `step` - step size
-> Double | `page` - 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 Source #

Arguments

:: RangeClass self |
=> self |
-> Double | `min` - minimum range value
-> Double | `max` - 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 Source #

Scrolling type

Constructors

ScrollNone |
ScrollJump |
ScrollStepBackward |
ScrollStepForward |
ScrollPageBackward |
ScrollPageForward |
ScrollStepUp |
ScrollStepDown |
ScrollPageUp |
ScrollPageDown |
ScrollStepLeft |
ScrollStepRight |
ScrollPageLeft |
ScrollPageRight |
ScrollStart |
ScrollEnd |

#### Instances

Instances details

Enum ScrollType Source # |

Instance details

Defined in Graphics.UI.Gtk.General.Enums

Methods

succ :: ScrollType -> ScrollType Source #

pred :: ScrollType -> ScrollType Source #

toEnum :: Int -> ScrollType Source #

fromEnum :: ScrollType -> Int Source #

enumFrom :: ScrollType -> [ScrollType] Source #

enumFromThen :: ScrollType -> ScrollType -> [ScrollType] Source #

enumFromTo :: ScrollType -> ScrollType -> [ScrollType] Source #

enumFromThenTo :: ScrollType -> ScrollType -> ScrollType -> [ScrollType] Source #

Show ScrollType Source # |
Instance details Defined in Graphics.UI.Gtk.General.Enums Methods showsPrec :: Int -> ScrollType -> ShowS Source # show :: ScrollType -> String Source # showList :: [ScrollType] -> ShowS Source #
Eq ScrollType Source # |
Instance details Defined in Graphics.UI.Gtk.General.Enums Methods (==) :: ScrollType -> ScrollType -> Bool Source # (/=) :: ScrollType -> ScrollType -> Bool Source #

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 always sensitive
- `SensitivityOff`: the arrow is always insensitive

Constructors

SensitivityAuto |
SensitivityOn |
SensitivityOff |

#### Instances

Instances details

Bounded SensitivityType Source # |
Instance details Defined in Graphics.UI.Gtk.Abstract.Range Methods minBound :: SensitivityType Source # maxBound :: SensitivityType Source #
Enum SensitivityType Source # |

Instance details

Defined in Graphics.UI.Gtk.Abstract.Range

Methods

succ :: SensitivityType -> SensitivityType Source #

pred :: SensitivityType -> SensitivityType Source #

toEnum :: Int -> SensitivityType Source #

fromEnum :: SensitivityType -> Int Source #

enumFrom :: SensitivityType -> [SensitivityType] Source #

enumFromThen :: SensitivityType -> SensitivityType -> [SensitivityType] Source #

enumFromTo :: SensitivityType -> SensitivityType -> [SensitivityType] Source #

enumFromThenTo :: SensitivityType -> SensitivityType -> SensitivityType -> [SensitivityType] Source #

Show SensitivityType Source # |
Instance details Defined in Graphics.UI.Gtk.Abstract.Range Methods showsPrec :: Int -> SensitivityType -> ShowS Source # show :: SensitivityType -> String Source # showList :: [SensitivityType] -> ShowS Source #
Eq SensitivityType Source # |
Instance details Defined in Graphics.UI.Gtk.Abstract.Range Methods (==) :: SensitivityType -> SensitivityType -> Bool Source # (/=) :: SensitivityType -> SensitivityType -> Bool Source #

rangeSetLowerStepperSensitivity Source #

Arguments

:: RangeClass self |
=> self |
-> SensitivityType | `sensitivity` - the lower stepper's sensitivity policy.
-> 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

rangeGetLowerStepperSensitivity Source #

Arguments

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

rangeSetUpperStepperSensitivity Source #

Arguments

:: RangeClass self |
=> self |
-> SensitivityType | `sensitivity` - the upper stepper's sensitivity policy.
-> 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

rangeGetUpperStepperSensitivity Source #

Arguments

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

rangeGetMinSliderSize Source #

Arguments

:: RangeClass self |
=> self |
-> IO Int | returns The minimum size of the range's slider.

This function is useful mainly for `Range` subclasses.

See `rangeSetMinSliderSize`.

rangeGetRangeRect :: RangeClass self => self -> IO Rectangle Source #

This function returns the area that contains the range's through 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.

rangeGetSliderSizeFixed Source #

Arguments

:: RangeClass self |
=> self |
-> IO Bool | returns whether the range's slider has a fixed size.

This function is useful mainly for `Range` subclasses.

See `rangeSetSliderSizeFixed`.

rangeSetMinSliderSize :: RangeClass self => self -> Bool -> IO () Source #

Sets the minimum size of the range's slider.

This function is useful mainly for `Range` subclasses.

rangeSetSliderSizeFixed Source #

Arguments

:: RangeClass self |
=> self |
-> Bool | `sizeFixed` `True` to make the slider size constant
-> 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

rangeAdjustment :: RangeClass self => Attr self Adjustment Source #

The `Adjustment` that contains the current value of this range object.

rangeInverted :: RangeClass self => Attr self Bool Source #

Invert direction slider moves to increase range value.

Default value: `False`

rangeLowerStepperSensitivity :: RangeClass self => Attr self SensitivityType Source #

The sensitivity policy for the stepper that points to the adjustment's lower side.

Default value: `SensitivityAuto`

rangeUpperStepperSensitivity :: RangeClass self => Attr self SensitivityType Source #

The sensitivity policy for the stepper that points to the adjustment's upper side.

Default value: `SensitivityAuto`

rangeValue :: RangeClass self => Attr self Double Source #

'value' property. See `rangeGetValue` and `rangeSetValue`

rangeSliderSizeFixed :: RangeClass self => Attr self Bool Source #

Whether 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 Bool Source #

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