gtk-0.12.4: Binding to the Gtk+ graphical user interface library.

Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Safe HaskellNone

Graphics.UI.Gtk.Abstract.Scale

Contents

Description

Base class for HScale and VScale

Synopsis

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

Methods

scaleSetDigitsSource

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.

scaleGetDigitsSource

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.

scaleSetDrawValueSource

Arguments

:: ScaleClass self 
=> self 
-> Bool

drawValue - a boolean.

-> IO () 

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

scaleGetDrawValueSource

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 trough

Constructors

PosLeft 
PosRight 
PosTop 
PosBottom 

scaleSetValuePosSource

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.

scaleGetValuePosSource

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 IntSource

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

Allowed values: [-1,64]

Default value: 1

scaleDrawValue :: ScaleClass self => Attr self BoolSource

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

Default value: True

scaleValuePos :: ScaleClass self => Attr self PositionTypeSource

The position in which the current value is displayed.

Default value: PosTop