Safe Haskell | Safe-Inferred |
---|
DataDict
Contents
Description
Data Dictionary module. The data dictionary allows widgets and controls to be collected in a single place.
- data Button
- = OptButton
- | ResetButton
- data Text
- data Control = GainSlider
- data DictKey
- data Dict a = Dict [(DictKey, a)]
- data DataDict a b c = DataDict {
- buttonDict :: Dict a
- textDict :: Dict b
- controlDict :: Dict c
- emptyDict :: Dict a
- lookupEntry :: DictKey -> Dict a -> Maybe a
- getEntry :: DictKey -> Dict a -> a
- addEntry :: DictKey -> a -> Dict a -> Dict a
- getButton :: Button -> DataDict a b c -> a
- getText :: Text -> DataDict a b c -> b
- getControl :: Control -> DataDict a b c -> c
Types
data Text
Available texts
data DictKey
A dictionary key
data Dict a
An individual dictionary. Multiple dictionaries are collected into the data dictionary.
Instances
Show a => Show (Dict a) |
data DataDict a b c
The data dictionary itself is a collection of buttons, text, and GUI controls.
Constructors
DataDict | |
Fields
|
Functions
lookupEntry :: DictKey -> Dict a -> Maybe a
Look up an entry in an individual dictionary
getEntry :: DictKey -> Dict a -> a
Get an entry from an individual dictionary. If the entry doesn't exist, this will throw an exception.
addEntry :: DictKey -> a -> Dict a -> Dict a
Add an entry to an individual dictionary. If the entry already exists, nothing happens
Dictionary specific gets
getControl :: Control -> DataDict a b c -> c
Get a control from the data dictionary