 | SybWidget-0.5.0: Library which aids constructing generic (SYB3-based) widgets | Contents | Index |
|
| Graphics.UI.SybWidget.PriLabel |
|
|
| Description |
PriLabels are labels with a priority.
PriLabels are usefull when widgets can have their label set multiple
times. This happens with genericcally created widgets. For example in:
data Foo = Foo { someName :: Bar }
data Bar = Bar Int
widgets created from Bar instances can have labels set due it's
constructor name and the fieldName in Foo (someName). A GUI
application programmer may also set the widgets label.
When a widget has set it's label multiple times, the priority can be
used to decide which label should be chosen.
|
|
| Synopsis |
|
|
|
| Documentation |
|
| data PriLabel |
| Prioritized label. If two PriLabel can be used for some
component, then the one with highest priority is used.
| | Constructors | | PriLabel | | | priority :: Priority | | | labelString :: String | |
|
| Instances | |
|
|
| data Priority |
| The label priority.
| | Constructors | | BadConstr | | | GoodConstr | | | FieldName | | | UserDefined | |
| Instances | |
|
|
| badConstrLabel :: String -> PriLabel |
|
| goodConstrLabel :: String -> PriLabel |
|
| fieldNameLabel :: String -> PriLabel |
|
| userDefinedLabel :: String -> PriLabel |
|
| bestLabel :: PriLabel -> PriLabel -> PriLabel |
| Choose label with highest priority. If equal then choose the left
|(first parameter) label.
|
|
| humanizeLabel :: PriLabel -> PriLabel |
| Humanized label strings, by turning labels like someLabelName
into Some label name.
|
|
| defaultLabel :: String -> PriLabel |
| Creates a default (lowest priority) PriLabel
|
|
| labelless :: PriLabel |
|
| Produced by Haddock version 2.1.0 |