Name

Adjustment —

An Adjustment object contains a value with maximum bounds and a step size. It is used to represent the value of a scoll bar and similar widgets.

Synopsis

adjustmentNew:: Double -> Double -> Double -> Double -> Double -> Double -> IO Adjustment
adjustmentClampPage:: Adjustment -> Double -> Double -> IO ()
adjustmentSetValue:: Adjustment -> Double -> IO ()
onAdjChanged:: Adjustment -> IO () -> IO (ConnectId Adjustment)
onValueChanged:: Adjustment -> IO () -> IO (ConnectId Adjustment)

Constructors

adjustmentNew

Create a new Adjustment object.

adjustmentNew:: Double:: Double:: Double:: Double:: Double:: Double:: IO Adjustment
pageSizevaluelowerupperstepIncrementpageIncrement

The creation function take every value that is contained in the object: value is the initial value and should be between the upper and lower bounds of the slider. Clicking on the arrows increases this value by stepIncrement. Clicking in the slider advances by pageIncrement. The pageSize is needed to determine if the end of the slider is still in the range.

Methods

adjustmentClampPage

Ensure that the alignment is within these bounds.

adjustmentClampPage:: Adjustment:: Double:: Double:: IO ()
alowerupper

Updates the Adjustment value to ensure that the range between lower and upper is in the current page (i.e. between value and value + page_size). If the range is larger than the page size, then only the start of it will be in the current page. A "changed" signal will be emitted if the value is changed.

adjustmentSetValue

Set the current value of the Adjustment object.

adjustmentSetValue:: Adjustment:: Double:: IO ()
avalue

Signals

onAdjChanged

This signal is emitted if some value of Adjustment except value itself changes.

onAdjChanged:: Adjustment:: IO ():: IO (ConnectId Adjustment)

onValueChanged

This signal is emitted if the value of the Alignment object changed.

onValueChanged:: Adjustment:: IO ():: IO (ConnectId Adjustment)