Portability | portable (depends on GHC) |
---|---|
Stability | provisional |
Maintainer | gtk2hs-users@lists.sourceforge.net |
Graphics.UI.Gtk.Abstract.Scale
Contents
- 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
- 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 Graphics.UI.Gtk.Abstract.Range.rangeSetValue
.
To detect changes to the value, you would normally use the
Graphics.UI.Gtk.Abstract.Range.onRangeValueChanged
signal.
The Scale
widget is an abstract class, used only for deriving the
subclasses HScale
and VScale
. To create a scale widget, call
Graphics.UI.Gtk.Entry.HScale.hScaleNewWithRange
or
Graphics.UI.Gtk.Entry.VScale.vScaleNewWithRange
.
Class Hierarchy
Types
data Scale
Instances
Eq Scale | |
Ord Scale | |
GObjectClass Scale | |
ScaleClass Scale | |
RangeClass Scale | |
WidgetClass Scale | |
ObjectClass Scale |
class RangeClass o => ScaleClass o
Instances
castToScale :: GObjectClass obj => obj -> Scale
gTypeScale :: GType
toScale :: ScaleClass o => o -> Scale
Methods
Arguments
:: ScaleClass self | |
=> self | |
-> Int |
|
-> 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.
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.
Arguments
:: ScaleClass self | |
=> self | |
-> Bool |
|
-> IO () |
Specifies whether the current value is displayed as a string next to the slider.
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
Position a scale's value is drawn relative to the trough
Instances
Enum PositionType | |
Eq PositionType | |
Show PositionType |
Arguments
:: ScaleClass self | |
=> self | |
-> PositionType |
|
-> IO () |
Sets the position in which the current value is displayed.
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
The number of decimal places that are displayed in the value.
Allowed values: [-1,64]
Default value: 1
scaleDrawValue :: ScaleClass self => Attr self Bool
Whether the current value is displayed as a string next to the slider.
Default value: True
scaleValuePos :: ScaleClass self => Attr self PositionType
The position in which the current value is displayed.
Default value: PosTop