ingraph

Safe HaskellSafe-Inferred

DataDict

Contents

Description

Data Dictionary module. The data dictionary allows widgets and controls to be collected in a single place.

Synopsis

Types

data Button

Available buttons

Constructors

OptButton 
ResetButton 

Instances

Eq Button 
Show Button 

data Text

Available texts

Instances

Eq Text 
Show Text 

data Control

Available controls

Constructors

GainSlider 

Instances

Eq Control 
Show Control 

data DictKey

A dictionary key

Instances

Eq DictKey 
Show DictKey 

data Dict a

An individual dictionary. Multiple dictionaries are collected into the data dictionary.

Constructors

Dict [(DictKey, a)] 

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

buttonDict :: Dict a
 
textDict :: Dict b
 
controlDict :: Dict c
 

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

getButton :: Button -> DataDict a b c -> a

Get a button from the data dictionary

getText :: Text -> DataDict a b c -> b

Get a text from the data dictionary

getControl :: Control -> DataDict a b c -> c

Get a control from the data dictionary