Go to the first, previous, next, last section, table of contents.
mkToggle :: ToggleResources -> Component (Toggle Bool, DisplayHandle)
-
create a new toggle instance/component, overriding the default behaviour
and looks with the attribute values given in the ToggleResources
list.
getToggle :: Toggle a -> IO a
-
returns the current value of the Toggle.
waitToggle :: Toggle a -> IO a
-
block until the Toggle next changes its state.
setToggle :: Toggle a -> a -> IO ()
-
set current value for the Toggle.
setToggleLabel :: Toggle a -> Bool -> Picture -> IO ()
-
change the `on' or `off' label for the Toggle.
getToggleGauge :: Toggle a -> Gauge a
-
a Toggle is an instance of the Gauge, an abstract,
stateful interaction device.
combineToggles :: [Toggle a] -> IO (Toggle [a])
-
join together a collection of Toggles into one, such that each time
a value changes for any of the component Toggles, the change will be
reflected in the combined Toggle.
enableToggle :: Toggle a -> IO ()
-
disableToggle :: Toggle a -> IO ()
-
enable or disable user interaction.
activateToggle :: Toggle a -> [ToggleName] -> Bool -> IO ()
-
isEnabledToggle :: Toggle a -> [ToggleName] -> IO Bool
-
setToggleName :: ToggleName -> Toggle a -> Toggle a
-
associate a new name ToggleName with a
Toggle.
getToggleName :: Toggle a -> ToggleName
-
return the name associated with the Toggle.
mapToggle :: (a->b) -> Toggle a -> Toggle b
-
mapIOToggle :: (a-> IO b) -> Toggle a -> Toggle b
-
return new Toggle that will remap all values reported on an existing
one.
replaceToggleLabel :: Toggle a -> [ToggleName] -> Picture -> IO ()
-
change the label for a Toggle, a generalisation of the
setToggleLabel operation. Allows you to configure/change the label
of a sub-component of a combined Toggle.
getToggleCH :: Toggle a -> ComponentHandle
-
return the `user interface' handle for a Toggle.
Go to the first, previous, next, last section, table of contents.