Source codeContentsIndex
Scale
Description
HTk's scale widget. A simple slider in a through representing a range of numeric values.
Synopsis
class (Num a, GUIValue a) => ScaleValue a where
toDouble :: a -> Double
fromDouble :: Double -> a
data Scale a
newScale :: (GUIValue a, ScaleValue a, Container par) => par -> [Config (Scale a)] -> IO (Scale a)
class HasIncrement w a where
increment :: a -> Config w
getIncrement :: w -> IO a
digits :: Int -> Config (Scale a)
getDigits :: Scale a -> IO Int
interval :: (ScaleValue a) => (a, a) -> Config (Scale a)
getInterval :: (ScaleValue a) => Scale a -> IO (a, a)
intervalTo :: (ScaleValue a) => a -> Config (Scale a)
getIntervalTo :: (ScaleValue a) => Scale a -> IO a
intervalFrom :: (ScaleValue a) => a -> Config (Scale a)
getIntervalFrom :: (ScaleValue a) => Scale a -> IO a
newtype Slider w = Slider w
class (Widget w) => HasSlider w where
repeatInterval :: Int -> Config (Slider w)
getRepeatInterval :: Slider w -> IO Int
repeatDelay :: Int -> Config (Slider w)
getRepeatDelay :: Slider w -> IO Int
bigIncrement :: (ScaleValue a) => a -> Config (Slider (Scale a))
getBigIncrement :: (ScaleValue a) => Slider (Scale a) -> IO a
showValue :: Toggle -> Config (Slider (Scale a))
getShowValue :: Slider (Scale a) -> IO Toggle
Documentation
class (Num a, GUIValue a) => ScaleValue a where
Values associated with a scale instansiate the class ScaleValue.
Methods
toDouble :: a -> Double
fromDouble :: Double -> a
Instances
ScaleValue Double
data Scale a
The Scale datatype.
newScale :: (GUIValue a, ScaleValue a, Container par) => par -> [Config (Scale a)] -> IO (Scale a)
class HasIncrement w a where
Incrementable objects (e.g. scale wigdgets) instantiate the class HasIncrement.
Methods
increment :: a -> Config w
Increments the object.
getIncrement :: w -> IO a
Gets object's incrementation.
Instances
(ScaleValue a) => HasIncrement (Scale a) a
(ScaleValue a) => HasIncrement (Slider (Scale a)) a
digits :: Int -> Config (Scale a)
getDigits :: Scale a -> IO Int
Gets the number of significant values in the scale widget.
interval :: (ScaleValue a) => (a, a) -> Config (Scale a)
Sets the scale widgets maximum and minumum value.
getInterval :: (ScaleValue a) => Scale a -> IO (a, a)
Gets the scale widgets maximum and minumum value.
intervalTo :: (ScaleValue a) => a -> Config (Scale a)
Sets the maximum value of the scale widget.
getIntervalTo :: (ScaleValue a) => Scale a -> IO a
Gets the maximum value of the scale widget.
intervalFrom :: (ScaleValue a) => a -> Config (Scale a)
Sets the minimum value of the scale widget.
getIntervalFrom :: (ScaleValue a) => Scale a -> IO a
Gets the minimum value of the scale widget.
newtype Slider w
The Slider datatype.
Constructors
Slider w
Instances
(ScaleValue a) => HasIncrement (Slider (Scale a)) a
HasSize (Slider (Scale a))
(GUIObject w) => GUIObject (Slider w)
(HasSlider w, GUIObject w) => HasColour (Slider w)
class (Widget w) => HasSlider w where
Widgets with sliders (scale widget, scrollbar) instantiate the class HasSlider.
Methods
repeatInterval :: Int -> Config (Slider w)
Sets the time period between auto-repeat events.
getRepeatInterval :: Slider w -> IO Int
Gets the time period between auto-repeat events.
repeatDelay :: Int -> Config (Slider w)
Sets the delay before auto-repeat starts (e.g. when mouse button is pressed).
getRepeatDelay :: Slider w -> IO Int
Gets the delay before auto-repeat starts.
Instances
HasSlider (Scale a)
HasSlider ScrollBar
bigIncrement :: (ScaleValue a) => a -> Config (Slider (Scale a))
getBigIncrement :: (ScaleValue a) => Slider (Scale a) -> IO a
Gets the coarse grain slider adjustment value.
showValue :: Toggle -> Config (Slider (Scale a))
Shows the sliders value when set.
getShowValue :: Slider (Scale a) -> IO Toggle
Gets the current showvalue setting.
Produced by Haddock version 0.3