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.
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) |
Create a new Adjustment object.
| adjustmentNew | :: Double | :: Double | :: Double | :: Double | :: Double | :: Double | :: IO Adjustment |
| pageSize | value | lower | upper | stepIncrement | pageIncrement |
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.
Ensure that the alignment is within these bounds.
| adjustmentClampPage | :: Adjustment | :: Double | :: Double | :: IO () |
| a | lower | upper |
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.