SpinButton —
A spin button provides the possiblity to enter a numeric value without using the keyboard.
spinButtonNew:: Adjustment -> Double -> Int -> IO SpinButton |
spinButtonConfigure:: SpinButtonClass sb => sb -> Adjustment -> Double -> Int -> IO () |
spinButtonGetAdjustment:: SpinButtonClass sb => sb -> IO Adjustment |
spinButtonGetValue:: SpinButtonClass sb => sb -> IO Double |
spinButtonGetValueAsInt:: SpinButtonClass sb => sb -> IO Int |
spinButtonNewWithRange:: Double -> Double -> Double -> IO SpinButton |
spinButtonSetAdjustment:: SpinButtonClass sb => sb -> Adjustment -> IO () |
spinButtonSetDigits:: SpinButtonClass sb => sb -> Int -> IO () |
spinButtonSetIncrements:: SpinButtonClass sb => sb -> Double -> Double -> IO () |
spinButtonSetNumeric:: SpinButtonClass sb => sb -> Bool -> IO () |
spinButtonSetRange:: SpinButtonClass sb => sb -> Double -> Double -> IO () |
spinButtonSetSnapToTicks:: SpinButtonClass sb => sb -> Bool -> IO () |
spinButtonSetUpdatePolicy:: SpinButtonClass sb => sb -> SpinButtonUpdatePolicy -> IO () |
spinButtonSetValue:: SpinButtonClass sb => sb -> Double -> IO () |
spinButtonSetWrap:: SpinButtonClass sb => sb -> Bool -> IO () |
spinButtonSpin:: SpinButtonClass sb => sb -> SpinType -> Double -> IO () |
spinButtonUpdate:: SpinButtonClass sb => sb -> IO () |
onInput:: SpinButtonClass sb => sb -> (IO (Maybe Double)) -> IO (ConnectId sb) |
onOutput:: SpinButtonClass sb => sb -> IO Bool -> IO (ConnectId sb) |
onValueSpinned:: SpinButtonClass sb => sb -> IO () -> IO (ConnectId sb) |
Change the settings of a SpinButton.
| spinButtonConfigure | :: sb | :: Adjustment | :: Double | :: Int | :: IO () |
| sb | adj | climbRate | digits |
Retrieve the Adjustment object that is currently controlling the SpinButton.
| spinButtonGetAdjustment | :: sb | :: IO Adjustment |
| sb |
Retrieve the current value as a floating point value.
| spinButtonGetValue | :: sb | :: IO Double |
| sb |
Retrieve the current value as integral value.
| spinButtonGetValueAsInt | :: sb | :: IO Int |
| sb |
Create a new SpinButton with a restricted range.
| spinButtonNewWithRange | :: Double | :: Double | :: Double | :: IO SpinButton |
| min | max | step |
This is a convenience function because the user does not have to create an Adjustment first. Page increments are set to 10 * step.
Attach a new Adjustment object to the SpinButton.
| spinButtonSetAdjustment | :: sb | :: Adjustment | :: IO () |
| sb | adj |
Sets the increment for up/down buttons.
| spinButtonSetIncrements | :: sb | :: Double | :: Double | :: IO () |
| sb | step | page |
Sets the flag that determines if non-numeric text can be typed into the spin button.
| spinButtonSetNumeric | :: sb | :: Bool | :: IO () |
| sb | numeric |
Set the maximal allowable range for the spinbutton.
| spinButtonSetRange | :: sb | :: Double | :: Double | :: IO () |
| sb | min | max |
Sets the policy as to whether values are corrected to the nearest step increment when a spin button is activated after providing an invalid value.
| spinButtonSetSnapToTicks | :: sb | :: Bool | :: IO () |
| sb | snapToTicks |
Whether the an out-of-range value set by spinButtonSetValue is clamped to the limits or simply ignored.
| spinButtonSetUpdatePolicy | :: sb | :: SpinButtonUpdatePolicy | :: IO () |
| sb | up |
Sets the flag that determines if a spin button value wraps around to the opposite limit when the upper or lower limit of the range is exceeded.
| spinButtonSetWrap | :: sb | :: Bool | :: IO () |
| sb | wrap |
Install a custom input handler.
| onInput | :: sb | :: (IO (Maybe Double)) | :: IO (ConnectId sb) |
| sb | user |
This signal is called upon each time the value of the SpinButton is set by spinButtonSetValue. The function can return Nothing if the value is no good.
Install a custom output handler.
| onOutput | :: sb | :: IO Bool | :: IO (ConnectId sb) |
This handler makes it possible to query the current value and to render something completely different to the screen using entrySetText. The return value must be False in order to let the default output routine run after this signal returns.