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

Contents

- Detail
- Class Hierarchy
- Types
- Methods
- Attributes

Description

Base class for `HScale` and `VScale`

Synopsis

- data Scale
- class RangeClass o => ScaleClass o
- castToScale :: GObjectClass obj => obj -> Scale
- gTypeScale :: GType
- toScale :: ScaleClass o => o -> Scale
- scaleSetDigits :: ScaleClass self => self -> Int -> IO ()
- scaleGetDigits :: ScaleClass self => self -> IO Int
- scaleSetDrawValue :: ScaleClass self => self -> Bool -> IO ()
- scaleGetDrawValue :: ScaleClass self => self -> IO Bool
- data PositionType
  - = PosLeft
  - | PosRight
  - | PosTop
  - | PosBottom
- scaleSetValuePos :: ScaleClass self => self -> PositionType -> IO ()
- scaleGetValuePos :: ScaleClass self => self -> IO PositionType
- scaleDigits :: ScaleClass self => Attr self Int
- scaleDrawValue :: ScaleClass self => Attr self Bool
- scaleValuePos :: ScaleClass self => Attr self PositionType

# Detail

A `Scale` is a slider control used to select a numeric value. To use it, you'll probably want to investigate the methods on its base class, `Range`, in addition to the methods for `Scale` itself. To set the value of a scale, you would normally use `rangeSetValue`. To detect changes to the value, you would normally use the `onRangeValueChanged` signal.

The `Scale` widget is an abstract class, used only for deriving the subclasses `HScale` and `VScale`. To create a scale widget, call `hScaleNewWithRange` or `vScaleNewWithRange`.

# Class Hierarchy

    | GObject
    | +----Object
    | +----Widget
    | +----Range
    | +----Scale
    | +----HScale
    | +----VScale

# Types

data Scale Source #

#### Instances

Instances details

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

class RangeClass o => ScaleClass o Source #

#### Instances

Instances details

ScaleClass HScale Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ScaleClass Scale Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ScaleClass VScale Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToScale :: GObjectClass obj => obj -> Scale Source #

gTypeScale :: GType Source #

toScale :: ScaleClass o => o -> Scale Source #

# Methods

scaleSetDigits Source #

Arguments

:: ScaleClass self |
=> self |
-> Int | `digits` - the number of decimal places to display, e.g. use 1 to display 1.0, 2 to display 1.00 etc.
-> IO () |

Sets the number of decimal places that are displayed in the value. Also causes the value of the adjustment to be rounded off to this number of digits, so the retrieved value matches the value the user saw.

scaleGetDigits Source #

Arguments

:: ScaleClass self |
=> self |
-> IO Int | returns the number of decimal places that are displayed.

Gets the number of decimal places that are displayed in the value.

scaleSetDrawValue Source #

Arguments

:: ScaleClass self |
=> self |
-> Bool | `drawValue` - a boolean.
-> IO () |

Specifies whether the current value is displayed as a string next to the slider.

scaleGetDrawValue Source #

Arguments

:: ScaleClass self |
=> self |
-> IO Bool | returns whether the current value is displayed as a string.

Returns whether the current value is displayed as a string next to the slider.

data PositionType Source #

Position a scale's value is drawn relative to the through

Constructors

PosLeft |
PosRight |
PosTop |
PosBottom |

#### Instances

Instances details

Enum PositionType Source # |

Instance details

Defined in Graphics.UI.Gtk.General.Enums

Methods

succ :: PositionType -> PositionType Source #

pred :: PositionType -> PositionType Source #

toEnum :: Int -> PositionType Source #

fromEnum :: PositionType -> Int Source #

enumFrom :: PositionType -> [PositionType] Source #

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

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

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

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

scaleSetValuePos Source #

Arguments

:: ScaleClass self |
=> self |
-> PositionType | `pos` - the position in which the current value is displayed.
-> IO () |

Sets the position in which the current value is displayed.

scaleGetValuePos Source #

Arguments

:: ScaleClass self |
=> self |
-> IO PositionType | returns the position in which the current value is displayed.

Gets the position in which the current value is displayed.

# Attributes

scaleDigits :: ScaleClass self => Attr self Int Source #

The number of decimal places that are displayed in the value.

Allowed values: [-1,64]

Default value: 1

scaleDrawValue :: ScaleClass self => Attr self Bool Source #

Whether the current value is displayed as a string next to the slider.

Default value: `True`

scaleValuePos :: ScaleClass self => Attr self PositionType Source #

The position in which the current value is displayed.

Default value: `PosTop`